From 9132a8be863cf50716370c6c6a6d296b3210dd84 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Wed, 16 Aug 2023 15:38:53 +0200 Subject: [PATCH 01/19] upload: define new pulp uploader Define a basic client struct to pull in the pulp-client library. --- go.mod | 1 + go.sum | 2 + internal/upload/pulp/pulp.go | 43 + vendor/github.com/osbuild/pulp-client/LICENSE | 201 ++ .../osbuild/pulp-client/pulpclient/README.md | 1393 +++++++++ .../pulpclient/api_access_policies.go | 749 +++++ .../pulp-client/pulpclient/api_acs_file.go | 1456 ++++++++++ .../pulp-client/pulpclient/api_acs_rpm.go | 1450 ++++++++++ .../pulpclient/api_ansible_collections.go | 905 ++++++ .../pulpclient/api_ansible_copy.go | 134 + .../pulpclient/api_api_collections.go | 292 ++ .../pulp-client/pulpclient/api_api_roles.go | 185 ++ .../pulp-client/pulpclient/api_artifacts.go | 760 +++++ .../pulpclient/api_collection_import.go | 175 ++ .../pulp-client/pulpclient/api_content.go | 250 ++ .../pulpclient/api_content_advisories.go | 636 +++++ .../pulpclient/api_content_artifact.go | 530 ++++ .../pulpclient/api_content_blobs.go | 400 +++ .../api_content_collection_deprecations.go | 490 ++++ .../api_content_collection_marks.go | 520 ++++ .../api_content_collection_signatures.go | 568 ++++ .../api_content_collection_versions.go | 620 ++++ .../pulpclient/api_content_commits.go | 390 +++ .../pulpclient/api_content_configs.go | 380 +++ .../pulpclient/api_content_content.go | 380 +++ .../api_content_distribution_trees.go | 380 +++ .../pulpclient/api_content_files.go | 571 ++++ .../pulp-client/pulpclient/api_content_gem.go | 564 ++++ .../api_content_generic_contents.go | 578 ++++ .../api_content_installer_file_indices.go | 551 ++++ .../api_content_installer_packages.go | 724 +++++ .../pulpclient/api_content_manifests.go | 418 +++ .../api_content_modulemd_defaults.go | 539 ++++ .../api_content_modulemd_obsoletes.go | 490 ++++ .../pulpclient/api_content_modulemds.go | 599 ++++ .../pulpclient/api_content_namespaces.go | 638 +++++ .../pulpclient/api_content_objects.go | 390 +++ .../pulpclient/api_content_package_indices.go | 554 ++++ .../api_content_package_release_components.go | 522 ++++ .../api_content_packagecategories.go | 380 +++ .../api_content_packageenvironments.go | 380 +++ .../pulpclient/api_content_packagegroups.go | 380 +++ .../api_content_packagelangpacks.go | 380 +++ .../pulpclient/api_content_packages.go | 2507 ++++++++++++++++ .../pulpclient/api_content_refs.go | 439 +++ .../api_content_release_architectures.go | 545 ++++ .../api_content_release_components.go | 536 ++++ .../pulpclient/api_content_release_files.go | 551 ++++ .../pulpclient/api_content_releases.go | 550 ++++ .../api_content_repo_metadata_files.go | 380 +++ .../pulpclient/api_content_roles.go | 520 ++++ .../pulpclient/api_content_signatures.go | 480 ++++ .../pulpclient/api_content_summaries.go | 380 +++ .../pulpclient/api_content_tags.go | 428 +++ .../pulpclient/api_contentguards.go | 270 ++ .../api_contentguards_content_redirect.go | 1336 +++++++++ .../pulpclient/api_contentguards_rbac.go | 1348 +++++++++ .../pulpclient/api_contentguards_rhsm.go | 830 ++++++ .../pulpclient/api_contentguards_x509.go | 830 ++++++ .../pulp-client/pulpclient/api_deb_copy.go | 134 + .../pulpclient/api_distributions.go | 350 +++ .../pulpclient/api_distributions_ansible.go | 1427 +++++++++ .../pulpclient/api_distributions_apt.go | 929 ++++++ .../pulpclient/api_distributions_artifacts.go | 480 ++++ .../pulpclient/api_distributions_container.go | 1444 ++++++++++ .../pulpclient/api_distributions_file.go | 1437 ++++++++++ .../pulpclient/api_distributions_gem.go | 921 ++++++ .../pulpclient/api_distributions_maven.go | 921 ++++++ .../pulpclient/api_distributions_ostree.go | 921 ++++++ .../pulpclient/api_distributions_pypi.go | 931 ++++++ .../pulpclient/api_distributions_rpm.go | 1427 +++++++++ .../pulpclient/api_docs_api_json.go | 172 ++ .../pulpclient/api_docs_api_yaml.go | 172 ++ .../pulp-client/pulpclient/api_domains.go | 847 ++++++ .../pulpclient/api_exporters_filesystem.go | 841 ++++++ .../api_exporters_filesystem_exports.go | 530 ++++ .../pulpclient/api_exporters_pulp.go | 841 ++++++ .../pulpclient/api_exporters_pulp_exports.go | 530 ++++ .../pulpclient/api_galaxy_detail.go | 165 ++ .../pulp-client/pulpclient/api_groups.go | 1356 +++++++++ .../pulpclient/api_groups_roles.go | 626 ++++ .../pulpclient/api_groups_users.go | 391 +++ .../pulpclient/api_importers_pulp.go | 830 ++++++ .../api_importers_pulp_import_check.go | 140 + .../pulpclient/api_importers_pulp_imports.go | 530 ++++ .../pulp-client/pulpclient/api_orphans.go | 123 + .../pulpclient/api_orphans_cleanup.go | 134 + .../pulpclient/api_publications.go | 321 +++ .../pulpclient/api_publications_apt.go | 671 +++++ .../pulpclient/api_publications_file.go | 1168 ++++++++ .../pulpclient/api_publications_gem.go | 653 +++++ .../pulpclient/api_publications_pypi.go | 660 +++++ .../pulpclient/api_publications_rpm.go | 1159 ++++++++ .../pulpclient/api_publications_verbatim.go | 668 +++++ .../pulpclient/api_pulp_ansible_api.go | 154 + ...ulp_ansible_api_v2_collections_versions.go | 166 ++ .../pulpclient/api_pulp_ansible_api_v3.go | 168 ++ ...lp_ansible_api_v3_artifacts_collections.go | 158 + ..._ansible_api_v3_collection_versions_all.go | 168 ++ .../api_pulp_ansible_api_v3_collections.go | 634 ++++ ...api_pulp_ansible_api_v3_collections_all.go | 225 ++ ...ulp_ansible_api_v3_collections_versions.go | 584 ++++ ...e_api_v3_collections_versions_docs_blob.go | 180 ++ .../api_pulp_ansible_api_v3_namespaces.go | 484 ++++ ..._v3_plugin_ansible_client_configuration.go | 165 ++ ...i_v3_plugin_ansible_content_collections.go | 169 ++ ...ble_content_collections_all_collections.go | 226 ++ ...nsible_content_collections_all_versions.go | 169 ++ ...n_ansible_content_collections_artifacts.go | 162 ++ ...lugin_ansible_content_collections_index.go | 638 +++++ ...ible_content_collections_index_versions.go | 587 ++++ ...nt_collections_index_versions_docs_blob.go | 181 ++ ...pi_v3_plugin_ansible_content_namespaces.go | 991 +++++++ ...ugin_ansible_search_collection_versions.go | 527 ++++ ...i_pulp_ansible_artifacts_collections_v3.go | 712 +++++ .../api_pulp_ansible_default_api.go | 112 + .../api_pulp_ansible_default_api_v3.go | 126 + ...le_default_api_v3_artifacts_collections.go | 158 + ..._default_api_v3_collection_versions_all.go | 126 + ...pulp_ansible_default_api_v3_collections.go | 618 ++++ ..._ansible_default_api_v3_collections_all.go | 220 ++ ...ble_default_api_v3_collections_versions.go | 572 ++++ ...t_api_v3_collections_versions_docs_blob.go | 176 ++ ..._pulp_ansible_default_api_v3_namespaces.go | 476 ++++ ..._v3_plugin_ansible_client_configuration.go | 123 + ...i_v3_plugin_ansible_content_collections.go | 165 ++ ...ble_content_collections_all_collections.go | 222 ++ ...nsible_content_collections_all_versions.go | 165 ++ ...n_ansible_content_collections_artifacts.go | 158 + ...lugin_ansible_content_collections_index.go | 622 ++++ ...ible_content_collections_index_versions.go | 575 ++++ ...nt_collections_index_versions_docs_blob.go | 177 ++ ...pi_v3_plugin_ansible_content_namespaces.go | 971 +++++++ ...ugin_ansible_search_collection_versions.go | 518 ++++ .../pulpclient/api_pulp_ansible_tags.go | 180 ++ .../api_pulp_container_namespaces.go | 1119 ++++++++ .../pulp-client/pulpclient/api_pulp_maven.go | 254 ++ .../pulp-client/pulpclient/api_pypi.go | 165 ++ .../pulp-client/pulpclient/api_pypi_legacy.go | 185 ++ .../pulpclient/api_pypi_metadata.go | 171 ++ .../pulp-client/pulpclient/api_pypi_simple.go | 447 +++ .../pulp-client/pulpclient/api_remotes.go | 358 +++ .../pulp-client/pulpclient/api_remotes_apt.go | 921 ++++++ .../pulpclient/api_remotes_collection.go | 1458 ++++++++++ .../pulpclient/api_remotes_container.go | 1427 +++++++++ .../pulpclient/api_remotes_file.go | 1427 +++++++++ .../pulp-client/pulpclient/api_remotes_gem.go | 912 ++++++ .../pulp-client/pulpclient/api_remotes_git.go | 1424 +++++++++ .../pulpclient/api_remotes_maven.go | 912 ++++++ .../pulpclient/api_remotes_ostree.go | 912 ++++++ .../pulpclient/api_remotes_python.go | 1072 +++++++ .../pulpclient/api_remotes_role.go | 1418 +++++++++ .../pulp-client/pulpclient/api_remotes_rpm.go | 1418 +++++++++ .../pulp-client/pulpclient/api_remotes_uln.go | 1418 +++++++++ .../pulp-client/pulpclient/api_repair.go | 134 + .../pulpclient/api_repositories.go | 390 +++ .../pulpclient/api_repositories_ansible.go | 2379 ++++++++++++++++ .../api_repositories_ansible_versions.go | 816 ++++++ .../pulpclient/api_repositories_apt.go | 1198 ++++++++ .../api_repositories_apt_versions.go | 708 +++++ .../pulpclient/api_repositories_container.go | 2537 +++++++++++++++++ .../api_repositories_container_push.go | 1832 ++++++++++++ ...pi_repositories_container_push_versions.go | 712 +++++ .../api_repositories_container_versions.go | 702 +++++ .../pulpclient/api_repositories_file.go | 1701 +++++++++++ .../api_repositories_file_versions.go | 704 +++++ .../pulpclient/api_repositories_gem.go | 1189 ++++++++ .../api_repositories_gem_versions.go | 702 +++++ .../pulpclient/api_repositories_maven.go | 1075 +++++++ .../api_repositories_maven_versions.go | 702 +++++ .../pulpclient/api_repositories_ostree.go | 1417 +++++++++ .../api_repositories_ostree_versions.go | 702 +++++ .../pulpclient/api_repositories_python.go | 1195 ++++++++ .../api_repositories_python_versions.go | 702 +++++ .../api_repositories_reclaim_space.go | 134 + .../pulpclient/api_repositories_rpm.go | 1695 +++++++++++ .../api_repositories_rpm_versions.go | 702 +++++ .../pulpclient/api_repository_versions.go | 341 +++ .../pulp-client/pulpclient/api_roles.go | 908 ++++++ .../pulp-client/pulpclient/api_rpm_comps.go | 171 ++ .../pulp-client/pulpclient/api_rpm_copy.go | 134 + .../pulpclient/api_signing_services.go | 360 +++ .../pulp-client/pulpclient/api_status.go | 131 + .../pulp-client/pulpclient/api_task_groups.go | 354 +++ .../pulpclient/api_task_schedules.go | 896 ++++++ .../pulp-client/pulpclient/api_tasks.go | 1557 ++++++++++ .../pulp-client/pulpclient/api_token.go | 112 + .../pulp-client/pulpclient/api_uploads.go | 1364 +++++++++ .../pulpclient/api_upstream_pulps.go | 853 ++++++ .../pulp-client/pulpclient/api_users.go | 1000 +++++++ .../pulp-client/pulpclient/api_users_roles.go | 626 ++++ .../pulp-client/pulpclient/api_versions.go | 334 +++ .../pulp-client/pulpclient/api_workers.go | 513 ++++ .../osbuild/pulp-client/pulpclient/client.go | 1227 ++++++++ .../pulp-client/pulpclient/configuration.go | 222 ++ .../pulpclient/model_access_policy.go | 258 ++ .../model_access_policy_response.go | 410 +++ .../pulpclient/model_addon_response.go | 260 ++ .../model_ansible_ansible_distribution.go | 354 +++ ...l_ansible_ansible_distribution_response.go | 468 +++ ...odel_ansible_ansible_namespace_metadata.go | 373 +++ ...ble_ansible_namespace_metadata_response.go | 484 ++++ .../model_ansible_ansible_repository.go | 459 +++ ...del_ansible_ansible_repository_response.go | 645 +++++ .../pulpclient/model_ansible_collection.go | 173 ++ .../model_ansible_collection_remote.go | 1275 +++++++++ ...odel_ansible_collection_remote_response.go | 1176 ++++++++ .../model_ansible_collection_response.go | 173 ++ .../model_ansible_collection_version.go | 382 +++ .../model_ansible_collection_version_mark.go | 173 ++ ...nsible_collection_version_mark_response.go | 249 ++ ...del_ansible_collection_version_response.go | 1150 ++++++++ ...el_ansible_collection_version_signature.go | 212 ++ ...e_collection_version_signature_response.go | 306 ++ .../pulpclient/model_ansible_git_remote.go | 1082 +++++++ .../model_ansible_git_remote_response.go | 994 +++++++ .../model_ansible_repository_mark.go | 173 ++ .../model_ansible_repository_rebuild.go | 256 ++ .../model_ansible_repository_signature.go | 173 ++ .../model_ansible_repository_sync_url.go | 237 ++ .../pulpclient/model_ansible_role.go | 266 ++ .../pulpclient/model_ansible_role_remote.go | 1047 +++++++ .../model_ansible_role_remote_response.go | 959 +++++++ .../pulpclient/model_ansible_role_response.go | 304 ++ .../pulpclient/model_ansible_tag_response.go | 153 + .../model_apt_repository_sync_url.go | 237 ++ .../pulp-client/pulpclient/model_artifact.go | 471 +++ .../model_artifact_distribution_response.go | 414 +++ .../pulpclient/model_artifact_ref_response.go | 199 ++ .../pulpclient/model_artifact_response.go | 546 ++++ .../model_async_operation_response.go | 144 + .../model_certguard_rhsm_cert_guard.go | 221 ++ ...odel_certguard_rhsm_cert_guard_response.go | 297 ++ .../model_certguard_x509_cert_guard.go | 221 ++ ...odel_certguard_x509_cert_guard_response.go | 297 ++ .../pulpclient/model_checksum_response.go | 173 ++ .../model_client_configuration_response.go | 145 + ...model_collection_import_detail_response.go | 358 +++ .../model_collection_metadata_response.go | 476 ++++ .../model_collection_namespace_response.go | 173 ++ .../pulpclient/model_collection_one_shot.go | 297 ++ .../model_collection_ref_response.go | 209 ++ .../pulpclient/model_collection_response.go | 445 +++ .../model_collection_summary_response.go | 504 ++++ .../model_collection_version_copy_move.go | 211 ++ .../model_collection_version_docs_response.go | 143 + .../model_collection_version_list_response.go | 332 +++ .../model_collection_version_response.go | 735 +++++ .../model_collection_version_search_list.go | 286 ++ ...collection_version_search_list_response.go | 322 +++ ...l_collection_version_signature_response.go | 265 ++ .../pulp-client/pulpclient/model_comps_xml.go | 221 ++ .../model_container_blob_response.go | 249 ++ .../model_container_container_distribution.go | 472 +++ ...ntainer_container_distribution_response.go | 624 ++++ .../model_container_container_namespace.go | 143 + ..._container_container_namespace_response.go | 219 ++ ...del_container_container_push_repository.go | 325 +++ ...iner_container_push_repository_response.go | 475 +++ .../model_container_container_remote.go | 1192 ++++++++ ...del_container_container_remote_response.go | 1104 +++++++ .../model_container_container_repository.go | 373 +++ ...container_container_repository_response.go | 523 ++++ .../model_container_manifest_response.go | 403 +++ ...l_container_manifest_signature_response.go | 394 +++ .../model_container_repository_sync_url.go | 237 ++ .../model_container_tag_response.go | 249 ++ .../model_content_app_status_response.go | 192 ++ .../model_content_guard_response.go | 268 ++ .../model_content_redirect_content_guard.go | 192 ++ ...content_redirect_content_guard_response.go | 268 ++ .../model_content_settings_response.go | 173 ++ .../model_content_summary_response.go | 199 ++ .../pulp-client/pulpclient/model_copy.go | 144 + .../model_database_connection_response.go | 144 + .../pulpclient/model_deb_apt_distribution.go | 396 +++ .../model_deb_apt_distribution_response.go | 510 ++++ .../pulpclient/model_deb_apt_publication.go | 312 ++ .../model_deb_apt_publication_response.go | 388 +++ .../pulpclient/model_deb_apt_remote.go | 1372 +++++++++ .../model_deb_apt_remote_response.go | 1284 +++++++++ .../pulpclient/model_deb_apt_repository.go | 325 +++ .../model_deb_apt_repository_response.go | 475 +++ .../pulpclient/model_deb_generic_content.go | 297 ++ .../model_deb_generic_content_response.go | 486 ++++ .../model_deb_installer_file_index.go | 278 ++ ...model_deb_installer_file_index_response.go | 316 ++ .../pulpclient/model_deb_installer_package.go | 306 ++ .../model_deb_installer_package_response.go | 1568 ++++++++++ .../pulpclient/model_deb_package.go | 382 +++ .../pulpclient/model_deb_package_index.go | 296 ++ .../model_deb_package_index_response.go | 334 +++ .../model_deb_package_release_component.go | 211 ++ ..._deb_package_release_component_response.go | 249 ++ .../pulpclient/model_deb_package_response.go | 1644 +++++++++++ .../pulpclient/model_deb_release.go | 237 ++ .../model_deb_release_architecture.go | 267 ++ ...model_deb_release_architecture_response.go | 305 ++ .../pulpclient/model_deb_release_component.go | 267 ++ .../model_deb_release_component_response.go | 305 ++ .../pulpclient/model_deb_release_file.go | 325 +++ .../model_deb_release_file_response.go | 363 +++ .../pulpclient/model_deb_release_response.go | 275 ++ .../model_deb_verbatim_publication.go | 190 ++ ...model_deb_verbatim_publication_response.go | 266 ++ .../pulpclient/model_distribution_response.go | 462 +++ .../pulp-client/pulpclient/model_domain.go | 333 +++ .../pulpclient/model_domain_response.go | 409 +++ .../pulpclient/model_evaluation_response.go | 202 ++ .../model_exclude_platforms_enum.go | 116 + ...odel_file_file_alternate_content_source.go | 260 ++ ..._file_alternate_content_source_response.go | 335 +++ .../pulpclient/model_file_file_content.go | 297 ++ .../model_file_file_content_response.go | 486 ++++ .../model_file_file_distribution.go | 396 +++ .../model_file_file_distribution_response.go | 510 ++++ .../pulpclient/model_file_file_publication.go | 242 ++ .../model_file_file_publication_response.go | 356 +++ .../pulpclient/model_file_file_remote.go | 1047 +++++++ .../model_file_file_remote_response.go | 959 +++++++ .../pulpclient/model_file_file_repository.go | 419 +++ .../model_file_file_repository_response.go | 569 ++++ .../pulpclient/model_filesystem_export.go | 277 ++ .../model_filesystem_export_response.go | 315 ++ .../pulpclient/model_filesystem_exporter.go | 214 ++ .../model_filesystem_exporter_response.go | 290 ++ .../pulpclient/model_galaxy_collection.go | 228 ++ .../model_galaxy_collection_response.go | 380 +++ ...odel_galaxy_collection_version_response.go | 323 +++ .../pulpclient/model_galaxy_role_response.go | 209 ++ .../model_galaxy_role_version_response.go | 181 ++ .../pulpclient/model_gem_gem_content.go | 230 ++ .../model_gem_gem_content_response.go | 485 ++++ .../pulpclient/model_gem_gem_distribution.go | 444 +++ .../model_gem_gem_distribution_response.go | 558 ++++ .../pulpclient/model_gem_gem_publication.go | 190 ++ .../model_gem_gem_publication_response.go | 266 ++ .../pulpclient/model_gem_gem_remote.go | 1164 ++++++++ .../model_gem_gem_remote_response.go | 1076 +++++++ .../pulpclient/model_gem_gem_repository.go | 325 +++ .../model_gem_gem_repository_response.go | 475 +++ .../pulp-client/pulpclient/model_group.go | 144 + .../model_group_progress_report_response.go | 315 ++ .../pulpclient/model_group_response.go | 218 ++ .../pulpclient/model_group_role.go | 222 ++ .../pulpclient/model_group_role_response.go | 372 +++ .../pulpclient/model_group_user.go | 144 + .../pulpclient/model_group_user_response.go | 181 ++ .../pulpclient/model_image_response.go | 232 ++ .../pulpclient/model_import_response.go | 249 ++ .../pulpclient/model_manifest_copy.go | 267 ++ .../pulpclient/model_maven_maven_artifact.go | 211 ++ .../model_maven_maven_artifact_response.go | 372 +++ .../model_maven_maven_distribution.go | 396 +++ ...model_maven_maven_distribution_response.go | 510 ++++ .../pulpclient/model_maven_maven_remote.go | 1047 +++++++ .../model_maven_maven_remote_response.go | 959 +++++++ .../model_maven_maven_repository.go | 325 +++ .../model_maven_maven_repository_response.go | 475 +++ .../pulpclient/model_media_types_enum.go | 118 + .../model_metadata_checksum_type_enum.go | 122 + .../pulpclient/model_method_enum.go | 114 + .../pulpclient/model_minimal_task_response.go | 372 +++ ...odel_multiple_artifact_content_response.go | 220 ++ .../model_my_permissions_response.go | 143 + .../pulpclient/model_namespace_link.go | 171 ++ .../model_namespace_link_response.go | 171 ++ .../pulpclient/model_nested_role.go | 217 ++ .../pulpclient/model_nested_role_response.go | 217 ++ .../pulpclient/model_object_roles_response.go | 143 + .../pulpclient/model_oci_build_image.go | 272 ++ .../pulpclient/model_orphans_cleanup.go | 201 ++ .../pulpclient/model_ostree_import_all.go | 173 ++ .../model_ostree_import_commits_to_ref.go | 202 ++ .../model_ostree_ostree_commit_response.go | 352 +++ .../model_ostree_ostree_config_response.go | 249 ++ .../model_ostree_ostree_content_response.go | 276 ++ .../model_ostree_ostree_distribution.go | 396 +++ ...del_ostree_ostree_distribution_response.go | 510 ++++ .../model_ostree_ostree_object_response.go | 306 ++ .../model_ostree_ostree_ref_response.go | 342 +++ .../pulpclient/model_ostree_ostree_remote.go | 1167 ++++++++ .../model_ostree_ostree_remote_response.go | 1079 +++++++ .../model_ostree_ostree_repository.go | 366 +++ ...model_ostree_ostree_repository_response.go | 516 ++++ .../model_ostree_ostree_summary_response.go | 249 ++ .../model_package_checksum_type_enum.go | 122 + .../model_package_metadata_response.go | 230 ++ .../pulpclient/model_package_types_enum.go | 124 + .../pulpclient/model_package_upload.go | 216 ++ .../model_package_upload_task_response.go | 200 ++ ...l_paginated_access_policy_response_list.go | 283 ++ ...ted_artifact_distribution_response_list.go | 283 ++ .../model_paginated_artifact_response_list.go | 283 ++ ...odel_paginated_collection_response_list.go | 226 ++ ...aginated_collection_response_list_links.go | 303 ++ ...paginated_collection_response_list_meta.go | 152 + ...d_collection_version_list_response_list.go | 226 ++ ...ction_version_search_list_response_list.go | 226 ++ ...l_paginated_content_guard_response_list.go | 283 ++ ...nt_redirect_content_guard_response_list.go | 283 ++ ...el_paginated_distribution_response_list.go | 283 ++ .../model_paginated_domain_response_list.go | 283 ++ ...ginated_filesystem_export_response_list.go | 283 ++ ...nated_filesystem_exporter_response_list.go | 283 ++ ...ginated_galaxy_collection_response_list.go | 283 ++ ...galaxy_collection_version_response_list.go | 283 ++ ...del_paginated_galaxy_role_response_list.go | 283 ++ ...nated_galaxy_role_version_response_list.go | 283 ++ .../model_paginated_group_response_list.go | 283 ++ ...odel_paginated_group_role_response_list.go | 283 ++ ...odel_paginated_group_user_response_list.go | 283 ++ .../model_paginated_import_response_list.go | 283 ++ ...multiple_artifact_content_response_list.go | 283 ++ ...del_paginated_publication_response_list.go | 283 ++ ...del_paginated_pulp_export_response_list.go | 283 ++ ...l_paginated_pulp_exporter_response_list.go | 283 ++ ...l_paginated_pulp_importer_response_list.go | 283 ++ ...inated_rbac_content_guard_response_list.go | 283 ++ .../model_paginated_remote_response_list.go | 283 ++ ...odel_paginated_repository_response_list.go | 283 ++ ...inated_repository_version_response_list.go | 283 ++ .../model_paginated_role_response_list.go | 283 ++ ...paginated_signing_service_response_list.go | 283 ++ .../model_paginated_tag_response_list.go | 283 ++ ...odel_paginated_task_group_response_list.go | 283 ++ .../model_paginated_task_response_list.go | 283 ++ ...l_paginated_task_schedule_response_list.go | 283 ++ .../model_paginated_upload_response_list.go | 283 ++ ...l_paginated_upstream_pulp_response_list.go | 283 ++ .../model_paginated_user_response_list.go | 283 ++ ...model_paginated_user_role_response_list.go | 283 ++ .../model_paginated_worker_response_list.go | 283 ++ ...ible_ansible_distribution_response_list.go | 283 ++ ...nsible_namespace_metadata_response_list.go | 283 ++ ...nsible_ansible_repository_response_list.go | 283 ++ ...ansible_collection_remote_response_list.go | 283 ++ ...ginatedansible_collection_response_list.go | 283 ++ ...e_collection_version_mark_response_list.go | 283 ++ ...nsible_collection_version_response_list.go | 283 ++ ...lection_version_signature_response_list.go | 283 ++ ...ginatedansible_git_remote_response_list.go | 283 ++ ...inatedansible_role_remote_response_list.go | 283 ++ ...del_paginatedansible_role_response_list.go | 283 ++ ...certguard_rhsm_cert_guard_response_list.go | 283 ++ ...certguard_x509_cert_guard_response_list.go | 283 ++ ...l_paginatedcontainer_blob_response_list.go | 283 ++ ...er_container_distribution_response_list.go | 283 ++ ...ainer_container_namespace_response_list.go | 283 ++ ...container_push_repository_response_list.go | 283 ++ ...ontainer_container_remote_response_list.go | 283 ++ ...iner_container_repository_response_list.go | 283 ++ ...ginatedcontainer_manifest_response_list.go | 283 ++ ...tainer_manifest_signature_response_list.go | 283 ++ ...el_paginatedcontainer_tag_response_list.go | 283 ++ ...nateddeb_apt_distribution_response_list.go | 283 ++ ...inateddeb_apt_publication_response_list.go | 283 ++ ...l_paginateddeb_apt_remote_response_list.go | 283 ++ ...ginateddeb_apt_repository_response_list.go | 283 ++ ...inateddeb_generic_content_response_list.go | 283 ++ ...ddeb_installer_file_index_response_list.go | 283 ++ ...ateddeb_installer_package_response_list.go | 283 ++ ...aginateddeb_package_index_response_list.go | 283 ++ ...package_release_component_response_list.go | 283 ++ ...odel_paginateddeb_package_response_list.go | 283 ++ ...ddeb_release_architecture_response_list.go | 283 ++ ...ateddeb_release_component_response_list.go | 283 ++ ...paginateddeb_release_file_response_list.go | 283 ++ ...odel_paginateddeb_release_response_list.go | 283 ++ ...ddeb_verbatim_publication_response_list.go | 283 ++ ..._alternate_content_source_response_list.go | 283 ++ ...aginatedfile_file_content_response_list.go | 283 ++ ...tedfile_file_distribution_response_list.go | 283 ++ ...atedfile_file_publication_response_list.go | 283 ++ ...paginatedfile_file_remote_response_list.go | 283 ++ ...natedfile_file_repository_response_list.go | 283 ++ ..._paginatedgem_gem_content_response_list.go | 283 ++ ...natedgem_gem_distribution_response_list.go | 283 ++ ...inatedgem_gem_publication_response_list.go | 283 ++ ...l_paginatedgem_gem_remote_response_list.go | 283 ++ ...ginatedgem_gem_repository_response_list.go | 283 ++ ...natedmaven_maven_artifact_response_list.go | 283 ++ ...dmaven_maven_distribution_response_list.go | 283 ++ ...ginatedmaven_maven_remote_response_list.go | 283 ++ ...tedmaven_maven_repository_response_list.go | 283 ++ ...natedostree_ostree_commit_response_list.go | 283 ++ ...natedostree_ostree_config_response_list.go | 283 ++ ...atedostree_ostree_content_response_list.go | 283 ++ ...stree_ostree_distribution_response_list.go | 283 ++ ...natedostree_ostree_object_response_list.go | 283 ++ ...aginatedostree_ostree_ref_response_list.go | 283 ++ ...natedostree_ostree_remote_response_list.go | 283 ++ ...dostree_ostree_repository_response_list.go | 283 ++ ...atedostree_ostree_summary_response_list.go | 283 ++ ...ython_python_distribution_response_list.go | 283 ++ ...on_python_package_content_response_list.go | 283 ++ ...python_python_publication_response_list.go | 283 ++ ...natedpython_python_remote_response_list.go | 283 ++ ...dpython_python_repository_response_list.go | 283 ++ ...atedrpm_distribution_tree_response_list.go | 283 ++ ...atedrpm_modulemd_defaults_response_list.go | 283 ++ ...atedrpm_modulemd_obsolete_response_list.go | 283 ++ ...del_paginatedrpm_modulemd_response_list.go | 283 ++ ...natedrpm_package_category_response_list.go | 283 ++ ...edrpm_package_environment_response_list.go | 283 ++ ...aginatedrpm_package_group_response_list.go | 283 ++ ...atedrpm_package_langpacks_response_list.go | 283 ++ ...odel_paginatedrpm_package_response_list.go | 283 ++ ...tedrpm_repo_metadata_file_response_list.go | 283 ++ ..._alternate_content_source_response_list.go | 283 ++ ...natedrpm_rpm_distribution_response_list.go | 283 ++ ...inatedrpm_rpm_publication_response_list.go | 283 ++ ...l_paginatedrpm_rpm_remote_response_list.go | 283 ++ ...ginatedrpm_rpm_repository_response_list.go | 283 ++ ...l_paginatedrpm_uln_remote_response_list.go | 283 ++ ...aginatedrpm_update_record_response_list.go | 283 ++ .../pulpclient/model_patched_access_policy.go | 267 ++ .../pulpclient/model_patched_collection.go | 152 + ..._patched_content_redirect_content_guard.go | 201 ++ .../pulpclient/model_patched_domain.go | 360 +++ .../model_patched_filesystem_exporter.go | 232 ++ .../pulpclient/model_patched_group.go | 153 + .../pulpclient/model_patched_pulp_exporter.go | 276 ++ .../pulpclient/model_patched_pulp_importer.go | 191 ++ .../model_patched_rbac_content_guard.go | 201 ++ .../pulpclient/model_patched_role.go | 239 ++ .../pulpclient/model_patched_task_cancel.go | 153 + .../pulpclient/model_patched_upstream_pulp.go | 603 ++++ .../pulpclient/model_patched_user.go | 399 +++ ...del_patchedansible_ansible_distribution.go | 372 +++ ...tchedansible_ansible_namespace_metadata.go | 382 +++ ...model_patchedansible_ansible_repository.go | 468 +++ .../model_patchedansible_collection_remote.go | 1293 +++++++++ .../model_patchedansible_git_remote.go | 1100 +++++++ .../model_patchedansible_role_remote.go | 1065 +++++++ .../model_patchedcertguard_rhsm_cert_guard.go | 239 ++ .../model_patchedcertguard_x509_cert_guard.go | 239 ++ ...patchedcontainer_container_distribution.go | 490 ++++ ...chedcontainer_container_push_repository.go | 334 +++ ...model_patchedcontainer_container_remote.go | 1219 ++++++++ ...l_patchedcontainer_container_repository.go | 382 +++ .../model_patcheddeb_apt_distribution.go | 414 +++ .../pulpclient/model_patcheddeb_apt_remote.go | 1399 +++++++++ .../model_patcheddeb_apt_repository.go | 334 +++ ...tchedfile_file_alternate_content_source.go | 278 ++ .../model_patchedfile_file_distribution.go | 414 +++ .../model_patchedfile_file_remote.go | 1065 +++++++ .../model_patchedfile_file_repository.go | 428 +++ .../model_patchedgem_gem_distribution.go | 462 +++ .../pulpclient/model_patchedgem_gem_remote.go | 1182 ++++++++ .../model_patchedgem_gem_repository.go | 334 +++ .../model_patchedmaven_maven_distribution.go | 414 +++ .../model_patchedmaven_maven_remote.go | 1065 +++++++ .../model_patchedmaven_maven_repository.go | 334 +++ ...model_patchedostree_ostree_distribution.go | 414 +++ .../model_patchedostree_ostree_remote.go | 1185 ++++++++ .../model_patchedostree_ostree_repository.go | 375 +++ ...model_patchedpython_python_distribution.go | 504 ++++ .../model_patchedpython_python_remote.go | 1297 +++++++++ .../model_patchedpython_python_repository.go | 376 +++ ...patchedrpm_rpm_alternate_content_source.go | 278 ++ .../model_patchedrpm_rpm_distribution.go | 414 +++ .../pulpclient/model_patchedrpm_rpm_remote.go | 1113 ++++++++ .../model_patchedrpm_rpm_repository.go | 682 +++++ .../pulpclient/model_patchedrpm_uln_remote.go | 1093 +++++++ .../pulpclient/model_policy462_enum.go | 112 + .../pulpclient/model_policy762_enum.go | 114 + .../pulpclient/model_policy_db6_enum.go | 112 + .../model_progress_report_response.go | 353 +++ .../pulpclient/model_publication_response.go | 266 ++ .../pulpclient/model_pulp_export.go | 361 +++ .../pulpclient/model_pulp_export_response.go | 391 +++ .../pulpclient/model_pulp_exporter.go | 249 ++ .../model_pulp_exporter_response.go | 325 +++ .../pulpclient/model_pulp_import.go | 233 ++ .../pulpclient/model_pulp_import_check.go | 229 ++ .../model_pulp_import_check_response.go | 226 ++ .../pulpclient/model_pulp_importer.go | 182 ++ .../model_pulp_importer_response.go | 258 ++ .../pulp-client/pulpclient/model_purge.go | 192 ++ .../pulpclient/model_python_bander_remote.go | 215 ++ .../model_python_python_distribution.go | 486 ++++ ...del_python_python_distribution_response.go | 599 ++++ .../model_python_python_package_content.go | 1137 ++++++++ ..._python_python_package_content_response.go | 1259 ++++++++ .../model_python_python_publication.go | 190 ++ ...odel_python_python_publication_response.go | 304 ++ .../pulpclient/model_python_python_remote.go | 1279 +++++++++ .../model_python_python_remote_response.go | 1191 ++++++++ .../model_python_python_repository.go | 367 +++ ...model_python_python_repository_response.go | 517 ++++ .../pulpclient/model_rbac_content_guard.go | 192 ++ .../model_rbac_content_guard_response.go | 342 +++ .../pulpclient/model_reclaim_space.go | 182 ++ .../pulpclient/model_recursive_manage.go | 153 + .../model_redis_connection_response.go | 144 + .../pulpclient/model_remote_response.go | 959 +++++++ ...del_remote_response_hidden_fields_inner.go | 189 ++ .../pulpclient/model_remove_image.go | 144 + .../pulpclient/model_remove_signatures.go | 144 + .../model_remove_signatures_response.go | 144 + .../pulp-client/pulpclient/model_repair.go | 157 + .../model_repo_metadata_response.go | 144 + .../pulpclient/model_repository.go | 325 +++ .../model_repository_add_cached_content.go | 153 + .../model_repository_add_remove_content.go | 229 ++ .../pulpclient/model_repository_response.go | 475 +++ .../pulpclient/model_repository_sign.go | 239 ++ .../pulpclient/model_repository_sync_url.go | 195 ++ .../model_repository_version_response.go | 340 +++ ...sitory_version_response_content_summary.go | 199 ++ .../pulp-client/pulpclient/model_role.go | 221 ++ .../pulpclient/model_role_response.go | 335 +++ .../model_rpm_distribution_tree_response.go | 684 +++++ .../pulpclient/model_rpm_modulemd.go | 531 ++++ .../pulpclient/model_rpm_modulemd_defaults.go | 269 ++ .../model_rpm_modulemd_defaults_response.go | 278 ++ .../pulpclient/model_rpm_modulemd_obsolete.go | 453 +++ .../model_rpm_modulemd_obsolete_response.go | 462 +++ .../pulpclient/model_rpm_modulemd_response.go | 540 ++++ .../pulpclient/model_rpm_package.go | 306 ++ .../model_rpm_package_category_response.go | 437 +++ .../model_rpm_package_environment_response.go | 470 +++ .../model_rpm_package_group_response.go | 551 ++++ .../model_rpm_package_langpacks_response.go | 255 ++ .../pulpclient/model_rpm_package_response.go | 1825 ++++++++++++ .../model_rpm_repo_metadata_file_response.go | 573 ++++ .../model_rpm_repository_sync_url.go | 328 +++ .../model_rpm_rpm_alternate_content_source.go | 260 ++ ...m_rpm_alternate_content_source_response.go | 335 +++ .../pulpclient/model_rpm_rpm_distribution.go | 396 +++ .../model_rpm_rpm_distribution_response.go | 510 ++++ .../pulpclient/model_rpm_rpm_publication.go | 382 +++ .../model_rpm_rpm_publication_response.go | 458 +++ .../pulpclient/model_rpm_rpm_remote.go | 1095 +++++++ .../model_rpm_rpm_remote_response.go | 1007 +++++++ .../pulpclient/model_rpm_rpm_repository.go | 673 +++++ .../model_rpm_rpm_repository_response.go | 823 ++++++ .../pulpclient/model_rpm_uln_remote.go | 1057 +++++++ .../model_rpm_uln_remote_response.go | 1007 +++++++ .../pulpclient/model_rpm_update_collection.go | 210 ++ .../model_rpm_update_collection_response.go | 248 ++ .../pulpclient/model_rpm_update_record.go | 192 ++ .../model_rpm_update_record_response.go | 875 ++++++ .../model_signing_service_response.go | 307 ++ .../pulpclient/model_skip_types_enum.go | 112 + .../pulpclient/model_states_enum.go | 116 + .../pulpclient/model_status_response.go | 361 +++ .../pulpclient/model_storage_class_enum.go | 114 + .../pulpclient/model_storage_response.go | 202 ++ .../pulpclient/model_summary_response.go | 202 ++ .../pulpclient/model_sync_policy_enum.go | 114 + .../pulp-client/pulpclient/model_tag_copy.go | 229 ++ .../pulp-client/pulpclient/model_tag_image.go | 173 ++ .../pulpclient/model_tag_response.go | 152 + .../pulp-client/pulpclient/model_task.go | 173 ++ .../model_task_group_operation_response.go | 144 + .../pulpclient/model_task_group_response.go | 550 ++++ .../pulpclient/model_task_response.go | 704 +++++ .../model_task_schedule_response.go | 366 +++ .../pulpclient/model_un_tag_image.go | 144 + ...unpaginated_collection_version_response.go | 659 +++++ .../pulp-client/pulpclient/model_upload.go | 144 + .../pulpclient/model_upload_chunk.go | 193 ++ .../pulpclient/model_upload_chunk_response.go | 189 ++ .../pulpclient/model_upload_commit.go | 144 + .../model_upload_detail_response.go | 295 ++ .../pulpclient/model_upload_response.go | 258 ++ .../pulpclient/model_upstream_pulp.go | 576 ++++ .../model_upstream_pulp_response.go | 584 ++++ .../pulp-client/pulpclient/model_user.go | 390 +++ .../pulpclient/model_user_group.go | 144 + .../pulpclient/model_user_group_response.go | 181 ++ .../pulpclient/model_user_response.go | 530 ++++ .../pulp-client/pulpclient/model_user_role.go | 222 ++ .../pulpclient/model_user_role_response.go | 372 +++ .../pulpclient/model_variant_response.go | 415 +++ .../pulpclient/model_version_response.go | 231 ++ .../pulpclient/model_worker_response.go | 305 ++ .../pulp-client/pulpclient/response.go | 48 + .../osbuild/pulp-client/pulpclient/utils.go | 348 +++ vendor/modules.txt | 3 + 682 files changed, 308758 insertions(+) create mode 100644 internal/upload/pulp/pulp.go create mode 100644 vendor/github.com/osbuild/pulp-client/LICENSE create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/README.md create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_access_policies.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_acs_file.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_acs_rpm.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_ansible_collections.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_ansible_copy.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_api_collections.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_api_roles.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_artifacts.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_collection_import.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_advisories.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_artifact.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_blobs.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_deprecations.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_marks.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_signatures.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_commits.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_configs.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_content.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_distribution_trees.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_files.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_gem.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_generic_contents.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_installer_file_indices.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_installer_packages.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_manifests.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_modulemd_defaults.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_modulemd_obsoletes.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_modulemds.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_namespaces.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_objects.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_package_indices.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_package_release_components.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packagecategories.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packageenvironments.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packagegroups.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packagelangpacks.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packages.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_refs.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_release_architectures.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_release_components.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_release_files.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_releases.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_repo_metadata_files.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_roles.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_signatures.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_summaries.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_content_tags.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_content_redirect.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_rbac.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_rhsm.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_x509.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_deb_copy.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_ansible.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_apt.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_artifacts.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_container.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_file.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_gem.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_maven.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_ostree.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_pypi.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_rpm.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_docs_api_json.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_docs_api_yaml.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_domains.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_filesystem.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_filesystem_exports.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_pulp.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_pulp_exports.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_galaxy_detail.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_groups.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_groups_roles.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_groups_users.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_importers_pulp.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_importers_pulp_import_check.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_importers_pulp_imports.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_orphans.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_orphans_cleanup.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_publications.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_apt.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_file.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_gem.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_pypi.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_rpm.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_verbatim.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v2_collections_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_artifacts_collections.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collection_versions_all.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections_all.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections_versions_docs_blob.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_namespaces.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_client_configuration.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_all_collections.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_all_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_artifacts.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_index.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions_docs_blob.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_namespaces.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_search_collection_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_artifacts_collections_v3.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_artifacts_collections.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collection_versions_all.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections_all.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections_versions_docs_blob.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_namespaces.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_client_configuration.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_collections.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_artifacts.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_index.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions_docs_blob.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_namespaces.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_tags.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_container_namespaces.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_maven.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi_legacy.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi_metadata.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi_simple.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_apt.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_collection.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_container.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_file.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_gem.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_git.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_maven.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_ostree.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_python.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_role.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_rpm.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_uln.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repair.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ansible.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ansible_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_apt.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_apt_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container_push.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container_push_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_file.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_file_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_gem.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_gem_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_maven.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_maven_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ostree.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ostree_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_python.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_python_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_reclaim_space.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_rpm.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_rpm_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_repository_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_roles.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_rpm_comps.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_rpm_copy.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_signing_services.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_status.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_task_groups.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_task_schedules.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_tasks.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_token.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_uploads.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_upstream_pulps.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_users.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_users_roles.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_versions.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/api_workers.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/client.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/configuration.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_access_policy.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_access_policy_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_addon_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_distribution_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_namespace_metadata.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_namespace_metadata_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_repository_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_remote_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_mark.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_mark_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_signature.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_signature_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_git_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_git_remote_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_mark.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_rebuild.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_signature.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_sync_url.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role_remote_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_tag_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_apt_repository_sync_url.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact_distribution_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact_ref_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_async_operation_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_rhsm_cert_guard.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_rhsm_cert_guard_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_x509_cert_guard.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_x509_cert_guard_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_checksum_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_client_configuration_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_import_detail_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_metadata_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_namespace_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_one_shot.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_ref_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_summary_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_copy_move.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_docs_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_list_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_search_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_search_list_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_signature_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_comps_xml.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_blob_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_distribution_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_namespace.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_namespace_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_push_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_push_repository_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_remote_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_repository_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_manifest_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_manifest_signature_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_repository_sync_url.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_container_tag_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_content_app_status_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_content_guard_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_content_redirect_content_guard.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_content_redirect_content_guard_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_content_settings_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_content_summary_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_copy.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_database_connection_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_distribution_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_publication.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_publication_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_remote_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_repository_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_generic_content.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_generic_content_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_file_index.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_file_index_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_package.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_package_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_index.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_index_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_release_component.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_release_component_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_architecture.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_architecture_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_component.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_component_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_file.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_file_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_verbatim_publication.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_verbatim_publication_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_distribution_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_domain.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_domain_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_evaluation_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_exclude_platforms_enum.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_alternate_content_source.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_alternate_content_source_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_content.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_content_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_distribution_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_publication.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_publication_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_remote_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_repository_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_export.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_export_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_exporter.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_exporter_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_collection.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_collection_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_collection_version_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_role_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_role_version_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_content.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_content_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_distribution_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_publication.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_publication_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_remote_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_repository_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_group.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_group_progress_report_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_group_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_group_role.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_group_role_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_group_user.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_group_user_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_image_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_import_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_manifest_copy.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_artifact.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_artifact_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_distribution_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_remote_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_repository_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_media_types_enum.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_metadata_checksum_type_enum.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_method_enum.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_minimal_task_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_multiple_artifact_content_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_my_permissions_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_namespace_link.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_namespace_link_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_nested_role.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_nested_role_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_object_roles_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_oci_build_image.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_orphans_cleanup.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_import_all.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_import_commits_to_ref.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_commit_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_config_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_content_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_distribution_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_object_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_ref_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_remote_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_repository_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_summary_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_package_checksum_type_enum.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_package_metadata_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_package_types_enum.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_package_upload.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_package_upload_task_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_access_policy_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_artifact_distribution_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_artifact_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_response_list_links.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_response_list_meta.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_version_list_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_version_search_list_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_content_guard_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_content_redirect_content_guard_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_distribution_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_domain_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_filesystem_export_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_filesystem_exporter_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_collection_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_collection_version_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_role_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_role_version_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_group_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_group_role_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_group_user_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_import_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_multiple_artifact_content_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_publication_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_pulp_export_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_pulp_exporter_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_pulp_importer_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_rbac_content_guard_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_remote_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_repository_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_repository_version_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_role_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_signing_service_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_tag_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_task_group_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_task_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_task_schedule_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_upload_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_upstream_pulp_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_user_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_user_role_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_worker_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_ansible_distribution_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_ansible_namespace_metadata_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_ansible_repository_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_remote_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_version_mark_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_version_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_version_signature_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_git_remote_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_role_remote_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_role_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcertguard_rhsm_cert_guard_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcertguard_x509_cert_guard_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_blob_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_distribution_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_namespace_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_push_repository_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_remote_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_repository_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_manifest_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_manifest_signature_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_tag_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_distribution_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_publication_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_remote_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_repository_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_generic_content_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_installer_file_index_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_installer_package_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_package_index_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_package_release_component_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_package_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_architecture_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_component_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_file_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_verbatim_publication_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_alternate_content_source_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_content_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_distribution_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_publication_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_remote_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_repository_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_content_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_distribution_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_publication_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_remote_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_repository_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_artifact_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_distribution_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_remote_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_repository_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_commit_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_config_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_content_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_distribution_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_object_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_ref_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_remote_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_repository_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_summary_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_distribution_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_package_content_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_publication_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_remote_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_repository_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_distribution_tree_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_modulemd_defaults_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_modulemd_obsolete_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_modulemd_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_category_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_environment_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_group_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_langpacks_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_repo_metadata_file_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_alternate_content_source_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_distribution_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_publication_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_remote_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_repository_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_uln_remote_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_update_record_response_list.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_access_policy.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_collection.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_content_redirect_content_guard.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_domain.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_filesystem_exporter.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_group.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_pulp_exporter.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_pulp_importer.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_rbac_content_guard.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_role.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_task_cancel.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_upstream_pulp.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_user.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_ansible_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_ansible_namespace_metadata.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_ansible_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_collection_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_git_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_role_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcertguard_rhsm_cert_guard.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcertguard_x509_cert_guard.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_push_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patcheddeb_apt_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patcheddeb_apt_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patcheddeb_apt_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_alternate_content_source.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedgem_gem_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedgem_gem_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedgem_gem_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedmaven_maven_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedmaven_maven_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedmaven_maven_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedostree_ostree_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedostree_ostree_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedostree_ostree_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedpython_python_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedpython_python_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedpython_python_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_alternate_content_source.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_uln_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_policy462_enum.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_policy762_enum.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_policy_db6_enum.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_progress_report_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_publication_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_export.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_export_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_exporter.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_exporter_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_import.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_import_check.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_import_check_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_importer.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_importer_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_purge.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_python_bander_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_distribution_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_package_content.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_package_content_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_publication.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_publication_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_remote_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_repository_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rbac_content_guard.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rbac_content_guard_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_reclaim_space.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_recursive_manage.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_redis_connection_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_remote_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_remote_response_hidden_fields_inner.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_remove_image.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_remove_signatures.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_remove_signatures_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_repair.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_repo_metadata_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_add_cached_content.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_add_remove_content.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_sign.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_sync_url.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_version_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_version_response_content_summary.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_role.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_role_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_distribution_tree_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_defaults.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_defaults_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_obsolete.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_obsolete_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_category_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_environment_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_group_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_langpacks_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_repo_metadata_file_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_repository_sync_url.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_alternate_content_source.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_alternate_content_source_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_distribution.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_distribution_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_publication.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_publication_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_remote_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_repository.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_repository_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_uln_remote.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_uln_remote_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_collection.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_collection_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_record.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_record_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_signing_service_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_skip_types_enum.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_states_enum.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_status_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_storage_class_enum.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_storage_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_summary_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_sync_policy_enum.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_tag_copy.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_tag_image.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_tag_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_task.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_task_group_operation_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_task_group_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_task_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_task_schedule_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_un_tag_image.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_unpaginated_collection_version_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_upload.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_chunk.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_chunk_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_commit.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_detail_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_upstream_pulp.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_upstream_pulp_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_user.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_user_group.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_user_group_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_user_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_user_role.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_user_role_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_variant_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_version_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/model_worker_response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/response.go create mode 100644 vendor/github.com/osbuild/pulp-client/pulpclient/utils.go diff --git a/go.mod b/go.mod index 05267282aa..922e3f3dbd 100644 --- a/go.mod +++ b/go.mod @@ -32,6 +32,7 @@ require ( github.com/openshift-online/ocm-sdk-go v0.1.373 github.com/oracle/oci-go-sdk/v54 v54.0.0 github.com/osbuild/images v0.12.0 + github.com/osbuild/pulp-client v0.1.0 github.com/prometheus/client_golang v1.17.0 github.com/segmentio/ksuid v1.0.4 github.com/sirupsen/logrus v1.9.3 diff --git a/go.sum b/go.sum index d718b5f5a2..963ae18f0c 100644 --- a/go.sum +++ b/go.sum @@ -582,6 +582,8 @@ github.com/oracle/oci-go-sdk/v54 v54.0.0 h1:CDLjeSejv2aDpElAJrhKpi6zvT/zhZCZuXch github.com/oracle/oci-go-sdk/v54 v54.0.0/go.mod h1:+t+yvcFGVp+3ZnztnyxqXfQDsMlq8U25faBLa+mqCMc= github.com/osbuild/images v0.12.0 h1:NJoZBAThfUhJMbBmHdPmpcimnIK7r9/ItKUi1qDaPBo= github.com/osbuild/images v0.12.0/go.mod h1:shwiFpnqCqKFAVR+Polou8BwzzskOmqU7w3ItgSohxM= +github.com/osbuild/pulp-client v0.1.0 h1:L0C4ezBJGTamN3BKdv+rKLuq/WxXJbsFwz/Hj7aEmJ8= +github.com/osbuild/pulp-client v0.1.0/go.mod h1:rd/MLdfwwO2cQI1s056h8z32zAi3Bo90XhlAAryIvWc= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/internal/upload/pulp/pulp.go b/internal/upload/pulp/pulp.go new file mode 100644 index 0000000000..fe10085fdc --- /dev/null +++ b/internal/upload/pulp/pulp.go @@ -0,0 +1,43 @@ +package pulp + +import ( + "context" + "net/http" + + "github.com/osbuild/pulp-client/pulpclient" +) + +type Client struct { + client *pulpclient.APIClient + ctx context.Context +} + +type Credentials struct { + Username string + Password string +} + +func NewClient(url string, creds *Credentials) *Client { + ctx := context.WithValue(context.Background(), pulpclient.ContextServerIndex, 0) + transport := &http.Transport{} + httpClient := http.Client{Transport: transport} + + pulpConfig := pulpclient.NewConfiguration() + pulpConfig.HTTPClient = &httpClient + pulpConfig.Servers = pulpclient.ServerConfigurations{pulpclient.ServerConfiguration{ + URL: url, + }} + client := pulpclient.NewAPIClient(pulpConfig) + + if creds != nil { + ctx = context.WithValue(ctx, pulpclient.ContextBasicAuth, pulpclient.BasicAuth{ + UserName: creds.Username, + Password: creds.Password, + }) + } + + return &Client{ + client: client, + ctx: ctx, + } +} diff --git a/vendor/github.com/osbuild/pulp-client/LICENSE b/vendor/github.com/osbuild/pulp-client/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/README.md b/vendor/github.com/osbuild/pulp-client/pulpclient/README.md new file mode 100644 index 0000000000..4f5635c15f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/README.md @@ -0,0 +1,1393 @@ +# Go API client for pulpclient + +Fetch, Upload, Organize, and Distribute Software Packages + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: v3 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen +For more information, please visit [https://pulpproject.org](https://pulpproject.org) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import pulpclient "github.com/osbuild/pulp-client/pulpclient" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```golang +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. + +```golang +ctx := context.WithValue(context.Background(), pulpclient.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. + +```golang +ctx := context.WithValue(context.Background(), pulpclient.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. + +```golang +ctx := context.WithValue(context.Background(), pulpclient.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), pulpclient.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost:8080* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AccessPoliciesAPI* | [**AccessPoliciesList**](docs/AccessPoliciesAPI.md#accesspolicieslist) | **Get** /pulp/api/v3/access_policies/ | List access policys +*AccessPoliciesAPI* | [**AccessPoliciesPartialUpdate**](docs/AccessPoliciesAPI.md#accesspoliciespartialupdate) | **Patch** {access_policy_href} | Update an access policy +*AccessPoliciesAPI* | [**AccessPoliciesRead**](docs/AccessPoliciesAPI.md#accesspoliciesread) | **Get** {access_policy_href} | Inspect an access policy +*AccessPoliciesAPI* | [**AccessPoliciesReset**](docs/AccessPoliciesAPI.md#accesspoliciesreset) | **Post** {access_policy_href}reset/ | +*AccessPoliciesAPI* | [**AccessPoliciesUpdate**](docs/AccessPoliciesAPI.md#accesspoliciesupdate) | **Put** {access_policy_href} | Update an access policy +*AcsFileAPI* | [**AcsFileFileAddRole**](docs/AcsFileAPI.md#acsfilefileaddrole) | **Post** {file_file_alternate_content_source_href}add_role/ | +*AcsFileAPI* | [**AcsFileFileCreate**](docs/AcsFileAPI.md#acsfilefilecreate) | **Post** /pulp/api/v3/acs/file/file/ | Create a file alternate content source +*AcsFileAPI* | [**AcsFileFileDelete**](docs/AcsFileAPI.md#acsfilefiledelete) | **Delete** {file_file_alternate_content_source_href} | Delete a file alternate content source +*AcsFileAPI* | [**AcsFileFileList**](docs/AcsFileAPI.md#acsfilefilelist) | **Get** /pulp/api/v3/acs/file/file/ | List file alternate content sources +*AcsFileAPI* | [**AcsFileFileListRoles**](docs/AcsFileAPI.md#acsfilefilelistroles) | **Get** {file_file_alternate_content_source_href}list_roles/ | +*AcsFileAPI* | [**AcsFileFileMyPermissions**](docs/AcsFileAPI.md#acsfilefilemypermissions) | **Get** {file_file_alternate_content_source_href}my_permissions/ | +*AcsFileAPI* | [**AcsFileFilePartialUpdate**](docs/AcsFileAPI.md#acsfilefilepartialupdate) | **Patch** {file_file_alternate_content_source_href} | Update a file alternate content source +*AcsFileAPI* | [**AcsFileFileRead**](docs/AcsFileAPI.md#acsfilefileread) | **Get** {file_file_alternate_content_source_href} | Inspect a file alternate content source +*AcsFileAPI* | [**AcsFileFileRefresh**](docs/AcsFileAPI.md#acsfilefilerefresh) | **Post** {file_file_alternate_content_source_href}refresh/ | Refresh metadata +*AcsFileAPI* | [**AcsFileFileRemoveRole**](docs/AcsFileAPI.md#acsfilefileremoverole) | **Post** {file_file_alternate_content_source_href}remove_role/ | +*AcsFileAPI* | [**AcsFileFileUpdate**](docs/AcsFileAPI.md#acsfilefileupdate) | **Put** {file_file_alternate_content_source_href} | Update a file alternate content source +*AcsRpmAPI* | [**AcsRpmRpmAddRole**](docs/AcsRpmAPI.md#acsrpmrpmaddrole) | **Post** {rpm_rpm_alternate_content_source_href}add_role/ | +*AcsRpmAPI* | [**AcsRpmRpmCreate**](docs/AcsRpmAPI.md#acsrpmrpmcreate) | **Post** /pulp/api/v3/acs/rpm/rpm/ | Create a rpm alternate content source +*AcsRpmAPI* | [**AcsRpmRpmDelete**](docs/AcsRpmAPI.md#acsrpmrpmdelete) | **Delete** {rpm_rpm_alternate_content_source_href} | Delete a rpm alternate content source +*AcsRpmAPI* | [**AcsRpmRpmList**](docs/AcsRpmAPI.md#acsrpmrpmlist) | **Get** /pulp/api/v3/acs/rpm/rpm/ | List rpm alternate content sources +*AcsRpmAPI* | [**AcsRpmRpmListRoles**](docs/AcsRpmAPI.md#acsrpmrpmlistroles) | **Get** {rpm_rpm_alternate_content_source_href}list_roles/ | +*AcsRpmAPI* | [**AcsRpmRpmMyPermissions**](docs/AcsRpmAPI.md#acsrpmrpmmypermissions) | **Get** {rpm_rpm_alternate_content_source_href}my_permissions/ | +*AcsRpmAPI* | [**AcsRpmRpmPartialUpdate**](docs/AcsRpmAPI.md#acsrpmrpmpartialupdate) | **Patch** {rpm_rpm_alternate_content_source_href} | Update a rpm alternate content source +*AcsRpmAPI* | [**AcsRpmRpmRead**](docs/AcsRpmAPI.md#acsrpmrpmread) | **Get** {rpm_rpm_alternate_content_source_href} | Inspect a rpm alternate content source +*AcsRpmAPI* | [**AcsRpmRpmRefresh**](docs/AcsRpmAPI.md#acsrpmrpmrefresh) | **Post** {rpm_rpm_alternate_content_source_href}refresh/ | +*AcsRpmAPI* | [**AcsRpmRpmRemoveRole**](docs/AcsRpmAPI.md#acsrpmrpmremoverole) | **Post** {rpm_rpm_alternate_content_source_href}remove_role/ | +*AcsRpmAPI* | [**AcsRpmRpmUpdate**](docs/AcsRpmAPI.md#acsrpmrpmupdate) | **Put** {rpm_rpm_alternate_content_source_href} | Update a rpm alternate content source +*AnsibleCollectionsAPI* | [**AnsibleCollectionsAddRole**](docs/AnsibleCollectionsAPI.md#ansiblecollectionsaddrole) | **Post** {ansible_collection_href}add_role/ | +*AnsibleCollectionsAPI* | [**AnsibleCollectionsList**](docs/AnsibleCollectionsAPI.md#ansiblecollectionslist) | **Get** /pulp/api/v3/ansible/collections/ | List collections +*AnsibleCollectionsAPI* | [**AnsibleCollectionsListRoles**](docs/AnsibleCollectionsAPI.md#ansiblecollectionslistroles) | **Get** {ansible_collection_href}list_roles/ | +*AnsibleCollectionsAPI* | [**AnsibleCollectionsMyPermissions**](docs/AnsibleCollectionsAPI.md#ansiblecollectionsmypermissions) | **Get** {ansible_collection_href}my_permissions/ | +*AnsibleCollectionsAPI* | [**AnsibleCollectionsRemoveRole**](docs/AnsibleCollectionsAPI.md#ansiblecollectionsremoverole) | **Post** {ansible_collection_href}remove_role/ | +*AnsibleCollectionsAPI* | [**UploadCollection**](docs/AnsibleCollectionsAPI.md#uploadcollection) | **Post** /ansible/collections/ | Upload a collection +*AnsibleCopyAPI* | [**CopyContent**](docs/AnsibleCopyAPI.md#copycontent) | **Post** /pulp/api/v3/ansible/copy/ | Copy content +*ApiCollectionsAPI* | [**ApiV2CollectionsGet**](docs/ApiCollectionsAPI.md#apiv2collectionsget) | **Get** {ansible_collection_href}api/v2/collections/ | +*ApiCollectionsAPI* | [**ApiV2CollectionsPost**](docs/ApiCollectionsAPI.md#apiv2collectionspost) | **Post** {ansible_collection_href}api/v2/collections/ | +*ApiRolesAPI* | [**ApiV1RolesGet**](docs/ApiRolesAPI.md#apiv1rolesget) | **Get** {ansible_role_href}api/v1/roles/ | +*ArtifactsAPI* | [**ArtifactsCreate**](docs/ArtifactsAPI.md#artifactscreate) | **Post** /pulp/api/v3/artifacts/ | Create an artifact +*ArtifactsAPI* | [**ArtifactsDelete**](docs/ArtifactsAPI.md#artifactsdelete) | **Delete** {artifact_href} | Delete an artifact +*ArtifactsAPI* | [**ArtifactsList**](docs/ArtifactsAPI.md#artifactslist) | **Get** /pulp/api/v3/artifacts/ | List artifacts +*ArtifactsAPI* | [**ArtifactsRead**](docs/ArtifactsAPI.md#artifactsread) | **Get** {artifact_href} | Inspect an artifact +*CollectionImportAPI* | [**CollectionImportRead**](docs/CollectionImportAPI.md#collectionimportread) | **Get** {ansible_collection_import_href} | Inspect a collection import +*ContentAPI* | [**ContentList**](docs/ContentAPI.md#contentlist) | **Get** /pulp/api/v3/content/ | List content +*ContentAdvisoriesAPI* | [**ContentRpmAdvisoriesCreate**](docs/ContentAdvisoriesAPI.md#contentrpmadvisoriescreate) | **Post** /pulp/api/v3/content/rpm/advisories/ | Create an update record +*ContentAdvisoriesAPI* | [**ContentRpmAdvisoriesList**](docs/ContentAdvisoriesAPI.md#contentrpmadvisorieslist) | **Get** /pulp/api/v3/content/rpm/advisories/ | List update records +*ContentAdvisoriesAPI* | [**ContentRpmAdvisoriesRead**](docs/ContentAdvisoriesAPI.md#contentrpmadvisoriesread) | **Get** {rpm_update_record_href} | Inspect an update record +*ContentArtifactAPI* | [**ContentMavenArtifactCreate**](docs/ContentArtifactAPI.md#contentmavenartifactcreate) | **Post** /pulp/api/v3/content/maven/artifact/ | Create a maven artifact +*ContentArtifactAPI* | [**ContentMavenArtifactList**](docs/ContentArtifactAPI.md#contentmavenartifactlist) | **Get** /pulp/api/v3/content/maven/artifact/ | List maven artifacts +*ContentArtifactAPI* | [**ContentMavenArtifactRead**](docs/ContentArtifactAPI.md#contentmavenartifactread) | **Get** {maven_maven_artifact_href} | Inspect a maven artifact +*ContentBlobsAPI* | [**ContentContainerBlobsList**](docs/ContentBlobsAPI.md#contentcontainerblobslist) | **Get** /pulp/api/v3/content/container/blobs/ | List blobs +*ContentBlobsAPI* | [**ContentContainerBlobsRead**](docs/ContentBlobsAPI.md#contentcontainerblobsread) | **Get** {container_blob_href} | Inspect a blob +*ContentCollectionDeprecationsAPI* | [**ContentAnsibleCollectionDeprecationsCreate**](docs/ContentCollectionDeprecationsAPI.md#contentansiblecollectiondeprecationscreate) | **Post** /pulp/api/v3/content/ansible/collection_deprecations/ | Create an ansible collection deprecated +*ContentCollectionDeprecationsAPI* | [**ContentAnsibleCollectionDeprecationsList**](docs/ContentCollectionDeprecationsAPI.md#contentansiblecollectiondeprecationslist) | **Get** /pulp/api/v3/content/ansible/collection_deprecations/ | List ansible collection deprecateds +*ContentCollectionDeprecationsAPI* | [**ContentAnsibleCollectionDeprecationsRead**](docs/ContentCollectionDeprecationsAPI.md#contentansiblecollectiondeprecationsread) | **Get** {ansible_ansible_collection_deprecated_href} | Inspect an ansible collection deprecated +*ContentCollectionMarksAPI* | [**ContentAnsibleCollectionMarksCreate**](docs/ContentCollectionMarksAPI.md#contentansiblecollectionmarkscreate) | **Post** /pulp/api/v3/content/ansible/collection_marks/ | Create a collection version mark +*ContentCollectionMarksAPI* | [**ContentAnsibleCollectionMarksList**](docs/ContentCollectionMarksAPI.md#contentansiblecollectionmarkslist) | **Get** /pulp/api/v3/content/ansible/collection_marks/ | List collection version marks +*ContentCollectionMarksAPI* | [**ContentAnsibleCollectionMarksRead**](docs/ContentCollectionMarksAPI.md#contentansiblecollectionmarksread) | **Get** {ansible_collection_version_mark_href} | Inspect a collection version mark +*ContentCollectionSignaturesAPI* | [**ContentAnsibleCollectionSignaturesCreate**](docs/ContentCollectionSignaturesAPI.md#contentansiblecollectionsignaturescreate) | **Post** /pulp/api/v3/content/ansible/collection_signatures/ | Create a collection version signature +*ContentCollectionSignaturesAPI* | [**ContentAnsibleCollectionSignaturesList**](docs/ContentCollectionSignaturesAPI.md#contentansiblecollectionsignatureslist) | **Get** /pulp/api/v3/content/ansible/collection_signatures/ | List collection version signatures +*ContentCollectionSignaturesAPI* | [**ContentAnsibleCollectionSignaturesRead**](docs/ContentCollectionSignaturesAPI.md#contentansiblecollectionsignaturesread) | **Get** {ansible_collection_version_signature_href} | Inspect a collection version signature +*ContentCollectionVersionsAPI* | [**ContentAnsibleCollectionVersionsCreate**](docs/ContentCollectionVersionsAPI.md#contentansiblecollectionversionscreate) | **Post** /pulp/api/v3/content/ansible/collection_versions/ | Create a collection version +*ContentCollectionVersionsAPI* | [**ContentAnsibleCollectionVersionsList**](docs/ContentCollectionVersionsAPI.md#contentansiblecollectionversionslist) | **Get** /pulp/api/v3/content/ansible/collection_versions/ | List collection versions +*ContentCollectionVersionsAPI* | [**ContentAnsibleCollectionVersionsRead**](docs/ContentCollectionVersionsAPI.md#contentansiblecollectionversionsread) | **Get** {ansible_collection_version_href} | Inspect a collection version +*ContentCommitsAPI* | [**ContentOstreeCommitsList**](docs/ContentCommitsAPI.md#contentostreecommitslist) | **Get** /pulp/api/v3/content/ostree/commits/ | List ostree commits +*ContentCommitsAPI* | [**ContentOstreeCommitsRead**](docs/ContentCommitsAPI.md#contentostreecommitsread) | **Get** {ostree_ostree_commit_href} | Inspect an ostree commit +*ContentConfigsAPI* | [**ContentOstreeConfigsList**](docs/ContentConfigsAPI.md#contentostreeconfigslist) | **Get** /pulp/api/v3/content/ostree/configs/ | List ostree configs +*ContentConfigsAPI* | [**ContentOstreeConfigsRead**](docs/ContentConfigsAPI.md#contentostreeconfigsread) | **Get** {ostree_ostree_config_href} | Inspect an ostree config +*ContentContentAPI* | [**ContentOstreeContentList**](docs/ContentContentAPI.md#contentostreecontentlist) | **Get** /pulp/api/v3/content/ostree/content/ | List ostree contents +*ContentContentAPI* | [**ContentOstreeContentRead**](docs/ContentContentAPI.md#contentostreecontentread) | **Get** {ostree_ostree_content_href} | Inspect an ostree content +*ContentDistributionTreesAPI* | [**ContentRpmDistributionTreesList**](docs/ContentDistributionTreesAPI.md#contentrpmdistributiontreeslist) | **Get** /pulp/api/v3/content/rpm/distribution_trees/ | List distribution trees +*ContentDistributionTreesAPI* | [**ContentRpmDistributionTreesRead**](docs/ContentDistributionTreesAPI.md#contentrpmdistributiontreesread) | **Get** {rpm_distribution_tree_href} | Inspect a distribution tree +*ContentFilesAPI* | [**ContentFileFilesCreate**](docs/ContentFilesAPI.md#contentfilefilescreate) | **Post** /pulp/api/v3/content/file/files/ | Create a file content +*ContentFilesAPI* | [**ContentFileFilesList**](docs/ContentFilesAPI.md#contentfilefileslist) | **Get** /pulp/api/v3/content/file/files/ | List file contents +*ContentFilesAPI* | [**ContentFileFilesRead**](docs/ContentFilesAPI.md#contentfilefilesread) | **Get** {file_file_content_href} | Inspect a file content +*ContentGemAPI* | [**ContentGemGemCreate**](docs/ContentGemAPI.md#contentgemgemcreate) | **Post** /pulp/api/v3/content/gem/gem/ | Create a gem content +*ContentGemAPI* | [**ContentGemGemList**](docs/ContentGemAPI.md#contentgemgemlist) | **Get** /pulp/api/v3/content/gem/gem/ | List gem contents +*ContentGemAPI* | [**ContentGemGemRead**](docs/ContentGemAPI.md#contentgemgemread) | **Get** {gem_gem_content_href} | Inspect a gem content +*ContentGenericContentsAPI* | [**ContentDebGenericContentsCreate**](docs/ContentGenericContentsAPI.md#contentdebgenericcontentscreate) | **Post** /pulp/api/v3/content/deb/generic_contents/ | Create a generic content +*ContentGenericContentsAPI* | [**ContentDebGenericContentsList**](docs/ContentGenericContentsAPI.md#contentdebgenericcontentslist) | **Get** /pulp/api/v3/content/deb/generic_contents/ | List generic contents +*ContentGenericContentsAPI* | [**ContentDebGenericContentsRead**](docs/ContentGenericContentsAPI.md#contentdebgenericcontentsread) | **Get** {deb_generic_content_href} | Inspect a generic content +*ContentInstallerFileIndicesAPI* | [**ContentDebInstallerFileIndicesCreate**](docs/ContentInstallerFileIndicesAPI.md#contentdebinstallerfileindicescreate) | **Post** /pulp/api/v3/content/deb/installer_file_indices/ | Create an installer file index +*ContentInstallerFileIndicesAPI* | [**ContentDebInstallerFileIndicesList**](docs/ContentInstallerFileIndicesAPI.md#contentdebinstallerfileindiceslist) | **Get** /pulp/api/v3/content/deb/installer_file_indices/ | List InstallerFileIndices +*ContentInstallerFileIndicesAPI* | [**ContentDebInstallerFileIndicesRead**](docs/ContentInstallerFileIndicesAPI.md#contentdebinstallerfileindicesread) | **Get** {deb_installer_file_index_href} | Inspect an installer file index +*ContentInstallerPackagesAPI* | [**ContentDebInstallerPackagesCreate**](docs/ContentInstallerPackagesAPI.md#contentdebinstallerpackagescreate) | **Post** /pulp/api/v3/content/deb/installer_packages/ | Create an installer package +*ContentInstallerPackagesAPI* | [**ContentDebInstallerPackagesList**](docs/ContentInstallerPackagesAPI.md#contentdebinstallerpackageslist) | **Get** /pulp/api/v3/content/deb/installer_packages/ | List installer packages +*ContentInstallerPackagesAPI* | [**ContentDebInstallerPackagesRead**](docs/ContentInstallerPackagesAPI.md#contentdebinstallerpackagesread) | **Get** {deb_installer_package_href} | Inspect an installer package +*ContentManifestsAPI* | [**ContentContainerManifestsList**](docs/ContentManifestsAPI.md#contentcontainermanifestslist) | **Get** /pulp/api/v3/content/container/manifests/ | List manifests +*ContentManifestsAPI* | [**ContentContainerManifestsRead**](docs/ContentManifestsAPI.md#contentcontainermanifestsread) | **Get** {container_manifest_href} | Inspect a manifest +*ContentModulemdDefaultsAPI* | [**ContentRpmModulemdDefaultsCreate**](docs/ContentModulemdDefaultsAPI.md#contentrpmmodulemddefaultscreate) | **Post** /pulp/api/v3/content/rpm/modulemd_defaults/ | Create a modulemd defaults +*ContentModulemdDefaultsAPI* | [**ContentRpmModulemdDefaultsList**](docs/ContentModulemdDefaultsAPI.md#contentrpmmodulemddefaultslist) | **Get** /pulp/api/v3/content/rpm/modulemd_defaults/ | List modulemd defaultss +*ContentModulemdDefaultsAPI* | [**ContentRpmModulemdDefaultsRead**](docs/ContentModulemdDefaultsAPI.md#contentrpmmodulemddefaultsread) | **Get** {rpm_modulemd_defaults_href} | Inspect a modulemd defaults +*ContentModulemdObsoletesAPI* | [**ContentRpmModulemdObsoletesCreate**](docs/ContentModulemdObsoletesAPI.md#contentrpmmodulemdobsoletescreate) | **Post** /pulp/api/v3/content/rpm/modulemd_obsoletes/ | Create a modulemd obsolete +*ContentModulemdObsoletesAPI* | [**ContentRpmModulemdObsoletesList**](docs/ContentModulemdObsoletesAPI.md#contentrpmmodulemdobsoleteslist) | **Get** /pulp/api/v3/content/rpm/modulemd_obsoletes/ | List modulemd obsoletes +*ContentModulemdObsoletesAPI* | [**ContentRpmModulemdObsoletesRead**](docs/ContentModulemdObsoletesAPI.md#contentrpmmodulemdobsoletesread) | **Get** {rpm_modulemd_obsolete_href} | Inspect a modulemd obsolete +*ContentModulemdsAPI* | [**ContentRpmModulemdsCreate**](docs/ContentModulemdsAPI.md#contentrpmmodulemdscreate) | **Post** /pulp/api/v3/content/rpm/modulemds/ | Create a modulemd +*ContentModulemdsAPI* | [**ContentRpmModulemdsList**](docs/ContentModulemdsAPI.md#contentrpmmodulemdslist) | **Get** /pulp/api/v3/content/rpm/modulemds/ | List modulemds +*ContentModulemdsAPI* | [**ContentRpmModulemdsRead**](docs/ContentModulemdsAPI.md#contentrpmmodulemdsread) | **Get** {rpm_modulemd_href} | Inspect a modulemd +*ContentNamespacesAPI* | [**ContentAnsibleNamespacesAvatar**](docs/ContentNamespacesAPI.md#contentansiblenamespacesavatar) | **Get** {ansible_ansible_namespace_metadata_href}avatar/ | +*ContentNamespacesAPI* | [**ContentAnsibleNamespacesList**](docs/ContentNamespacesAPI.md#contentansiblenamespaceslist) | **Get** /pulp/api/v3/content/ansible/namespaces/ | List ansible namespace metadatas +*ContentNamespacesAPI* | [**ContentAnsibleNamespacesRead**](docs/ContentNamespacesAPI.md#contentansiblenamespacesread) | **Get** {ansible_ansible_namespace_metadata_href} | Inspect an ansible namespace metadata +*ContentObjectsAPI* | [**ContentOstreeObjectsList**](docs/ContentObjectsAPI.md#contentostreeobjectslist) | **Get** /pulp/api/v3/content/ostree/objects/ | List ostree objects +*ContentObjectsAPI* | [**ContentOstreeObjectsRead**](docs/ContentObjectsAPI.md#contentostreeobjectsread) | **Get** {ostree_ostree_object_href} | Inspect an ostree object +*ContentPackageIndicesAPI* | [**ContentDebPackageIndicesCreate**](docs/ContentPackageIndicesAPI.md#contentdebpackageindicescreate) | **Post** /pulp/api/v3/content/deb/package_indices/ | Create a package index +*ContentPackageIndicesAPI* | [**ContentDebPackageIndicesList**](docs/ContentPackageIndicesAPI.md#contentdebpackageindiceslist) | **Get** /pulp/api/v3/content/deb/package_indices/ | List PackageIndices +*ContentPackageIndicesAPI* | [**ContentDebPackageIndicesRead**](docs/ContentPackageIndicesAPI.md#contentdebpackageindicesread) | **Get** {deb_package_index_href} | Inspect a package index +*ContentPackageReleaseComponentsAPI* | [**ContentDebPackageReleaseComponentsCreate**](docs/ContentPackageReleaseComponentsAPI.md#contentdebpackagereleasecomponentscreate) | **Post** /pulp/api/v3/content/deb/package_release_components/ | Create a package release component +*ContentPackageReleaseComponentsAPI* | [**ContentDebPackageReleaseComponentsList**](docs/ContentPackageReleaseComponentsAPI.md#contentdebpackagereleasecomponentslist) | **Get** /pulp/api/v3/content/deb/package_release_components/ | List package release components +*ContentPackageReleaseComponentsAPI* | [**ContentDebPackageReleaseComponentsRead**](docs/ContentPackageReleaseComponentsAPI.md#contentdebpackagereleasecomponentsread) | **Get** {deb_package_release_component_href} | Inspect a package release component +*ContentPackagecategoriesAPI* | [**ContentRpmPackagecategoriesList**](docs/ContentPackagecategoriesAPI.md#contentrpmpackagecategorieslist) | **Get** /pulp/api/v3/content/rpm/packagecategories/ | List package categorys +*ContentPackagecategoriesAPI* | [**ContentRpmPackagecategoriesRead**](docs/ContentPackagecategoriesAPI.md#contentrpmpackagecategoriesread) | **Get** {rpm_package_category_href} | Inspect a package category +*ContentPackageenvironmentsAPI* | [**ContentRpmPackageenvironmentsList**](docs/ContentPackageenvironmentsAPI.md#contentrpmpackageenvironmentslist) | **Get** /pulp/api/v3/content/rpm/packageenvironments/ | List package environments +*ContentPackageenvironmentsAPI* | [**ContentRpmPackageenvironmentsRead**](docs/ContentPackageenvironmentsAPI.md#contentrpmpackageenvironmentsread) | **Get** {rpm_package_environment_href} | Inspect a package environment +*ContentPackagegroupsAPI* | [**ContentRpmPackagegroupsList**](docs/ContentPackagegroupsAPI.md#contentrpmpackagegroupslist) | **Get** /pulp/api/v3/content/rpm/packagegroups/ | List package groups +*ContentPackagegroupsAPI* | [**ContentRpmPackagegroupsRead**](docs/ContentPackagegroupsAPI.md#contentrpmpackagegroupsread) | **Get** {rpm_package_group_href} | Inspect a package group +*ContentPackagelangpacksAPI* | [**ContentRpmPackagelangpacksList**](docs/ContentPackagelangpacksAPI.md#contentrpmpackagelangpackslist) | **Get** /pulp/api/v3/content/rpm/packagelangpacks/ | List package langpackss +*ContentPackagelangpacksAPI* | [**ContentRpmPackagelangpacksRead**](docs/ContentPackagelangpacksAPI.md#contentrpmpackagelangpacksread) | **Get** {rpm_package_langpacks_href} | Inspect a package langpacks +*ContentPackagesAPI* | [**ContentDebPackagesCreate**](docs/ContentPackagesAPI.md#contentdebpackagescreate) | **Post** /pulp/api/v3/content/deb/packages/ | Create a package +*ContentPackagesAPI* | [**ContentDebPackagesList**](docs/ContentPackagesAPI.md#contentdebpackageslist) | **Get** /pulp/api/v3/content/deb/packages/ | List packages +*ContentPackagesAPI* | [**ContentDebPackagesRead**](docs/ContentPackagesAPI.md#contentdebpackagesread) | **Get** {deb_package_href} | Inspect a package +*ContentPackagesAPI* | [**ContentPythonPackagesCreate**](docs/ContentPackagesAPI.md#contentpythonpackagescreate) | **Post** /pulp/api/v3/content/python/packages/ | Create a python package content +*ContentPackagesAPI* | [**ContentPythonPackagesList**](docs/ContentPackagesAPI.md#contentpythonpackageslist) | **Get** /pulp/api/v3/content/python/packages/ | List python package contents +*ContentPackagesAPI* | [**ContentPythonPackagesRead**](docs/ContentPackagesAPI.md#contentpythonpackagesread) | **Get** {python_python_package_content_href} | Inspect a python package content +*ContentPackagesAPI* | [**ContentRpmPackagesCreate**](docs/ContentPackagesAPI.md#contentrpmpackagescreate) | **Post** /pulp/api/v3/content/rpm/packages/ | Create a package +*ContentPackagesAPI* | [**ContentRpmPackagesList**](docs/ContentPackagesAPI.md#contentrpmpackageslist) | **Get** /pulp/api/v3/content/rpm/packages/ | List packages +*ContentPackagesAPI* | [**ContentRpmPackagesRead**](docs/ContentPackagesAPI.md#contentrpmpackagesread) | **Get** {rpm_package_href} | Inspect a package +*ContentRefsAPI* | [**ContentOstreeRefsList**](docs/ContentRefsAPI.md#contentostreerefslist) | **Get** /pulp/api/v3/content/ostree/refs/ | List ostree refs +*ContentRefsAPI* | [**ContentOstreeRefsRead**](docs/ContentRefsAPI.md#contentostreerefsread) | **Get** {ostree_ostree_ref_href} | Inspect an ostree ref +*ContentReleaseArchitecturesAPI* | [**ContentDebReleaseArchitecturesCreate**](docs/ContentReleaseArchitecturesAPI.md#contentdebreleasearchitecturescreate) | **Post** /pulp/api/v3/content/deb/release_architectures/ | Create a release architecture +*ContentReleaseArchitecturesAPI* | [**ContentDebReleaseArchitecturesList**](docs/ContentReleaseArchitecturesAPI.md#contentdebreleasearchitectureslist) | **Get** /pulp/api/v3/content/deb/release_architectures/ | List release architectures +*ContentReleaseArchitecturesAPI* | [**ContentDebReleaseArchitecturesRead**](docs/ContentReleaseArchitecturesAPI.md#contentdebreleasearchitecturesread) | **Get** {deb_release_architecture_href} | Inspect a release architecture +*ContentReleaseComponentsAPI* | [**ContentDebReleaseComponentsCreate**](docs/ContentReleaseComponentsAPI.md#contentdebreleasecomponentscreate) | **Post** /pulp/api/v3/content/deb/release_components/ | Create a release component +*ContentReleaseComponentsAPI* | [**ContentDebReleaseComponentsList**](docs/ContentReleaseComponentsAPI.md#contentdebreleasecomponentslist) | **Get** /pulp/api/v3/content/deb/release_components/ | List release components +*ContentReleaseComponentsAPI* | [**ContentDebReleaseComponentsRead**](docs/ContentReleaseComponentsAPI.md#contentdebreleasecomponentsread) | **Get** {deb_release_component_href} | Inspect a release component +*ContentReleaseFilesAPI* | [**ContentDebReleaseFilesCreate**](docs/ContentReleaseFilesAPI.md#contentdebreleasefilescreate) | **Post** /pulp/api/v3/content/deb/release_files/ | Create a release file +*ContentReleaseFilesAPI* | [**ContentDebReleaseFilesList**](docs/ContentReleaseFilesAPI.md#contentdebreleasefileslist) | **Get** /pulp/api/v3/content/deb/release_files/ | List release files +*ContentReleaseFilesAPI* | [**ContentDebReleaseFilesRead**](docs/ContentReleaseFilesAPI.md#contentdebreleasefilesread) | **Get** {deb_release_file_href} | Inspect a release file +*ContentReleasesAPI* | [**ContentDebReleasesCreate**](docs/ContentReleasesAPI.md#contentdebreleasescreate) | **Post** /pulp/api/v3/content/deb/releases/ | Create a release +*ContentReleasesAPI* | [**ContentDebReleasesList**](docs/ContentReleasesAPI.md#contentdebreleaseslist) | **Get** /pulp/api/v3/content/deb/releases/ | List releases +*ContentReleasesAPI* | [**ContentDebReleasesRead**](docs/ContentReleasesAPI.md#contentdebreleasesread) | **Get** {deb_release_href} | Inspect a release +*ContentRepoMetadataFilesAPI* | [**ContentRpmRepoMetadataFilesList**](docs/ContentRepoMetadataFilesAPI.md#contentrpmrepometadatafileslist) | **Get** /pulp/api/v3/content/rpm/repo_metadata_files/ | List repo metadata files +*ContentRepoMetadataFilesAPI* | [**ContentRpmRepoMetadataFilesRead**](docs/ContentRepoMetadataFilesAPI.md#contentrpmrepometadatafilesread) | **Get** {rpm_repo_metadata_file_href} | Inspect a repo metadata file +*ContentRolesAPI* | [**ContentAnsibleRolesCreate**](docs/ContentRolesAPI.md#contentansiblerolescreate) | **Post** /pulp/api/v3/content/ansible/roles/ | Create a role +*ContentRolesAPI* | [**ContentAnsibleRolesList**](docs/ContentRolesAPI.md#contentansibleroleslist) | **Get** /pulp/api/v3/content/ansible/roles/ | List roles +*ContentRolesAPI* | [**ContentAnsibleRolesRead**](docs/ContentRolesAPI.md#contentansiblerolesread) | **Get** {ansible_role_href} | Inspect a role +*ContentSignaturesAPI* | [**ContentContainerSignaturesList**](docs/ContentSignaturesAPI.md#contentcontainersignatureslist) | **Get** /pulp/api/v3/content/container/signatures/ | List manifest signatures +*ContentSignaturesAPI* | [**ContentContainerSignaturesRead**](docs/ContentSignaturesAPI.md#contentcontainersignaturesread) | **Get** {container_manifest_signature_href} | Inspect a manifest signature +*ContentSummariesAPI* | [**ContentOstreeSummariesList**](docs/ContentSummariesAPI.md#contentostreesummarieslist) | **Get** /pulp/api/v3/content/ostree/summaries/ | List ostree summarys +*ContentSummariesAPI* | [**ContentOstreeSummariesRead**](docs/ContentSummariesAPI.md#contentostreesummariesread) | **Get** {ostree_ostree_summary_href} | Inspect an ostree summary +*ContentTagsAPI* | [**ContentContainerTagsList**](docs/ContentTagsAPI.md#contentcontainertagslist) | **Get** /pulp/api/v3/content/container/tags/ | List tags +*ContentTagsAPI* | [**ContentContainerTagsRead**](docs/ContentTagsAPI.md#contentcontainertagsread) | **Get** {container_tag_href} | Inspect a tag +*ContentguardsAPI* | [**ContentguardsList**](docs/ContentguardsAPI.md#contentguardslist) | **Get** /pulp/api/v3/contentguards/ | List content guards +*ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectAddRole**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectaddrole) | **Post** {content_redirect_content_guard_href}add_role/ | +*ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectCreate**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectcreate) | **Post** /pulp/api/v3/contentguards/core/content_redirect/ | Create a content redirect content guard +*ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectDelete**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectdelete) | **Delete** {content_redirect_content_guard_href} | Delete a content redirect content guard +*ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectList**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectlist) | **Get** /pulp/api/v3/contentguards/core/content_redirect/ | List content redirect content guards +*ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectListRoles**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectlistroles) | **Get** {content_redirect_content_guard_href}list_roles/ | +*ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectMyPermissions**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectmypermissions) | **Get** {content_redirect_content_guard_href}my_permissions/ | +*ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectPartialUpdate**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectpartialupdate) | **Patch** {content_redirect_content_guard_href} | Update a content redirect content guard +*ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectRead**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectread) | **Get** {content_redirect_content_guard_href} | Inspect a content redirect content guard +*ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectRemoveRole**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectremoverole) | **Post** {content_redirect_content_guard_href}remove_role/ | +*ContentguardsContentRedirectAPI* | [**ContentguardsCoreContentRedirectUpdate**](docs/ContentguardsContentRedirectAPI.md#contentguardscorecontentredirectupdate) | **Put** {content_redirect_content_guard_href} | Update a content redirect content guard +*ContentguardsRbacAPI* | [**ContentguardsCoreRbacAddRole**](docs/ContentguardsRbacAPI.md#contentguardscorerbacaddrole) | **Post** {r_b_a_c_content_guard_href}add_role/ | +*ContentguardsRbacAPI* | [**ContentguardsCoreRbacCreate**](docs/ContentguardsRbacAPI.md#contentguardscorerbaccreate) | **Post** /pulp/api/v3/contentguards/core/rbac/ | Create a rbac content guard +*ContentguardsRbacAPI* | [**ContentguardsCoreRbacDelete**](docs/ContentguardsRbacAPI.md#contentguardscorerbacdelete) | **Delete** {r_b_a_c_content_guard_href} | Delete a rbac content guard +*ContentguardsRbacAPI* | [**ContentguardsCoreRbacList**](docs/ContentguardsRbacAPI.md#contentguardscorerbaclist) | **Get** /pulp/api/v3/contentguards/core/rbac/ | List rbac content guards +*ContentguardsRbacAPI* | [**ContentguardsCoreRbacListRoles**](docs/ContentguardsRbacAPI.md#contentguardscorerbaclistroles) | **Get** {r_b_a_c_content_guard_href}list_roles/ | +*ContentguardsRbacAPI* | [**ContentguardsCoreRbacMyPermissions**](docs/ContentguardsRbacAPI.md#contentguardscorerbacmypermissions) | **Get** {r_b_a_c_content_guard_href}my_permissions/ | +*ContentguardsRbacAPI* | [**ContentguardsCoreRbacPartialUpdate**](docs/ContentguardsRbacAPI.md#contentguardscorerbacpartialupdate) | **Patch** {r_b_a_c_content_guard_href} | Update a rbac content guard +*ContentguardsRbacAPI* | [**ContentguardsCoreRbacRead**](docs/ContentguardsRbacAPI.md#contentguardscorerbacread) | **Get** {r_b_a_c_content_guard_href} | Inspect a rbac content guard +*ContentguardsRbacAPI* | [**ContentguardsCoreRbacRemoveRole**](docs/ContentguardsRbacAPI.md#contentguardscorerbacremoverole) | **Post** {r_b_a_c_content_guard_href}remove_role/ | +*ContentguardsRbacAPI* | [**ContentguardsCoreRbacUpdate**](docs/ContentguardsRbacAPI.md#contentguardscorerbacupdate) | **Put** {r_b_a_c_content_guard_href} | Update a rbac content guard +*ContentguardsRhsmAPI* | [**ContentguardsCertguardRhsmCreate**](docs/ContentguardsRhsmAPI.md#contentguardscertguardrhsmcreate) | **Post** /pulp/api/v3/contentguards/certguard/rhsm/ | Create a rhsm cert guard +*ContentguardsRhsmAPI* | [**ContentguardsCertguardRhsmDelete**](docs/ContentguardsRhsmAPI.md#contentguardscertguardrhsmdelete) | **Delete** {certguard_r_h_s_m_cert_guard_href} | Delete a rhsm cert guard +*ContentguardsRhsmAPI* | [**ContentguardsCertguardRhsmList**](docs/ContentguardsRhsmAPI.md#contentguardscertguardrhsmlist) | **Get** /pulp/api/v3/contentguards/certguard/rhsm/ | List rhsm cert guards +*ContentguardsRhsmAPI* | [**ContentguardsCertguardRhsmPartialUpdate**](docs/ContentguardsRhsmAPI.md#contentguardscertguardrhsmpartialupdate) | **Patch** {certguard_r_h_s_m_cert_guard_href} | Update a rhsm cert guard +*ContentguardsRhsmAPI* | [**ContentguardsCertguardRhsmRead**](docs/ContentguardsRhsmAPI.md#contentguardscertguardrhsmread) | **Get** {certguard_r_h_s_m_cert_guard_href} | Inspect a rhsm cert guard +*ContentguardsRhsmAPI* | [**ContentguardsCertguardRhsmUpdate**](docs/ContentguardsRhsmAPI.md#contentguardscertguardrhsmupdate) | **Put** {certguard_r_h_s_m_cert_guard_href} | Update a rhsm cert guard +*ContentguardsX509API* | [**ContentguardsCertguardX509Create**](docs/ContentguardsX509API.md#contentguardscertguardx509create) | **Post** /pulp/api/v3/contentguards/certguard/x509/ | Create a x509 cert guard +*ContentguardsX509API* | [**ContentguardsCertguardX509Delete**](docs/ContentguardsX509API.md#contentguardscertguardx509delete) | **Delete** {certguard_x509_cert_guard_href} | Delete a x509 cert guard +*ContentguardsX509API* | [**ContentguardsCertguardX509List**](docs/ContentguardsX509API.md#contentguardscertguardx509list) | **Get** /pulp/api/v3/contentguards/certguard/x509/ | List x509 cert guards +*ContentguardsX509API* | [**ContentguardsCertguardX509PartialUpdate**](docs/ContentguardsX509API.md#contentguardscertguardx509partialupdate) | **Patch** {certguard_x509_cert_guard_href} | Update a x509 cert guard +*ContentguardsX509API* | [**ContentguardsCertguardX509Read**](docs/ContentguardsX509API.md#contentguardscertguardx509read) | **Get** {certguard_x509_cert_guard_href} | Inspect a x509 cert guard +*ContentguardsX509API* | [**ContentguardsCertguardX509Update**](docs/ContentguardsX509API.md#contentguardscertguardx509update) | **Put** {certguard_x509_cert_guard_href} | Update a x509 cert guard +*DebCopyAPI* | [**CopyContent**](docs/DebCopyAPI.md#copycontent) | **Post** /pulp/api/v3/deb/copy/ | Copy content +*DistributionsAPI* | [**DistributionsList**](docs/DistributionsAPI.md#distributionslist) | **Get** /pulp/api/v3/distributions/ | List distributions +*DistributionsAnsibleAPI* | [**DistributionsAnsibleAnsibleAddRole**](docs/DistributionsAnsibleAPI.md#distributionsansibleansibleaddrole) | **Post** {ansible_ansible_distribution_href}add_role/ | +*DistributionsAnsibleAPI* | [**DistributionsAnsibleAnsibleCreate**](docs/DistributionsAnsibleAPI.md#distributionsansibleansiblecreate) | **Post** /pulp/api/v3/distributions/ansible/ansible/ | Create an ansible distribution +*DistributionsAnsibleAPI* | [**DistributionsAnsibleAnsibleDelete**](docs/DistributionsAnsibleAPI.md#distributionsansibleansibledelete) | **Delete** {ansible_ansible_distribution_href} | Delete an ansible distribution +*DistributionsAnsibleAPI* | [**DistributionsAnsibleAnsibleList**](docs/DistributionsAnsibleAPI.md#distributionsansibleansiblelist) | **Get** /pulp/api/v3/distributions/ansible/ansible/ | List ansible distributions +*DistributionsAnsibleAPI* | [**DistributionsAnsibleAnsibleListRoles**](docs/DistributionsAnsibleAPI.md#distributionsansibleansiblelistroles) | **Get** {ansible_ansible_distribution_href}list_roles/ | +*DistributionsAnsibleAPI* | [**DistributionsAnsibleAnsibleMyPermissions**](docs/DistributionsAnsibleAPI.md#distributionsansibleansiblemypermissions) | **Get** {ansible_ansible_distribution_href}my_permissions/ | +*DistributionsAnsibleAPI* | [**DistributionsAnsibleAnsiblePartialUpdate**](docs/DistributionsAnsibleAPI.md#distributionsansibleansiblepartialupdate) | **Patch** {ansible_ansible_distribution_href} | Update an ansible distribution +*DistributionsAnsibleAPI* | [**DistributionsAnsibleAnsibleRead**](docs/DistributionsAnsibleAPI.md#distributionsansibleansibleread) | **Get** {ansible_ansible_distribution_href} | Inspect an ansible distribution +*DistributionsAnsibleAPI* | [**DistributionsAnsibleAnsibleRemoveRole**](docs/DistributionsAnsibleAPI.md#distributionsansibleansibleremoverole) | **Post** {ansible_ansible_distribution_href}remove_role/ | +*DistributionsAnsibleAPI* | [**DistributionsAnsibleAnsibleUpdate**](docs/DistributionsAnsibleAPI.md#distributionsansibleansibleupdate) | **Put** {ansible_ansible_distribution_href} | Update an ansible distribution +*DistributionsAptAPI* | [**DistributionsDebAptCreate**](docs/DistributionsAptAPI.md#distributionsdebaptcreate) | **Post** /pulp/api/v3/distributions/deb/apt/ | Create an apt distribution +*DistributionsAptAPI* | [**DistributionsDebAptDelete**](docs/DistributionsAptAPI.md#distributionsdebaptdelete) | **Delete** {deb_apt_distribution_href} | Delete an apt distribution +*DistributionsAptAPI* | [**DistributionsDebAptList**](docs/DistributionsAptAPI.md#distributionsdebaptlist) | **Get** /pulp/api/v3/distributions/deb/apt/ | List apt distributions +*DistributionsAptAPI* | [**DistributionsDebAptPartialUpdate**](docs/DistributionsAptAPI.md#distributionsdebaptpartialupdate) | **Patch** {deb_apt_distribution_href} | Update an apt distribution +*DistributionsAptAPI* | [**DistributionsDebAptRead**](docs/DistributionsAptAPI.md#distributionsdebaptread) | **Get** {deb_apt_distribution_href} | Inspect an apt distribution +*DistributionsAptAPI* | [**DistributionsDebAptUpdate**](docs/DistributionsAptAPI.md#distributionsdebaptupdate) | **Put** {deb_apt_distribution_href} | Update an apt distribution +*DistributionsArtifactsAPI* | [**DistributionsCoreArtifactsList**](docs/DistributionsArtifactsAPI.md#distributionscoreartifactslist) | **Get** /pulp/api/v3/distributions/core/artifacts/ | List artifact distributions +*DistributionsArtifactsAPI* | [**DistributionsCoreArtifactsRead**](docs/DistributionsArtifactsAPI.md#distributionscoreartifactsread) | **Get** {artifact_distribution_href} | Inspect an artifact distribution +*DistributionsContainerAPI* | [**DistributionsContainerContainerAddRole**](docs/DistributionsContainerAPI.md#distributionscontainercontaineraddrole) | **Post** {container_container_distribution_href}add_role/ | +*DistributionsContainerAPI* | [**DistributionsContainerContainerCreate**](docs/DistributionsContainerAPI.md#distributionscontainercontainercreate) | **Post** /pulp/api/v3/distributions/container/container/ | Create a container distribution +*DistributionsContainerAPI* | [**DistributionsContainerContainerDelete**](docs/DistributionsContainerAPI.md#distributionscontainercontainerdelete) | **Delete** {container_container_distribution_href} | Delete a container distribution +*DistributionsContainerAPI* | [**DistributionsContainerContainerList**](docs/DistributionsContainerAPI.md#distributionscontainercontainerlist) | **Get** /pulp/api/v3/distributions/container/container/ | List container distributions +*DistributionsContainerAPI* | [**DistributionsContainerContainerListRoles**](docs/DistributionsContainerAPI.md#distributionscontainercontainerlistroles) | **Get** {container_container_distribution_href}list_roles/ | +*DistributionsContainerAPI* | [**DistributionsContainerContainerMyPermissions**](docs/DistributionsContainerAPI.md#distributionscontainercontainermypermissions) | **Get** {container_container_distribution_href}my_permissions/ | +*DistributionsContainerAPI* | [**DistributionsContainerContainerPartialUpdate**](docs/DistributionsContainerAPI.md#distributionscontainercontainerpartialupdate) | **Patch** {container_container_distribution_href} | Update a container distribution +*DistributionsContainerAPI* | [**DistributionsContainerContainerRead**](docs/DistributionsContainerAPI.md#distributionscontainercontainerread) | **Get** {container_container_distribution_href} | Inspect a container distribution +*DistributionsContainerAPI* | [**DistributionsContainerContainerRemoveRole**](docs/DistributionsContainerAPI.md#distributionscontainercontainerremoverole) | **Post** {container_container_distribution_href}remove_role/ | +*DistributionsContainerAPI* | [**DistributionsContainerContainerUpdate**](docs/DistributionsContainerAPI.md#distributionscontainercontainerupdate) | **Put** {container_container_distribution_href} | Update a container distribution +*DistributionsFileAPI* | [**DistributionsFileFileAddRole**](docs/DistributionsFileAPI.md#distributionsfilefileaddrole) | **Post** {file_file_distribution_href}add_role/ | +*DistributionsFileAPI* | [**DistributionsFileFileCreate**](docs/DistributionsFileAPI.md#distributionsfilefilecreate) | **Post** /pulp/api/v3/distributions/file/file/ | Create a file distribution +*DistributionsFileAPI* | [**DistributionsFileFileDelete**](docs/DistributionsFileAPI.md#distributionsfilefiledelete) | **Delete** {file_file_distribution_href} | Delete a file distribution +*DistributionsFileAPI* | [**DistributionsFileFileList**](docs/DistributionsFileAPI.md#distributionsfilefilelist) | **Get** /pulp/api/v3/distributions/file/file/ | List file distributions +*DistributionsFileAPI* | [**DistributionsFileFileListRoles**](docs/DistributionsFileAPI.md#distributionsfilefilelistroles) | **Get** {file_file_distribution_href}list_roles/ | +*DistributionsFileAPI* | [**DistributionsFileFileMyPermissions**](docs/DistributionsFileAPI.md#distributionsfilefilemypermissions) | **Get** {file_file_distribution_href}my_permissions/ | +*DistributionsFileAPI* | [**DistributionsFileFilePartialUpdate**](docs/DistributionsFileAPI.md#distributionsfilefilepartialupdate) | **Patch** {file_file_distribution_href} | Update a file distribution +*DistributionsFileAPI* | [**DistributionsFileFileRead**](docs/DistributionsFileAPI.md#distributionsfilefileread) | **Get** {file_file_distribution_href} | Inspect a file distribution +*DistributionsFileAPI* | [**DistributionsFileFileRemoveRole**](docs/DistributionsFileAPI.md#distributionsfilefileremoverole) | **Post** {file_file_distribution_href}remove_role/ | +*DistributionsFileAPI* | [**DistributionsFileFileUpdate**](docs/DistributionsFileAPI.md#distributionsfilefileupdate) | **Put** {file_file_distribution_href} | Update a file distribution +*DistributionsGemAPI* | [**DistributionsGemGemCreate**](docs/DistributionsGemAPI.md#distributionsgemgemcreate) | **Post** /pulp/api/v3/distributions/gem/gem/ | Create a gem distribution +*DistributionsGemAPI* | [**DistributionsGemGemDelete**](docs/DistributionsGemAPI.md#distributionsgemgemdelete) | **Delete** {gem_gem_distribution_href} | Delete a gem distribution +*DistributionsGemAPI* | [**DistributionsGemGemList**](docs/DistributionsGemAPI.md#distributionsgemgemlist) | **Get** /pulp/api/v3/distributions/gem/gem/ | List gem distributions +*DistributionsGemAPI* | [**DistributionsGemGemPartialUpdate**](docs/DistributionsGemAPI.md#distributionsgemgempartialupdate) | **Patch** {gem_gem_distribution_href} | Update a gem distribution +*DistributionsGemAPI* | [**DistributionsGemGemRead**](docs/DistributionsGemAPI.md#distributionsgemgemread) | **Get** {gem_gem_distribution_href} | Inspect a gem distribution +*DistributionsGemAPI* | [**DistributionsGemGemUpdate**](docs/DistributionsGemAPI.md#distributionsgemgemupdate) | **Put** {gem_gem_distribution_href} | Update a gem distribution +*DistributionsMavenAPI* | [**DistributionsMavenMavenCreate**](docs/DistributionsMavenAPI.md#distributionsmavenmavencreate) | **Post** /pulp/api/v3/distributions/maven/maven/ | Create a maven distribution +*DistributionsMavenAPI* | [**DistributionsMavenMavenDelete**](docs/DistributionsMavenAPI.md#distributionsmavenmavendelete) | **Delete** {maven_maven_distribution_href} | Delete a maven distribution +*DistributionsMavenAPI* | [**DistributionsMavenMavenList**](docs/DistributionsMavenAPI.md#distributionsmavenmavenlist) | **Get** /pulp/api/v3/distributions/maven/maven/ | List maven distributions +*DistributionsMavenAPI* | [**DistributionsMavenMavenPartialUpdate**](docs/DistributionsMavenAPI.md#distributionsmavenmavenpartialupdate) | **Patch** {maven_maven_distribution_href} | Update a maven distribution +*DistributionsMavenAPI* | [**DistributionsMavenMavenRead**](docs/DistributionsMavenAPI.md#distributionsmavenmavenread) | **Get** {maven_maven_distribution_href} | Inspect a maven distribution +*DistributionsMavenAPI* | [**DistributionsMavenMavenUpdate**](docs/DistributionsMavenAPI.md#distributionsmavenmavenupdate) | **Put** {maven_maven_distribution_href} | Update a maven distribution +*DistributionsOstreeAPI* | [**DistributionsOstreeOstreeCreate**](docs/DistributionsOstreeAPI.md#distributionsostreeostreecreate) | **Post** /pulp/api/v3/distributions/ostree/ostree/ | Create an ostree distribution +*DistributionsOstreeAPI* | [**DistributionsOstreeOstreeDelete**](docs/DistributionsOstreeAPI.md#distributionsostreeostreedelete) | **Delete** {ostree_ostree_distribution_href} | Delete an ostree distribution +*DistributionsOstreeAPI* | [**DistributionsOstreeOstreeList**](docs/DistributionsOstreeAPI.md#distributionsostreeostreelist) | **Get** /pulp/api/v3/distributions/ostree/ostree/ | List ostree distributions +*DistributionsOstreeAPI* | [**DistributionsOstreeOstreePartialUpdate**](docs/DistributionsOstreeAPI.md#distributionsostreeostreepartialupdate) | **Patch** {ostree_ostree_distribution_href} | Update an ostree distribution +*DistributionsOstreeAPI* | [**DistributionsOstreeOstreeRead**](docs/DistributionsOstreeAPI.md#distributionsostreeostreeread) | **Get** {ostree_ostree_distribution_href} | Inspect an ostree distribution +*DistributionsOstreeAPI* | [**DistributionsOstreeOstreeUpdate**](docs/DistributionsOstreeAPI.md#distributionsostreeostreeupdate) | **Put** {ostree_ostree_distribution_href} | Update an ostree distribution +*DistributionsPypiAPI* | [**DistributionsPythonPypiCreate**](docs/DistributionsPypiAPI.md#distributionspythonpypicreate) | **Post** /pulp/api/v3/distributions/python/pypi/ | Create a python distribution +*DistributionsPypiAPI* | [**DistributionsPythonPypiDelete**](docs/DistributionsPypiAPI.md#distributionspythonpypidelete) | **Delete** {python_python_distribution_href} | Delete a python distribution +*DistributionsPypiAPI* | [**DistributionsPythonPypiList**](docs/DistributionsPypiAPI.md#distributionspythonpypilist) | **Get** /pulp/api/v3/distributions/python/pypi/ | List python distributions +*DistributionsPypiAPI* | [**DistributionsPythonPypiPartialUpdate**](docs/DistributionsPypiAPI.md#distributionspythonpypipartialupdate) | **Patch** {python_python_distribution_href} | Update a python distribution +*DistributionsPypiAPI* | [**DistributionsPythonPypiRead**](docs/DistributionsPypiAPI.md#distributionspythonpypiread) | **Get** {python_python_distribution_href} | Inspect a python distribution +*DistributionsPypiAPI* | [**DistributionsPythonPypiUpdate**](docs/DistributionsPypiAPI.md#distributionspythonpypiupdate) | **Put** {python_python_distribution_href} | Update a python distribution +*DistributionsRpmAPI* | [**DistributionsRpmRpmAddRole**](docs/DistributionsRpmAPI.md#distributionsrpmrpmaddrole) | **Post** {rpm_rpm_distribution_href}add_role/ | +*DistributionsRpmAPI* | [**DistributionsRpmRpmCreate**](docs/DistributionsRpmAPI.md#distributionsrpmrpmcreate) | **Post** /pulp/api/v3/distributions/rpm/rpm/ | Create a rpm distribution +*DistributionsRpmAPI* | [**DistributionsRpmRpmDelete**](docs/DistributionsRpmAPI.md#distributionsrpmrpmdelete) | **Delete** {rpm_rpm_distribution_href} | Delete a rpm distribution +*DistributionsRpmAPI* | [**DistributionsRpmRpmList**](docs/DistributionsRpmAPI.md#distributionsrpmrpmlist) | **Get** /pulp/api/v3/distributions/rpm/rpm/ | List rpm distributions +*DistributionsRpmAPI* | [**DistributionsRpmRpmListRoles**](docs/DistributionsRpmAPI.md#distributionsrpmrpmlistroles) | **Get** {rpm_rpm_distribution_href}list_roles/ | +*DistributionsRpmAPI* | [**DistributionsRpmRpmMyPermissions**](docs/DistributionsRpmAPI.md#distributionsrpmrpmmypermissions) | **Get** {rpm_rpm_distribution_href}my_permissions/ | +*DistributionsRpmAPI* | [**DistributionsRpmRpmPartialUpdate**](docs/DistributionsRpmAPI.md#distributionsrpmrpmpartialupdate) | **Patch** {rpm_rpm_distribution_href} | Update a rpm distribution +*DistributionsRpmAPI* | [**DistributionsRpmRpmRead**](docs/DistributionsRpmAPI.md#distributionsrpmrpmread) | **Get** {rpm_rpm_distribution_href} | Inspect a rpm distribution +*DistributionsRpmAPI* | [**DistributionsRpmRpmRemoveRole**](docs/DistributionsRpmAPI.md#distributionsrpmrpmremoverole) | **Post** {rpm_rpm_distribution_href}remove_role/ | +*DistributionsRpmAPI* | [**DistributionsRpmRpmUpdate**](docs/DistributionsRpmAPI.md#distributionsrpmrpmupdate) | **Put** {rpm_rpm_distribution_href} | Update a rpm distribution +*DocsApiJsonAPI* | [**DocsApiJsonGet**](docs/DocsApiJsonAPI.md#docsapijsonget) | **Get** /pulp/api/v3/docs/api.json | +*DocsApiYamlAPI* | [**DocsApiYamlGet**](docs/DocsApiYamlAPI.md#docsapiyamlget) | **Get** /pulp/api/v3/docs/api.yaml | +*DomainsAPI* | [**DomainsCreate**](docs/DomainsAPI.md#domainscreate) | **Post** /pulp/api/v3/domains/ | Create a domain +*DomainsAPI* | [**DomainsDelete**](docs/DomainsAPI.md#domainsdelete) | **Delete** {domain_href} | Delete a domain +*DomainsAPI* | [**DomainsList**](docs/DomainsAPI.md#domainslist) | **Get** /pulp/api/v3/domains/ | List domains +*DomainsAPI* | [**DomainsPartialUpdate**](docs/DomainsAPI.md#domainspartialupdate) | **Patch** {domain_href} | Update a domain +*DomainsAPI* | [**DomainsRead**](docs/DomainsAPI.md#domainsread) | **Get** {domain_href} | Inspect a domain +*DomainsAPI* | [**DomainsUpdate**](docs/DomainsAPI.md#domainsupdate) | **Put** {domain_href} | Update a domain +*ExportersFilesystemAPI* | [**ExportersCoreFilesystemCreate**](docs/ExportersFilesystemAPI.md#exporterscorefilesystemcreate) | **Post** /pulp/api/v3/exporters/core/filesystem/ | Create a filesystem exporter +*ExportersFilesystemAPI* | [**ExportersCoreFilesystemDelete**](docs/ExportersFilesystemAPI.md#exporterscorefilesystemdelete) | **Delete** {filesystem_exporter_href} | Delete a filesystem exporter +*ExportersFilesystemAPI* | [**ExportersCoreFilesystemList**](docs/ExportersFilesystemAPI.md#exporterscorefilesystemlist) | **Get** /pulp/api/v3/exporters/core/filesystem/ | List filesystem exporters +*ExportersFilesystemAPI* | [**ExportersCoreFilesystemPartialUpdate**](docs/ExportersFilesystemAPI.md#exporterscorefilesystempartialupdate) | **Patch** {filesystem_exporter_href} | Update a filesystem exporter +*ExportersFilesystemAPI* | [**ExportersCoreFilesystemRead**](docs/ExportersFilesystemAPI.md#exporterscorefilesystemread) | **Get** {filesystem_exporter_href} | Inspect a filesystem exporter +*ExportersFilesystemAPI* | [**ExportersCoreFilesystemUpdate**](docs/ExportersFilesystemAPI.md#exporterscorefilesystemupdate) | **Put** {filesystem_exporter_href} | Update a filesystem exporter +*ExportersFilesystemExportsAPI* | [**ExportersCoreFilesystemExportsCreate**](docs/ExportersFilesystemExportsAPI.md#exporterscorefilesystemexportscreate) | **Post** {filesystem_exporter_href}exports/ | Create a filesystem export +*ExportersFilesystemExportsAPI* | [**ExportersCoreFilesystemExportsDelete**](docs/ExportersFilesystemExportsAPI.md#exporterscorefilesystemexportsdelete) | **Delete** {filesystem_filesystem_export_href} | Delete a filesystem export +*ExportersFilesystemExportsAPI* | [**ExportersCoreFilesystemExportsList**](docs/ExportersFilesystemExportsAPI.md#exporterscorefilesystemexportslist) | **Get** {filesystem_exporter_href}exports/ | List filesystem exports +*ExportersFilesystemExportsAPI* | [**ExportersCoreFilesystemExportsRead**](docs/ExportersFilesystemExportsAPI.md#exporterscorefilesystemexportsread) | **Get** {filesystem_filesystem_export_href} | Inspect a filesystem export +*ExportersPulpAPI* | [**ExportersCorePulpCreate**](docs/ExportersPulpAPI.md#exporterscorepulpcreate) | **Post** /pulp/api/v3/exporters/core/pulp/ | Create a pulp exporter +*ExportersPulpAPI* | [**ExportersCorePulpDelete**](docs/ExportersPulpAPI.md#exporterscorepulpdelete) | **Delete** {pulp_exporter_href} | Delete a pulp exporter +*ExportersPulpAPI* | [**ExportersCorePulpList**](docs/ExportersPulpAPI.md#exporterscorepulplist) | **Get** /pulp/api/v3/exporters/core/pulp/ | List pulp exporters +*ExportersPulpAPI* | [**ExportersCorePulpPartialUpdate**](docs/ExportersPulpAPI.md#exporterscorepulppartialupdate) | **Patch** {pulp_exporter_href} | Update a pulp exporter +*ExportersPulpAPI* | [**ExportersCorePulpRead**](docs/ExportersPulpAPI.md#exporterscorepulpread) | **Get** {pulp_exporter_href} | Inspect a pulp exporter +*ExportersPulpAPI* | [**ExportersCorePulpUpdate**](docs/ExportersPulpAPI.md#exporterscorepulpupdate) | **Put** {pulp_exporter_href} | Update a pulp exporter +*ExportersPulpExportsAPI* | [**ExportersCorePulpExportsCreate**](docs/ExportersPulpExportsAPI.md#exporterscorepulpexportscreate) | **Post** {pulp_exporter_href}exports/ | Create a pulp export +*ExportersPulpExportsAPI* | [**ExportersCorePulpExportsDelete**](docs/ExportersPulpExportsAPI.md#exporterscorepulpexportsdelete) | **Delete** {pulp_pulp_export_href} | Delete a pulp export +*ExportersPulpExportsAPI* | [**ExportersCorePulpExportsList**](docs/ExportersPulpExportsAPI.md#exporterscorepulpexportslist) | **Get** {pulp_exporter_href}exports/ | List pulp exports +*ExportersPulpExportsAPI* | [**ExportersCorePulpExportsRead**](docs/ExportersPulpExportsAPI.md#exporterscorepulpexportsread) | **Get** {pulp_pulp_export_href} | Inspect a pulp export +*GalaxyDetailAPI* | [**GalaxyCollectionDetailGet**](docs/GalaxyDetailAPI.md#galaxycollectiondetailget) | **Get** {ansible_collection_href} | +*GroupsAPI* | [**GroupsAddRole**](docs/GroupsAPI.md#groupsaddrole) | **Post** {group_href}add_role/ | +*GroupsAPI* | [**GroupsCreate**](docs/GroupsAPI.md#groupscreate) | **Post** /pulp/api/v3/groups/ | Create a group +*GroupsAPI* | [**GroupsDelete**](docs/GroupsAPI.md#groupsdelete) | **Delete** {group_href} | Delete a group +*GroupsAPI* | [**GroupsList**](docs/GroupsAPI.md#groupslist) | **Get** /pulp/api/v3/groups/ | List groups +*GroupsAPI* | [**GroupsListRoles**](docs/GroupsAPI.md#groupslistroles) | **Get** {group_href}list_roles/ | +*GroupsAPI* | [**GroupsMyPermissions**](docs/GroupsAPI.md#groupsmypermissions) | **Get** {group_href}my_permissions/ | +*GroupsAPI* | [**GroupsPartialUpdate**](docs/GroupsAPI.md#groupspartialupdate) | **Patch** {group_href} | Update a group +*GroupsAPI* | [**GroupsRead**](docs/GroupsAPI.md#groupsread) | **Get** {group_href} | Inspect a group +*GroupsAPI* | [**GroupsRemoveRole**](docs/GroupsAPI.md#groupsremoverole) | **Post** {group_href}remove_role/ | +*GroupsAPI* | [**GroupsUpdate**](docs/GroupsAPI.md#groupsupdate) | **Put** {group_href} | Update a group +*GroupsRolesAPI* | [**GroupsRolesCreate**](docs/GroupsRolesAPI.md#groupsrolescreate) | **Post** {group_href}roles/ | Create a group role +*GroupsRolesAPI* | [**GroupsRolesDelete**](docs/GroupsRolesAPI.md#groupsrolesdelete) | **Delete** {groups_group_role_href} | Delete a group role +*GroupsRolesAPI* | [**GroupsRolesList**](docs/GroupsRolesAPI.md#groupsroleslist) | **Get** {group_href}roles/ | List group roles +*GroupsRolesAPI* | [**GroupsRolesRead**](docs/GroupsRolesAPI.md#groupsrolesread) | **Get** {groups_group_role_href} | Inspect a group role +*GroupsUsersAPI* | [**GroupsUsersCreate**](docs/GroupsUsersAPI.md#groupsuserscreate) | **Post** {group_href}users/ | Create an user +*GroupsUsersAPI* | [**GroupsUsersDelete**](docs/GroupsUsersAPI.md#groupsusersdelete) | **Delete** {groups_user_href} | Delete an user +*GroupsUsersAPI* | [**GroupsUsersList**](docs/GroupsUsersAPI.md#groupsuserslist) | **Get** {group_href}users/ | List users +*ImportersPulpAPI* | [**ImportersCorePulpCreate**](docs/ImportersPulpAPI.md#importerscorepulpcreate) | **Post** /pulp/api/v3/importers/core/pulp/ | Create a pulp importer +*ImportersPulpAPI* | [**ImportersCorePulpDelete**](docs/ImportersPulpAPI.md#importerscorepulpdelete) | **Delete** {pulp_importer_href} | Delete a pulp importer +*ImportersPulpAPI* | [**ImportersCorePulpList**](docs/ImportersPulpAPI.md#importerscorepulplist) | **Get** /pulp/api/v3/importers/core/pulp/ | List pulp importers +*ImportersPulpAPI* | [**ImportersCorePulpPartialUpdate**](docs/ImportersPulpAPI.md#importerscorepulppartialupdate) | **Patch** {pulp_importer_href} | Update a pulp importer +*ImportersPulpAPI* | [**ImportersCorePulpRead**](docs/ImportersPulpAPI.md#importerscorepulpread) | **Get** {pulp_importer_href} | Inspect a pulp importer +*ImportersPulpAPI* | [**ImportersCorePulpUpdate**](docs/ImportersPulpAPI.md#importerscorepulpupdate) | **Put** {pulp_importer_href} | Update a pulp importer +*ImportersPulpImportCheckAPI* | [**PulpImportCheckPost**](docs/ImportersPulpImportCheckAPI.md#pulpimportcheckpost) | **Post** /pulp/api/v3/importers/core/pulp/import-check/ | Validate the parameters to be used for a PulpImport call +*ImportersPulpImportsAPI* | [**ImportersCorePulpImportsCreate**](docs/ImportersPulpImportsAPI.md#importerscorepulpimportscreate) | **Post** {pulp_importer_href}imports/ | Create a pulp import +*ImportersPulpImportsAPI* | [**ImportersCorePulpImportsDelete**](docs/ImportersPulpImportsAPI.md#importerscorepulpimportsdelete) | **Delete** {pulp_pulp_import_href} | Delete a pulp import +*ImportersPulpImportsAPI* | [**ImportersCorePulpImportsList**](docs/ImportersPulpImportsAPI.md#importerscorepulpimportslist) | **Get** {pulp_importer_href}imports/ | List pulp imports +*ImportersPulpImportsAPI* | [**ImportersCorePulpImportsRead**](docs/ImportersPulpImportsAPI.md#importerscorepulpimportsread) | **Get** {pulp_pulp_import_href} | Inspect a pulp import +*OrphansAPI* | [**OrphansDelete**](docs/OrphansAPI.md#orphansdelete) | **Delete** /pulp/api/v3/orphans/ | Delete orphans +*OrphansCleanupAPI* | [**OrphansCleanupCleanup**](docs/OrphansCleanupAPI.md#orphanscleanupcleanup) | **Post** /pulp/api/v3/orphans/cleanup/ | +*PublicationsAPI* | [**PublicationsList**](docs/PublicationsAPI.md#publicationslist) | **Get** /pulp/api/v3/publications/ | List publications +*PublicationsAptAPI* | [**PublicationsDebAptCreate**](docs/PublicationsAptAPI.md#publicationsdebaptcreate) | **Post** /pulp/api/v3/publications/deb/apt/ | Create an apt publication +*PublicationsAptAPI* | [**PublicationsDebAptDelete**](docs/PublicationsAptAPI.md#publicationsdebaptdelete) | **Delete** {deb_apt_publication_href} | Delete an apt publication +*PublicationsAptAPI* | [**PublicationsDebAptList**](docs/PublicationsAptAPI.md#publicationsdebaptlist) | **Get** /pulp/api/v3/publications/deb/apt/ | List apt publications +*PublicationsAptAPI* | [**PublicationsDebAptRead**](docs/PublicationsAptAPI.md#publicationsdebaptread) | **Get** {deb_apt_publication_href} | Inspect an apt publication +*PublicationsFileAPI* | [**PublicationsFileFileAddRole**](docs/PublicationsFileAPI.md#publicationsfilefileaddrole) | **Post** {file_file_publication_href}add_role/ | +*PublicationsFileAPI* | [**PublicationsFileFileCreate**](docs/PublicationsFileAPI.md#publicationsfilefilecreate) | **Post** /pulp/api/v3/publications/file/file/ | Create a file publication +*PublicationsFileAPI* | [**PublicationsFileFileDelete**](docs/PublicationsFileAPI.md#publicationsfilefiledelete) | **Delete** {file_file_publication_href} | Delete a file publication +*PublicationsFileAPI* | [**PublicationsFileFileList**](docs/PublicationsFileAPI.md#publicationsfilefilelist) | **Get** /pulp/api/v3/publications/file/file/ | List file publications +*PublicationsFileAPI* | [**PublicationsFileFileListRoles**](docs/PublicationsFileAPI.md#publicationsfilefilelistroles) | **Get** {file_file_publication_href}list_roles/ | +*PublicationsFileAPI* | [**PublicationsFileFileMyPermissions**](docs/PublicationsFileAPI.md#publicationsfilefilemypermissions) | **Get** {file_file_publication_href}my_permissions/ | +*PublicationsFileAPI* | [**PublicationsFileFileRead**](docs/PublicationsFileAPI.md#publicationsfilefileread) | **Get** {file_file_publication_href} | Inspect a file publication +*PublicationsFileAPI* | [**PublicationsFileFileRemoveRole**](docs/PublicationsFileAPI.md#publicationsfilefileremoverole) | **Post** {file_file_publication_href}remove_role/ | +*PublicationsGemAPI* | [**PublicationsGemGemCreate**](docs/PublicationsGemAPI.md#publicationsgemgemcreate) | **Post** /pulp/api/v3/publications/gem/gem/ | Create a gem publication +*PublicationsGemAPI* | [**PublicationsGemGemDelete**](docs/PublicationsGemAPI.md#publicationsgemgemdelete) | **Delete** {gem_gem_publication_href} | Delete a gem publication +*PublicationsGemAPI* | [**PublicationsGemGemList**](docs/PublicationsGemAPI.md#publicationsgemgemlist) | **Get** /pulp/api/v3/publications/gem/gem/ | List gem publications +*PublicationsGemAPI* | [**PublicationsGemGemRead**](docs/PublicationsGemAPI.md#publicationsgemgemread) | **Get** {gem_gem_publication_href} | Inspect a gem publication +*PublicationsPypiAPI* | [**PublicationsPythonPypiCreate**](docs/PublicationsPypiAPI.md#publicationspythonpypicreate) | **Post** /pulp/api/v3/publications/python/pypi/ | Create a python publication +*PublicationsPypiAPI* | [**PublicationsPythonPypiDelete**](docs/PublicationsPypiAPI.md#publicationspythonpypidelete) | **Delete** {python_python_publication_href} | Delete a python publication +*PublicationsPypiAPI* | [**PublicationsPythonPypiList**](docs/PublicationsPypiAPI.md#publicationspythonpypilist) | **Get** /pulp/api/v3/publications/python/pypi/ | List python publications +*PublicationsPypiAPI* | [**PublicationsPythonPypiRead**](docs/PublicationsPypiAPI.md#publicationspythonpypiread) | **Get** {python_python_publication_href} | Inspect a python publication +*PublicationsRpmAPI* | [**PublicationsRpmRpmAddRole**](docs/PublicationsRpmAPI.md#publicationsrpmrpmaddrole) | **Post** {rpm_rpm_publication_href}add_role/ | +*PublicationsRpmAPI* | [**PublicationsRpmRpmCreate**](docs/PublicationsRpmAPI.md#publicationsrpmrpmcreate) | **Post** /pulp/api/v3/publications/rpm/rpm/ | Create a rpm publication +*PublicationsRpmAPI* | [**PublicationsRpmRpmDelete**](docs/PublicationsRpmAPI.md#publicationsrpmrpmdelete) | **Delete** {rpm_rpm_publication_href} | Delete a rpm publication +*PublicationsRpmAPI* | [**PublicationsRpmRpmList**](docs/PublicationsRpmAPI.md#publicationsrpmrpmlist) | **Get** /pulp/api/v3/publications/rpm/rpm/ | List rpm publications +*PublicationsRpmAPI* | [**PublicationsRpmRpmListRoles**](docs/PublicationsRpmAPI.md#publicationsrpmrpmlistroles) | **Get** {rpm_rpm_publication_href}list_roles/ | +*PublicationsRpmAPI* | [**PublicationsRpmRpmMyPermissions**](docs/PublicationsRpmAPI.md#publicationsrpmrpmmypermissions) | **Get** {rpm_rpm_publication_href}my_permissions/ | +*PublicationsRpmAPI* | [**PublicationsRpmRpmRead**](docs/PublicationsRpmAPI.md#publicationsrpmrpmread) | **Get** {rpm_rpm_publication_href} | Inspect a rpm publication +*PublicationsRpmAPI* | [**PublicationsRpmRpmRemoveRole**](docs/PublicationsRpmAPI.md#publicationsrpmrpmremoverole) | **Post** {rpm_rpm_publication_href}remove_role/ | +*PublicationsVerbatimAPI* | [**PublicationsDebVerbatimCreate**](docs/PublicationsVerbatimAPI.md#publicationsdebverbatimcreate) | **Post** /pulp/api/v3/publications/deb/verbatim/ | Create a verbatim publication +*PublicationsVerbatimAPI* | [**PublicationsDebVerbatimDelete**](docs/PublicationsVerbatimAPI.md#publicationsdebverbatimdelete) | **Delete** {deb_verbatim_publication_href} | Delete a verbatim publication +*PublicationsVerbatimAPI* | [**PublicationsDebVerbatimList**](docs/PublicationsVerbatimAPI.md#publicationsdebverbatimlist) | **Get** /pulp/api/v3/publications/deb/verbatim/ | List verbatim publications +*PublicationsVerbatimAPI* | [**PublicationsDebVerbatimRead**](docs/PublicationsVerbatimAPI.md#publicationsdebverbatimread) | **Get** {deb_verbatim_publication_href} | Inspect a verbatim publication +*PulpAnsibleApiAPI* | [**PulpAnsibleGalaxyApiGet**](docs/PulpAnsibleApiAPI.md#pulpansiblegalaxyapiget) | **Get** /pulp_ansible/galaxy/{path}/api/ | +*PulpAnsibleApiV2CollectionsVersionsAPI* | [**PulpAnsibleGalaxyApiV2CollectionsVersionsGet**](docs/PulpAnsibleApiV2CollectionsVersionsAPI.md#pulpansiblegalaxyapiv2collectionsversionsget) | **Get** /pulp_ansible/galaxy/{path}/api/v2/collections/{namespace}/{name}/versions/{version}/ | +*PulpAnsibleApiV3API* | [**PulpAnsibleGalaxyApiV3Read**](docs/PulpAnsibleApiV3API.md#pulpansiblegalaxyapiv3read) | **Get** /pulp_ansible/galaxy/{path}/api/v3/ | +*PulpAnsibleApiV3ArtifactsCollectionsAPI* | [**PulpAnsibleGalaxyApiV3ArtifactsCollectionsGet**](docs/PulpAnsibleApiV3ArtifactsCollectionsAPI.md#pulpansiblegalaxyapiv3artifactscollectionsget) | **Get** /pulp_ansible/galaxy/{path}/api/v3/artifacts/collections/{path}/{filename} | +*PulpAnsibleApiV3CollectionVersionsAllAPI* | [**PulpAnsibleGalaxyApiV3CollectionVersionsAllList**](docs/PulpAnsibleApiV3CollectionVersionsAllAPI.md#pulpansiblegalaxyapiv3collectionversionsalllist) | **Get** /pulp_ansible/galaxy/{path}/api/v3/collection_versions/all/ | +*PulpAnsibleApiV3CollectionsAPI* | [**PulpAnsibleGalaxyApiV3CollectionsDelete**](docs/PulpAnsibleApiV3CollectionsAPI.md#pulpansiblegalaxyapiv3collectionsdelete) | **Delete** /pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/ | +*PulpAnsibleApiV3CollectionsAPI* | [**PulpAnsibleGalaxyApiV3CollectionsList**](docs/PulpAnsibleApiV3CollectionsAPI.md#pulpansiblegalaxyapiv3collectionslist) | **Get** /pulp_ansible/galaxy/{path}/api/v3/collections/ | +*PulpAnsibleApiV3CollectionsAPI* | [**PulpAnsibleGalaxyApiV3CollectionsRead**](docs/PulpAnsibleApiV3CollectionsAPI.md#pulpansiblegalaxyapiv3collectionsread) | **Get** /pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/ | +*PulpAnsibleApiV3CollectionsAPI* | [**PulpAnsibleGalaxyApiV3CollectionsUpdate**](docs/PulpAnsibleApiV3CollectionsAPI.md#pulpansiblegalaxyapiv3collectionsupdate) | **Patch** /pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/ | +*PulpAnsibleApiV3CollectionsAllAPI* | [**PulpAnsibleGalaxyApiV3CollectionsAllList**](docs/PulpAnsibleApiV3CollectionsAllAPI.md#pulpansiblegalaxyapiv3collectionsalllist) | **Get** /pulp_ansible/galaxy/{path}/api/v3/collections/all/ | +*PulpAnsibleApiV3CollectionsVersionsAPI* | [**PulpAnsibleGalaxyApiV3CollectionsVersionsDelete**](docs/PulpAnsibleApiV3CollectionsVersionsAPI.md#pulpansiblegalaxyapiv3collectionsversionsdelete) | **Delete** /pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/versions/{version}/ | +*PulpAnsibleApiV3CollectionsVersionsAPI* | [**PulpAnsibleGalaxyApiV3CollectionsVersionsList**](docs/PulpAnsibleApiV3CollectionsVersionsAPI.md#pulpansiblegalaxyapiv3collectionsversionslist) | **Get** /pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/versions/ | +*PulpAnsibleApiV3CollectionsVersionsAPI* | [**PulpAnsibleGalaxyApiV3CollectionsVersionsRead**](docs/PulpAnsibleApiV3CollectionsVersionsAPI.md#pulpansiblegalaxyapiv3collectionsversionsread) | **Get** /pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/versions/{version}/ | +*PulpAnsibleApiV3CollectionsVersionsDocsBlobAPI* | [**PulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobRead**](docs/PulpAnsibleApiV3CollectionsVersionsDocsBlobAPI.md#pulpansiblegalaxyapiv3collectionsversionsdocsblobread) | **Get** /pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/versions/{version}/docs-blob/ | +*PulpAnsibleApiV3NamespacesAPI* | [**PulpAnsibleGalaxyApiV3NamespacesList**](docs/PulpAnsibleApiV3NamespacesAPI.md#pulpansiblegalaxyapiv3namespaceslist) | **Get** /pulp_ansible/galaxy/{path}/api/v3/namespaces/ | +*PulpAnsibleApiV3NamespacesAPI* | [**PulpAnsibleGalaxyApiV3NamespacesRead**](docs/PulpAnsibleApiV3NamespacesAPI.md#pulpansiblegalaxyapiv3namespacesread) | **Get** /pulp_ansible/galaxy/{path}/api/v3/namespaces/{name}/ | +*PulpAnsibleApiV3PluginAnsibleClientConfigurationAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationRead**](docs/PulpAnsibleApiV3PluginAnsibleClientConfigurationAPI.md#pulpansiblegalaxyapiv3pluginansibleclientconfigurationread) | **Get** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/client-configuration/ | +*PulpAnsibleApiV3PluginAnsibleContentCollectionsAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsRead**](docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentcollectionsread) | **Get** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/ | +*PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsList**](docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentcollectionsallcollectionslist) | **Get** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/all-collections/ | +*PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsList**](docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentcollectionsallversionslist) | **Get** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/all-versions/ | +*PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownload**](docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentcollectionsartifactsdownload) | **Get** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/artifacts/{filename} | +*PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexDelete**](docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentcollectionsindexdelete) | **Delete** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/ | +*PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexList**](docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentcollectionsindexlist) | **Get** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/ | +*PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexRead**](docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentcollectionsindexread) | **Get** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/ | +*PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdate**](docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentcollectionsindexupdate) | **Patch** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/ | +*PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDelete**](docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentcollectionsindexversionsdelete) | **Delete** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/{version}/ | +*PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsList**](docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentcollectionsindexversionslist) | **Get** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/ | +*PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsRead**](docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentcollectionsindexversionsread) | **Get** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/{version}/ | +*PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobRead**](docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentcollectionsindexversionsdocsblobread) | **Get** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/{version}/docs-blob/ | +*PulpAnsibleApiV3PluginAnsibleContentNamespacesAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreate**](docs/PulpAnsibleApiV3PluginAnsibleContentNamespacesAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentnamespacescreate) | **Post** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/ | +*PulpAnsibleApiV3PluginAnsibleContentNamespacesAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesDelete**](docs/PulpAnsibleApiV3PluginAnsibleContentNamespacesAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentnamespacesdelete) | **Delete** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/{name}/ | +*PulpAnsibleApiV3PluginAnsibleContentNamespacesAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesList**](docs/PulpAnsibleApiV3PluginAnsibleContentNamespacesAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentnamespaceslist) | **Get** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/ | +*PulpAnsibleApiV3PluginAnsibleContentNamespacesAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdate**](docs/PulpAnsibleApiV3PluginAnsibleContentNamespacesAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentnamespacespartialupdate) | **Patch** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/{name}/ | +*PulpAnsibleApiV3PluginAnsibleContentNamespacesAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesRead**](docs/PulpAnsibleApiV3PluginAnsibleContentNamespacesAPI.md#pulpansiblegalaxyapiv3pluginansiblecontentnamespacesread) | **Get** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/{name}/ | +*PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsList**](docs/PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPI.md#pulpansiblegalaxyapiv3pluginansiblesearchcollectionversionslist) | **Get** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/search/collection-versions/ | +*PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPI* | [**PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuild**](docs/PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPI.md#pulpansiblegalaxyapiv3pluginansiblesearchcollectionversionsrebuild) | **Post** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/search/collection-versions/ | +*PulpAnsibleArtifactsCollectionsV3API* | [**PulpAnsibleGalaxyApiV3ArtifactsCollectionsCreate**](docs/PulpAnsibleArtifactsCollectionsV3API.md#pulpansiblegalaxyapiv3artifactscollectionscreate) | **Post** /pulp_ansible/galaxy/{path}/api/v3/artifacts/collections/ | Upload a collection +*PulpAnsibleArtifactsCollectionsV3API* | [**PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreate**](docs/PulpAnsibleArtifactsCollectionsV3API.md#pulpansiblegalaxyapiv3pluginansiblecontentcollectionsartifactscreate) | **Post** /pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/artifacts/ | Upload a collection +*PulpAnsibleArtifactsCollectionsV3API* | [**PulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreate**](docs/PulpAnsibleArtifactsCollectionsV3API.md#pulpansiblegalaxydefaultapiv3artifactscollectionscreate) | **Post** /pulp_ansible/galaxy/default/api/v3/artifacts/collections/ | Upload a collection +*PulpAnsibleArtifactsCollectionsV3API* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreate**](docs/PulpAnsibleArtifactsCollectionsV3API.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentcollectionsartifactscreate) | **Post** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/artifacts/ | Upload a collection +*PulpAnsibleDefaultApiAPI* | [**PulpAnsibleGalaxyDefaultApiGet**](docs/PulpAnsibleDefaultApiAPI.md#pulpansiblegalaxydefaultapiget) | **Get** /pulp_ansible/galaxy/default/api/ | +*PulpAnsibleDefaultApiV3API* | [**PulpAnsibleGalaxyDefaultApiV3Read**](docs/PulpAnsibleDefaultApiV3API.md#pulpansiblegalaxydefaultapiv3read) | **Get** /pulp_ansible/galaxy/default/api/v3/ | +*PulpAnsibleDefaultApiV3ArtifactsCollectionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGet**](docs/PulpAnsibleDefaultApiV3ArtifactsCollectionsAPI.md#pulpansiblegalaxydefaultapiv3artifactscollectionsget) | **Get** /pulp_ansible/galaxy/default/api/v3/artifacts/collections/{path}/{filename} | +*PulpAnsibleDefaultApiV3CollectionVersionsAllAPI* | [**PulpAnsibleGalaxyDefaultApiV3CollectionVersionsAllList**](docs/PulpAnsibleDefaultApiV3CollectionVersionsAllAPI.md#pulpansiblegalaxydefaultapiv3collectionversionsalllist) | **Get** /pulp_ansible/galaxy/default/api/v3/collection_versions/all/ | +*PulpAnsibleDefaultApiV3CollectionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3CollectionsDelete**](docs/PulpAnsibleDefaultApiV3CollectionsAPI.md#pulpansiblegalaxydefaultapiv3collectionsdelete) | **Delete** /pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/ | +*PulpAnsibleDefaultApiV3CollectionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3CollectionsList**](docs/PulpAnsibleDefaultApiV3CollectionsAPI.md#pulpansiblegalaxydefaultapiv3collectionslist) | **Get** /pulp_ansible/galaxy/default/api/v3/collections/ | +*PulpAnsibleDefaultApiV3CollectionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3CollectionsRead**](docs/PulpAnsibleDefaultApiV3CollectionsAPI.md#pulpansiblegalaxydefaultapiv3collectionsread) | **Get** /pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/ | +*PulpAnsibleDefaultApiV3CollectionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3CollectionsUpdate**](docs/PulpAnsibleDefaultApiV3CollectionsAPI.md#pulpansiblegalaxydefaultapiv3collectionsupdate) | **Patch** /pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/ | +*PulpAnsibleDefaultApiV3CollectionsAllAPI* | [**PulpAnsibleGalaxyDefaultApiV3CollectionsAllList**](docs/PulpAnsibleDefaultApiV3CollectionsAllAPI.md#pulpansiblegalaxydefaultapiv3collectionsalllist) | **Get** /pulp_ansible/galaxy/default/api/v3/collections/all/ | +*PulpAnsibleDefaultApiV3CollectionsVersionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDelete**](docs/PulpAnsibleDefaultApiV3CollectionsVersionsAPI.md#pulpansiblegalaxydefaultapiv3collectionsversionsdelete) | **Delete** /pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/versions/{version}/ | +*PulpAnsibleDefaultApiV3CollectionsVersionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsList**](docs/PulpAnsibleDefaultApiV3CollectionsVersionsAPI.md#pulpansiblegalaxydefaultapiv3collectionsversionslist) | **Get** /pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/versions/ | +*PulpAnsibleDefaultApiV3CollectionsVersionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsRead**](docs/PulpAnsibleDefaultApiV3CollectionsVersionsAPI.md#pulpansiblegalaxydefaultapiv3collectionsversionsread) | **Get** /pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/versions/{version}/ | +*PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPI* | [**PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobRead**](docs/PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPI.md#pulpansiblegalaxydefaultapiv3collectionsversionsdocsblobread) | **Get** /pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/versions/{version}/docs-blob/ | +*PulpAnsibleDefaultApiV3NamespacesAPI* | [**PulpAnsibleGalaxyDefaultApiV3NamespacesList**](docs/PulpAnsibleDefaultApiV3NamespacesAPI.md#pulpansiblegalaxydefaultapiv3namespaceslist) | **Get** /pulp_ansible/galaxy/default/api/v3/namespaces/ | +*PulpAnsibleDefaultApiV3NamespacesAPI* | [**PulpAnsibleGalaxyDefaultApiV3NamespacesRead**](docs/PulpAnsibleDefaultApiV3NamespacesAPI.md#pulpansiblegalaxydefaultapiv3namespacesread) | **Get** /pulp_ansible/galaxy/default/api/v3/namespaces/{name}/ | +*PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleClientConfigurationRead**](docs/PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPI.md#pulpansiblegalaxydefaultapiv3pluginansibleclientconfigurationread) | **Get** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/client-configuration/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsRead**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentcollectionsread) | **Get** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsList**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentcollectionsallcollectionslist) | **Get** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/all-collections/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsList**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentcollectionsallversionslist) | **Get** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/all-versions/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownload**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentcollectionsartifactsdownload) | **Get** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/artifacts/{filename} | +*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexDelete**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentcollectionsindexdelete) | **Delete** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexList**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentcollectionsindexlist) | **Get** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexRead**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentcollectionsindexread) | **Get** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdate**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentcollectionsindexupdate) | **Patch** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDelete**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentcollectionsindexversionsdelete) | **Delete** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/{version}/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsList**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentcollectionsindexversionslist) | **Get** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsRead**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentcollectionsindexversionsread) | **Get** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/{version}/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobRead**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentcollectionsindexversionsdocsblobread) | **Get** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/{version}/docs-blob/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreate**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentnamespacescreate) | **Post** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesDelete**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentnamespacesdelete) | **Delete** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/{name}/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesList**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentnamespaceslist) | **Get** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdate**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentnamespacespartialupdate) | **Patch** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/{name}/ | +*PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesRead**](docs/PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblecontentnamespacesread) | **Get** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/{name}/ | +*PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsList**](docs/PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblesearchcollectionversionslist) | **Get** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/search/collection-versions/ | +*PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPI* | [**PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuild**](docs/PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPI.md#pulpansiblegalaxydefaultapiv3pluginansiblesearchcollectionversionsrebuild) | **Post** /pulp_ansible/galaxy/default/api/v3/plugin/ansible/search/collection-versions/ | +*PulpAnsibleTagsAPI* | [**PulpAnsibleTagsList**](docs/PulpAnsibleTagsAPI.md#pulpansibletagslist) | **Get** /pulp/api/v3/pulp_ansible/tags/ | List tags +*PulpContainerNamespacesAPI* | [**PulpContainerNamespacesAddRole**](docs/PulpContainerNamespacesAPI.md#pulpcontainernamespacesaddrole) | **Post** {container_container_namespace_href}add_role/ | +*PulpContainerNamespacesAPI* | [**PulpContainerNamespacesCreate**](docs/PulpContainerNamespacesAPI.md#pulpcontainernamespacescreate) | **Post** /pulp/api/v3/pulp_container/namespaces/ | Create a container namespace +*PulpContainerNamespacesAPI* | [**PulpContainerNamespacesDelete**](docs/PulpContainerNamespacesAPI.md#pulpcontainernamespacesdelete) | **Delete** {container_container_namespace_href} | Delete a container namespace +*PulpContainerNamespacesAPI* | [**PulpContainerNamespacesList**](docs/PulpContainerNamespacesAPI.md#pulpcontainernamespaceslist) | **Get** /pulp/api/v3/pulp_container/namespaces/ | List container namespaces +*PulpContainerNamespacesAPI* | [**PulpContainerNamespacesListRoles**](docs/PulpContainerNamespacesAPI.md#pulpcontainernamespaceslistroles) | **Get** {container_container_namespace_href}list_roles/ | +*PulpContainerNamespacesAPI* | [**PulpContainerNamespacesMyPermissions**](docs/PulpContainerNamespacesAPI.md#pulpcontainernamespacesmypermissions) | **Get** {container_container_namespace_href}my_permissions/ | +*PulpContainerNamespacesAPI* | [**PulpContainerNamespacesRead**](docs/PulpContainerNamespacesAPI.md#pulpcontainernamespacesread) | **Get** {container_container_namespace_href} | Inspect a container namespace +*PulpContainerNamespacesAPI* | [**PulpContainerNamespacesRemoveRole**](docs/PulpContainerNamespacesAPI.md#pulpcontainernamespacesremoverole) | **Post** {container_container_namespace_href}remove_role/ | +*PulpMavenAPI* | [**PulpMavenGet**](docs/PulpMavenAPI.md#pulpmavenget) | **Get** /pulp/maven/{name}/{path} | +*PulpMavenAPI* | [**PulpMavenPut**](docs/PulpMavenAPI.md#pulpmavenput) | **Put** /pulp/maven/{name}/{path} | +*PypiAPI* | [**PypiRead**](docs/PypiAPI.md#pypiread) | **Get** /pypi/{path}/ | Get index summary +*PypiLegacyAPI* | [**PypiLegacyCreate**](docs/PypiLegacyAPI.md#pypilegacycreate) | **Post** /pypi/{path}/legacy/ | Upload a package +*PypiMetadataAPI* | [**PypiPypiRead**](docs/PypiMetadataAPI.md#pypipypiread) | **Get** /pypi/{path}/pypi/{meta}/ | Get package metadata +*PypiSimpleAPI* | [**PypiSimpleCreate**](docs/PypiSimpleAPI.md#pypisimplecreate) | **Post** /pypi/{path}/simple/ | Upload a package +*PypiSimpleAPI* | [**PypiSimplePackageRead**](docs/PypiSimpleAPI.md#pypisimplepackageread) | **Get** /pypi/{path}/simple/{package}/ | Get package simple page +*PypiSimpleAPI* | [**PypiSimpleRead**](docs/PypiSimpleAPI.md#pypisimpleread) | **Get** /pypi/{path}/simple/ | Get index simple page +*RemotesAPI* | [**RemotesList**](docs/RemotesAPI.md#remoteslist) | **Get** /pulp/api/v3/remotes/ | List remotes +*RemotesAptAPI* | [**RemotesDebAptCreate**](docs/RemotesAptAPI.md#remotesdebaptcreate) | **Post** /pulp/api/v3/remotes/deb/apt/ | Create an apt remote +*RemotesAptAPI* | [**RemotesDebAptDelete**](docs/RemotesAptAPI.md#remotesdebaptdelete) | **Delete** {deb_apt_remote_href} | Delete an apt remote +*RemotesAptAPI* | [**RemotesDebAptList**](docs/RemotesAptAPI.md#remotesdebaptlist) | **Get** /pulp/api/v3/remotes/deb/apt/ | List apt remotes +*RemotesAptAPI* | [**RemotesDebAptPartialUpdate**](docs/RemotesAptAPI.md#remotesdebaptpartialupdate) | **Patch** {deb_apt_remote_href} | Update an apt remote +*RemotesAptAPI* | [**RemotesDebAptRead**](docs/RemotesAptAPI.md#remotesdebaptread) | **Get** {deb_apt_remote_href} | Inspect an apt remote +*RemotesAptAPI* | [**RemotesDebAptUpdate**](docs/RemotesAptAPI.md#remotesdebaptupdate) | **Put** {deb_apt_remote_href} | Update an apt remote +*RemotesCollectionAPI* | [**RemotesAnsibleCollectionAddRole**](docs/RemotesCollectionAPI.md#remotesansiblecollectionaddrole) | **Post** {ansible_collection_remote_href}add_role/ | +*RemotesCollectionAPI* | [**RemotesAnsibleCollectionCreate**](docs/RemotesCollectionAPI.md#remotesansiblecollectioncreate) | **Post** /pulp/api/v3/remotes/ansible/collection/ | Create a collection remote +*RemotesCollectionAPI* | [**RemotesAnsibleCollectionDelete**](docs/RemotesCollectionAPI.md#remotesansiblecollectiondelete) | **Delete** {ansible_collection_remote_href} | Delete a collection remote +*RemotesCollectionAPI* | [**RemotesAnsibleCollectionList**](docs/RemotesCollectionAPI.md#remotesansiblecollectionlist) | **Get** /pulp/api/v3/remotes/ansible/collection/ | List collection remotes +*RemotesCollectionAPI* | [**RemotesAnsibleCollectionListRoles**](docs/RemotesCollectionAPI.md#remotesansiblecollectionlistroles) | **Get** {ansible_collection_remote_href}list_roles/ | +*RemotesCollectionAPI* | [**RemotesAnsibleCollectionMyPermissions**](docs/RemotesCollectionAPI.md#remotesansiblecollectionmypermissions) | **Get** {ansible_collection_remote_href}my_permissions/ | +*RemotesCollectionAPI* | [**RemotesAnsibleCollectionPartialUpdate**](docs/RemotesCollectionAPI.md#remotesansiblecollectionpartialupdate) | **Patch** {ansible_collection_remote_href} | Update a collection remote +*RemotesCollectionAPI* | [**RemotesAnsibleCollectionRead**](docs/RemotesCollectionAPI.md#remotesansiblecollectionread) | **Get** {ansible_collection_remote_href} | Inspect a collection remote +*RemotesCollectionAPI* | [**RemotesAnsibleCollectionRemoveRole**](docs/RemotesCollectionAPI.md#remotesansiblecollectionremoverole) | **Post** {ansible_collection_remote_href}remove_role/ | +*RemotesCollectionAPI* | [**RemotesAnsibleCollectionUpdate**](docs/RemotesCollectionAPI.md#remotesansiblecollectionupdate) | **Put** {ansible_collection_remote_href} | Update a collection remote +*RemotesContainerAPI* | [**RemotesContainerContainerAddRole**](docs/RemotesContainerAPI.md#remotescontainercontaineraddrole) | **Post** {container_container_remote_href}add_role/ | +*RemotesContainerAPI* | [**RemotesContainerContainerCreate**](docs/RemotesContainerAPI.md#remotescontainercontainercreate) | **Post** /pulp/api/v3/remotes/container/container/ | Create a container remote +*RemotesContainerAPI* | [**RemotesContainerContainerDelete**](docs/RemotesContainerAPI.md#remotescontainercontainerdelete) | **Delete** {container_container_remote_href} | Delete a container remote +*RemotesContainerAPI* | [**RemotesContainerContainerList**](docs/RemotesContainerAPI.md#remotescontainercontainerlist) | **Get** /pulp/api/v3/remotes/container/container/ | List container remotes +*RemotesContainerAPI* | [**RemotesContainerContainerListRoles**](docs/RemotesContainerAPI.md#remotescontainercontainerlistroles) | **Get** {container_container_remote_href}list_roles/ | +*RemotesContainerAPI* | [**RemotesContainerContainerMyPermissions**](docs/RemotesContainerAPI.md#remotescontainercontainermypermissions) | **Get** {container_container_remote_href}my_permissions/ | +*RemotesContainerAPI* | [**RemotesContainerContainerPartialUpdate**](docs/RemotesContainerAPI.md#remotescontainercontainerpartialupdate) | **Patch** {container_container_remote_href} | Update a container remote +*RemotesContainerAPI* | [**RemotesContainerContainerRead**](docs/RemotesContainerAPI.md#remotescontainercontainerread) | **Get** {container_container_remote_href} | Inspect a container remote +*RemotesContainerAPI* | [**RemotesContainerContainerRemoveRole**](docs/RemotesContainerAPI.md#remotescontainercontainerremoverole) | **Post** {container_container_remote_href}remove_role/ | +*RemotesContainerAPI* | [**RemotesContainerContainerUpdate**](docs/RemotesContainerAPI.md#remotescontainercontainerupdate) | **Put** {container_container_remote_href} | Update a container remote +*RemotesFileAPI* | [**RemotesFileFileAddRole**](docs/RemotesFileAPI.md#remotesfilefileaddrole) | **Post** {file_file_remote_href}add_role/ | +*RemotesFileAPI* | [**RemotesFileFileCreate**](docs/RemotesFileAPI.md#remotesfilefilecreate) | **Post** /pulp/api/v3/remotes/file/file/ | Create a file remote +*RemotesFileAPI* | [**RemotesFileFileDelete**](docs/RemotesFileAPI.md#remotesfilefiledelete) | **Delete** {file_file_remote_href} | Delete a file remote +*RemotesFileAPI* | [**RemotesFileFileList**](docs/RemotesFileAPI.md#remotesfilefilelist) | **Get** /pulp/api/v3/remotes/file/file/ | List file remotes +*RemotesFileAPI* | [**RemotesFileFileListRoles**](docs/RemotesFileAPI.md#remotesfilefilelistroles) | **Get** {file_file_remote_href}list_roles/ | +*RemotesFileAPI* | [**RemotesFileFileMyPermissions**](docs/RemotesFileAPI.md#remotesfilefilemypermissions) | **Get** {file_file_remote_href}my_permissions/ | +*RemotesFileAPI* | [**RemotesFileFilePartialUpdate**](docs/RemotesFileAPI.md#remotesfilefilepartialupdate) | **Patch** {file_file_remote_href} | Update a file remote +*RemotesFileAPI* | [**RemotesFileFileRead**](docs/RemotesFileAPI.md#remotesfilefileread) | **Get** {file_file_remote_href} | Inspect a file remote +*RemotesFileAPI* | [**RemotesFileFileRemoveRole**](docs/RemotesFileAPI.md#remotesfilefileremoverole) | **Post** {file_file_remote_href}remove_role/ | +*RemotesFileAPI* | [**RemotesFileFileUpdate**](docs/RemotesFileAPI.md#remotesfilefileupdate) | **Put** {file_file_remote_href} | Update a file remote +*RemotesGemAPI* | [**RemotesGemGemCreate**](docs/RemotesGemAPI.md#remotesgemgemcreate) | **Post** /pulp/api/v3/remotes/gem/gem/ | Create a gem remote +*RemotesGemAPI* | [**RemotesGemGemDelete**](docs/RemotesGemAPI.md#remotesgemgemdelete) | **Delete** {gem_gem_remote_href} | Delete a gem remote +*RemotesGemAPI* | [**RemotesGemGemList**](docs/RemotesGemAPI.md#remotesgemgemlist) | **Get** /pulp/api/v3/remotes/gem/gem/ | List gem remotes +*RemotesGemAPI* | [**RemotesGemGemPartialUpdate**](docs/RemotesGemAPI.md#remotesgemgempartialupdate) | **Patch** {gem_gem_remote_href} | Update a gem remote +*RemotesGemAPI* | [**RemotesGemGemRead**](docs/RemotesGemAPI.md#remotesgemgemread) | **Get** {gem_gem_remote_href} | Inspect a gem remote +*RemotesGemAPI* | [**RemotesGemGemUpdate**](docs/RemotesGemAPI.md#remotesgemgemupdate) | **Put** {gem_gem_remote_href} | Update a gem remote +*RemotesGitAPI* | [**RemotesAnsibleGitAddRole**](docs/RemotesGitAPI.md#remotesansiblegitaddrole) | **Post** {ansible_git_remote_href}add_role/ | +*RemotesGitAPI* | [**RemotesAnsibleGitCreate**](docs/RemotesGitAPI.md#remotesansiblegitcreate) | **Post** /pulp/api/v3/remotes/ansible/git/ | Create a git remote +*RemotesGitAPI* | [**RemotesAnsibleGitDelete**](docs/RemotesGitAPI.md#remotesansiblegitdelete) | **Delete** {ansible_git_remote_href} | Delete a git remote +*RemotesGitAPI* | [**RemotesAnsibleGitList**](docs/RemotesGitAPI.md#remotesansiblegitlist) | **Get** /pulp/api/v3/remotes/ansible/git/ | List git remotes +*RemotesGitAPI* | [**RemotesAnsibleGitListRoles**](docs/RemotesGitAPI.md#remotesansiblegitlistroles) | **Get** {ansible_git_remote_href}list_roles/ | +*RemotesGitAPI* | [**RemotesAnsibleGitMyPermissions**](docs/RemotesGitAPI.md#remotesansiblegitmypermissions) | **Get** {ansible_git_remote_href}my_permissions/ | +*RemotesGitAPI* | [**RemotesAnsibleGitPartialUpdate**](docs/RemotesGitAPI.md#remotesansiblegitpartialupdate) | **Patch** {ansible_git_remote_href} | Update a git remote +*RemotesGitAPI* | [**RemotesAnsibleGitRead**](docs/RemotesGitAPI.md#remotesansiblegitread) | **Get** {ansible_git_remote_href} | Inspect a git remote +*RemotesGitAPI* | [**RemotesAnsibleGitRemoveRole**](docs/RemotesGitAPI.md#remotesansiblegitremoverole) | **Post** {ansible_git_remote_href}remove_role/ | +*RemotesGitAPI* | [**RemotesAnsibleGitUpdate**](docs/RemotesGitAPI.md#remotesansiblegitupdate) | **Put** {ansible_git_remote_href} | Update a git remote +*RemotesMavenAPI* | [**RemotesMavenMavenCreate**](docs/RemotesMavenAPI.md#remotesmavenmavencreate) | **Post** /pulp/api/v3/remotes/maven/maven/ | Create a maven remote +*RemotesMavenAPI* | [**RemotesMavenMavenDelete**](docs/RemotesMavenAPI.md#remotesmavenmavendelete) | **Delete** {maven_maven_remote_href} | Delete a maven remote +*RemotesMavenAPI* | [**RemotesMavenMavenList**](docs/RemotesMavenAPI.md#remotesmavenmavenlist) | **Get** /pulp/api/v3/remotes/maven/maven/ | List maven remotes +*RemotesMavenAPI* | [**RemotesMavenMavenPartialUpdate**](docs/RemotesMavenAPI.md#remotesmavenmavenpartialupdate) | **Patch** {maven_maven_remote_href} | Update a maven remote +*RemotesMavenAPI* | [**RemotesMavenMavenRead**](docs/RemotesMavenAPI.md#remotesmavenmavenread) | **Get** {maven_maven_remote_href} | Inspect a maven remote +*RemotesMavenAPI* | [**RemotesMavenMavenUpdate**](docs/RemotesMavenAPI.md#remotesmavenmavenupdate) | **Put** {maven_maven_remote_href} | Update a maven remote +*RemotesOstreeAPI* | [**RemotesOstreeOstreeCreate**](docs/RemotesOstreeAPI.md#remotesostreeostreecreate) | **Post** /pulp/api/v3/remotes/ostree/ostree/ | Create an ostree remote +*RemotesOstreeAPI* | [**RemotesOstreeOstreeDelete**](docs/RemotesOstreeAPI.md#remotesostreeostreedelete) | **Delete** {ostree_ostree_remote_href} | Delete an ostree remote +*RemotesOstreeAPI* | [**RemotesOstreeOstreeList**](docs/RemotesOstreeAPI.md#remotesostreeostreelist) | **Get** /pulp/api/v3/remotes/ostree/ostree/ | List ostree remotes +*RemotesOstreeAPI* | [**RemotesOstreeOstreePartialUpdate**](docs/RemotesOstreeAPI.md#remotesostreeostreepartialupdate) | **Patch** {ostree_ostree_remote_href} | Update an ostree remote +*RemotesOstreeAPI* | [**RemotesOstreeOstreeRead**](docs/RemotesOstreeAPI.md#remotesostreeostreeread) | **Get** {ostree_ostree_remote_href} | Inspect an ostree remote +*RemotesOstreeAPI* | [**RemotesOstreeOstreeUpdate**](docs/RemotesOstreeAPI.md#remotesostreeostreeupdate) | **Put** {ostree_ostree_remote_href} | Update an ostree remote +*RemotesPythonAPI* | [**RemotesPythonPythonCreate**](docs/RemotesPythonAPI.md#remotespythonpythoncreate) | **Post** /pulp/api/v3/remotes/python/python/ | Create a python remote +*RemotesPythonAPI* | [**RemotesPythonPythonDelete**](docs/RemotesPythonAPI.md#remotespythonpythondelete) | **Delete** {python_python_remote_href} | Delete a python remote +*RemotesPythonAPI* | [**RemotesPythonPythonFromBandersnatch**](docs/RemotesPythonAPI.md#remotespythonpythonfrombandersnatch) | **Post** /pulp/api/v3/remotes/python/python/from_bandersnatch/ | Create from Bandersnatch +*RemotesPythonAPI* | [**RemotesPythonPythonList**](docs/RemotesPythonAPI.md#remotespythonpythonlist) | **Get** /pulp/api/v3/remotes/python/python/ | List python remotes +*RemotesPythonAPI* | [**RemotesPythonPythonPartialUpdate**](docs/RemotesPythonAPI.md#remotespythonpythonpartialupdate) | **Patch** {python_python_remote_href} | Update a python remote +*RemotesPythonAPI* | [**RemotesPythonPythonRead**](docs/RemotesPythonAPI.md#remotespythonpythonread) | **Get** {python_python_remote_href} | Inspect a python remote +*RemotesPythonAPI* | [**RemotesPythonPythonUpdate**](docs/RemotesPythonAPI.md#remotespythonpythonupdate) | **Put** {python_python_remote_href} | Update a python remote +*RemotesRoleAPI* | [**RemotesAnsibleRoleAddRole**](docs/RemotesRoleAPI.md#remotesansibleroleaddrole) | **Post** {ansible_role_remote_href}add_role/ | +*RemotesRoleAPI* | [**RemotesAnsibleRoleCreate**](docs/RemotesRoleAPI.md#remotesansiblerolecreate) | **Post** /pulp/api/v3/remotes/ansible/role/ | Create a role remote +*RemotesRoleAPI* | [**RemotesAnsibleRoleDelete**](docs/RemotesRoleAPI.md#remotesansibleroledelete) | **Delete** {ansible_role_remote_href} | Delete a role remote +*RemotesRoleAPI* | [**RemotesAnsibleRoleList**](docs/RemotesRoleAPI.md#remotesansiblerolelist) | **Get** /pulp/api/v3/remotes/ansible/role/ | List role remotes +*RemotesRoleAPI* | [**RemotesAnsibleRoleListRoles**](docs/RemotesRoleAPI.md#remotesansiblerolelistroles) | **Get** {ansible_role_remote_href}list_roles/ | +*RemotesRoleAPI* | [**RemotesAnsibleRoleMyPermissions**](docs/RemotesRoleAPI.md#remotesansiblerolemypermissions) | **Get** {ansible_role_remote_href}my_permissions/ | +*RemotesRoleAPI* | [**RemotesAnsibleRolePartialUpdate**](docs/RemotesRoleAPI.md#remotesansiblerolepartialupdate) | **Patch** {ansible_role_remote_href} | Update a role remote +*RemotesRoleAPI* | [**RemotesAnsibleRoleRead**](docs/RemotesRoleAPI.md#remotesansibleroleread) | **Get** {ansible_role_remote_href} | Inspect a role remote +*RemotesRoleAPI* | [**RemotesAnsibleRoleRemoveRole**](docs/RemotesRoleAPI.md#remotesansibleroleremoverole) | **Post** {ansible_role_remote_href}remove_role/ | +*RemotesRoleAPI* | [**RemotesAnsibleRoleUpdate**](docs/RemotesRoleAPI.md#remotesansibleroleupdate) | **Put** {ansible_role_remote_href} | Update a role remote +*RemotesRpmAPI* | [**RemotesRpmRpmAddRole**](docs/RemotesRpmAPI.md#remotesrpmrpmaddrole) | **Post** {rpm_rpm_remote_href}add_role/ | +*RemotesRpmAPI* | [**RemotesRpmRpmCreate**](docs/RemotesRpmAPI.md#remotesrpmrpmcreate) | **Post** /pulp/api/v3/remotes/rpm/rpm/ | Create a rpm remote +*RemotesRpmAPI* | [**RemotesRpmRpmDelete**](docs/RemotesRpmAPI.md#remotesrpmrpmdelete) | **Delete** {rpm_rpm_remote_href} | Delete a rpm remote +*RemotesRpmAPI* | [**RemotesRpmRpmList**](docs/RemotesRpmAPI.md#remotesrpmrpmlist) | **Get** /pulp/api/v3/remotes/rpm/rpm/ | List rpm remotes +*RemotesRpmAPI* | [**RemotesRpmRpmListRoles**](docs/RemotesRpmAPI.md#remotesrpmrpmlistroles) | **Get** {rpm_rpm_remote_href}list_roles/ | +*RemotesRpmAPI* | [**RemotesRpmRpmMyPermissions**](docs/RemotesRpmAPI.md#remotesrpmrpmmypermissions) | **Get** {rpm_rpm_remote_href}my_permissions/ | +*RemotesRpmAPI* | [**RemotesRpmRpmPartialUpdate**](docs/RemotesRpmAPI.md#remotesrpmrpmpartialupdate) | **Patch** {rpm_rpm_remote_href} | Update a rpm remote +*RemotesRpmAPI* | [**RemotesRpmRpmRead**](docs/RemotesRpmAPI.md#remotesrpmrpmread) | **Get** {rpm_rpm_remote_href} | Inspect a rpm remote +*RemotesRpmAPI* | [**RemotesRpmRpmRemoveRole**](docs/RemotesRpmAPI.md#remotesrpmrpmremoverole) | **Post** {rpm_rpm_remote_href}remove_role/ | +*RemotesRpmAPI* | [**RemotesRpmRpmUpdate**](docs/RemotesRpmAPI.md#remotesrpmrpmupdate) | **Put** {rpm_rpm_remote_href} | Update a rpm remote +*RemotesUlnAPI* | [**RemotesRpmUlnAddRole**](docs/RemotesUlnAPI.md#remotesrpmulnaddrole) | **Post** {rpm_uln_remote_href}add_role/ | +*RemotesUlnAPI* | [**RemotesRpmUlnCreate**](docs/RemotesUlnAPI.md#remotesrpmulncreate) | **Post** /pulp/api/v3/remotes/rpm/uln/ | Create an uln remote +*RemotesUlnAPI* | [**RemotesRpmUlnDelete**](docs/RemotesUlnAPI.md#remotesrpmulndelete) | **Delete** {rpm_uln_remote_href} | Delete an uln remote +*RemotesUlnAPI* | [**RemotesRpmUlnList**](docs/RemotesUlnAPI.md#remotesrpmulnlist) | **Get** /pulp/api/v3/remotes/rpm/uln/ | List uln remotes +*RemotesUlnAPI* | [**RemotesRpmUlnListRoles**](docs/RemotesUlnAPI.md#remotesrpmulnlistroles) | **Get** {rpm_uln_remote_href}list_roles/ | +*RemotesUlnAPI* | [**RemotesRpmUlnMyPermissions**](docs/RemotesUlnAPI.md#remotesrpmulnmypermissions) | **Get** {rpm_uln_remote_href}my_permissions/ | +*RemotesUlnAPI* | [**RemotesRpmUlnPartialUpdate**](docs/RemotesUlnAPI.md#remotesrpmulnpartialupdate) | **Patch** {rpm_uln_remote_href} | Update an uln remote +*RemotesUlnAPI* | [**RemotesRpmUlnRead**](docs/RemotesUlnAPI.md#remotesrpmulnread) | **Get** {rpm_uln_remote_href} | Inspect an uln remote +*RemotesUlnAPI* | [**RemotesRpmUlnRemoveRole**](docs/RemotesUlnAPI.md#remotesrpmulnremoverole) | **Post** {rpm_uln_remote_href}remove_role/ | +*RemotesUlnAPI* | [**RemotesRpmUlnUpdate**](docs/RemotesUlnAPI.md#remotesrpmulnupdate) | **Put** {rpm_uln_remote_href} | Update an uln remote +*RepairAPI* | [**RepairPost**](docs/RepairAPI.md#repairpost) | **Post** /pulp/api/v3/repair/ | Repair Artifact Storage +*RepositoriesAPI* | [**RepositoriesList**](docs/RepositoriesAPI.md#repositorieslist) | **Get** /pulp/api/v3/repositories/ | List repositories +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleAddRole**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansibleaddrole) | **Post** {ansible_ansible_repository_href}add_role/ | +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleCopyCollectionVersion**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansiblecopycollectionversion) | **Post** {ansible_ansible_repository_href}copy_collection_version/ | +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleCreate**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansiblecreate) | **Post** /pulp/api/v3/repositories/ansible/ansible/ | Create an ansible repository +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleDelete**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansibledelete) | **Delete** {ansible_ansible_repository_href} | Delete an ansible repository +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleList**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansiblelist) | **Get** /pulp/api/v3/repositories/ansible/ansible/ | List ansible repositorys +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleListRoles**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansiblelistroles) | **Get** {ansible_ansible_repository_href}list_roles/ | +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleMark**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansiblemark) | **Post** {ansible_ansible_repository_href}mark/ | +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleModify**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansiblemodify) | **Post** {ansible_ansible_repository_href}modify/ | Modify Repository Content +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleMoveCollectionVersion**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansiblemovecollectionversion) | **Post** {ansible_ansible_repository_href}move_collection_version/ | +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleMyPermissions**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansiblemypermissions) | **Get** {ansible_ansible_repository_href}my_permissions/ | +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsiblePartialUpdate**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansiblepartialupdate) | **Patch** {ansible_ansible_repository_href} | Update an ansible repository +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleRead**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansibleread) | **Get** {ansible_ansible_repository_href} | Inspect an ansible repository +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleRebuildMetadata**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansiblerebuildmetadata) | **Post** {ansible_ansible_repository_href}rebuild_metadata/ | +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleRemoveRole**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansibleremoverole) | **Post** {ansible_ansible_repository_href}remove_role/ | +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleSign**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansiblesign) | **Post** {ansible_ansible_repository_href}sign/ | +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleSync**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansiblesync) | **Post** {ansible_ansible_repository_href}sync/ | +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleUnmark**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansibleunmark) | **Post** {ansible_ansible_repository_href}unmark/ | +*RepositoriesAnsibleAPI* | [**RepositoriesAnsibleAnsibleUpdate**](docs/RepositoriesAnsibleAPI.md#repositoriesansibleansibleupdate) | **Put** {ansible_ansible_repository_href} | Update an ansible repository +*RepositoriesAnsibleVersionsAPI* | [**RepositoriesAnsibleAnsibleVersionsDelete**](docs/RepositoriesAnsibleVersionsAPI.md#repositoriesansibleansibleversionsdelete) | **Delete** {ansible_ansible_repository_version_href} | Delete a repository version +*RepositoriesAnsibleVersionsAPI* | [**RepositoriesAnsibleAnsibleVersionsList**](docs/RepositoriesAnsibleVersionsAPI.md#repositoriesansibleansibleversionslist) | **Get** {ansible_ansible_repository_href}versions/ | List repository versions +*RepositoriesAnsibleVersionsAPI* | [**RepositoriesAnsibleAnsibleVersionsRead**](docs/RepositoriesAnsibleVersionsAPI.md#repositoriesansibleansibleversionsread) | **Get** {ansible_ansible_repository_version_href} | Inspect a repository version +*RepositoriesAnsibleVersionsAPI* | [**RepositoriesAnsibleAnsibleVersionsRebuildMetadata**](docs/RepositoriesAnsibleVersionsAPI.md#repositoriesansibleansibleversionsrebuildmetadata) | **Post** {ansible_ansible_repository_version_href}rebuild_metadata/ | +*RepositoriesAnsibleVersionsAPI* | [**RepositoriesAnsibleAnsibleVersionsRepair**](docs/RepositoriesAnsibleVersionsAPI.md#repositoriesansibleansibleversionsrepair) | **Post** {ansible_ansible_repository_version_href}repair/ | +*RepositoriesAptAPI* | [**RepositoriesDebAptCreate**](docs/RepositoriesAptAPI.md#repositoriesdebaptcreate) | **Post** /pulp/api/v3/repositories/deb/apt/ | Create an apt repository +*RepositoriesAptAPI* | [**RepositoriesDebAptDelete**](docs/RepositoriesAptAPI.md#repositoriesdebaptdelete) | **Delete** {deb_apt_repository_href} | Delete an apt repository +*RepositoriesAptAPI* | [**RepositoriesDebAptList**](docs/RepositoriesAptAPI.md#repositoriesdebaptlist) | **Get** /pulp/api/v3/repositories/deb/apt/ | List apt repositorys +*RepositoriesAptAPI* | [**RepositoriesDebAptModify**](docs/RepositoriesAptAPI.md#repositoriesdebaptmodify) | **Post** {deb_apt_repository_href}modify/ | Modify Repository Content +*RepositoriesAptAPI* | [**RepositoriesDebAptPartialUpdate**](docs/RepositoriesAptAPI.md#repositoriesdebaptpartialupdate) | **Patch** {deb_apt_repository_href} | Update an apt repository +*RepositoriesAptAPI* | [**RepositoriesDebAptRead**](docs/RepositoriesAptAPI.md#repositoriesdebaptread) | **Get** {deb_apt_repository_href} | Inspect an apt repository +*RepositoriesAptAPI* | [**RepositoriesDebAptSync**](docs/RepositoriesAptAPI.md#repositoriesdebaptsync) | **Post** {deb_apt_repository_href}sync/ | Sync from remote +*RepositoriesAptAPI* | [**RepositoriesDebAptUpdate**](docs/RepositoriesAptAPI.md#repositoriesdebaptupdate) | **Put** {deb_apt_repository_href} | Update an apt repository +*RepositoriesAptVersionsAPI* | [**RepositoriesDebAptVersionsDelete**](docs/RepositoriesAptVersionsAPI.md#repositoriesdebaptversionsdelete) | **Delete** {deb_apt_repository_version_href} | Delete a repository version +*RepositoriesAptVersionsAPI* | [**RepositoriesDebAptVersionsList**](docs/RepositoriesAptVersionsAPI.md#repositoriesdebaptversionslist) | **Get** {deb_apt_repository_href}versions/ | List repository versions +*RepositoriesAptVersionsAPI* | [**RepositoriesDebAptVersionsRead**](docs/RepositoriesAptVersionsAPI.md#repositoriesdebaptversionsread) | **Get** {deb_apt_repository_version_href} | Inspect a repository version +*RepositoriesAptVersionsAPI* | [**RepositoriesDebAptVersionsRepair**](docs/RepositoriesAptVersionsAPI.md#repositoriesdebaptversionsrepair) | **Post** {deb_apt_repository_version_href}repair/ | +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerAdd**](docs/RepositoriesContainerAPI.md#repositoriescontainercontaineradd) | **Post** {container_container_repository_href}add/ | Add content +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerAddRole**](docs/RepositoriesContainerAPI.md#repositoriescontainercontaineraddrole) | **Post** {container_container_repository_href}add_role/ | +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerBuildImage**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainerbuildimage) | **Post** {container_container_repository_href}build_image/ | Build an Image +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerCopyManifests**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainercopymanifests) | **Post** {container_container_repository_href}copy_manifests/ | Copy manifests +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerCopyTags**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainercopytags) | **Post** {container_container_repository_href}copy_tags/ | Copy tags +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerCreate**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainercreate) | **Post** /pulp/api/v3/repositories/container/container/ | Create a container repository +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerDelete**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainerdelete) | **Delete** {container_container_repository_href} | Delete a container repository +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerList**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainerlist) | **Get** /pulp/api/v3/repositories/container/container/ | List container repositorys +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerListRoles**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainerlistroles) | **Get** {container_container_repository_href}list_roles/ | +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerMyPermissions**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainermypermissions) | **Get** {container_container_repository_href}my_permissions/ | +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerPartialUpdate**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainerpartialupdate) | **Patch** {container_container_repository_href} | Update a container repository +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerRead**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainerread) | **Get** {container_container_repository_href} | Inspect a container repository +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerRemove**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainerremove) | **Post** {container_container_repository_href}remove/ | Remove content +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerRemoveRole**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainerremoverole) | **Post** {container_container_repository_href}remove_role/ | +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerSign**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainersign) | **Post** {container_container_repository_href}sign/ | Sign images in the repo +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerSync**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainersync) | **Post** {container_container_repository_href}sync/ | Sync from a remote +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerTag**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainertag) | **Post** {container_container_repository_href}tag/ | Create a Tag +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerUntag**](docs/RepositoriesContainerAPI.md#repositoriescontainercontaineruntag) | **Post** {container_container_repository_href}untag/ | Delete a tag +*RepositoriesContainerAPI* | [**RepositoriesContainerContainerUpdate**](docs/RepositoriesContainerAPI.md#repositoriescontainercontainerupdate) | **Put** {container_container_repository_href} | Update a container repository +*RepositoriesContainerPushAPI* | [**RepositoriesContainerContainerPushAddRole**](docs/RepositoriesContainerPushAPI.md#repositoriescontainercontainerpushaddrole) | **Post** {container_container_push_repository_href}add_role/ | +*RepositoriesContainerPushAPI* | [**RepositoriesContainerContainerPushList**](docs/RepositoriesContainerPushAPI.md#repositoriescontainercontainerpushlist) | **Get** /pulp/api/v3/repositories/container/container-push/ | List container push repositorys +*RepositoriesContainerPushAPI* | [**RepositoriesContainerContainerPushListRoles**](docs/RepositoriesContainerPushAPI.md#repositoriescontainercontainerpushlistroles) | **Get** {container_container_push_repository_href}list_roles/ | +*RepositoriesContainerPushAPI* | [**RepositoriesContainerContainerPushMyPermissions**](docs/RepositoriesContainerPushAPI.md#repositoriescontainercontainerpushmypermissions) | **Get** {container_container_push_repository_href}my_permissions/ | +*RepositoriesContainerPushAPI* | [**RepositoriesContainerContainerPushPartialUpdate**](docs/RepositoriesContainerPushAPI.md#repositoriescontainercontainerpushpartialupdate) | **Patch** {container_container_push_repository_href} | Update a container push repository +*RepositoriesContainerPushAPI* | [**RepositoriesContainerContainerPushRead**](docs/RepositoriesContainerPushAPI.md#repositoriescontainercontainerpushread) | **Get** {container_container_push_repository_href} | Inspect a container push repository +*RepositoriesContainerPushAPI* | [**RepositoriesContainerContainerPushRemoveImage**](docs/RepositoriesContainerPushAPI.md#repositoriescontainercontainerpushremoveimage) | **Post** {container_container_push_repository_href}remove_image/ | Delete an image from a repository +*RepositoriesContainerPushAPI* | [**RepositoriesContainerContainerPushRemoveRole**](docs/RepositoriesContainerPushAPI.md#repositoriescontainercontainerpushremoverole) | **Post** {container_container_push_repository_href}remove_role/ | +*RepositoriesContainerPushAPI* | [**RepositoriesContainerContainerPushRemoveSignatures**](docs/RepositoriesContainerPushAPI.md#repositoriescontainercontainerpushremovesignatures) | **Post** {container_container_push_repository_href}remove_signatures/ | +*RepositoriesContainerPushAPI* | [**RepositoriesContainerContainerPushSign**](docs/RepositoriesContainerPushAPI.md#repositoriescontainercontainerpushsign) | **Post** {container_container_push_repository_href}sign/ | Sign images in the repo +*RepositoriesContainerPushAPI* | [**RepositoriesContainerContainerPushTag**](docs/RepositoriesContainerPushAPI.md#repositoriescontainercontainerpushtag) | **Post** {container_container_push_repository_href}tag/ | Create a Tag +*RepositoriesContainerPushAPI* | [**RepositoriesContainerContainerPushUntag**](docs/RepositoriesContainerPushAPI.md#repositoriescontainercontainerpushuntag) | **Post** {container_container_push_repository_href}untag/ | Delete a tag +*RepositoriesContainerPushAPI* | [**RepositoriesContainerContainerPushUpdate**](docs/RepositoriesContainerPushAPI.md#repositoriescontainercontainerpushupdate) | **Put** {container_container_push_repository_href} | Update a container push repository +*RepositoriesContainerPushVersionsAPI* | [**RepositoriesContainerContainerPushVersionsDelete**](docs/RepositoriesContainerPushVersionsAPI.md#repositoriescontainercontainerpushversionsdelete) | **Delete** {container_container_push_repository_version_href} | Delete a repository version +*RepositoriesContainerPushVersionsAPI* | [**RepositoriesContainerContainerPushVersionsList**](docs/RepositoriesContainerPushVersionsAPI.md#repositoriescontainercontainerpushversionslist) | **Get** {container_container_push_repository_href}versions/ | List repository versions +*RepositoriesContainerPushVersionsAPI* | [**RepositoriesContainerContainerPushVersionsRead**](docs/RepositoriesContainerPushVersionsAPI.md#repositoriescontainercontainerpushversionsread) | **Get** {container_container_push_repository_version_href} | Inspect a repository version +*RepositoriesContainerPushVersionsAPI* | [**RepositoriesContainerContainerPushVersionsRepair**](docs/RepositoriesContainerPushVersionsAPI.md#repositoriescontainercontainerpushversionsrepair) | **Post** {container_container_push_repository_version_href}repair/ | +*RepositoriesContainerVersionsAPI* | [**RepositoriesContainerContainerVersionsDelete**](docs/RepositoriesContainerVersionsAPI.md#repositoriescontainercontainerversionsdelete) | **Delete** {container_container_repository_version_href} | Delete a repository version +*RepositoriesContainerVersionsAPI* | [**RepositoriesContainerContainerVersionsList**](docs/RepositoriesContainerVersionsAPI.md#repositoriescontainercontainerversionslist) | **Get** {container_container_repository_href}versions/ | List repository versions +*RepositoriesContainerVersionsAPI* | [**RepositoriesContainerContainerVersionsRead**](docs/RepositoriesContainerVersionsAPI.md#repositoriescontainercontainerversionsread) | **Get** {container_container_repository_version_href} | Inspect a repository version +*RepositoriesContainerVersionsAPI* | [**RepositoriesContainerContainerVersionsRepair**](docs/RepositoriesContainerVersionsAPI.md#repositoriescontainercontainerversionsrepair) | **Post** {container_container_repository_version_href}repair/ | +*RepositoriesFileAPI* | [**RepositoriesFileFileAddRole**](docs/RepositoriesFileAPI.md#repositoriesfilefileaddrole) | **Post** {file_file_repository_href}add_role/ | +*RepositoriesFileAPI* | [**RepositoriesFileFileCreate**](docs/RepositoriesFileAPI.md#repositoriesfilefilecreate) | **Post** /pulp/api/v3/repositories/file/file/ | Create a file repository +*RepositoriesFileAPI* | [**RepositoriesFileFileDelete**](docs/RepositoriesFileAPI.md#repositoriesfilefiledelete) | **Delete** {file_file_repository_href} | Delete a file repository +*RepositoriesFileAPI* | [**RepositoriesFileFileList**](docs/RepositoriesFileAPI.md#repositoriesfilefilelist) | **Get** /pulp/api/v3/repositories/file/file/ | List file repositorys +*RepositoriesFileAPI* | [**RepositoriesFileFileListRoles**](docs/RepositoriesFileAPI.md#repositoriesfilefilelistroles) | **Get** {file_file_repository_href}list_roles/ | +*RepositoriesFileAPI* | [**RepositoriesFileFileModify**](docs/RepositoriesFileAPI.md#repositoriesfilefilemodify) | **Post** {file_file_repository_href}modify/ | Modify Repository Content +*RepositoriesFileAPI* | [**RepositoriesFileFileMyPermissions**](docs/RepositoriesFileAPI.md#repositoriesfilefilemypermissions) | **Get** {file_file_repository_href}my_permissions/ | +*RepositoriesFileAPI* | [**RepositoriesFileFilePartialUpdate**](docs/RepositoriesFileAPI.md#repositoriesfilefilepartialupdate) | **Patch** {file_file_repository_href} | Update a file repository +*RepositoriesFileAPI* | [**RepositoriesFileFileRead**](docs/RepositoriesFileAPI.md#repositoriesfilefileread) | **Get** {file_file_repository_href} | Inspect a file repository +*RepositoriesFileAPI* | [**RepositoriesFileFileRemoveRole**](docs/RepositoriesFileAPI.md#repositoriesfilefileremoverole) | **Post** {file_file_repository_href}remove_role/ | +*RepositoriesFileAPI* | [**RepositoriesFileFileSync**](docs/RepositoriesFileAPI.md#repositoriesfilefilesync) | **Post** {file_file_repository_href}sync/ | Sync from a remote +*RepositoriesFileAPI* | [**RepositoriesFileFileUpdate**](docs/RepositoriesFileAPI.md#repositoriesfilefileupdate) | **Put** {file_file_repository_href} | Update a file repository +*RepositoriesFileVersionsAPI* | [**RepositoriesFileFileVersionsDelete**](docs/RepositoriesFileVersionsAPI.md#repositoriesfilefileversionsdelete) | **Delete** {file_file_repository_version_href} | Delete a repository version +*RepositoriesFileVersionsAPI* | [**RepositoriesFileFileVersionsList**](docs/RepositoriesFileVersionsAPI.md#repositoriesfilefileversionslist) | **Get** {file_file_repository_href}versions/ | List repository versions +*RepositoriesFileVersionsAPI* | [**RepositoriesFileFileVersionsRead**](docs/RepositoriesFileVersionsAPI.md#repositoriesfilefileversionsread) | **Get** {file_file_repository_version_href} | Inspect a repository version +*RepositoriesFileVersionsAPI* | [**RepositoriesFileFileVersionsRepair**](docs/RepositoriesFileVersionsAPI.md#repositoriesfilefileversionsrepair) | **Post** {file_file_repository_version_href}repair/ | +*RepositoriesGemAPI* | [**RepositoriesGemGemCreate**](docs/RepositoriesGemAPI.md#repositoriesgemgemcreate) | **Post** /pulp/api/v3/repositories/gem/gem/ | Create a gem repository +*RepositoriesGemAPI* | [**RepositoriesGemGemDelete**](docs/RepositoriesGemAPI.md#repositoriesgemgemdelete) | **Delete** {gem_gem_repository_href} | Delete a gem repository +*RepositoriesGemAPI* | [**RepositoriesGemGemList**](docs/RepositoriesGemAPI.md#repositoriesgemgemlist) | **Get** /pulp/api/v3/repositories/gem/gem/ | List gem repositorys +*RepositoriesGemAPI* | [**RepositoriesGemGemModify**](docs/RepositoriesGemAPI.md#repositoriesgemgemmodify) | **Post** {gem_gem_repository_href}modify/ | Modify Repository Content +*RepositoriesGemAPI* | [**RepositoriesGemGemPartialUpdate**](docs/RepositoriesGemAPI.md#repositoriesgemgempartialupdate) | **Patch** {gem_gem_repository_href} | Update a gem repository +*RepositoriesGemAPI* | [**RepositoriesGemGemRead**](docs/RepositoriesGemAPI.md#repositoriesgemgemread) | **Get** {gem_gem_repository_href} | Inspect a gem repository +*RepositoriesGemAPI* | [**RepositoriesGemGemSync**](docs/RepositoriesGemAPI.md#repositoriesgemgemsync) | **Post** {gem_gem_repository_href}sync/ | Sync from a remote +*RepositoriesGemAPI* | [**RepositoriesGemGemUpdate**](docs/RepositoriesGemAPI.md#repositoriesgemgemupdate) | **Put** {gem_gem_repository_href} | Update a gem repository +*RepositoriesGemVersionsAPI* | [**RepositoriesGemGemVersionsDelete**](docs/RepositoriesGemVersionsAPI.md#repositoriesgemgemversionsdelete) | **Delete** {gem_gem_repository_version_href} | Delete a repository version +*RepositoriesGemVersionsAPI* | [**RepositoriesGemGemVersionsList**](docs/RepositoriesGemVersionsAPI.md#repositoriesgemgemversionslist) | **Get** {gem_gem_repository_href}versions/ | List repository versions +*RepositoriesGemVersionsAPI* | [**RepositoriesGemGemVersionsRead**](docs/RepositoriesGemVersionsAPI.md#repositoriesgemgemversionsread) | **Get** {gem_gem_repository_version_href} | Inspect a repository version +*RepositoriesGemVersionsAPI* | [**RepositoriesGemGemVersionsRepair**](docs/RepositoriesGemVersionsAPI.md#repositoriesgemgemversionsrepair) | **Post** {gem_gem_repository_version_href}repair/ | +*RepositoriesMavenAPI* | [**RepositoriesMavenMavenAddCachedContent**](docs/RepositoriesMavenAPI.md#repositoriesmavenmavenaddcachedcontent) | **Post** {maven_maven_repository_href}add_cached_content/ | Add cached content +*RepositoriesMavenAPI* | [**RepositoriesMavenMavenCreate**](docs/RepositoriesMavenAPI.md#repositoriesmavenmavencreate) | **Post** /pulp/api/v3/repositories/maven/maven/ | Create a maven repository +*RepositoriesMavenAPI* | [**RepositoriesMavenMavenDelete**](docs/RepositoriesMavenAPI.md#repositoriesmavenmavendelete) | **Delete** {maven_maven_repository_href} | Delete a maven repository +*RepositoriesMavenAPI* | [**RepositoriesMavenMavenList**](docs/RepositoriesMavenAPI.md#repositoriesmavenmavenlist) | **Get** /pulp/api/v3/repositories/maven/maven/ | List maven repositorys +*RepositoriesMavenAPI* | [**RepositoriesMavenMavenPartialUpdate**](docs/RepositoriesMavenAPI.md#repositoriesmavenmavenpartialupdate) | **Patch** {maven_maven_repository_href} | Update a maven repository +*RepositoriesMavenAPI* | [**RepositoriesMavenMavenRead**](docs/RepositoriesMavenAPI.md#repositoriesmavenmavenread) | **Get** {maven_maven_repository_href} | Inspect a maven repository +*RepositoriesMavenAPI* | [**RepositoriesMavenMavenUpdate**](docs/RepositoriesMavenAPI.md#repositoriesmavenmavenupdate) | **Put** {maven_maven_repository_href} | Update a maven repository +*RepositoriesMavenVersionsAPI* | [**RepositoriesMavenMavenVersionsDelete**](docs/RepositoriesMavenVersionsAPI.md#repositoriesmavenmavenversionsdelete) | **Delete** {maven_maven_repository_version_href} | Delete a repository version +*RepositoriesMavenVersionsAPI* | [**RepositoriesMavenMavenVersionsList**](docs/RepositoriesMavenVersionsAPI.md#repositoriesmavenmavenversionslist) | **Get** {maven_maven_repository_href}versions/ | List repository versions +*RepositoriesMavenVersionsAPI* | [**RepositoriesMavenMavenVersionsRead**](docs/RepositoriesMavenVersionsAPI.md#repositoriesmavenmavenversionsread) | **Get** {maven_maven_repository_version_href} | Inspect a repository version +*RepositoriesMavenVersionsAPI* | [**RepositoriesMavenMavenVersionsRepair**](docs/RepositoriesMavenVersionsAPI.md#repositoriesmavenmavenversionsrepair) | **Post** {maven_maven_repository_version_href}repair/ | +*RepositoriesOstreeAPI* | [**RepositoriesOstreeOstreeCreate**](docs/RepositoriesOstreeAPI.md#repositoriesostreeostreecreate) | **Post** /pulp/api/v3/repositories/ostree/ostree/ | Create an ostree repository +*RepositoriesOstreeAPI* | [**RepositoriesOstreeOstreeDelete**](docs/RepositoriesOstreeAPI.md#repositoriesostreeostreedelete) | **Delete** {ostree_ostree_repository_href} | Delete an ostree repository +*RepositoriesOstreeAPI* | [**RepositoriesOstreeOstreeImportAll**](docs/RepositoriesOstreeAPI.md#repositoriesostreeostreeimportall) | **Post** {ostree_ostree_repository_href}import_all/ | Import refs and commits to a repository +*RepositoriesOstreeAPI* | [**RepositoriesOstreeOstreeImportCommits**](docs/RepositoriesOstreeAPI.md#repositoriesostreeostreeimportcommits) | **Post** {ostree_ostree_repository_href}import_commits/ | Append child commits to a repository +*RepositoriesOstreeAPI* | [**RepositoriesOstreeOstreeList**](docs/RepositoriesOstreeAPI.md#repositoriesostreeostreelist) | **Get** /pulp/api/v3/repositories/ostree/ostree/ | List ostree repositorys +*RepositoriesOstreeAPI* | [**RepositoriesOstreeOstreeModify**](docs/RepositoriesOstreeAPI.md#repositoriesostreeostreemodify) | **Post** {ostree_ostree_repository_href}modify/ | Modify repository +*RepositoriesOstreeAPI* | [**RepositoriesOstreeOstreePartialUpdate**](docs/RepositoriesOstreeAPI.md#repositoriesostreeostreepartialupdate) | **Patch** {ostree_ostree_repository_href} | Update an ostree repository +*RepositoriesOstreeAPI* | [**RepositoriesOstreeOstreeRead**](docs/RepositoriesOstreeAPI.md#repositoriesostreeostreeread) | **Get** {ostree_ostree_repository_href} | Inspect an ostree repository +*RepositoriesOstreeAPI* | [**RepositoriesOstreeOstreeSync**](docs/RepositoriesOstreeAPI.md#repositoriesostreeostreesync) | **Post** {ostree_ostree_repository_href}sync/ | Sync from remote +*RepositoriesOstreeAPI* | [**RepositoriesOstreeOstreeUpdate**](docs/RepositoriesOstreeAPI.md#repositoriesostreeostreeupdate) | **Put** {ostree_ostree_repository_href} | Update an ostree repository +*RepositoriesOstreeVersionsAPI* | [**RepositoriesOstreeOstreeVersionsDelete**](docs/RepositoriesOstreeVersionsAPI.md#repositoriesostreeostreeversionsdelete) | **Delete** {ostree_ostree_repository_version_href} | Delete a repository version +*RepositoriesOstreeVersionsAPI* | [**RepositoriesOstreeOstreeVersionsList**](docs/RepositoriesOstreeVersionsAPI.md#repositoriesostreeostreeversionslist) | **Get** {ostree_ostree_repository_href}versions/ | List repository versions +*RepositoriesOstreeVersionsAPI* | [**RepositoriesOstreeOstreeVersionsRead**](docs/RepositoriesOstreeVersionsAPI.md#repositoriesostreeostreeversionsread) | **Get** {ostree_ostree_repository_version_href} | Inspect a repository version +*RepositoriesOstreeVersionsAPI* | [**RepositoriesOstreeOstreeVersionsRepair**](docs/RepositoriesOstreeVersionsAPI.md#repositoriesostreeostreeversionsrepair) | **Post** {ostree_ostree_repository_version_href}repair/ | +*RepositoriesPythonAPI* | [**RepositoriesPythonPythonCreate**](docs/RepositoriesPythonAPI.md#repositoriespythonpythoncreate) | **Post** /pulp/api/v3/repositories/python/python/ | Create a python repository +*RepositoriesPythonAPI* | [**RepositoriesPythonPythonDelete**](docs/RepositoriesPythonAPI.md#repositoriespythonpythondelete) | **Delete** {python_python_repository_href} | Delete a python repository +*RepositoriesPythonAPI* | [**RepositoriesPythonPythonList**](docs/RepositoriesPythonAPI.md#repositoriespythonpythonlist) | **Get** /pulp/api/v3/repositories/python/python/ | List python repositorys +*RepositoriesPythonAPI* | [**RepositoriesPythonPythonModify**](docs/RepositoriesPythonAPI.md#repositoriespythonpythonmodify) | **Post** {python_python_repository_href}modify/ | Modify Repository Content +*RepositoriesPythonAPI* | [**RepositoriesPythonPythonPartialUpdate**](docs/RepositoriesPythonAPI.md#repositoriespythonpythonpartialupdate) | **Patch** {python_python_repository_href} | Update a python repository +*RepositoriesPythonAPI* | [**RepositoriesPythonPythonRead**](docs/RepositoriesPythonAPI.md#repositoriespythonpythonread) | **Get** {python_python_repository_href} | Inspect a python repository +*RepositoriesPythonAPI* | [**RepositoriesPythonPythonSync**](docs/RepositoriesPythonAPI.md#repositoriespythonpythonsync) | **Post** {python_python_repository_href}sync/ | Sync from remote +*RepositoriesPythonAPI* | [**RepositoriesPythonPythonUpdate**](docs/RepositoriesPythonAPI.md#repositoriespythonpythonupdate) | **Put** {python_python_repository_href} | Update a python repository +*RepositoriesPythonVersionsAPI* | [**RepositoriesPythonPythonVersionsDelete**](docs/RepositoriesPythonVersionsAPI.md#repositoriespythonpythonversionsdelete) | **Delete** {python_python_repository_version_href} | Delete a repository version +*RepositoriesPythonVersionsAPI* | [**RepositoriesPythonPythonVersionsList**](docs/RepositoriesPythonVersionsAPI.md#repositoriespythonpythonversionslist) | **Get** {python_python_repository_href}versions/ | List repository versions +*RepositoriesPythonVersionsAPI* | [**RepositoriesPythonPythonVersionsRead**](docs/RepositoriesPythonVersionsAPI.md#repositoriespythonpythonversionsread) | **Get** {python_python_repository_version_href} | Inspect a repository version +*RepositoriesPythonVersionsAPI* | [**RepositoriesPythonPythonVersionsRepair**](docs/RepositoriesPythonVersionsAPI.md#repositoriespythonpythonversionsrepair) | **Post** {python_python_repository_version_href}repair/ | +*RepositoriesReclaimSpaceAPI* | [**RepositoriesReclaimSpaceReclaim**](docs/RepositoriesReclaimSpaceAPI.md#repositoriesreclaimspacereclaim) | **Post** /pulp/api/v3/repositories/reclaim_space/ | +*RepositoriesRpmAPI* | [**RepositoriesRpmRpmAddRole**](docs/RepositoriesRpmAPI.md#repositoriesrpmrpmaddrole) | **Post** {rpm_rpm_repository_href}add_role/ | +*RepositoriesRpmAPI* | [**RepositoriesRpmRpmCreate**](docs/RepositoriesRpmAPI.md#repositoriesrpmrpmcreate) | **Post** /pulp/api/v3/repositories/rpm/rpm/ | Create a rpm repository +*RepositoriesRpmAPI* | [**RepositoriesRpmRpmDelete**](docs/RepositoriesRpmAPI.md#repositoriesrpmrpmdelete) | **Delete** {rpm_rpm_repository_href} | Delete a rpm repository +*RepositoriesRpmAPI* | [**RepositoriesRpmRpmList**](docs/RepositoriesRpmAPI.md#repositoriesrpmrpmlist) | **Get** /pulp/api/v3/repositories/rpm/rpm/ | List rpm repositorys +*RepositoriesRpmAPI* | [**RepositoriesRpmRpmListRoles**](docs/RepositoriesRpmAPI.md#repositoriesrpmrpmlistroles) | **Get** {rpm_rpm_repository_href}list_roles/ | +*RepositoriesRpmAPI* | [**RepositoriesRpmRpmModify**](docs/RepositoriesRpmAPI.md#repositoriesrpmrpmmodify) | **Post** {rpm_rpm_repository_href}modify/ | Modify Repository Content +*RepositoriesRpmAPI* | [**RepositoriesRpmRpmMyPermissions**](docs/RepositoriesRpmAPI.md#repositoriesrpmrpmmypermissions) | **Get** {rpm_rpm_repository_href}my_permissions/ | +*RepositoriesRpmAPI* | [**RepositoriesRpmRpmPartialUpdate**](docs/RepositoriesRpmAPI.md#repositoriesrpmrpmpartialupdate) | **Patch** {rpm_rpm_repository_href} | Update a rpm repository +*RepositoriesRpmAPI* | [**RepositoriesRpmRpmRead**](docs/RepositoriesRpmAPI.md#repositoriesrpmrpmread) | **Get** {rpm_rpm_repository_href} | Inspect a rpm repository +*RepositoriesRpmAPI* | [**RepositoriesRpmRpmRemoveRole**](docs/RepositoriesRpmAPI.md#repositoriesrpmrpmremoverole) | **Post** {rpm_rpm_repository_href}remove_role/ | +*RepositoriesRpmAPI* | [**RepositoriesRpmRpmSync**](docs/RepositoriesRpmAPI.md#repositoriesrpmrpmsync) | **Post** {rpm_rpm_repository_href}sync/ | Sync from remote +*RepositoriesRpmAPI* | [**RepositoriesRpmRpmUpdate**](docs/RepositoriesRpmAPI.md#repositoriesrpmrpmupdate) | **Put** {rpm_rpm_repository_href} | Update a rpm repository +*RepositoriesRpmVersionsAPI* | [**RepositoriesRpmRpmVersionsDelete**](docs/RepositoriesRpmVersionsAPI.md#repositoriesrpmrpmversionsdelete) | **Delete** {rpm_rpm_repository_version_href} | Delete a repository version +*RepositoriesRpmVersionsAPI* | [**RepositoriesRpmRpmVersionsList**](docs/RepositoriesRpmVersionsAPI.md#repositoriesrpmrpmversionslist) | **Get** {rpm_rpm_repository_href}versions/ | List repository versions +*RepositoriesRpmVersionsAPI* | [**RepositoriesRpmRpmVersionsRead**](docs/RepositoriesRpmVersionsAPI.md#repositoriesrpmrpmversionsread) | **Get** {rpm_rpm_repository_version_href} | Inspect a repository version +*RepositoriesRpmVersionsAPI* | [**RepositoriesRpmRpmVersionsRepair**](docs/RepositoriesRpmVersionsAPI.md#repositoriesrpmrpmversionsrepair) | **Post** {rpm_rpm_repository_version_href}repair/ | +*RepositoryVersionsAPI* | [**RepositoryVersionsList**](docs/RepositoryVersionsAPI.md#repositoryversionslist) | **Get** /pulp/api/v3/repository_versions/ | List repository versions +*RolesAPI* | [**RolesCreate**](docs/RolesAPI.md#rolescreate) | **Post** /pulp/api/v3/roles/ | Create a role +*RolesAPI* | [**RolesDelete**](docs/RolesAPI.md#rolesdelete) | **Delete** {role_href} | Delete a role +*RolesAPI* | [**RolesList**](docs/RolesAPI.md#roleslist) | **Get** /pulp/api/v3/roles/ | List roles +*RolesAPI* | [**RolesPartialUpdate**](docs/RolesAPI.md#rolespartialupdate) | **Patch** {role_href} | Update a role +*RolesAPI* | [**RolesRead**](docs/RolesAPI.md#rolesread) | **Get** {role_href} | Inspect a role +*RolesAPI* | [**RolesUpdate**](docs/RolesAPI.md#rolesupdate) | **Put** {role_href} | Update a role +*RpmCompsAPI* | [**RpmCompsUpload**](docs/RpmCompsAPI.md#rpmcompsupload) | **Post** /pulp/api/v3/rpm/comps/ | Upload comps.xml +*RpmCopyAPI* | [**CopyContent**](docs/RpmCopyAPI.md#copycontent) | **Post** /pulp/api/v3/rpm/copy/ | Copy content +*SigningServicesAPI* | [**SigningServicesList**](docs/SigningServicesAPI.md#signingserviceslist) | **Get** /pulp/api/v3/signing-services/ | List signing services +*SigningServicesAPI* | [**SigningServicesRead**](docs/SigningServicesAPI.md#signingservicesread) | **Get** {signing_service_href} | Inspect a signing service +*StatusAPI* | [**StatusRead**](docs/StatusAPI.md#statusread) | **Get** /pulp/api/v3/status/ | Inspect status of Pulp +*TaskGroupsAPI* | [**TaskGroupsList**](docs/TaskGroupsAPI.md#taskgroupslist) | **Get** /pulp/api/v3/task-groups/ | List task groups +*TaskGroupsAPI* | [**TaskGroupsRead**](docs/TaskGroupsAPI.md#taskgroupsread) | **Get** {task_group_href} | Inspect a task group +*TaskSchedulesAPI* | [**TaskSchedulesAddRole**](docs/TaskSchedulesAPI.md#taskschedulesaddrole) | **Post** {task_schedule_href}add_role/ | +*TaskSchedulesAPI* | [**TaskSchedulesList**](docs/TaskSchedulesAPI.md#taskscheduleslist) | **Get** /pulp/api/v3/task-schedules/ | List task schedules +*TaskSchedulesAPI* | [**TaskSchedulesListRoles**](docs/TaskSchedulesAPI.md#taskscheduleslistroles) | **Get** {task_schedule_href}list_roles/ | +*TaskSchedulesAPI* | [**TaskSchedulesMyPermissions**](docs/TaskSchedulesAPI.md#taskschedulesmypermissions) | **Get** {task_schedule_href}my_permissions/ | +*TaskSchedulesAPI* | [**TaskSchedulesRead**](docs/TaskSchedulesAPI.md#taskschedulesread) | **Get** {task_schedule_href} | Inspect a task schedule +*TaskSchedulesAPI* | [**TaskSchedulesRemoveRole**](docs/TaskSchedulesAPI.md#taskschedulesremoverole) | **Post** {task_schedule_href}remove_role/ | +*TasksAPI* | [**TasksAddRole**](docs/TasksAPI.md#tasksaddrole) | **Post** {task_href}add_role/ | +*TasksAPI* | [**TasksCancel**](docs/TasksAPI.md#taskscancel) | **Patch** {task_href} | Cancel a task +*TasksAPI* | [**TasksDelete**](docs/TasksAPI.md#tasksdelete) | **Delete** {task_href} | Delete a task +*TasksAPI* | [**TasksList**](docs/TasksAPI.md#taskslist) | **Get** /pulp/api/v3/tasks/ | List tasks +*TasksAPI* | [**TasksListRoles**](docs/TasksAPI.md#taskslistroles) | **Get** {task_href}list_roles/ | +*TasksAPI* | [**TasksMyPermissions**](docs/TasksAPI.md#tasksmypermissions) | **Get** {task_href}my_permissions/ | +*TasksAPI* | [**TasksPurge**](docs/TasksAPI.md#taskspurge) | **Post** /pulp/api/v3/tasks/purge/ | Purge Completed Tasks +*TasksAPI* | [**TasksRead**](docs/TasksAPI.md#tasksread) | **Get** {task_href} | Inspect a task +*TasksAPI* | [**TasksRemoveRole**](docs/TasksAPI.md#tasksremoverole) | **Post** {task_href}remove_role/ | +*TokenAPI* | [**TokenGet**](docs/TokenAPI.md#tokenget) | **Get** /token/ | +*UploadsAPI* | [**UploadsAddRole**](docs/UploadsAPI.md#uploadsaddrole) | **Post** {upload_href}add_role/ | +*UploadsAPI* | [**UploadsCommit**](docs/UploadsAPI.md#uploadscommit) | **Post** {upload_href}commit/ | Finish an Upload +*UploadsAPI* | [**UploadsCreate**](docs/UploadsAPI.md#uploadscreate) | **Post** /pulp/api/v3/uploads/ | Create an upload +*UploadsAPI* | [**UploadsDelete**](docs/UploadsAPI.md#uploadsdelete) | **Delete** {upload_href} | Delete an upload +*UploadsAPI* | [**UploadsList**](docs/UploadsAPI.md#uploadslist) | **Get** /pulp/api/v3/uploads/ | List uploads +*UploadsAPI* | [**UploadsListRoles**](docs/UploadsAPI.md#uploadslistroles) | **Get** {upload_href}list_roles/ | +*UploadsAPI* | [**UploadsMyPermissions**](docs/UploadsAPI.md#uploadsmypermissions) | **Get** {upload_href}my_permissions/ | +*UploadsAPI* | [**UploadsRead**](docs/UploadsAPI.md#uploadsread) | **Get** {upload_href} | Inspect an upload +*UploadsAPI* | [**UploadsRemoveRole**](docs/UploadsAPI.md#uploadsremoverole) | **Post** {upload_href}remove_role/ | +*UploadsAPI* | [**UploadsUpdate**](docs/UploadsAPI.md#uploadsupdate) | **Put** {upload_href} | Upload a file chunk +*UpstreamPulpsAPI* | [**UpstreamPulpsCreate**](docs/UpstreamPulpsAPI.md#upstreampulpscreate) | **Post** /pulp/api/v3/upstream-pulps/ | Create an upstream pulp +*UpstreamPulpsAPI* | [**UpstreamPulpsDelete**](docs/UpstreamPulpsAPI.md#upstreampulpsdelete) | **Delete** {upstream_pulp_href} | Delete an upstream pulp +*UpstreamPulpsAPI* | [**UpstreamPulpsList**](docs/UpstreamPulpsAPI.md#upstreampulpslist) | **Get** /pulp/api/v3/upstream-pulps/ | List upstream pulps +*UpstreamPulpsAPI* | [**UpstreamPulpsPartialUpdate**](docs/UpstreamPulpsAPI.md#upstreampulpspartialupdate) | **Patch** {upstream_pulp_href} | Update an upstream pulp +*UpstreamPulpsAPI* | [**UpstreamPulpsRead**](docs/UpstreamPulpsAPI.md#upstreampulpsread) | **Get** {upstream_pulp_href} | Inspect an upstream pulp +*UpstreamPulpsAPI* | [**UpstreamPulpsReplicate**](docs/UpstreamPulpsAPI.md#upstreampulpsreplicate) | **Post** {upstream_pulp_href}replicate/ | Replicate +*UpstreamPulpsAPI* | [**UpstreamPulpsUpdate**](docs/UpstreamPulpsAPI.md#upstreampulpsupdate) | **Put** {upstream_pulp_href} | Update an upstream pulp +*UsersAPI* | [**UsersCreate**](docs/UsersAPI.md#userscreate) | **Post** /pulp/api/v3/users/ | Create an user +*UsersAPI* | [**UsersDelete**](docs/UsersAPI.md#usersdelete) | **Delete** {auth_user_href} | Delete an user +*UsersAPI* | [**UsersList**](docs/UsersAPI.md#userslist) | **Get** /pulp/api/v3/users/ | List users +*UsersAPI* | [**UsersPartialUpdate**](docs/UsersAPI.md#userspartialupdate) | **Patch** {auth_user_href} | Update an user +*UsersAPI* | [**UsersRead**](docs/UsersAPI.md#usersread) | **Get** {auth_user_href} | Inspect an user +*UsersAPI* | [**UsersUpdate**](docs/UsersAPI.md#usersupdate) | **Put** {auth_user_href} | Update an user +*UsersRolesAPI* | [**UsersRolesCreate**](docs/UsersRolesAPI.md#usersrolescreate) | **Post** {auth_user_href}roles/ | Create an user role +*UsersRolesAPI* | [**UsersRolesDelete**](docs/UsersRolesAPI.md#usersrolesdelete) | **Delete** {auth_users_user_role_href} | Delete an user role +*UsersRolesAPI* | [**UsersRolesList**](docs/UsersRolesAPI.md#usersroleslist) | **Get** {auth_user_href}roles/ | List user roles +*UsersRolesAPI* | [**UsersRolesRead**](docs/UsersRolesAPI.md#usersrolesread) | **Get** {auth_users_user_role_href} | Inspect an user role +*VersionsAPI* | [**ApiV1RolesVersionsList**](docs/VersionsAPI.md#apiv1rolesversionslist) | **Get** {ansible_role_href}versions/ | +*VersionsAPI* | [**ApiV2CollectionVersionsList**](docs/VersionsAPI.md#apiv2collectionversionslist) | **Get** {ansible_collection_version_href}versions/ | +*WorkersAPI* | [**WorkersList**](docs/WorkersAPI.md#workerslist) | **Get** /pulp/api/v3/workers/ | List workers +*WorkersAPI* | [**WorkersRead**](docs/WorkersAPI.md#workersread) | **Get** {worker_href} | Inspect a worker + + +## Documentation For Models + + - [AccessPolicy](docs/AccessPolicy.md) + - [AccessPolicyResponse](docs/AccessPolicyResponse.md) + - [AddonResponse](docs/AddonResponse.md) + - [AnsibleAnsibleDistribution](docs/AnsibleAnsibleDistribution.md) + - [AnsibleAnsibleDistributionResponse](docs/AnsibleAnsibleDistributionResponse.md) + - [AnsibleAnsibleNamespaceMetadata](docs/AnsibleAnsibleNamespaceMetadata.md) + - [AnsibleAnsibleNamespaceMetadataResponse](docs/AnsibleAnsibleNamespaceMetadataResponse.md) + - [AnsibleAnsibleRepository](docs/AnsibleAnsibleRepository.md) + - [AnsibleAnsibleRepositoryResponse](docs/AnsibleAnsibleRepositoryResponse.md) + - [AnsibleCollection](docs/AnsibleCollection.md) + - [AnsibleCollectionRemote](docs/AnsibleCollectionRemote.md) + - [AnsibleCollectionRemoteResponse](docs/AnsibleCollectionRemoteResponse.md) + - [AnsibleCollectionResponse](docs/AnsibleCollectionResponse.md) + - [AnsibleCollectionVersion](docs/AnsibleCollectionVersion.md) + - [AnsibleCollectionVersionMark](docs/AnsibleCollectionVersionMark.md) + - [AnsibleCollectionVersionMarkResponse](docs/AnsibleCollectionVersionMarkResponse.md) + - [AnsibleCollectionVersionResponse](docs/AnsibleCollectionVersionResponse.md) + - [AnsibleCollectionVersionSignature](docs/AnsibleCollectionVersionSignature.md) + - [AnsibleCollectionVersionSignatureResponse](docs/AnsibleCollectionVersionSignatureResponse.md) + - [AnsibleGitRemote](docs/AnsibleGitRemote.md) + - [AnsibleGitRemoteResponse](docs/AnsibleGitRemoteResponse.md) + - [AnsibleRepositoryMark](docs/AnsibleRepositoryMark.md) + - [AnsibleRepositoryRebuild](docs/AnsibleRepositoryRebuild.md) + - [AnsibleRepositorySignature](docs/AnsibleRepositorySignature.md) + - [AnsibleRepositorySyncURL](docs/AnsibleRepositorySyncURL.md) + - [AnsibleRole](docs/AnsibleRole.md) + - [AnsibleRoleRemote](docs/AnsibleRoleRemote.md) + - [AnsibleRoleRemoteResponse](docs/AnsibleRoleRemoteResponse.md) + - [AnsibleRoleResponse](docs/AnsibleRoleResponse.md) + - [AnsibleTagResponse](docs/AnsibleTagResponse.md) + - [AptRepositorySyncURL](docs/AptRepositorySyncURL.md) + - [Artifact](docs/Artifact.md) + - [ArtifactDistributionResponse](docs/ArtifactDistributionResponse.md) + - [ArtifactRefResponse](docs/ArtifactRefResponse.md) + - [ArtifactResponse](docs/ArtifactResponse.md) + - [AsyncOperationResponse](docs/AsyncOperationResponse.md) + - [CertguardRHSMCertGuard](docs/CertguardRHSMCertGuard.md) + - [CertguardRHSMCertGuardResponse](docs/CertguardRHSMCertGuardResponse.md) + - [CertguardX509CertGuard](docs/CertguardX509CertGuard.md) + - [CertguardX509CertGuardResponse](docs/CertguardX509CertGuardResponse.md) + - [ChecksumResponse](docs/ChecksumResponse.md) + - [ClientConfigurationResponse](docs/ClientConfigurationResponse.md) + - [CollectionImportDetailResponse](docs/CollectionImportDetailResponse.md) + - [CollectionMetadataResponse](docs/CollectionMetadataResponse.md) + - [CollectionNamespaceResponse](docs/CollectionNamespaceResponse.md) + - [CollectionOneShot](docs/CollectionOneShot.md) + - [CollectionRefResponse](docs/CollectionRefResponse.md) + - [CollectionResponse](docs/CollectionResponse.md) + - [CollectionSummaryResponse](docs/CollectionSummaryResponse.md) + - [CollectionVersionCopyMove](docs/CollectionVersionCopyMove.md) + - [CollectionVersionDocsResponse](docs/CollectionVersionDocsResponse.md) + - [CollectionVersionListResponse](docs/CollectionVersionListResponse.md) + - [CollectionVersionResponse](docs/CollectionVersionResponse.md) + - [CollectionVersionSearchList](docs/CollectionVersionSearchList.md) + - [CollectionVersionSearchListResponse](docs/CollectionVersionSearchListResponse.md) + - [CollectionVersionSignatureResponse](docs/CollectionVersionSignatureResponse.md) + - [CompsXml](docs/CompsXml.md) + - [ContainerBlobResponse](docs/ContainerBlobResponse.md) + - [ContainerContainerDistribution](docs/ContainerContainerDistribution.md) + - [ContainerContainerDistributionResponse](docs/ContainerContainerDistributionResponse.md) + - [ContainerContainerNamespace](docs/ContainerContainerNamespace.md) + - [ContainerContainerNamespaceResponse](docs/ContainerContainerNamespaceResponse.md) + - [ContainerContainerPushRepository](docs/ContainerContainerPushRepository.md) + - [ContainerContainerPushRepositoryResponse](docs/ContainerContainerPushRepositoryResponse.md) + - [ContainerContainerRemote](docs/ContainerContainerRemote.md) + - [ContainerContainerRemoteResponse](docs/ContainerContainerRemoteResponse.md) + - [ContainerContainerRepository](docs/ContainerContainerRepository.md) + - [ContainerContainerRepositoryResponse](docs/ContainerContainerRepositoryResponse.md) + - [ContainerManifestResponse](docs/ContainerManifestResponse.md) + - [ContainerManifestSignatureResponse](docs/ContainerManifestSignatureResponse.md) + - [ContainerRepositorySyncURL](docs/ContainerRepositorySyncURL.md) + - [ContainerTagResponse](docs/ContainerTagResponse.md) + - [ContentAppStatusResponse](docs/ContentAppStatusResponse.md) + - [ContentGuardResponse](docs/ContentGuardResponse.md) + - [ContentRedirectContentGuard](docs/ContentRedirectContentGuard.md) + - [ContentRedirectContentGuardResponse](docs/ContentRedirectContentGuardResponse.md) + - [ContentSettingsResponse](docs/ContentSettingsResponse.md) + - [ContentSummaryResponse](docs/ContentSummaryResponse.md) + - [Copy](docs/Copy.md) + - [DatabaseConnectionResponse](docs/DatabaseConnectionResponse.md) + - [DebAptDistribution](docs/DebAptDistribution.md) + - [DebAptDistributionResponse](docs/DebAptDistributionResponse.md) + - [DebAptPublication](docs/DebAptPublication.md) + - [DebAptPublicationResponse](docs/DebAptPublicationResponse.md) + - [DebAptRemote](docs/DebAptRemote.md) + - [DebAptRemoteResponse](docs/DebAptRemoteResponse.md) + - [DebAptRepository](docs/DebAptRepository.md) + - [DebAptRepositoryResponse](docs/DebAptRepositoryResponse.md) + - [DebGenericContent](docs/DebGenericContent.md) + - [DebGenericContentResponse](docs/DebGenericContentResponse.md) + - [DebInstallerFileIndex](docs/DebInstallerFileIndex.md) + - [DebInstallerFileIndexResponse](docs/DebInstallerFileIndexResponse.md) + - [DebInstallerPackage](docs/DebInstallerPackage.md) + - [DebInstallerPackageResponse](docs/DebInstallerPackageResponse.md) + - [DebPackage](docs/DebPackage.md) + - [DebPackageIndex](docs/DebPackageIndex.md) + - [DebPackageIndexResponse](docs/DebPackageIndexResponse.md) + - [DebPackageReleaseComponent](docs/DebPackageReleaseComponent.md) + - [DebPackageReleaseComponentResponse](docs/DebPackageReleaseComponentResponse.md) + - [DebPackageResponse](docs/DebPackageResponse.md) + - [DebRelease](docs/DebRelease.md) + - [DebReleaseArchitecture](docs/DebReleaseArchitecture.md) + - [DebReleaseArchitectureResponse](docs/DebReleaseArchitectureResponse.md) + - [DebReleaseComponent](docs/DebReleaseComponent.md) + - [DebReleaseComponentResponse](docs/DebReleaseComponentResponse.md) + - [DebReleaseFile](docs/DebReleaseFile.md) + - [DebReleaseFileResponse](docs/DebReleaseFileResponse.md) + - [DebReleaseResponse](docs/DebReleaseResponse.md) + - [DebVerbatimPublication](docs/DebVerbatimPublication.md) + - [DebVerbatimPublicationResponse](docs/DebVerbatimPublicationResponse.md) + - [DistributionResponse](docs/DistributionResponse.md) + - [Domain](docs/Domain.md) + - [DomainResponse](docs/DomainResponse.md) + - [EvaluationResponse](docs/EvaluationResponse.md) + - [ExcludePlatformsEnum](docs/ExcludePlatformsEnum.md) + - [FileFileAlternateContentSource](docs/FileFileAlternateContentSource.md) + - [FileFileAlternateContentSourceResponse](docs/FileFileAlternateContentSourceResponse.md) + - [FileFileContent](docs/FileFileContent.md) + - [FileFileContentResponse](docs/FileFileContentResponse.md) + - [FileFileDistribution](docs/FileFileDistribution.md) + - [FileFileDistributionResponse](docs/FileFileDistributionResponse.md) + - [FileFilePublication](docs/FileFilePublication.md) + - [FileFilePublicationResponse](docs/FileFilePublicationResponse.md) + - [FileFileRemote](docs/FileFileRemote.md) + - [FileFileRemoteResponse](docs/FileFileRemoteResponse.md) + - [FileFileRepository](docs/FileFileRepository.md) + - [FileFileRepositoryResponse](docs/FileFileRepositoryResponse.md) + - [FilesystemExport](docs/FilesystemExport.md) + - [FilesystemExportResponse](docs/FilesystemExportResponse.md) + - [FilesystemExporter](docs/FilesystemExporter.md) + - [FilesystemExporterResponse](docs/FilesystemExporterResponse.md) + - [GalaxyCollection](docs/GalaxyCollection.md) + - [GalaxyCollectionResponse](docs/GalaxyCollectionResponse.md) + - [GalaxyCollectionVersionResponse](docs/GalaxyCollectionVersionResponse.md) + - [GalaxyRoleResponse](docs/GalaxyRoleResponse.md) + - [GalaxyRoleVersionResponse](docs/GalaxyRoleVersionResponse.md) + - [GemGemContent](docs/GemGemContent.md) + - [GemGemContentResponse](docs/GemGemContentResponse.md) + - [GemGemDistribution](docs/GemGemDistribution.md) + - [GemGemDistributionResponse](docs/GemGemDistributionResponse.md) + - [GemGemPublication](docs/GemGemPublication.md) + - [GemGemPublicationResponse](docs/GemGemPublicationResponse.md) + - [GemGemRemote](docs/GemGemRemote.md) + - [GemGemRemoteResponse](docs/GemGemRemoteResponse.md) + - [GemGemRepository](docs/GemGemRepository.md) + - [GemGemRepositoryResponse](docs/GemGemRepositoryResponse.md) + - [Group](docs/Group.md) + - [GroupProgressReportResponse](docs/GroupProgressReportResponse.md) + - [GroupResponse](docs/GroupResponse.md) + - [GroupRole](docs/GroupRole.md) + - [GroupRoleResponse](docs/GroupRoleResponse.md) + - [GroupUser](docs/GroupUser.md) + - [GroupUserResponse](docs/GroupUserResponse.md) + - [ImageResponse](docs/ImageResponse.md) + - [ImportResponse](docs/ImportResponse.md) + - [ManifestCopy](docs/ManifestCopy.md) + - [MavenMavenArtifact](docs/MavenMavenArtifact.md) + - [MavenMavenArtifactResponse](docs/MavenMavenArtifactResponse.md) + - [MavenMavenDistribution](docs/MavenMavenDistribution.md) + - [MavenMavenDistributionResponse](docs/MavenMavenDistributionResponse.md) + - [MavenMavenRemote](docs/MavenMavenRemote.md) + - [MavenMavenRemoteResponse](docs/MavenMavenRemoteResponse.md) + - [MavenMavenRepository](docs/MavenMavenRepository.md) + - [MavenMavenRepositoryResponse](docs/MavenMavenRepositoryResponse.md) + - [MediaTypesEnum](docs/MediaTypesEnum.md) + - [MetadataChecksumTypeEnum](docs/MetadataChecksumTypeEnum.md) + - [MethodEnum](docs/MethodEnum.md) + - [MinimalTaskResponse](docs/MinimalTaskResponse.md) + - [MultipleArtifactContentResponse](docs/MultipleArtifactContentResponse.md) + - [MyPermissionsResponse](docs/MyPermissionsResponse.md) + - [NamespaceLink](docs/NamespaceLink.md) + - [NamespaceLinkResponse](docs/NamespaceLinkResponse.md) + - [NestedRole](docs/NestedRole.md) + - [NestedRoleResponse](docs/NestedRoleResponse.md) + - [OCIBuildImage](docs/OCIBuildImage.md) + - [ObjectRolesResponse](docs/ObjectRolesResponse.md) + - [OrphansCleanup](docs/OrphansCleanup.md) + - [OstreeImportAll](docs/OstreeImportAll.md) + - [OstreeImportCommitsToRef](docs/OstreeImportCommitsToRef.md) + - [OstreeOstreeCommitResponse](docs/OstreeOstreeCommitResponse.md) + - [OstreeOstreeConfigResponse](docs/OstreeOstreeConfigResponse.md) + - [OstreeOstreeContentResponse](docs/OstreeOstreeContentResponse.md) + - [OstreeOstreeDistribution](docs/OstreeOstreeDistribution.md) + - [OstreeOstreeDistributionResponse](docs/OstreeOstreeDistributionResponse.md) + - [OstreeOstreeObjectResponse](docs/OstreeOstreeObjectResponse.md) + - [OstreeOstreeRefResponse](docs/OstreeOstreeRefResponse.md) + - [OstreeOstreeRemote](docs/OstreeOstreeRemote.md) + - [OstreeOstreeRemoteResponse](docs/OstreeOstreeRemoteResponse.md) + - [OstreeOstreeRepository](docs/OstreeOstreeRepository.md) + - [OstreeOstreeRepositoryResponse](docs/OstreeOstreeRepositoryResponse.md) + - [OstreeOstreeSummaryResponse](docs/OstreeOstreeSummaryResponse.md) + - [PackageChecksumTypeEnum](docs/PackageChecksumTypeEnum.md) + - [PackageMetadataResponse](docs/PackageMetadataResponse.md) + - [PackageTypesEnum](docs/PackageTypesEnum.md) + - [PackageUpload](docs/PackageUpload.md) + - [PackageUploadTaskResponse](docs/PackageUploadTaskResponse.md) + - [PaginatedAccessPolicyResponseList](docs/PaginatedAccessPolicyResponseList.md) + - [PaginatedArtifactDistributionResponseList](docs/PaginatedArtifactDistributionResponseList.md) + - [PaginatedArtifactResponseList](docs/PaginatedArtifactResponseList.md) + - [PaginatedCollectionResponseList](docs/PaginatedCollectionResponseList.md) + - [PaginatedCollectionResponseListLinks](docs/PaginatedCollectionResponseListLinks.md) + - [PaginatedCollectionResponseListMeta](docs/PaginatedCollectionResponseListMeta.md) + - [PaginatedCollectionVersionListResponseList](docs/PaginatedCollectionVersionListResponseList.md) + - [PaginatedCollectionVersionSearchListResponseList](docs/PaginatedCollectionVersionSearchListResponseList.md) + - [PaginatedContentGuardResponseList](docs/PaginatedContentGuardResponseList.md) + - [PaginatedContentRedirectContentGuardResponseList](docs/PaginatedContentRedirectContentGuardResponseList.md) + - [PaginatedDistributionResponseList](docs/PaginatedDistributionResponseList.md) + - [PaginatedDomainResponseList](docs/PaginatedDomainResponseList.md) + - [PaginatedFilesystemExportResponseList](docs/PaginatedFilesystemExportResponseList.md) + - [PaginatedFilesystemExporterResponseList](docs/PaginatedFilesystemExporterResponseList.md) + - [PaginatedGalaxyCollectionResponseList](docs/PaginatedGalaxyCollectionResponseList.md) + - [PaginatedGalaxyCollectionVersionResponseList](docs/PaginatedGalaxyCollectionVersionResponseList.md) + - [PaginatedGalaxyRoleResponseList](docs/PaginatedGalaxyRoleResponseList.md) + - [PaginatedGalaxyRoleVersionResponseList](docs/PaginatedGalaxyRoleVersionResponseList.md) + - [PaginatedGroupResponseList](docs/PaginatedGroupResponseList.md) + - [PaginatedGroupRoleResponseList](docs/PaginatedGroupRoleResponseList.md) + - [PaginatedGroupUserResponseList](docs/PaginatedGroupUserResponseList.md) + - [PaginatedImportResponseList](docs/PaginatedImportResponseList.md) + - [PaginatedMultipleArtifactContentResponseList](docs/PaginatedMultipleArtifactContentResponseList.md) + - [PaginatedPublicationResponseList](docs/PaginatedPublicationResponseList.md) + - [PaginatedPulpExportResponseList](docs/PaginatedPulpExportResponseList.md) + - [PaginatedPulpExporterResponseList](docs/PaginatedPulpExporterResponseList.md) + - [PaginatedPulpImporterResponseList](docs/PaginatedPulpImporterResponseList.md) + - [PaginatedRBACContentGuardResponseList](docs/PaginatedRBACContentGuardResponseList.md) + - [PaginatedRemoteResponseList](docs/PaginatedRemoteResponseList.md) + - [PaginatedRepositoryResponseList](docs/PaginatedRepositoryResponseList.md) + - [PaginatedRepositoryVersionResponseList](docs/PaginatedRepositoryVersionResponseList.md) + - [PaginatedRoleResponseList](docs/PaginatedRoleResponseList.md) + - [PaginatedSigningServiceResponseList](docs/PaginatedSigningServiceResponseList.md) + - [PaginatedTagResponseList](docs/PaginatedTagResponseList.md) + - [PaginatedTaskGroupResponseList](docs/PaginatedTaskGroupResponseList.md) + - [PaginatedTaskResponseList](docs/PaginatedTaskResponseList.md) + - [PaginatedTaskScheduleResponseList](docs/PaginatedTaskScheduleResponseList.md) + - [PaginatedUploadResponseList](docs/PaginatedUploadResponseList.md) + - [PaginatedUpstreamPulpResponseList](docs/PaginatedUpstreamPulpResponseList.md) + - [PaginatedUserResponseList](docs/PaginatedUserResponseList.md) + - [PaginatedUserRoleResponseList](docs/PaginatedUserRoleResponseList.md) + - [PaginatedWorkerResponseList](docs/PaginatedWorkerResponseList.md) + - [PaginatedansibleAnsibleDistributionResponseList](docs/PaginatedansibleAnsibleDistributionResponseList.md) + - [PaginatedansibleAnsibleNamespaceMetadataResponseList](docs/PaginatedansibleAnsibleNamespaceMetadataResponseList.md) + - [PaginatedansibleAnsibleRepositoryResponseList](docs/PaginatedansibleAnsibleRepositoryResponseList.md) + - [PaginatedansibleCollectionRemoteResponseList](docs/PaginatedansibleCollectionRemoteResponseList.md) + - [PaginatedansibleCollectionResponseList](docs/PaginatedansibleCollectionResponseList.md) + - [PaginatedansibleCollectionVersionMarkResponseList](docs/PaginatedansibleCollectionVersionMarkResponseList.md) + - [PaginatedansibleCollectionVersionResponseList](docs/PaginatedansibleCollectionVersionResponseList.md) + - [PaginatedansibleCollectionVersionSignatureResponseList](docs/PaginatedansibleCollectionVersionSignatureResponseList.md) + - [PaginatedansibleGitRemoteResponseList](docs/PaginatedansibleGitRemoteResponseList.md) + - [PaginatedansibleRoleRemoteResponseList](docs/PaginatedansibleRoleRemoteResponseList.md) + - [PaginatedansibleRoleResponseList](docs/PaginatedansibleRoleResponseList.md) + - [PaginatedcertguardRHSMCertGuardResponseList](docs/PaginatedcertguardRHSMCertGuardResponseList.md) + - [PaginatedcertguardX509CertGuardResponseList](docs/PaginatedcertguardX509CertGuardResponseList.md) + - [PaginatedcontainerBlobResponseList](docs/PaginatedcontainerBlobResponseList.md) + - [PaginatedcontainerContainerDistributionResponseList](docs/PaginatedcontainerContainerDistributionResponseList.md) + - [PaginatedcontainerContainerNamespaceResponseList](docs/PaginatedcontainerContainerNamespaceResponseList.md) + - [PaginatedcontainerContainerPushRepositoryResponseList](docs/PaginatedcontainerContainerPushRepositoryResponseList.md) + - [PaginatedcontainerContainerRemoteResponseList](docs/PaginatedcontainerContainerRemoteResponseList.md) + - [PaginatedcontainerContainerRepositoryResponseList](docs/PaginatedcontainerContainerRepositoryResponseList.md) + - [PaginatedcontainerManifestResponseList](docs/PaginatedcontainerManifestResponseList.md) + - [PaginatedcontainerManifestSignatureResponseList](docs/PaginatedcontainerManifestSignatureResponseList.md) + - [PaginatedcontainerTagResponseList](docs/PaginatedcontainerTagResponseList.md) + - [PaginateddebAptDistributionResponseList](docs/PaginateddebAptDistributionResponseList.md) + - [PaginateddebAptPublicationResponseList](docs/PaginateddebAptPublicationResponseList.md) + - [PaginateddebAptRemoteResponseList](docs/PaginateddebAptRemoteResponseList.md) + - [PaginateddebAptRepositoryResponseList](docs/PaginateddebAptRepositoryResponseList.md) + - [PaginateddebGenericContentResponseList](docs/PaginateddebGenericContentResponseList.md) + - [PaginateddebInstallerFileIndexResponseList](docs/PaginateddebInstallerFileIndexResponseList.md) + - [PaginateddebInstallerPackageResponseList](docs/PaginateddebInstallerPackageResponseList.md) + - [PaginateddebPackageIndexResponseList](docs/PaginateddebPackageIndexResponseList.md) + - [PaginateddebPackageReleaseComponentResponseList](docs/PaginateddebPackageReleaseComponentResponseList.md) + - [PaginateddebPackageResponseList](docs/PaginateddebPackageResponseList.md) + - [PaginateddebReleaseArchitectureResponseList](docs/PaginateddebReleaseArchitectureResponseList.md) + - [PaginateddebReleaseComponentResponseList](docs/PaginateddebReleaseComponentResponseList.md) + - [PaginateddebReleaseFileResponseList](docs/PaginateddebReleaseFileResponseList.md) + - [PaginateddebReleaseResponseList](docs/PaginateddebReleaseResponseList.md) + - [PaginateddebVerbatimPublicationResponseList](docs/PaginateddebVerbatimPublicationResponseList.md) + - [PaginatedfileFileAlternateContentSourceResponseList](docs/PaginatedfileFileAlternateContentSourceResponseList.md) + - [PaginatedfileFileContentResponseList](docs/PaginatedfileFileContentResponseList.md) + - [PaginatedfileFileDistributionResponseList](docs/PaginatedfileFileDistributionResponseList.md) + - [PaginatedfileFilePublicationResponseList](docs/PaginatedfileFilePublicationResponseList.md) + - [PaginatedfileFileRemoteResponseList](docs/PaginatedfileFileRemoteResponseList.md) + - [PaginatedfileFileRepositoryResponseList](docs/PaginatedfileFileRepositoryResponseList.md) + - [PaginatedgemGemContentResponseList](docs/PaginatedgemGemContentResponseList.md) + - [PaginatedgemGemDistributionResponseList](docs/PaginatedgemGemDistributionResponseList.md) + - [PaginatedgemGemPublicationResponseList](docs/PaginatedgemGemPublicationResponseList.md) + - [PaginatedgemGemRemoteResponseList](docs/PaginatedgemGemRemoteResponseList.md) + - [PaginatedgemGemRepositoryResponseList](docs/PaginatedgemGemRepositoryResponseList.md) + - [PaginatedmavenMavenArtifactResponseList](docs/PaginatedmavenMavenArtifactResponseList.md) + - [PaginatedmavenMavenDistributionResponseList](docs/PaginatedmavenMavenDistributionResponseList.md) + - [PaginatedmavenMavenRemoteResponseList](docs/PaginatedmavenMavenRemoteResponseList.md) + - [PaginatedmavenMavenRepositoryResponseList](docs/PaginatedmavenMavenRepositoryResponseList.md) + - [PaginatedostreeOstreeCommitResponseList](docs/PaginatedostreeOstreeCommitResponseList.md) + - [PaginatedostreeOstreeConfigResponseList](docs/PaginatedostreeOstreeConfigResponseList.md) + - [PaginatedostreeOstreeContentResponseList](docs/PaginatedostreeOstreeContentResponseList.md) + - [PaginatedostreeOstreeDistributionResponseList](docs/PaginatedostreeOstreeDistributionResponseList.md) + - [PaginatedostreeOstreeObjectResponseList](docs/PaginatedostreeOstreeObjectResponseList.md) + - [PaginatedostreeOstreeRefResponseList](docs/PaginatedostreeOstreeRefResponseList.md) + - [PaginatedostreeOstreeRemoteResponseList](docs/PaginatedostreeOstreeRemoteResponseList.md) + - [PaginatedostreeOstreeRepositoryResponseList](docs/PaginatedostreeOstreeRepositoryResponseList.md) + - [PaginatedostreeOstreeSummaryResponseList](docs/PaginatedostreeOstreeSummaryResponseList.md) + - [PaginatedpythonPythonDistributionResponseList](docs/PaginatedpythonPythonDistributionResponseList.md) + - [PaginatedpythonPythonPackageContentResponseList](docs/PaginatedpythonPythonPackageContentResponseList.md) + - [PaginatedpythonPythonPublicationResponseList](docs/PaginatedpythonPythonPublicationResponseList.md) + - [PaginatedpythonPythonRemoteResponseList](docs/PaginatedpythonPythonRemoteResponseList.md) + - [PaginatedpythonPythonRepositoryResponseList](docs/PaginatedpythonPythonRepositoryResponseList.md) + - [PaginatedrpmDistributionTreeResponseList](docs/PaginatedrpmDistributionTreeResponseList.md) + - [PaginatedrpmModulemdDefaultsResponseList](docs/PaginatedrpmModulemdDefaultsResponseList.md) + - [PaginatedrpmModulemdObsoleteResponseList](docs/PaginatedrpmModulemdObsoleteResponseList.md) + - [PaginatedrpmModulemdResponseList](docs/PaginatedrpmModulemdResponseList.md) + - [PaginatedrpmPackageCategoryResponseList](docs/PaginatedrpmPackageCategoryResponseList.md) + - [PaginatedrpmPackageEnvironmentResponseList](docs/PaginatedrpmPackageEnvironmentResponseList.md) + - [PaginatedrpmPackageGroupResponseList](docs/PaginatedrpmPackageGroupResponseList.md) + - [PaginatedrpmPackageLangpacksResponseList](docs/PaginatedrpmPackageLangpacksResponseList.md) + - [PaginatedrpmPackageResponseList](docs/PaginatedrpmPackageResponseList.md) + - [PaginatedrpmRepoMetadataFileResponseList](docs/PaginatedrpmRepoMetadataFileResponseList.md) + - [PaginatedrpmRpmAlternateContentSourceResponseList](docs/PaginatedrpmRpmAlternateContentSourceResponseList.md) + - [PaginatedrpmRpmDistributionResponseList](docs/PaginatedrpmRpmDistributionResponseList.md) + - [PaginatedrpmRpmPublicationResponseList](docs/PaginatedrpmRpmPublicationResponseList.md) + - [PaginatedrpmRpmRemoteResponseList](docs/PaginatedrpmRpmRemoteResponseList.md) + - [PaginatedrpmRpmRepositoryResponseList](docs/PaginatedrpmRpmRepositoryResponseList.md) + - [PaginatedrpmUlnRemoteResponseList](docs/PaginatedrpmUlnRemoteResponseList.md) + - [PaginatedrpmUpdateRecordResponseList](docs/PaginatedrpmUpdateRecordResponseList.md) + - [PatchedAccessPolicy](docs/PatchedAccessPolicy.md) + - [PatchedCollection](docs/PatchedCollection.md) + - [PatchedContentRedirectContentGuard](docs/PatchedContentRedirectContentGuard.md) + - [PatchedDomain](docs/PatchedDomain.md) + - [PatchedFilesystemExporter](docs/PatchedFilesystemExporter.md) + - [PatchedGroup](docs/PatchedGroup.md) + - [PatchedPulpExporter](docs/PatchedPulpExporter.md) + - [PatchedPulpImporter](docs/PatchedPulpImporter.md) + - [PatchedRBACContentGuard](docs/PatchedRBACContentGuard.md) + - [PatchedRole](docs/PatchedRole.md) + - [PatchedTaskCancel](docs/PatchedTaskCancel.md) + - [PatchedUpstreamPulp](docs/PatchedUpstreamPulp.md) + - [PatchedUser](docs/PatchedUser.md) + - [PatchedansibleAnsibleDistribution](docs/PatchedansibleAnsibleDistribution.md) + - [PatchedansibleAnsibleNamespaceMetadata](docs/PatchedansibleAnsibleNamespaceMetadata.md) + - [PatchedansibleAnsibleRepository](docs/PatchedansibleAnsibleRepository.md) + - [PatchedansibleCollectionRemote](docs/PatchedansibleCollectionRemote.md) + - [PatchedansibleGitRemote](docs/PatchedansibleGitRemote.md) + - [PatchedansibleRoleRemote](docs/PatchedansibleRoleRemote.md) + - [PatchedcertguardRHSMCertGuard](docs/PatchedcertguardRHSMCertGuard.md) + - [PatchedcertguardX509CertGuard](docs/PatchedcertguardX509CertGuard.md) + - [PatchedcontainerContainerDistribution](docs/PatchedcontainerContainerDistribution.md) + - [PatchedcontainerContainerPushRepository](docs/PatchedcontainerContainerPushRepository.md) + - [PatchedcontainerContainerRemote](docs/PatchedcontainerContainerRemote.md) + - [PatchedcontainerContainerRepository](docs/PatchedcontainerContainerRepository.md) + - [PatcheddebAptDistribution](docs/PatcheddebAptDistribution.md) + - [PatcheddebAptRemote](docs/PatcheddebAptRemote.md) + - [PatcheddebAptRepository](docs/PatcheddebAptRepository.md) + - [PatchedfileFileAlternateContentSource](docs/PatchedfileFileAlternateContentSource.md) + - [PatchedfileFileDistribution](docs/PatchedfileFileDistribution.md) + - [PatchedfileFileRemote](docs/PatchedfileFileRemote.md) + - [PatchedfileFileRepository](docs/PatchedfileFileRepository.md) + - [PatchedgemGemDistribution](docs/PatchedgemGemDistribution.md) + - [PatchedgemGemRemote](docs/PatchedgemGemRemote.md) + - [PatchedgemGemRepository](docs/PatchedgemGemRepository.md) + - [PatchedmavenMavenDistribution](docs/PatchedmavenMavenDistribution.md) + - [PatchedmavenMavenRemote](docs/PatchedmavenMavenRemote.md) + - [PatchedmavenMavenRepository](docs/PatchedmavenMavenRepository.md) + - [PatchedostreeOstreeDistribution](docs/PatchedostreeOstreeDistribution.md) + - [PatchedostreeOstreeRemote](docs/PatchedostreeOstreeRemote.md) + - [PatchedostreeOstreeRepository](docs/PatchedostreeOstreeRepository.md) + - [PatchedpythonPythonDistribution](docs/PatchedpythonPythonDistribution.md) + - [PatchedpythonPythonRemote](docs/PatchedpythonPythonRemote.md) + - [PatchedpythonPythonRepository](docs/PatchedpythonPythonRepository.md) + - [PatchedrpmRpmAlternateContentSource](docs/PatchedrpmRpmAlternateContentSource.md) + - [PatchedrpmRpmDistribution](docs/PatchedrpmRpmDistribution.md) + - [PatchedrpmRpmRemote](docs/PatchedrpmRpmRemote.md) + - [PatchedrpmRpmRepository](docs/PatchedrpmRpmRepository.md) + - [PatchedrpmUlnRemote](docs/PatchedrpmUlnRemote.md) + - [Policy462Enum](docs/Policy462Enum.md) + - [Policy762Enum](docs/Policy762Enum.md) + - [PolicyDb6Enum](docs/PolicyDb6Enum.md) + - [ProgressReportResponse](docs/ProgressReportResponse.md) + - [PublicationResponse](docs/PublicationResponse.md) + - [PulpExport](docs/PulpExport.md) + - [PulpExportResponse](docs/PulpExportResponse.md) + - [PulpExporter](docs/PulpExporter.md) + - [PulpExporterResponse](docs/PulpExporterResponse.md) + - [PulpImport](docs/PulpImport.md) + - [PulpImportCheck](docs/PulpImportCheck.md) + - [PulpImportCheckResponse](docs/PulpImportCheckResponse.md) + - [PulpImporter](docs/PulpImporter.md) + - [PulpImporterResponse](docs/PulpImporterResponse.md) + - [Purge](docs/Purge.md) + - [PythonBanderRemote](docs/PythonBanderRemote.md) + - [PythonPythonDistribution](docs/PythonPythonDistribution.md) + - [PythonPythonDistributionResponse](docs/PythonPythonDistributionResponse.md) + - [PythonPythonPackageContent](docs/PythonPythonPackageContent.md) + - [PythonPythonPackageContentResponse](docs/PythonPythonPackageContentResponse.md) + - [PythonPythonPublication](docs/PythonPythonPublication.md) + - [PythonPythonPublicationResponse](docs/PythonPythonPublicationResponse.md) + - [PythonPythonRemote](docs/PythonPythonRemote.md) + - [PythonPythonRemoteResponse](docs/PythonPythonRemoteResponse.md) + - [PythonPythonRepository](docs/PythonPythonRepository.md) + - [PythonPythonRepositoryResponse](docs/PythonPythonRepositoryResponse.md) + - [RBACContentGuard](docs/RBACContentGuard.md) + - [RBACContentGuardResponse](docs/RBACContentGuardResponse.md) + - [ReclaimSpace](docs/ReclaimSpace.md) + - [RecursiveManage](docs/RecursiveManage.md) + - [RedisConnectionResponse](docs/RedisConnectionResponse.md) + - [RemoteResponse](docs/RemoteResponse.md) + - [RemoteResponseHiddenFieldsInner](docs/RemoteResponseHiddenFieldsInner.md) + - [RemoveImage](docs/RemoveImage.md) + - [RemoveSignatures](docs/RemoveSignatures.md) + - [RemoveSignaturesResponse](docs/RemoveSignaturesResponse.md) + - [Repair](docs/Repair.md) + - [RepoMetadataResponse](docs/RepoMetadataResponse.md) + - [Repository](docs/Repository.md) + - [RepositoryAddCachedContent](docs/RepositoryAddCachedContent.md) + - [RepositoryAddRemoveContent](docs/RepositoryAddRemoveContent.md) + - [RepositoryResponse](docs/RepositoryResponse.md) + - [RepositorySign](docs/RepositorySign.md) + - [RepositorySyncURL](docs/RepositorySyncURL.md) + - [RepositoryVersionResponse](docs/RepositoryVersionResponse.md) + - [RepositoryVersionResponseContentSummary](docs/RepositoryVersionResponseContentSummary.md) + - [Role](docs/Role.md) + - [RoleResponse](docs/RoleResponse.md) + - [RpmDistributionTreeResponse](docs/RpmDistributionTreeResponse.md) + - [RpmModulemd](docs/RpmModulemd.md) + - [RpmModulemdDefaults](docs/RpmModulemdDefaults.md) + - [RpmModulemdDefaultsResponse](docs/RpmModulemdDefaultsResponse.md) + - [RpmModulemdObsolete](docs/RpmModulemdObsolete.md) + - [RpmModulemdObsoleteResponse](docs/RpmModulemdObsoleteResponse.md) + - [RpmModulemdResponse](docs/RpmModulemdResponse.md) + - [RpmPackage](docs/RpmPackage.md) + - [RpmPackageCategoryResponse](docs/RpmPackageCategoryResponse.md) + - [RpmPackageEnvironmentResponse](docs/RpmPackageEnvironmentResponse.md) + - [RpmPackageGroupResponse](docs/RpmPackageGroupResponse.md) + - [RpmPackageLangpacksResponse](docs/RpmPackageLangpacksResponse.md) + - [RpmPackageResponse](docs/RpmPackageResponse.md) + - [RpmRepoMetadataFileResponse](docs/RpmRepoMetadataFileResponse.md) + - [RpmRepositorySyncURL](docs/RpmRepositorySyncURL.md) + - [RpmRpmAlternateContentSource](docs/RpmRpmAlternateContentSource.md) + - [RpmRpmAlternateContentSourceResponse](docs/RpmRpmAlternateContentSourceResponse.md) + - [RpmRpmDistribution](docs/RpmRpmDistribution.md) + - [RpmRpmDistributionResponse](docs/RpmRpmDistributionResponse.md) + - [RpmRpmPublication](docs/RpmRpmPublication.md) + - [RpmRpmPublicationResponse](docs/RpmRpmPublicationResponse.md) + - [RpmRpmRemote](docs/RpmRpmRemote.md) + - [RpmRpmRemoteResponse](docs/RpmRpmRemoteResponse.md) + - [RpmRpmRepository](docs/RpmRpmRepository.md) + - [RpmRpmRepositoryResponse](docs/RpmRpmRepositoryResponse.md) + - [RpmUlnRemote](docs/RpmUlnRemote.md) + - [RpmUlnRemoteResponse](docs/RpmUlnRemoteResponse.md) + - [RpmUpdateCollection](docs/RpmUpdateCollection.md) + - [RpmUpdateCollectionResponse](docs/RpmUpdateCollectionResponse.md) + - [RpmUpdateRecord](docs/RpmUpdateRecord.md) + - [RpmUpdateRecordResponse](docs/RpmUpdateRecordResponse.md) + - [SigningServiceResponse](docs/SigningServiceResponse.md) + - [SkipTypesEnum](docs/SkipTypesEnum.md) + - [StatesEnum](docs/StatesEnum.md) + - [StatusResponse](docs/StatusResponse.md) + - [StorageClassEnum](docs/StorageClassEnum.md) + - [StorageResponse](docs/StorageResponse.md) + - [SummaryResponse](docs/SummaryResponse.md) + - [SyncPolicyEnum](docs/SyncPolicyEnum.md) + - [TagCopy](docs/TagCopy.md) + - [TagImage](docs/TagImage.md) + - [TagResponse](docs/TagResponse.md) + - [Task](docs/Task.md) + - [TaskGroupOperationResponse](docs/TaskGroupOperationResponse.md) + - [TaskGroupResponse](docs/TaskGroupResponse.md) + - [TaskResponse](docs/TaskResponse.md) + - [TaskScheduleResponse](docs/TaskScheduleResponse.md) + - [UnTagImage](docs/UnTagImage.md) + - [UnpaginatedCollectionVersionResponse](docs/UnpaginatedCollectionVersionResponse.md) + - [Upload](docs/Upload.md) + - [UploadChunk](docs/UploadChunk.md) + - [UploadChunkResponse](docs/UploadChunkResponse.md) + - [UploadCommit](docs/UploadCommit.md) + - [UploadDetailResponse](docs/UploadDetailResponse.md) + - [UploadResponse](docs/UploadResponse.md) + - [UpstreamPulp](docs/UpstreamPulp.md) + - [UpstreamPulpResponse](docs/UpstreamPulpResponse.md) + - [User](docs/User.md) + - [UserGroup](docs/UserGroup.md) + - [UserGroupResponse](docs/UserGroupResponse.md) + - [UserResponse](docs/UserResponse.md) + - [UserRole](docs/UserRole.md) + - [UserRoleResponse](docs/UserRoleResponse.md) + - [VariantResponse](docs/VariantResponse.md) + - [VersionResponse](docs/VersionResponse.md) + - [WorkerResponse](docs/WorkerResponse.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### basicAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + +### cookieAuth + +- **Type**: API key +- **API key parameter name**: sessionid +- **Location**: + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: sessionid and passed in as the auth context for each request. + +Example + +```golang +auth := context.WithValue( + context.Background(), + sw.ContextAPIKeys, + map[string]sw.APIKey{ + "sessionid": {Key: "API_KEY_STRING"}, + }, + ) +r, err := client.Service.Operation(auth, args) +``` + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + +pulp-list@redhat.com + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_access_policies.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_access_policies.go new file mode 100644 index 0000000000..055b5f4d7c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_access_policies.go @@ -0,0 +1,749 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// AccessPoliciesAPIService AccessPoliciesAPI service +type AccessPoliciesAPIService service + +type AccessPoliciesAPIAccessPoliciesListRequest struct { + ctx context.Context + ApiService *AccessPoliciesAPIService + customized *bool + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + viewsetName *string + viewsetNameContains *string + viewsetNameIcontains *string + viewsetNameIn *[]string + viewsetNameStartswith *string + fields *[]string + excludeFields *[]string +} + +// Filter results where customized matches value +func (r AccessPoliciesAPIAccessPoliciesListRequest) Customized(customized bool) AccessPoliciesAPIAccessPoliciesListRequest { + r.customized = &customized + return r +} + +// Number of results to return per page. +func (r AccessPoliciesAPIAccessPoliciesListRequest) Limit(limit int32) AccessPoliciesAPIAccessPoliciesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r AccessPoliciesAPIAccessPoliciesListRequest) Offset(offset int32) AccessPoliciesAPIAccessPoliciesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `creation_hooks` - Creation hooks * `-creation_hooks` - Creation hooks (descending) * `statements` - Statements * `-statements` - Statements (descending) * `viewset_name` - Viewset name * `-viewset_name` - Viewset name (descending) * `customized` - Customized * `-customized` - Customized (descending) * `queryset_scoping` - Queryset scoping * `-queryset_scoping` - Queryset scoping (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r AccessPoliciesAPIAccessPoliciesListRequest) Ordering(ordering []string) AccessPoliciesAPIAccessPoliciesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r AccessPoliciesAPIAccessPoliciesListRequest) PulpHrefIn(pulpHrefIn []string) AccessPoliciesAPIAccessPoliciesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r AccessPoliciesAPIAccessPoliciesListRequest) PulpIdIn(pulpIdIn []string) AccessPoliciesAPIAccessPoliciesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter results where viewset_name matches value +func (r AccessPoliciesAPIAccessPoliciesListRequest) ViewsetName(viewsetName string) AccessPoliciesAPIAccessPoliciesListRequest { + r.viewsetName = &viewsetName + return r +} + +// Filter results where viewset_name contains value +func (r AccessPoliciesAPIAccessPoliciesListRequest) ViewsetNameContains(viewsetNameContains string) AccessPoliciesAPIAccessPoliciesListRequest { + r.viewsetNameContains = &viewsetNameContains + return r +} + +// Filter results where viewset_name contains value +func (r AccessPoliciesAPIAccessPoliciesListRequest) ViewsetNameIcontains(viewsetNameIcontains string) AccessPoliciesAPIAccessPoliciesListRequest { + r.viewsetNameIcontains = &viewsetNameIcontains + return r +} + +// Filter results where viewset_name is in a comma-separated list of values +func (r AccessPoliciesAPIAccessPoliciesListRequest) ViewsetNameIn(viewsetNameIn []string) AccessPoliciesAPIAccessPoliciesListRequest { + r.viewsetNameIn = &viewsetNameIn + return r +} + +// Filter results where viewset_name starts with value +func (r AccessPoliciesAPIAccessPoliciesListRequest) ViewsetNameStartswith(viewsetNameStartswith string) AccessPoliciesAPIAccessPoliciesListRequest { + r.viewsetNameStartswith = &viewsetNameStartswith + return r +} + +// A list of fields to include in the response. +func (r AccessPoliciesAPIAccessPoliciesListRequest) Fields(fields []string) AccessPoliciesAPIAccessPoliciesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r AccessPoliciesAPIAccessPoliciesListRequest) ExcludeFields(excludeFields []string) AccessPoliciesAPIAccessPoliciesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r AccessPoliciesAPIAccessPoliciesListRequest) Execute() (*PaginatedAccessPolicyResponseList, *http.Response, error) { + return r.ApiService.AccessPoliciesListExecute(r) +} + +/* +AccessPoliciesList List access policys + +ViewSet for AccessPolicy. + +NOTE: This API endpoint is in "tech preview" and subject to change + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return AccessPoliciesAPIAccessPoliciesListRequest +*/ +func (a *AccessPoliciesAPIService) AccessPoliciesList(ctx context.Context) AccessPoliciesAPIAccessPoliciesListRequest { + return AccessPoliciesAPIAccessPoliciesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedAccessPolicyResponseList +func (a *AccessPoliciesAPIService) AccessPoliciesListExecute(r AccessPoliciesAPIAccessPoliciesListRequest) (*PaginatedAccessPolicyResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedAccessPolicyResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccessPoliciesAPIService.AccessPoliciesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/access_policies/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.customized != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "customized", r.customized, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.viewsetName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "viewset_name", r.viewsetName, "") + } + if r.viewsetNameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "viewset_name__contains", r.viewsetNameContains, "") + } + if r.viewsetNameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "viewset_name__icontains", r.viewsetNameIcontains, "") + } + if r.viewsetNameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "viewset_name__in", r.viewsetNameIn, "csv") + } + if r.viewsetNameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "viewset_name__startswith", r.viewsetNameStartswith, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AccessPoliciesAPIAccessPoliciesPartialUpdateRequest struct { + ctx context.Context + ApiService *AccessPoliciesAPIService + accessPolicyHref string + patchedAccessPolicy *PatchedAccessPolicy +} + +func (r AccessPoliciesAPIAccessPoliciesPartialUpdateRequest) PatchedAccessPolicy(patchedAccessPolicy PatchedAccessPolicy) AccessPoliciesAPIAccessPoliciesPartialUpdateRequest { + r.patchedAccessPolicy = &patchedAccessPolicy + return r +} + +func (r AccessPoliciesAPIAccessPoliciesPartialUpdateRequest) Execute() (*AccessPolicyResponse, *http.Response, error) { + return r.ApiService.AccessPoliciesPartialUpdateExecute(r) +} + +/* +AccessPoliciesPartialUpdate Update an access policy + +ViewSet for AccessPolicy. + +NOTE: This API endpoint is in "tech preview" and subject to change + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param accessPolicyHref + @return AccessPoliciesAPIAccessPoliciesPartialUpdateRequest +*/ +func (a *AccessPoliciesAPIService) AccessPoliciesPartialUpdate(ctx context.Context, accessPolicyHref string) AccessPoliciesAPIAccessPoliciesPartialUpdateRequest { + return AccessPoliciesAPIAccessPoliciesPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + accessPolicyHref: accessPolicyHref, + } +} + +// Execute executes the request +// @return AccessPolicyResponse +func (a *AccessPoliciesAPIService) AccessPoliciesPartialUpdateExecute(r AccessPoliciesAPIAccessPoliciesPartialUpdateRequest) (*AccessPolicyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AccessPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccessPoliciesAPIService.AccessPoliciesPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{access_policy_href}" + localVarPath = strings.Replace(localVarPath, "{"+"access_policy_href"+"}", parameterValueToString(r.accessPolicyHref, "accessPolicyHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedAccessPolicy == nil { + return localVarReturnValue, nil, reportError("patchedAccessPolicy is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedAccessPolicy + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AccessPoliciesAPIAccessPoliciesReadRequest struct { + ctx context.Context + ApiService *AccessPoliciesAPIService + accessPolicyHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r AccessPoliciesAPIAccessPoliciesReadRequest) Fields(fields []string) AccessPoliciesAPIAccessPoliciesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r AccessPoliciesAPIAccessPoliciesReadRequest) ExcludeFields(excludeFields []string) AccessPoliciesAPIAccessPoliciesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r AccessPoliciesAPIAccessPoliciesReadRequest) Execute() (*AccessPolicyResponse, *http.Response, error) { + return r.ApiService.AccessPoliciesReadExecute(r) +} + +/* +AccessPoliciesRead Inspect an access policy + +ViewSet for AccessPolicy. + +NOTE: This API endpoint is in "tech preview" and subject to change + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param accessPolicyHref + @return AccessPoliciesAPIAccessPoliciesReadRequest +*/ +func (a *AccessPoliciesAPIService) AccessPoliciesRead(ctx context.Context, accessPolicyHref string) AccessPoliciesAPIAccessPoliciesReadRequest { + return AccessPoliciesAPIAccessPoliciesReadRequest{ + ApiService: a, + ctx: ctx, + accessPolicyHref: accessPolicyHref, + } +} + +// Execute executes the request +// @return AccessPolicyResponse +func (a *AccessPoliciesAPIService) AccessPoliciesReadExecute(r AccessPoliciesAPIAccessPoliciesReadRequest) (*AccessPolicyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AccessPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccessPoliciesAPIService.AccessPoliciesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{access_policy_href}" + localVarPath = strings.Replace(localVarPath, "{"+"access_policy_href"+"}", parameterValueToString(r.accessPolicyHref, "accessPolicyHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AccessPoliciesAPIAccessPoliciesResetRequest struct { + ctx context.Context + ApiService *AccessPoliciesAPIService + accessPolicyHref string +} + +func (r AccessPoliciesAPIAccessPoliciesResetRequest) Execute() (*AccessPolicyResponse, *http.Response, error) { + return r.ApiService.AccessPoliciesResetExecute(r) +} + +/* +AccessPoliciesReset Method for AccessPoliciesReset + +Reset the access policy to its uncustomized default value. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param accessPolicyHref + @return AccessPoliciesAPIAccessPoliciesResetRequest +*/ +func (a *AccessPoliciesAPIService) AccessPoliciesReset(ctx context.Context, accessPolicyHref string) AccessPoliciesAPIAccessPoliciesResetRequest { + return AccessPoliciesAPIAccessPoliciesResetRequest{ + ApiService: a, + ctx: ctx, + accessPolicyHref: accessPolicyHref, + } +} + +// Execute executes the request +// @return AccessPolicyResponse +func (a *AccessPoliciesAPIService) AccessPoliciesResetExecute(r AccessPoliciesAPIAccessPoliciesResetRequest) (*AccessPolicyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AccessPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccessPoliciesAPIService.AccessPoliciesReset") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{access_policy_href}reset/" + localVarPath = strings.Replace(localVarPath, "{"+"access_policy_href"+"}", parameterValueToString(r.accessPolicyHref, "accessPolicyHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AccessPoliciesAPIAccessPoliciesUpdateRequest struct { + ctx context.Context + ApiService *AccessPoliciesAPIService + accessPolicyHref string + accessPolicy *AccessPolicy +} + +func (r AccessPoliciesAPIAccessPoliciesUpdateRequest) AccessPolicy(accessPolicy AccessPolicy) AccessPoliciesAPIAccessPoliciesUpdateRequest { + r.accessPolicy = &accessPolicy + return r +} + +func (r AccessPoliciesAPIAccessPoliciesUpdateRequest) Execute() (*AccessPolicyResponse, *http.Response, error) { + return r.ApiService.AccessPoliciesUpdateExecute(r) +} + +/* +AccessPoliciesUpdate Update an access policy + +ViewSet for AccessPolicy. + +NOTE: This API endpoint is in "tech preview" and subject to change + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param accessPolicyHref + @return AccessPoliciesAPIAccessPoliciesUpdateRequest +*/ +func (a *AccessPoliciesAPIService) AccessPoliciesUpdate(ctx context.Context, accessPolicyHref string) AccessPoliciesAPIAccessPoliciesUpdateRequest { + return AccessPoliciesAPIAccessPoliciesUpdateRequest{ + ApiService: a, + ctx: ctx, + accessPolicyHref: accessPolicyHref, + } +} + +// Execute executes the request +// @return AccessPolicyResponse +func (a *AccessPoliciesAPIService) AccessPoliciesUpdateExecute(r AccessPoliciesAPIAccessPoliciesUpdateRequest) (*AccessPolicyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AccessPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccessPoliciesAPIService.AccessPoliciesUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{access_policy_href}" + localVarPath = strings.Replace(localVarPath, "{"+"access_policy_href"+"}", parameterValueToString(r.accessPolicyHref, "accessPolicyHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.accessPolicy == nil { + return localVarReturnValue, nil, reportError("accessPolicy is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.accessPolicy + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_acs_file.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_acs_file.go new file mode 100644 index 0000000000..6e5dbb1d12 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_acs_file.go @@ -0,0 +1,1456 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// AcsFileAPIService AcsFileAPI service +type AcsFileAPIService service + +type AcsFileAPIAcsFileFileAddRoleRequest struct { + ctx context.Context + ApiService *AcsFileAPIService + fileFileAlternateContentSourceHref string + nestedRole *NestedRole +} + +func (r AcsFileAPIAcsFileFileAddRoleRequest) NestedRole(nestedRole NestedRole) AcsFileAPIAcsFileFileAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r AcsFileAPIAcsFileFileAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.AcsFileFileAddRoleExecute(r) +} + +/* +AcsFileFileAddRole Method for AcsFileFileAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileAlternateContentSourceHref + @return AcsFileAPIAcsFileFileAddRoleRequest +*/ +func (a *AcsFileAPIService) AcsFileFileAddRole(ctx context.Context, fileFileAlternateContentSourceHref string) AcsFileAPIAcsFileFileAddRoleRequest { + return AcsFileAPIAcsFileFileAddRoleRequest{ + ApiService: a, + ctx: ctx, + fileFileAlternateContentSourceHref: fileFileAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *AcsFileAPIService) AcsFileFileAddRoleExecute(r AcsFileAPIAcsFileFileAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsFileAPIService.AcsFileFileAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_alternate_content_source_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_alternate_content_source_href"+"}", parameterValueToString(r.fileFileAlternateContentSourceHref, "fileFileAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsFileAPIAcsFileFileCreateRequest struct { + ctx context.Context + ApiService *AcsFileAPIService + fileFileAlternateContentSource *FileFileAlternateContentSource +} + +func (r AcsFileAPIAcsFileFileCreateRequest) FileFileAlternateContentSource(fileFileAlternateContentSource FileFileAlternateContentSource) AcsFileAPIAcsFileFileCreateRequest { + r.fileFileAlternateContentSource = &fileFileAlternateContentSource + return r +} + +func (r AcsFileAPIAcsFileFileCreateRequest) Execute() (*FileFileAlternateContentSourceResponse, *http.Response, error) { + return r.ApiService.AcsFileFileCreateExecute(r) +} + +/* +AcsFileFileCreate Create a file alternate content source + +Alternate Content Source ViewSet for File + +ACS support is provided as a tech preview in pulp_file. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return AcsFileAPIAcsFileFileCreateRequest +*/ +func (a *AcsFileAPIService) AcsFileFileCreate(ctx context.Context) AcsFileAPIAcsFileFileCreateRequest { + return AcsFileAPIAcsFileFileCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return FileFileAlternateContentSourceResponse +func (a *AcsFileAPIService) AcsFileFileCreateExecute(r AcsFileAPIAcsFileFileCreateRequest) (*FileFileAlternateContentSourceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FileFileAlternateContentSourceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsFileAPIService.AcsFileFileCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/acs/file/file/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.fileFileAlternateContentSource == nil { + return localVarReturnValue, nil, reportError("fileFileAlternateContentSource is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.fileFileAlternateContentSource + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsFileAPIAcsFileFileDeleteRequest struct { + ctx context.Context + ApiService *AcsFileAPIService + fileFileAlternateContentSourceHref string +} + +func (r AcsFileAPIAcsFileFileDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.AcsFileFileDeleteExecute(r) +} + +/* +AcsFileFileDelete Delete a file alternate content source + +Trigger an asynchronous delete ACS task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileAlternateContentSourceHref + @return AcsFileAPIAcsFileFileDeleteRequest +*/ +func (a *AcsFileAPIService) AcsFileFileDelete(ctx context.Context, fileFileAlternateContentSourceHref string) AcsFileAPIAcsFileFileDeleteRequest { + return AcsFileAPIAcsFileFileDeleteRequest{ + ApiService: a, + ctx: ctx, + fileFileAlternateContentSourceHref: fileFileAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *AcsFileAPIService) AcsFileFileDeleteExecute(r AcsFileAPIAcsFileFileDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsFileAPIService.AcsFileFileDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_alternate_content_source_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_alternate_content_source_href"+"}", parameterValueToString(r.fileFileAlternateContentSourceHref, "fileFileAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsFileAPIAcsFileFileListRequest struct { + ctx context.Context + ApiService *AcsFileAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r AcsFileAPIAcsFileFileListRequest) Limit(limit int32) AcsFileAPIAcsFileFileListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r AcsFileAPIAcsFileFileListRequest) Name(name string) AcsFileAPIAcsFileFileListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r AcsFileAPIAcsFileFileListRequest) NameContains(nameContains string) AcsFileAPIAcsFileFileListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r AcsFileAPIAcsFileFileListRequest) NameIcontains(nameIcontains string) AcsFileAPIAcsFileFileListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r AcsFileAPIAcsFileFileListRequest) NameIn(nameIn []string) AcsFileAPIAcsFileFileListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r AcsFileAPIAcsFileFileListRequest) NameStartswith(nameStartswith string) AcsFileAPIAcsFileFileListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r AcsFileAPIAcsFileFileListRequest) Offset(offset int32) AcsFileAPIAcsFileFileListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `last_refreshed` - Last refreshed * `-last_refreshed` - Last refreshed (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r AcsFileAPIAcsFileFileListRequest) Ordering(ordering []string) AcsFileAPIAcsFileFileListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r AcsFileAPIAcsFileFileListRequest) PulpHrefIn(pulpHrefIn []string) AcsFileAPIAcsFileFileListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r AcsFileAPIAcsFileFileListRequest) PulpIdIn(pulpIdIn []string) AcsFileAPIAcsFileFileListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r AcsFileAPIAcsFileFileListRequest) Fields(fields []string) AcsFileAPIAcsFileFileListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r AcsFileAPIAcsFileFileListRequest) ExcludeFields(excludeFields []string) AcsFileAPIAcsFileFileListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r AcsFileAPIAcsFileFileListRequest) Execute() (*PaginatedfileFileAlternateContentSourceResponseList, *http.Response, error) { + return r.ApiService.AcsFileFileListExecute(r) +} + +/* +AcsFileFileList List file alternate content sources + +Alternate Content Source ViewSet for File + +ACS support is provided as a tech preview in pulp_file. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return AcsFileAPIAcsFileFileListRequest +*/ +func (a *AcsFileAPIService) AcsFileFileList(ctx context.Context) AcsFileAPIAcsFileFileListRequest { + return AcsFileAPIAcsFileFileListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedfileFileAlternateContentSourceResponseList +func (a *AcsFileAPIService) AcsFileFileListExecute(r AcsFileAPIAcsFileFileListRequest) (*PaginatedfileFileAlternateContentSourceResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedfileFileAlternateContentSourceResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsFileAPIService.AcsFileFileList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/acs/file/file/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsFileAPIAcsFileFileListRolesRequest struct { + ctx context.Context + ApiService *AcsFileAPIService + fileFileAlternateContentSourceHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r AcsFileAPIAcsFileFileListRolesRequest) Fields(fields []string) AcsFileAPIAcsFileFileListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r AcsFileAPIAcsFileFileListRolesRequest) ExcludeFields(excludeFields []string) AcsFileAPIAcsFileFileListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r AcsFileAPIAcsFileFileListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.AcsFileFileListRolesExecute(r) +} + +/* +AcsFileFileListRoles Method for AcsFileFileListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileAlternateContentSourceHref + @return AcsFileAPIAcsFileFileListRolesRequest +*/ +func (a *AcsFileAPIService) AcsFileFileListRoles(ctx context.Context, fileFileAlternateContentSourceHref string) AcsFileAPIAcsFileFileListRolesRequest { + return AcsFileAPIAcsFileFileListRolesRequest{ + ApiService: a, + ctx: ctx, + fileFileAlternateContentSourceHref: fileFileAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *AcsFileAPIService) AcsFileFileListRolesExecute(r AcsFileAPIAcsFileFileListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsFileAPIService.AcsFileFileListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_alternate_content_source_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_alternate_content_source_href"+"}", parameterValueToString(r.fileFileAlternateContentSourceHref, "fileFileAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsFileAPIAcsFileFileMyPermissionsRequest struct { + ctx context.Context + ApiService *AcsFileAPIService + fileFileAlternateContentSourceHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r AcsFileAPIAcsFileFileMyPermissionsRequest) Fields(fields []string) AcsFileAPIAcsFileFileMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r AcsFileAPIAcsFileFileMyPermissionsRequest) ExcludeFields(excludeFields []string) AcsFileAPIAcsFileFileMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r AcsFileAPIAcsFileFileMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.AcsFileFileMyPermissionsExecute(r) +} + +/* +AcsFileFileMyPermissions Method for AcsFileFileMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileAlternateContentSourceHref + @return AcsFileAPIAcsFileFileMyPermissionsRequest +*/ +func (a *AcsFileAPIService) AcsFileFileMyPermissions(ctx context.Context, fileFileAlternateContentSourceHref string) AcsFileAPIAcsFileFileMyPermissionsRequest { + return AcsFileAPIAcsFileFileMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + fileFileAlternateContentSourceHref: fileFileAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *AcsFileAPIService) AcsFileFileMyPermissionsExecute(r AcsFileAPIAcsFileFileMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsFileAPIService.AcsFileFileMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_alternate_content_source_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_alternate_content_source_href"+"}", parameterValueToString(r.fileFileAlternateContentSourceHref, "fileFileAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsFileAPIAcsFileFilePartialUpdateRequest struct { + ctx context.Context + ApiService *AcsFileAPIService + fileFileAlternateContentSourceHref string + patchedfileFileAlternateContentSource *PatchedfileFileAlternateContentSource +} + +func (r AcsFileAPIAcsFileFilePartialUpdateRequest) PatchedfileFileAlternateContentSource(patchedfileFileAlternateContentSource PatchedfileFileAlternateContentSource) AcsFileAPIAcsFileFilePartialUpdateRequest { + r.patchedfileFileAlternateContentSource = &patchedfileFileAlternateContentSource + return r +} + +func (r AcsFileAPIAcsFileFilePartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.AcsFileFilePartialUpdateExecute(r) +} + +/* +AcsFileFilePartialUpdate Update a file alternate content source + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileAlternateContentSourceHref + @return AcsFileAPIAcsFileFilePartialUpdateRequest +*/ +func (a *AcsFileAPIService) AcsFileFilePartialUpdate(ctx context.Context, fileFileAlternateContentSourceHref string) AcsFileAPIAcsFileFilePartialUpdateRequest { + return AcsFileAPIAcsFileFilePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + fileFileAlternateContentSourceHref: fileFileAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *AcsFileAPIService) AcsFileFilePartialUpdateExecute(r AcsFileAPIAcsFileFilePartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsFileAPIService.AcsFileFilePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_alternate_content_source_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_alternate_content_source_href"+"}", parameterValueToString(r.fileFileAlternateContentSourceHref, "fileFileAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedfileFileAlternateContentSource == nil { + return localVarReturnValue, nil, reportError("patchedfileFileAlternateContentSource is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedfileFileAlternateContentSource + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsFileAPIAcsFileFileReadRequest struct { + ctx context.Context + ApiService *AcsFileAPIService + fileFileAlternateContentSourceHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r AcsFileAPIAcsFileFileReadRequest) Fields(fields []string) AcsFileAPIAcsFileFileReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r AcsFileAPIAcsFileFileReadRequest) ExcludeFields(excludeFields []string) AcsFileAPIAcsFileFileReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r AcsFileAPIAcsFileFileReadRequest) Execute() (*FileFileAlternateContentSourceResponse, *http.Response, error) { + return r.ApiService.AcsFileFileReadExecute(r) +} + +/* +AcsFileFileRead Inspect a file alternate content source + +Alternate Content Source ViewSet for File + +ACS support is provided as a tech preview in pulp_file. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileAlternateContentSourceHref + @return AcsFileAPIAcsFileFileReadRequest +*/ +func (a *AcsFileAPIService) AcsFileFileRead(ctx context.Context, fileFileAlternateContentSourceHref string) AcsFileAPIAcsFileFileReadRequest { + return AcsFileAPIAcsFileFileReadRequest{ + ApiService: a, + ctx: ctx, + fileFileAlternateContentSourceHref: fileFileAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return FileFileAlternateContentSourceResponse +func (a *AcsFileAPIService) AcsFileFileReadExecute(r AcsFileAPIAcsFileFileReadRequest) (*FileFileAlternateContentSourceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FileFileAlternateContentSourceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsFileAPIService.AcsFileFileRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_alternate_content_source_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_alternate_content_source_href"+"}", parameterValueToString(r.fileFileAlternateContentSourceHref, "fileFileAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsFileAPIAcsFileFileRefreshRequest struct { + ctx context.Context + ApiService *AcsFileAPIService + fileFileAlternateContentSourceHref string +} + +func (r AcsFileAPIAcsFileFileRefreshRequest) Execute() (*TaskGroupOperationResponse, *http.Response, error) { + return r.ApiService.AcsFileFileRefreshExecute(r) +} + +/* +AcsFileFileRefresh Refresh metadata + +Trigger an asynchronous task to create Alternate Content Source content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileAlternateContentSourceHref + @return AcsFileAPIAcsFileFileRefreshRequest +*/ +func (a *AcsFileAPIService) AcsFileFileRefresh(ctx context.Context, fileFileAlternateContentSourceHref string) AcsFileAPIAcsFileFileRefreshRequest { + return AcsFileAPIAcsFileFileRefreshRequest{ + ApiService: a, + ctx: ctx, + fileFileAlternateContentSourceHref: fileFileAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return TaskGroupOperationResponse +func (a *AcsFileAPIService) AcsFileFileRefreshExecute(r AcsFileAPIAcsFileFileRefreshRequest) (*TaskGroupOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TaskGroupOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsFileAPIService.AcsFileFileRefresh") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_alternate_content_source_href}refresh/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_alternate_content_source_href"+"}", parameterValueToString(r.fileFileAlternateContentSourceHref, "fileFileAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsFileAPIAcsFileFileRemoveRoleRequest struct { + ctx context.Context + ApiService *AcsFileAPIService + fileFileAlternateContentSourceHref string + nestedRole *NestedRole +} + +func (r AcsFileAPIAcsFileFileRemoveRoleRequest) NestedRole(nestedRole NestedRole) AcsFileAPIAcsFileFileRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r AcsFileAPIAcsFileFileRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.AcsFileFileRemoveRoleExecute(r) +} + +/* +AcsFileFileRemoveRole Method for AcsFileFileRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileAlternateContentSourceHref + @return AcsFileAPIAcsFileFileRemoveRoleRequest +*/ +func (a *AcsFileAPIService) AcsFileFileRemoveRole(ctx context.Context, fileFileAlternateContentSourceHref string) AcsFileAPIAcsFileFileRemoveRoleRequest { + return AcsFileAPIAcsFileFileRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + fileFileAlternateContentSourceHref: fileFileAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *AcsFileAPIService) AcsFileFileRemoveRoleExecute(r AcsFileAPIAcsFileFileRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsFileAPIService.AcsFileFileRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_alternate_content_source_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_alternate_content_source_href"+"}", parameterValueToString(r.fileFileAlternateContentSourceHref, "fileFileAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsFileAPIAcsFileFileUpdateRequest struct { + ctx context.Context + ApiService *AcsFileAPIService + fileFileAlternateContentSourceHref string + fileFileAlternateContentSource *FileFileAlternateContentSource +} + +func (r AcsFileAPIAcsFileFileUpdateRequest) FileFileAlternateContentSource(fileFileAlternateContentSource FileFileAlternateContentSource) AcsFileAPIAcsFileFileUpdateRequest { + r.fileFileAlternateContentSource = &fileFileAlternateContentSource + return r +} + +func (r AcsFileAPIAcsFileFileUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.AcsFileFileUpdateExecute(r) +} + +/* +AcsFileFileUpdate Update a file alternate content source + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileAlternateContentSourceHref + @return AcsFileAPIAcsFileFileUpdateRequest +*/ +func (a *AcsFileAPIService) AcsFileFileUpdate(ctx context.Context, fileFileAlternateContentSourceHref string) AcsFileAPIAcsFileFileUpdateRequest { + return AcsFileAPIAcsFileFileUpdateRequest{ + ApiService: a, + ctx: ctx, + fileFileAlternateContentSourceHref: fileFileAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *AcsFileAPIService) AcsFileFileUpdateExecute(r AcsFileAPIAcsFileFileUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsFileAPIService.AcsFileFileUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_alternate_content_source_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_alternate_content_source_href"+"}", parameterValueToString(r.fileFileAlternateContentSourceHref, "fileFileAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.fileFileAlternateContentSource == nil { + return localVarReturnValue, nil, reportError("fileFileAlternateContentSource is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.fileFileAlternateContentSource + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_acs_rpm.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_acs_rpm.go new file mode 100644 index 0000000000..1e265d1d00 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_acs_rpm.go @@ -0,0 +1,1450 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// AcsRpmAPIService AcsRpmAPI service +type AcsRpmAPIService service + +type AcsRpmAPIAcsRpmRpmAddRoleRequest struct { + ctx context.Context + ApiService *AcsRpmAPIService + rpmRpmAlternateContentSourceHref string + nestedRole *NestedRole +} + +func (r AcsRpmAPIAcsRpmRpmAddRoleRequest) NestedRole(nestedRole NestedRole) AcsRpmAPIAcsRpmRpmAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r AcsRpmAPIAcsRpmRpmAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.AcsRpmRpmAddRoleExecute(r) +} + +/* +AcsRpmRpmAddRole Method for AcsRpmRpmAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmAlternateContentSourceHref + @return AcsRpmAPIAcsRpmRpmAddRoleRequest +*/ +func (a *AcsRpmAPIService) AcsRpmRpmAddRole(ctx context.Context, rpmRpmAlternateContentSourceHref string) AcsRpmAPIAcsRpmRpmAddRoleRequest { + return AcsRpmAPIAcsRpmRpmAddRoleRequest{ + ApiService: a, + ctx: ctx, + rpmRpmAlternateContentSourceHref: rpmRpmAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *AcsRpmAPIService) AcsRpmRpmAddRoleExecute(r AcsRpmAPIAcsRpmRpmAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsRpmAPIService.AcsRpmRpmAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_alternate_content_source_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_alternate_content_source_href"+"}", parameterValueToString(r.rpmRpmAlternateContentSourceHref, "rpmRpmAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsRpmAPIAcsRpmRpmCreateRequest struct { + ctx context.Context + ApiService *AcsRpmAPIService + rpmRpmAlternateContentSource *RpmRpmAlternateContentSource +} + +func (r AcsRpmAPIAcsRpmRpmCreateRequest) RpmRpmAlternateContentSource(rpmRpmAlternateContentSource RpmRpmAlternateContentSource) AcsRpmAPIAcsRpmRpmCreateRequest { + r.rpmRpmAlternateContentSource = &rpmRpmAlternateContentSource + return r +} + +func (r AcsRpmAPIAcsRpmRpmCreateRequest) Execute() (*RpmRpmAlternateContentSourceResponse, *http.Response, error) { + return r.ApiService.AcsRpmRpmCreateExecute(r) +} + +/* +AcsRpmRpmCreate Create a rpm alternate content source + +ViewSet for ACS. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return AcsRpmAPIAcsRpmRpmCreateRequest +*/ +func (a *AcsRpmAPIService) AcsRpmRpmCreate(ctx context.Context) AcsRpmAPIAcsRpmRpmCreateRequest { + return AcsRpmAPIAcsRpmRpmCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return RpmRpmAlternateContentSourceResponse +func (a *AcsRpmAPIService) AcsRpmRpmCreateExecute(r AcsRpmAPIAcsRpmRpmCreateRequest) (*RpmRpmAlternateContentSourceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmRpmAlternateContentSourceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsRpmAPIService.AcsRpmRpmCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/acs/rpm/rpm/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmRpmAlternateContentSource == nil { + return localVarReturnValue, nil, reportError("rpmRpmAlternateContentSource is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmRpmAlternateContentSource + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsRpmAPIAcsRpmRpmDeleteRequest struct { + ctx context.Context + ApiService *AcsRpmAPIService + rpmRpmAlternateContentSourceHref string +} + +func (r AcsRpmAPIAcsRpmRpmDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.AcsRpmRpmDeleteExecute(r) +} + +/* +AcsRpmRpmDelete Delete a rpm alternate content source + +Trigger an asynchronous delete ACS task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmAlternateContentSourceHref + @return AcsRpmAPIAcsRpmRpmDeleteRequest +*/ +func (a *AcsRpmAPIService) AcsRpmRpmDelete(ctx context.Context, rpmRpmAlternateContentSourceHref string) AcsRpmAPIAcsRpmRpmDeleteRequest { + return AcsRpmAPIAcsRpmRpmDeleteRequest{ + ApiService: a, + ctx: ctx, + rpmRpmAlternateContentSourceHref: rpmRpmAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *AcsRpmAPIService) AcsRpmRpmDeleteExecute(r AcsRpmAPIAcsRpmRpmDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsRpmAPIService.AcsRpmRpmDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_alternate_content_source_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_alternate_content_source_href"+"}", parameterValueToString(r.rpmRpmAlternateContentSourceHref, "rpmRpmAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsRpmAPIAcsRpmRpmListRequest struct { + ctx context.Context + ApiService *AcsRpmAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r AcsRpmAPIAcsRpmRpmListRequest) Limit(limit int32) AcsRpmAPIAcsRpmRpmListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r AcsRpmAPIAcsRpmRpmListRequest) Name(name string) AcsRpmAPIAcsRpmRpmListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r AcsRpmAPIAcsRpmRpmListRequest) NameContains(nameContains string) AcsRpmAPIAcsRpmRpmListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r AcsRpmAPIAcsRpmRpmListRequest) NameIcontains(nameIcontains string) AcsRpmAPIAcsRpmRpmListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r AcsRpmAPIAcsRpmRpmListRequest) NameIn(nameIn []string) AcsRpmAPIAcsRpmRpmListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r AcsRpmAPIAcsRpmRpmListRequest) NameStartswith(nameStartswith string) AcsRpmAPIAcsRpmRpmListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r AcsRpmAPIAcsRpmRpmListRequest) Offset(offset int32) AcsRpmAPIAcsRpmRpmListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `last_refreshed` - Last refreshed * `-last_refreshed` - Last refreshed (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r AcsRpmAPIAcsRpmRpmListRequest) Ordering(ordering []string) AcsRpmAPIAcsRpmRpmListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r AcsRpmAPIAcsRpmRpmListRequest) PulpHrefIn(pulpHrefIn []string) AcsRpmAPIAcsRpmRpmListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r AcsRpmAPIAcsRpmRpmListRequest) PulpIdIn(pulpIdIn []string) AcsRpmAPIAcsRpmRpmListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r AcsRpmAPIAcsRpmRpmListRequest) Fields(fields []string) AcsRpmAPIAcsRpmRpmListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r AcsRpmAPIAcsRpmRpmListRequest) ExcludeFields(excludeFields []string) AcsRpmAPIAcsRpmRpmListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r AcsRpmAPIAcsRpmRpmListRequest) Execute() (*PaginatedrpmRpmAlternateContentSourceResponseList, *http.Response, error) { + return r.ApiService.AcsRpmRpmListExecute(r) +} + +/* +AcsRpmRpmList List rpm alternate content sources + +ViewSet for ACS. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return AcsRpmAPIAcsRpmRpmListRequest +*/ +func (a *AcsRpmAPIService) AcsRpmRpmList(ctx context.Context) AcsRpmAPIAcsRpmRpmListRequest { + return AcsRpmAPIAcsRpmRpmListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmRpmAlternateContentSourceResponseList +func (a *AcsRpmAPIService) AcsRpmRpmListExecute(r AcsRpmAPIAcsRpmRpmListRequest) (*PaginatedrpmRpmAlternateContentSourceResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmRpmAlternateContentSourceResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsRpmAPIService.AcsRpmRpmList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/acs/rpm/rpm/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsRpmAPIAcsRpmRpmListRolesRequest struct { + ctx context.Context + ApiService *AcsRpmAPIService + rpmRpmAlternateContentSourceHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r AcsRpmAPIAcsRpmRpmListRolesRequest) Fields(fields []string) AcsRpmAPIAcsRpmRpmListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r AcsRpmAPIAcsRpmRpmListRolesRequest) ExcludeFields(excludeFields []string) AcsRpmAPIAcsRpmRpmListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r AcsRpmAPIAcsRpmRpmListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.AcsRpmRpmListRolesExecute(r) +} + +/* +AcsRpmRpmListRoles Method for AcsRpmRpmListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmAlternateContentSourceHref + @return AcsRpmAPIAcsRpmRpmListRolesRequest +*/ +func (a *AcsRpmAPIService) AcsRpmRpmListRoles(ctx context.Context, rpmRpmAlternateContentSourceHref string) AcsRpmAPIAcsRpmRpmListRolesRequest { + return AcsRpmAPIAcsRpmRpmListRolesRequest{ + ApiService: a, + ctx: ctx, + rpmRpmAlternateContentSourceHref: rpmRpmAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *AcsRpmAPIService) AcsRpmRpmListRolesExecute(r AcsRpmAPIAcsRpmRpmListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsRpmAPIService.AcsRpmRpmListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_alternate_content_source_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_alternate_content_source_href"+"}", parameterValueToString(r.rpmRpmAlternateContentSourceHref, "rpmRpmAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsRpmAPIAcsRpmRpmMyPermissionsRequest struct { + ctx context.Context + ApiService *AcsRpmAPIService + rpmRpmAlternateContentSourceHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r AcsRpmAPIAcsRpmRpmMyPermissionsRequest) Fields(fields []string) AcsRpmAPIAcsRpmRpmMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r AcsRpmAPIAcsRpmRpmMyPermissionsRequest) ExcludeFields(excludeFields []string) AcsRpmAPIAcsRpmRpmMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r AcsRpmAPIAcsRpmRpmMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.AcsRpmRpmMyPermissionsExecute(r) +} + +/* +AcsRpmRpmMyPermissions Method for AcsRpmRpmMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmAlternateContentSourceHref + @return AcsRpmAPIAcsRpmRpmMyPermissionsRequest +*/ +func (a *AcsRpmAPIService) AcsRpmRpmMyPermissions(ctx context.Context, rpmRpmAlternateContentSourceHref string) AcsRpmAPIAcsRpmRpmMyPermissionsRequest { + return AcsRpmAPIAcsRpmRpmMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + rpmRpmAlternateContentSourceHref: rpmRpmAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *AcsRpmAPIService) AcsRpmRpmMyPermissionsExecute(r AcsRpmAPIAcsRpmRpmMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsRpmAPIService.AcsRpmRpmMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_alternate_content_source_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_alternate_content_source_href"+"}", parameterValueToString(r.rpmRpmAlternateContentSourceHref, "rpmRpmAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsRpmAPIAcsRpmRpmPartialUpdateRequest struct { + ctx context.Context + ApiService *AcsRpmAPIService + rpmRpmAlternateContentSourceHref string + patchedrpmRpmAlternateContentSource *PatchedrpmRpmAlternateContentSource +} + +func (r AcsRpmAPIAcsRpmRpmPartialUpdateRequest) PatchedrpmRpmAlternateContentSource(patchedrpmRpmAlternateContentSource PatchedrpmRpmAlternateContentSource) AcsRpmAPIAcsRpmRpmPartialUpdateRequest { + r.patchedrpmRpmAlternateContentSource = &patchedrpmRpmAlternateContentSource + return r +} + +func (r AcsRpmAPIAcsRpmRpmPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.AcsRpmRpmPartialUpdateExecute(r) +} + +/* +AcsRpmRpmPartialUpdate Update a rpm alternate content source + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmAlternateContentSourceHref + @return AcsRpmAPIAcsRpmRpmPartialUpdateRequest +*/ +func (a *AcsRpmAPIService) AcsRpmRpmPartialUpdate(ctx context.Context, rpmRpmAlternateContentSourceHref string) AcsRpmAPIAcsRpmRpmPartialUpdateRequest { + return AcsRpmAPIAcsRpmRpmPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + rpmRpmAlternateContentSourceHref: rpmRpmAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *AcsRpmAPIService) AcsRpmRpmPartialUpdateExecute(r AcsRpmAPIAcsRpmRpmPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsRpmAPIService.AcsRpmRpmPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_alternate_content_source_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_alternate_content_source_href"+"}", parameterValueToString(r.rpmRpmAlternateContentSourceHref, "rpmRpmAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedrpmRpmAlternateContentSource == nil { + return localVarReturnValue, nil, reportError("patchedrpmRpmAlternateContentSource is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedrpmRpmAlternateContentSource + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsRpmAPIAcsRpmRpmReadRequest struct { + ctx context.Context + ApiService *AcsRpmAPIService + rpmRpmAlternateContentSourceHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r AcsRpmAPIAcsRpmRpmReadRequest) Fields(fields []string) AcsRpmAPIAcsRpmRpmReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r AcsRpmAPIAcsRpmRpmReadRequest) ExcludeFields(excludeFields []string) AcsRpmAPIAcsRpmRpmReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r AcsRpmAPIAcsRpmRpmReadRequest) Execute() (*RpmRpmAlternateContentSourceResponse, *http.Response, error) { + return r.ApiService.AcsRpmRpmReadExecute(r) +} + +/* +AcsRpmRpmRead Inspect a rpm alternate content source + +ViewSet for ACS. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmAlternateContentSourceHref + @return AcsRpmAPIAcsRpmRpmReadRequest +*/ +func (a *AcsRpmAPIService) AcsRpmRpmRead(ctx context.Context, rpmRpmAlternateContentSourceHref string) AcsRpmAPIAcsRpmRpmReadRequest { + return AcsRpmAPIAcsRpmRpmReadRequest{ + ApiService: a, + ctx: ctx, + rpmRpmAlternateContentSourceHref: rpmRpmAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return RpmRpmAlternateContentSourceResponse +func (a *AcsRpmAPIService) AcsRpmRpmReadExecute(r AcsRpmAPIAcsRpmRpmReadRequest) (*RpmRpmAlternateContentSourceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmRpmAlternateContentSourceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsRpmAPIService.AcsRpmRpmRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_alternate_content_source_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_alternate_content_source_href"+"}", parameterValueToString(r.rpmRpmAlternateContentSourceHref, "rpmRpmAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsRpmAPIAcsRpmRpmRefreshRequest struct { + ctx context.Context + ApiService *AcsRpmAPIService + rpmRpmAlternateContentSourceHref string +} + +func (r AcsRpmAPIAcsRpmRpmRefreshRequest) Execute() (*TaskGroupOperationResponse, *http.Response, error) { + return r.ApiService.AcsRpmRpmRefreshExecute(r) +} + +/* +AcsRpmRpmRefresh Method for AcsRpmRpmRefresh + +Trigger an asynchronous task to create Alternate Content Source content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmAlternateContentSourceHref + @return AcsRpmAPIAcsRpmRpmRefreshRequest +*/ +func (a *AcsRpmAPIService) AcsRpmRpmRefresh(ctx context.Context, rpmRpmAlternateContentSourceHref string) AcsRpmAPIAcsRpmRpmRefreshRequest { + return AcsRpmAPIAcsRpmRpmRefreshRequest{ + ApiService: a, + ctx: ctx, + rpmRpmAlternateContentSourceHref: rpmRpmAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return TaskGroupOperationResponse +func (a *AcsRpmAPIService) AcsRpmRpmRefreshExecute(r AcsRpmAPIAcsRpmRpmRefreshRequest) (*TaskGroupOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TaskGroupOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsRpmAPIService.AcsRpmRpmRefresh") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_alternate_content_source_href}refresh/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_alternate_content_source_href"+"}", parameterValueToString(r.rpmRpmAlternateContentSourceHref, "rpmRpmAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsRpmAPIAcsRpmRpmRemoveRoleRequest struct { + ctx context.Context + ApiService *AcsRpmAPIService + rpmRpmAlternateContentSourceHref string + nestedRole *NestedRole +} + +func (r AcsRpmAPIAcsRpmRpmRemoveRoleRequest) NestedRole(nestedRole NestedRole) AcsRpmAPIAcsRpmRpmRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r AcsRpmAPIAcsRpmRpmRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.AcsRpmRpmRemoveRoleExecute(r) +} + +/* +AcsRpmRpmRemoveRole Method for AcsRpmRpmRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmAlternateContentSourceHref + @return AcsRpmAPIAcsRpmRpmRemoveRoleRequest +*/ +func (a *AcsRpmAPIService) AcsRpmRpmRemoveRole(ctx context.Context, rpmRpmAlternateContentSourceHref string) AcsRpmAPIAcsRpmRpmRemoveRoleRequest { + return AcsRpmAPIAcsRpmRpmRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + rpmRpmAlternateContentSourceHref: rpmRpmAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *AcsRpmAPIService) AcsRpmRpmRemoveRoleExecute(r AcsRpmAPIAcsRpmRpmRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsRpmAPIService.AcsRpmRpmRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_alternate_content_source_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_alternate_content_source_href"+"}", parameterValueToString(r.rpmRpmAlternateContentSourceHref, "rpmRpmAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AcsRpmAPIAcsRpmRpmUpdateRequest struct { + ctx context.Context + ApiService *AcsRpmAPIService + rpmRpmAlternateContentSourceHref string + rpmRpmAlternateContentSource *RpmRpmAlternateContentSource +} + +func (r AcsRpmAPIAcsRpmRpmUpdateRequest) RpmRpmAlternateContentSource(rpmRpmAlternateContentSource RpmRpmAlternateContentSource) AcsRpmAPIAcsRpmRpmUpdateRequest { + r.rpmRpmAlternateContentSource = &rpmRpmAlternateContentSource + return r +} + +func (r AcsRpmAPIAcsRpmRpmUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.AcsRpmRpmUpdateExecute(r) +} + +/* +AcsRpmRpmUpdate Update a rpm alternate content source + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmAlternateContentSourceHref + @return AcsRpmAPIAcsRpmRpmUpdateRequest +*/ +func (a *AcsRpmAPIService) AcsRpmRpmUpdate(ctx context.Context, rpmRpmAlternateContentSourceHref string) AcsRpmAPIAcsRpmRpmUpdateRequest { + return AcsRpmAPIAcsRpmRpmUpdateRequest{ + ApiService: a, + ctx: ctx, + rpmRpmAlternateContentSourceHref: rpmRpmAlternateContentSourceHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *AcsRpmAPIService) AcsRpmRpmUpdateExecute(r AcsRpmAPIAcsRpmRpmUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AcsRpmAPIService.AcsRpmRpmUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_alternate_content_source_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_alternate_content_source_href"+"}", parameterValueToString(r.rpmRpmAlternateContentSourceHref, "rpmRpmAlternateContentSourceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmRpmAlternateContentSource == nil { + return localVarReturnValue, nil, reportError("rpmRpmAlternateContentSource is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmRpmAlternateContentSource + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_ansible_collections.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_ansible_collections.go new file mode 100644 index 0000000000..1aa23ba858 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_ansible_collections.go @@ -0,0 +1,905 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" + "os" +) + + +// AnsibleCollectionsAPIService AnsibleCollectionsAPI service +type AnsibleCollectionsAPIService service + +type AnsibleCollectionsAPIAnsibleCollectionsAddRoleRequest struct { + ctx context.Context + ApiService *AnsibleCollectionsAPIService + ansibleCollectionHref string + nestedRole *NestedRole +} + +func (r AnsibleCollectionsAPIAnsibleCollectionsAddRoleRequest) NestedRole(nestedRole NestedRole) AnsibleCollectionsAPIAnsibleCollectionsAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r AnsibleCollectionsAPIAnsibleCollectionsAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.AnsibleCollectionsAddRoleExecute(r) +} + +/* +AnsibleCollectionsAddRole Method for AnsibleCollectionsAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionHref + @return AnsibleCollectionsAPIAnsibleCollectionsAddRoleRequest +*/ +func (a *AnsibleCollectionsAPIService) AnsibleCollectionsAddRole(ctx context.Context, ansibleCollectionHref string) AnsibleCollectionsAPIAnsibleCollectionsAddRoleRequest { + return AnsibleCollectionsAPIAnsibleCollectionsAddRoleRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionHref: ansibleCollectionHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *AnsibleCollectionsAPIService) AnsibleCollectionsAddRoleExecute(r AnsibleCollectionsAPIAnsibleCollectionsAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnsibleCollectionsAPIService.AnsibleCollectionsAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_href"+"}", parameterValueToString(r.ansibleCollectionHref, "ansibleCollectionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AnsibleCollectionsAPIAnsibleCollectionsListRequest struct { + ctx context.Context + ApiService *AnsibleCollectionsAPIService + limit *int32 + name *string + namespace *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r AnsibleCollectionsAPIAnsibleCollectionsListRequest) Limit(limit int32) AnsibleCollectionsAPIAnsibleCollectionsListRequest { + r.limit = &limit + return r +} + +func (r AnsibleCollectionsAPIAnsibleCollectionsListRequest) Name(name string) AnsibleCollectionsAPIAnsibleCollectionsListRequest { + r.name = &name + return r +} + +func (r AnsibleCollectionsAPIAnsibleCollectionsListRequest) Namespace(namespace string) AnsibleCollectionsAPIAnsibleCollectionsListRequest { + r.namespace = &namespace + return r +} + +// The initial index from which to return the results. +func (r AnsibleCollectionsAPIAnsibleCollectionsListRequest) Offset(offset int32) AnsibleCollectionsAPIAnsibleCollectionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r AnsibleCollectionsAPIAnsibleCollectionsListRequest) Ordering(ordering []string) AnsibleCollectionsAPIAnsibleCollectionsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r AnsibleCollectionsAPIAnsibleCollectionsListRequest) PulpHrefIn(pulpHrefIn []string) AnsibleCollectionsAPIAnsibleCollectionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r AnsibleCollectionsAPIAnsibleCollectionsListRequest) PulpIdIn(pulpIdIn []string) AnsibleCollectionsAPIAnsibleCollectionsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r AnsibleCollectionsAPIAnsibleCollectionsListRequest) Fields(fields []string) AnsibleCollectionsAPIAnsibleCollectionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r AnsibleCollectionsAPIAnsibleCollectionsListRequest) ExcludeFields(excludeFields []string) AnsibleCollectionsAPIAnsibleCollectionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r AnsibleCollectionsAPIAnsibleCollectionsListRequest) Execute() (*PaginatedansibleCollectionResponseList, *http.Response, error) { + return r.ApiService.AnsibleCollectionsListExecute(r) +} + +/* +AnsibleCollectionsList List collections + +Viewset for Ansible Collections. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return AnsibleCollectionsAPIAnsibleCollectionsListRequest +*/ +func (a *AnsibleCollectionsAPIService) AnsibleCollectionsList(ctx context.Context) AnsibleCollectionsAPIAnsibleCollectionsListRequest { + return AnsibleCollectionsAPIAnsibleCollectionsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedansibleCollectionResponseList +func (a *AnsibleCollectionsAPIService) AnsibleCollectionsListExecute(r AnsibleCollectionsAPIAnsibleCollectionsListRequest) (*PaginatedansibleCollectionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleCollectionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnsibleCollectionsAPIService.AnsibleCollectionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/ansible/collections/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AnsibleCollectionsAPIAnsibleCollectionsListRolesRequest struct { + ctx context.Context + ApiService *AnsibleCollectionsAPIService + ansibleCollectionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r AnsibleCollectionsAPIAnsibleCollectionsListRolesRequest) Fields(fields []string) AnsibleCollectionsAPIAnsibleCollectionsListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r AnsibleCollectionsAPIAnsibleCollectionsListRolesRequest) ExcludeFields(excludeFields []string) AnsibleCollectionsAPIAnsibleCollectionsListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r AnsibleCollectionsAPIAnsibleCollectionsListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.AnsibleCollectionsListRolesExecute(r) +} + +/* +AnsibleCollectionsListRoles Method for AnsibleCollectionsListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionHref + @return AnsibleCollectionsAPIAnsibleCollectionsListRolesRequest +*/ +func (a *AnsibleCollectionsAPIService) AnsibleCollectionsListRoles(ctx context.Context, ansibleCollectionHref string) AnsibleCollectionsAPIAnsibleCollectionsListRolesRequest { + return AnsibleCollectionsAPIAnsibleCollectionsListRolesRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionHref: ansibleCollectionHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *AnsibleCollectionsAPIService) AnsibleCollectionsListRolesExecute(r AnsibleCollectionsAPIAnsibleCollectionsListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnsibleCollectionsAPIService.AnsibleCollectionsListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_href"+"}", parameterValueToString(r.ansibleCollectionHref, "ansibleCollectionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AnsibleCollectionsAPIAnsibleCollectionsMyPermissionsRequest struct { + ctx context.Context + ApiService *AnsibleCollectionsAPIService + ansibleCollectionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r AnsibleCollectionsAPIAnsibleCollectionsMyPermissionsRequest) Fields(fields []string) AnsibleCollectionsAPIAnsibleCollectionsMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r AnsibleCollectionsAPIAnsibleCollectionsMyPermissionsRequest) ExcludeFields(excludeFields []string) AnsibleCollectionsAPIAnsibleCollectionsMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r AnsibleCollectionsAPIAnsibleCollectionsMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.AnsibleCollectionsMyPermissionsExecute(r) +} + +/* +AnsibleCollectionsMyPermissions Method for AnsibleCollectionsMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionHref + @return AnsibleCollectionsAPIAnsibleCollectionsMyPermissionsRequest +*/ +func (a *AnsibleCollectionsAPIService) AnsibleCollectionsMyPermissions(ctx context.Context, ansibleCollectionHref string) AnsibleCollectionsAPIAnsibleCollectionsMyPermissionsRequest { + return AnsibleCollectionsAPIAnsibleCollectionsMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionHref: ansibleCollectionHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *AnsibleCollectionsAPIService) AnsibleCollectionsMyPermissionsExecute(r AnsibleCollectionsAPIAnsibleCollectionsMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnsibleCollectionsAPIService.AnsibleCollectionsMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_href"+"}", parameterValueToString(r.ansibleCollectionHref, "ansibleCollectionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AnsibleCollectionsAPIAnsibleCollectionsRemoveRoleRequest struct { + ctx context.Context + ApiService *AnsibleCollectionsAPIService + ansibleCollectionHref string + nestedRole *NestedRole +} + +func (r AnsibleCollectionsAPIAnsibleCollectionsRemoveRoleRequest) NestedRole(nestedRole NestedRole) AnsibleCollectionsAPIAnsibleCollectionsRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r AnsibleCollectionsAPIAnsibleCollectionsRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.AnsibleCollectionsRemoveRoleExecute(r) +} + +/* +AnsibleCollectionsRemoveRole Method for AnsibleCollectionsRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionHref + @return AnsibleCollectionsAPIAnsibleCollectionsRemoveRoleRequest +*/ +func (a *AnsibleCollectionsAPIService) AnsibleCollectionsRemoveRole(ctx context.Context, ansibleCollectionHref string) AnsibleCollectionsAPIAnsibleCollectionsRemoveRoleRequest { + return AnsibleCollectionsAPIAnsibleCollectionsRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionHref: ansibleCollectionHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *AnsibleCollectionsAPIService) AnsibleCollectionsRemoveRoleExecute(r AnsibleCollectionsAPIAnsibleCollectionsRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnsibleCollectionsAPIService.AnsibleCollectionsRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_href"+"}", parameterValueToString(r.ansibleCollectionHref, "ansibleCollectionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type AnsibleCollectionsAPIUploadCollectionRequest struct { + ctx context.Context + ApiService *AnsibleCollectionsAPIService + file *os.File + sha256 *string + expectedNamespace *string + expectedName *string + expectedVersion *string +} + +// The Collection tarball. +func (r AnsibleCollectionsAPIUploadCollectionRequest) File(file *os.File) AnsibleCollectionsAPIUploadCollectionRequest { + r.file = file + return r +} + +// An optional sha256 checksum of the uploaded file. +func (r AnsibleCollectionsAPIUploadCollectionRequest) Sha256(sha256 string) AnsibleCollectionsAPIUploadCollectionRequest { + r.sha256 = &sha256 + return r +} + +// The expected 'namespace' of the Collection to be verified against the metadata during import. +func (r AnsibleCollectionsAPIUploadCollectionRequest) ExpectedNamespace(expectedNamespace string) AnsibleCollectionsAPIUploadCollectionRequest { + r.expectedNamespace = &expectedNamespace + return r +} + +// The expected 'name' of the Collection to be verified against the metadata during import. +func (r AnsibleCollectionsAPIUploadCollectionRequest) ExpectedName(expectedName string) AnsibleCollectionsAPIUploadCollectionRequest { + r.expectedName = &expectedName + return r +} + +// The expected version of the Collection to be verified against the metadata during import. +func (r AnsibleCollectionsAPIUploadCollectionRequest) ExpectedVersion(expectedVersion string) AnsibleCollectionsAPIUploadCollectionRequest { + r.expectedVersion = &expectedVersion + return r +} + +func (r AnsibleCollectionsAPIUploadCollectionRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.UploadCollectionExecute(r) +} + +/* +UploadCollection Upload a collection + +Create an artifact and trigger an asynchronous task to create Collection content from it. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return AnsibleCollectionsAPIUploadCollectionRequest + +Deprecated +*/ +func (a *AnsibleCollectionsAPIService) UploadCollection(ctx context.Context) AnsibleCollectionsAPIUploadCollectionRequest { + return AnsibleCollectionsAPIUploadCollectionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +// Deprecated +func (a *AnsibleCollectionsAPIService) UploadCollectionExecute(r AnsibleCollectionsAPIUploadCollectionRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnsibleCollectionsAPIService.UploadCollection") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/ansible/collections/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.file == nil { + return localVarReturnValue, nil, reportError("file is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha256", r.sha256, "") + } + if r.expectedNamespace != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_namespace", r.expectedNamespace, "") + } + if r.expectedName != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_name", r.expectedName, "") + } + if r.expectedVersion != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_version", r.expectedVersion, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_ansible_copy.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_ansible_copy.go new file mode 100644 index 0000000000..583af07148 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_ansible_copy.go @@ -0,0 +1,134 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// AnsibleCopyAPIService AnsibleCopyAPI service +type AnsibleCopyAPIService service + +type AnsibleCopyAPICopyContentRequest struct { + ctx context.Context + ApiService *AnsibleCopyAPIService + copy *Copy +} + +func (r AnsibleCopyAPICopyContentRequest) Copy(copy Copy) AnsibleCopyAPICopyContentRequest { + r.copy = © + return r +} + +func (r AnsibleCopyAPICopyContentRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.CopyContentExecute(r) +} + +/* +CopyContent Copy content + +Trigger an asynchronous task to copy ansible content from one repository into another, creating a new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return AnsibleCopyAPICopyContentRequest +*/ +func (a *AnsibleCopyAPIService) CopyContent(ctx context.Context) AnsibleCopyAPICopyContentRequest { + return AnsibleCopyAPICopyContentRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *AnsibleCopyAPIService) CopyContentExecute(r AnsibleCopyAPICopyContentRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnsibleCopyAPIService.CopyContent") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/ansible/copy/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.copy == nil { + return localVarReturnValue, nil, reportError("copy is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.copy + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_api_collections.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_api_collections.go new file mode 100644 index 0000000000..80fe796691 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_api_collections.go @@ -0,0 +1,292 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ApiCollectionsAPIService ApiCollectionsAPI service +type ApiCollectionsAPIService service + +type ApiCollectionsAPIApiV2CollectionsGetRequest struct { + ctx context.Context + ApiService *ApiCollectionsAPIService + ansibleCollectionHref string + page *int32 + fields *[]string + excludeFields *[]string +} + +// A page number within the paginated result set. +func (r ApiCollectionsAPIApiV2CollectionsGetRequest) Page(page int32) ApiCollectionsAPIApiV2CollectionsGetRequest { + r.page = &page + return r +} + +// A list of fields to include in the response. +func (r ApiCollectionsAPIApiV2CollectionsGetRequest) Fields(fields []string) ApiCollectionsAPIApiV2CollectionsGetRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ApiCollectionsAPIApiV2CollectionsGetRequest) ExcludeFields(excludeFields []string) ApiCollectionsAPIApiV2CollectionsGetRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ApiCollectionsAPIApiV2CollectionsGetRequest) Execute() (*PaginatedGalaxyCollectionResponseList, *http.Response, error) { + return r.ApiService.ApiV2CollectionsGetExecute(r) +} + +/* +ApiV2CollectionsGet Method for ApiV2CollectionsGet + +View for Collection models. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionHref + @return ApiCollectionsAPIApiV2CollectionsGetRequest +*/ +func (a *ApiCollectionsAPIService) ApiV2CollectionsGet(ctx context.Context, ansibleCollectionHref string) ApiCollectionsAPIApiV2CollectionsGetRequest { + return ApiCollectionsAPIApiV2CollectionsGetRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionHref: ansibleCollectionHref, + } +} + +// Execute executes the request +// @return PaginatedGalaxyCollectionResponseList +func (a *ApiCollectionsAPIService) ApiV2CollectionsGetExecute(r ApiCollectionsAPIApiV2CollectionsGetRequest) (*PaginatedGalaxyCollectionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedGalaxyCollectionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiCollectionsAPIService.ApiV2CollectionsGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_href}api/v2/collections/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_href"+"}", parameterValueToString(r.ansibleCollectionHref, "ansibleCollectionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCollectionsAPIApiV2CollectionsPostRequest struct { + ctx context.Context + ApiService *ApiCollectionsAPIService + ansibleCollectionHref string + galaxyCollection *GalaxyCollection +} + +func (r ApiCollectionsAPIApiV2CollectionsPostRequest) GalaxyCollection(galaxyCollection GalaxyCollection) ApiCollectionsAPIApiV2CollectionsPostRequest { + r.galaxyCollection = &galaxyCollection + return r +} + +func (r ApiCollectionsAPIApiV2CollectionsPostRequest) Execute() (*GalaxyCollectionResponse, *http.Response, error) { + return r.ApiService.ApiV2CollectionsPostExecute(r) +} + +/* +ApiV2CollectionsPost Method for ApiV2CollectionsPost + +Queues a task that creates a new Collection from an uploaded artifact. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionHref + @return ApiCollectionsAPIApiV2CollectionsPostRequest + +Deprecated +*/ +func (a *ApiCollectionsAPIService) ApiV2CollectionsPost(ctx context.Context, ansibleCollectionHref string) ApiCollectionsAPIApiV2CollectionsPostRequest { + return ApiCollectionsAPIApiV2CollectionsPostRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionHref: ansibleCollectionHref, + } +} + +// Execute executes the request +// @return GalaxyCollectionResponse +// Deprecated +func (a *ApiCollectionsAPIService) ApiV2CollectionsPostExecute(r ApiCollectionsAPIApiV2CollectionsPostRequest) (*GalaxyCollectionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GalaxyCollectionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiCollectionsAPIService.ApiV2CollectionsPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_href}api/v2/collections/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_href"+"}", parameterValueToString(r.ansibleCollectionHref, "ansibleCollectionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.galaxyCollection == nil { + return localVarReturnValue, nil, reportError("galaxyCollection is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.galaxyCollection + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_api_roles.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_api_roles.go new file mode 100644 index 0000000000..690b675256 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_api_roles.go @@ -0,0 +1,185 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ApiRolesAPIService ApiRolesAPI service +type ApiRolesAPIService service + +type ApiRolesAPIApiV1RolesGetRequest struct { + ctx context.Context + ApiService *ApiRolesAPIService + ansibleRoleHref string + limit *int32 + offset *int32 + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ApiRolesAPIApiV1RolesGetRequest) Limit(limit int32) ApiRolesAPIApiV1RolesGetRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ApiRolesAPIApiV1RolesGetRequest) Offset(offset int32) ApiRolesAPIApiV1RolesGetRequest { + r.offset = &offset + return r +} + +// A list of fields to include in the response. +func (r ApiRolesAPIApiV1RolesGetRequest) Fields(fields []string) ApiRolesAPIApiV1RolesGetRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ApiRolesAPIApiV1RolesGetRequest) ExcludeFields(excludeFields []string) ApiRolesAPIApiV1RolesGetRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ApiRolesAPIApiV1RolesGetRequest) Execute() (*PaginatedGalaxyRoleResponseList, *http.Response, error) { + return r.ApiService.ApiV1RolesGetExecute(r) +} + +/* +ApiV1RolesGet Method for ApiV1RolesGet + +APIView for Roles. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleRoleHref + @return ApiRolesAPIApiV1RolesGetRequest +*/ +func (a *ApiRolesAPIService) ApiV1RolesGet(ctx context.Context, ansibleRoleHref string) ApiRolesAPIApiV1RolesGetRequest { + return ApiRolesAPIApiV1RolesGetRequest{ + ApiService: a, + ctx: ctx, + ansibleRoleHref: ansibleRoleHref, + } +} + +// Execute executes the request +// @return PaginatedGalaxyRoleResponseList +func (a *ApiRolesAPIService) ApiV1RolesGetExecute(r ApiRolesAPIApiV1RolesGetRequest) (*PaginatedGalaxyRoleResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedGalaxyRoleResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiRolesAPIService.ApiV1RolesGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_role_href}api/v1/roles/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_role_href"+"}", parameterValueToString(r.ansibleRoleHref, "ansibleRoleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_artifacts.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_artifacts.go new file mode 100644 index 0000000000..9445e42943 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_artifacts.go @@ -0,0 +1,760 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "reflect" +) + + +// ArtifactsAPIService ArtifactsAPI service +type ArtifactsAPIService service + +type ArtifactsAPIArtifactsCreateRequest struct { + ctx context.Context + ApiService *ArtifactsAPIService + file *os.File + size *int64 + md5 *string + sha1 *string + sha224 *string + sha256 *string + sha384 *string + sha512 *string +} + +// The stored file. +func (r ArtifactsAPIArtifactsCreateRequest) File(file *os.File) ArtifactsAPIArtifactsCreateRequest { + r.file = file + return r +} + +// The size of the file in bytes. +func (r ArtifactsAPIArtifactsCreateRequest) Size(size int64) ArtifactsAPIArtifactsCreateRequest { + r.size = &size + return r +} + +// The MD5 checksum of the file if available. +func (r ArtifactsAPIArtifactsCreateRequest) Md5(md5 string) ArtifactsAPIArtifactsCreateRequest { + r.md5 = &md5 + return r +} + +// The SHA-1 checksum of the file if available. +func (r ArtifactsAPIArtifactsCreateRequest) Sha1(sha1 string) ArtifactsAPIArtifactsCreateRequest { + r.sha1 = &sha1 + return r +} + +// The SHA-224 checksum of the file if available. +func (r ArtifactsAPIArtifactsCreateRequest) Sha224(sha224 string) ArtifactsAPIArtifactsCreateRequest { + r.sha224 = &sha224 + return r +} + +// The SHA-256 checksum of the file if available. +func (r ArtifactsAPIArtifactsCreateRequest) Sha256(sha256 string) ArtifactsAPIArtifactsCreateRequest { + r.sha256 = &sha256 + return r +} + +// The SHA-384 checksum of the file if available. +func (r ArtifactsAPIArtifactsCreateRequest) Sha384(sha384 string) ArtifactsAPIArtifactsCreateRequest { + r.sha384 = &sha384 + return r +} + +// The SHA-512 checksum of the file if available. +func (r ArtifactsAPIArtifactsCreateRequest) Sha512(sha512 string) ArtifactsAPIArtifactsCreateRequest { + r.sha512 = &sha512 + return r +} + +func (r ArtifactsAPIArtifactsCreateRequest) Execute() (*ArtifactResponse, *http.Response, error) { + return r.ApiService.ArtifactsCreateExecute(r) +} + +/* +ArtifactsCreate Create an artifact + +A customized named ModelViewSet that knows how to register itself with the Pulp API router. + +This viewset is discoverable by its name. +"Normal" Django Models and Master/Detail models are supported by the ``register_with`` method. + +Attributes: + lookup_field (str): The name of the field by which an object should be looked up, in + addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' + endpoint_name (str): The name of the final path segment that should identify the ViewSet's + collection endpoint. + nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must + correspond to the "parent_prefix" of a router with rest_framework_nested.NestedMixin. + None indicates this ViewSet should not be nested. + parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs + to django model filter expressions that can be used with the corresponding value from + self.kwargs, used only by a nested ViewSet to filter based on the parent object's + identity. + schema (DefaultSchema): The schema class to use by default in a viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ArtifactsAPIArtifactsCreateRequest +*/ +func (a *ArtifactsAPIService) ArtifactsCreate(ctx context.Context) ArtifactsAPIArtifactsCreateRequest { + return ArtifactsAPIArtifactsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ArtifactResponse +func (a *ArtifactsAPIService) ArtifactsCreateExecute(r ArtifactsAPIArtifactsCreateRequest) (*ArtifactResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ArtifactResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsAPIService.ArtifactsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/artifacts/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.file == nil { + return localVarReturnValue, nil, reportError("file is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "size", r.size, "") + } + if r.md5 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "md5", r.md5, "") + } + if r.sha1 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha1", r.sha1, "") + } + if r.sha224 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha224", r.sha224, "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha256", r.sha256, "") + } + if r.sha384 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha384", r.sha384, "") + } + if r.sha512 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha512", r.sha512, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ArtifactsAPIArtifactsDeleteRequest struct { + ctx context.Context + ApiService *ArtifactsAPIService + artifactHref string +} + +func (r ArtifactsAPIArtifactsDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ArtifactsDeleteExecute(r) +} + +/* +ArtifactsDelete Delete an artifact + +Remove Artifact only if it is not associated with any Content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param artifactHref + @return ArtifactsAPIArtifactsDeleteRequest +*/ +func (a *ArtifactsAPIService) ArtifactsDelete(ctx context.Context, artifactHref string) ArtifactsAPIArtifactsDeleteRequest { + return ArtifactsAPIArtifactsDeleteRequest{ + ApiService: a, + ctx: ctx, + artifactHref: artifactHref, + } +} + +// Execute executes the request +func (a *ArtifactsAPIService) ArtifactsDeleteExecute(r ArtifactsAPIArtifactsDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsAPIService.ArtifactsDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{artifact_href}" + localVarPath = strings.Replace(localVarPath, "{"+"artifact_href"+"}", parameterValueToString(r.artifactHref, "artifactHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ArtifactsAPIArtifactsListRequest struct { + ctx context.Context + ApiService *ArtifactsAPIService + limit *int32 + md5 *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + sha1 *string + sha224 *string + sha256 *string + sha384 *string + sha512 *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ArtifactsAPIArtifactsListRequest) Limit(limit int32) ArtifactsAPIArtifactsListRequest { + r.limit = &limit + return r +} + +// Filter results where md5 matches value +func (r ArtifactsAPIArtifactsListRequest) Md5(md5 string) ArtifactsAPIArtifactsListRequest { + r.md5 = &md5 + return r +} + +// The initial index from which to return the results. +func (r ArtifactsAPIArtifactsListRequest) Offset(offset int32) ArtifactsAPIArtifactsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `file` - File * `-file` - File (descending) * `size` - Size * `-size` - Size (descending) * `md5` - Md5 * `-md5` - Md5 (descending) * `sha1` - Sha1 * `-sha1` - Sha1 (descending) * `sha224` - Sha224 * `-sha224` - Sha224 (descending) * `sha256` - Sha256 * `-sha256` - Sha256 (descending) * `sha384` - Sha384 * `-sha384` - Sha384 (descending) * `sha512` - Sha512 * `-sha512` - Sha512 (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ArtifactsAPIArtifactsListRequest) Ordering(ordering []string) ArtifactsAPIArtifactsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ArtifactsAPIArtifactsListRequest) PulpHrefIn(pulpHrefIn []string) ArtifactsAPIArtifactsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ArtifactsAPIArtifactsListRequest) PulpIdIn(pulpIdIn []string) ArtifactsAPIArtifactsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ArtifactsAPIArtifactsListRequest) RepositoryVersion(repositoryVersion string) ArtifactsAPIArtifactsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Filter results where sha1 matches value +func (r ArtifactsAPIArtifactsListRequest) Sha1(sha1 string) ArtifactsAPIArtifactsListRequest { + r.sha1 = &sha1 + return r +} + +// Filter results where sha224 matches value +func (r ArtifactsAPIArtifactsListRequest) Sha224(sha224 string) ArtifactsAPIArtifactsListRequest { + r.sha224 = &sha224 + return r +} + +// Filter results where sha256 matches value +func (r ArtifactsAPIArtifactsListRequest) Sha256(sha256 string) ArtifactsAPIArtifactsListRequest { + r.sha256 = &sha256 + return r +} + +// Filter results where sha384 matches value +func (r ArtifactsAPIArtifactsListRequest) Sha384(sha384 string) ArtifactsAPIArtifactsListRequest { + r.sha384 = &sha384 + return r +} + +// Filter results where sha512 matches value +func (r ArtifactsAPIArtifactsListRequest) Sha512(sha512 string) ArtifactsAPIArtifactsListRequest { + r.sha512 = &sha512 + return r +} + +// A list of fields to include in the response. +func (r ArtifactsAPIArtifactsListRequest) Fields(fields []string) ArtifactsAPIArtifactsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ArtifactsAPIArtifactsListRequest) ExcludeFields(excludeFields []string) ArtifactsAPIArtifactsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ArtifactsAPIArtifactsListRequest) Execute() (*PaginatedArtifactResponseList, *http.Response, error) { + return r.ApiService.ArtifactsListExecute(r) +} + +/* +ArtifactsList List artifacts + +A customized named ModelViewSet that knows how to register itself with the Pulp API router. + +This viewset is discoverable by its name. +"Normal" Django Models and Master/Detail models are supported by the ``register_with`` method. + +Attributes: + lookup_field (str): The name of the field by which an object should be looked up, in + addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' + endpoint_name (str): The name of the final path segment that should identify the ViewSet's + collection endpoint. + nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must + correspond to the "parent_prefix" of a router with rest_framework_nested.NestedMixin. + None indicates this ViewSet should not be nested. + parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs + to django model filter expressions that can be used with the corresponding value from + self.kwargs, used only by a nested ViewSet to filter based on the parent object's + identity. + schema (DefaultSchema): The schema class to use by default in a viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ArtifactsAPIArtifactsListRequest +*/ +func (a *ArtifactsAPIService) ArtifactsList(ctx context.Context) ArtifactsAPIArtifactsListRequest { + return ArtifactsAPIArtifactsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedArtifactResponseList +func (a *ArtifactsAPIService) ArtifactsListExecute(r ArtifactsAPIArtifactsListRequest) (*PaginatedArtifactResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedArtifactResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsAPIService.ArtifactsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/artifacts/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.md5 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "md5", r.md5, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.sha1 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha1", r.sha1, "") + } + if r.sha224 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha224", r.sha224, "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256", r.sha256, "") + } + if r.sha384 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha384", r.sha384, "") + } + if r.sha512 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha512", r.sha512, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ArtifactsAPIArtifactsReadRequest struct { + ctx context.Context + ApiService *ArtifactsAPIService + artifactHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ArtifactsAPIArtifactsReadRequest) Fields(fields []string) ArtifactsAPIArtifactsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ArtifactsAPIArtifactsReadRequest) ExcludeFields(excludeFields []string) ArtifactsAPIArtifactsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ArtifactsAPIArtifactsReadRequest) Execute() (*ArtifactResponse, *http.Response, error) { + return r.ApiService.ArtifactsReadExecute(r) +} + +/* +ArtifactsRead Inspect an artifact + +A customized named ModelViewSet that knows how to register itself with the Pulp API router. + +This viewset is discoverable by its name. +"Normal" Django Models and Master/Detail models are supported by the ``register_with`` method. + +Attributes: + lookup_field (str): The name of the field by which an object should be looked up, in + addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' + endpoint_name (str): The name of the final path segment that should identify the ViewSet's + collection endpoint. + nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must + correspond to the "parent_prefix" of a router with rest_framework_nested.NestedMixin. + None indicates this ViewSet should not be nested. + parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs + to django model filter expressions that can be used with the corresponding value from + self.kwargs, used only by a nested ViewSet to filter based on the parent object's + identity. + schema (DefaultSchema): The schema class to use by default in a viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param artifactHref + @return ArtifactsAPIArtifactsReadRequest +*/ +func (a *ArtifactsAPIService) ArtifactsRead(ctx context.Context, artifactHref string) ArtifactsAPIArtifactsReadRequest { + return ArtifactsAPIArtifactsReadRequest{ + ApiService: a, + ctx: ctx, + artifactHref: artifactHref, + } +} + +// Execute executes the request +// @return ArtifactResponse +func (a *ArtifactsAPIService) ArtifactsReadExecute(r ArtifactsAPIArtifactsReadRequest) (*ArtifactResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ArtifactResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsAPIService.ArtifactsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{artifact_href}" + localVarPath = strings.Replace(localVarPath, "{"+"artifact_href"+"}", parameterValueToString(r.artifactHref, "artifactHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_collection_import.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_collection_import.go new file mode 100644 index 0000000000..17101ac854 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_collection_import.go @@ -0,0 +1,175 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// CollectionImportAPIService CollectionImportAPI service +type CollectionImportAPIService service + +type CollectionImportAPICollectionImportReadRequest struct { + ctx context.Context + ApiService *CollectionImportAPIService + ansibleCollectionImportHref string + since *string + fields *[]string + excludeFields *[]string +} + +// Filter messages since a given timestamp +func (r CollectionImportAPICollectionImportReadRequest) Since(since string) CollectionImportAPICollectionImportReadRequest { + r.since = &since + return r +} + +// A list of fields to include in the response. +func (r CollectionImportAPICollectionImportReadRequest) Fields(fields []string) CollectionImportAPICollectionImportReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r CollectionImportAPICollectionImportReadRequest) ExcludeFields(excludeFields []string) CollectionImportAPICollectionImportReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r CollectionImportAPICollectionImportReadRequest) Execute() (*CollectionImportDetailResponse, *http.Response, error) { + return r.ApiService.CollectionImportReadExecute(r) +} + +/* +CollectionImportRead Inspect a collection import + +Returns a CollectionImport object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionImportHref + @return CollectionImportAPICollectionImportReadRequest +*/ +func (a *CollectionImportAPIService) CollectionImportRead(ctx context.Context, ansibleCollectionImportHref string) CollectionImportAPICollectionImportReadRequest { + return CollectionImportAPICollectionImportReadRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionImportHref: ansibleCollectionImportHref, + } +} + +// Execute executes the request +// @return CollectionImportDetailResponse +func (a *CollectionImportAPIService) CollectionImportReadExecute(r CollectionImportAPICollectionImportReadRequest) (*CollectionImportDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionImportDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CollectionImportAPIService.CollectionImportRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_import_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_import_href"+"}", parameterValueToString(r.ansibleCollectionImportHref, "ansibleCollectionImportHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content.go new file mode 100644 index 0000000000..6478a4e561 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content.go @@ -0,0 +1,250 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" +) + + +// ContentAPIService ContentAPI service +type ContentAPIService service + +type ContentAPIContentListRequest struct { + ctx context.Context + ApiService *ContentAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpTypeIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentAPIContentListRequest) Limit(limit int32) ContentAPIContentListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentAPIContentListRequest) Offset(offset int32) ContentAPIContentListRequest { + r.offset = &offset + return r +} + +// Ordering * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentAPIContentListRequest) Ordering(ordering []string) ContentAPIContentListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentAPIContentListRequest) PulpHrefIn(pulpHrefIn []string) ContentAPIContentListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentAPIContentListRequest) PulpIdIn(pulpIdIn []string) ContentAPIContentListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Pulp type is in * `core.publishedmetadata` - core.publishedmetadata * `ansible.role` - ansible.role * `ansible.collection_version` - ansible.collection_version * `ansible.collection_mark` - ansible.collection_mark * `ansible.collection_signature` - ansible.collection_signature * `ansible.namespace` - ansible.namespace * `ansible.collection_deprecation` - ansible.collection_deprecation * `container.blob` - container.blob * `container.manifest` - container.manifest * `container.tag` - container.tag * `container.signature` - container.signature * `deb.package` - deb.package * `deb.installer_package` - deb.installer_package * `deb.generic` - deb.generic * `deb.release` - deb.release * `deb.release_architecture` - deb.release_architecture * `deb.release_component` - deb.release_component * `deb.package_release_component` - deb.package_release_component * `deb.release_file` - deb.release_file * `deb.package_index` - deb.package_index * `deb.installer_file_index` - deb.installer_file_index * `file.file` - file.file * `gem.shallow-gem` - gem.shallow-gem * `gem.gem` - gem.gem * `maven.artifact` - maven.artifact * `maven.metadata` - maven.metadata * `ostree.object` - ostree.object * `ostree.commit` - ostree.commit * `ostree.refs` - ostree.refs * `ostree.content` - ostree.content * `ostree.config` - ostree.config * `ostree.summary` - ostree.summary * `python.python` - python.python * `rpm.advisory` - rpm.advisory * `rpm.packagegroup` - rpm.packagegroup * `rpm.packagecategory` - rpm.packagecategory * `rpm.packageenvironment` - rpm.packageenvironment * `rpm.packagelangpacks` - rpm.packagelangpacks * `rpm.repo_metadata_file` - rpm.repo_metadata_file * `rpm.distribution_tree` - rpm.distribution_tree * `rpm.package` - rpm.package * `rpm.modulemd` - rpm.modulemd * `rpm.modulemd_defaults` - rpm.modulemd_defaults * `rpm.modulemd_obsolete` - rpm.modulemd_obsolete +func (r ContentAPIContentListRequest) PulpTypeIn(pulpTypeIn []string) ContentAPIContentListRequest { + r.pulpTypeIn = &pulpTypeIn + return r +} + +// Repository Version referenced by HREF +func (r ContentAPIContentListRequest) RepositoryVersion(repositoryVersion string) ContentAPIContentListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentAPIContentListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentAPIContentListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentAPIContentListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentAPIContentListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentAPIContentListRequest) Fields(fields []string) ContentAPIContentListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentAPIContentListRequest) ExcludeFields(excludeFields []string) ContentAPIContentListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentAPIContentListRequest) Execute() (*PaginatedMultipleArtifactContentResponseList, *http.Response, error) { + return r.ApiService.ContentListExecute(r) +} + +/* +ContentList List content + +Endpoint to list all content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentAPIContentListRequest +*/ +func (a *ContentAPIService) ContentList(ctx context.Context) ContentAPIContentListRequest { + return ContentAPIContentListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedMultipleArtifactContentResponseList +func (a *ContentAPIService) ContentListExecute(r ContentAPIContentListRequest) (*PaginatedMultipleArtifactContentResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedMultipleArtifactContentResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentAPIService.ContentList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpTypeIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_type__in", r.pulpTypeIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_advisories.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_advisories.go new file mode 100644 index 0000000000..9dd9a83804 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_advisories.go @@ -0,0 +1,636 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "reflect" +) + + +// ContentAdvisoriesAPIService ContentAdvisoriesAPI service +type ContentAdvisoriesAPIService service + +type ContentAdvisoriesAPIContentRpmAdvisoriesCreateRequest struct { + ctx context.Context + ApiService *ContentAdvisoriesAPIService + repository *string + file *os.File +} + +// A URI of a repository the new content unit should be associated with. +func (r ContentAdvisoriesAPIContentRpmAdvisoriesCreateRequest) Repository(repository string) ContentAdvisoriesAPIContentRpmAdvisoriesCreateRequest { + r.repository = &repository + return r +} + +// An uploaded file that may be turned into the artifact of the content unit. +func (r ContentAdvisoriesAPIContentRpmAdvisoriesCreateRequest) File(file *os.File) ContentAdvisoriesAPIContentRpmAdvisoriesCreateRequest { + r.file = file + return r +} + +func (r ContentAdvisoriesAPIContentRpmAdvisoriesCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ContentRpmAdvisoriesCreateExecute(r) +} + +/* +ContentRpmAdvisoriesCreate Create an update record + +Trigger an asynchronous task to create content,optionally create new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentAdvisoriesAPIContentRpmAdvisoriesCreateRequest +*/ +func (a *ContentAdvisoriesAPIService) ContentRpmAdvisoriesCreate(ctx context.Context) ContentAdvisoriesAPIContentRpmAdvisoriesCreateRequest { + return ContentAdvisoriesAPIContentRpmAdvisoriesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ContentAdvisoriesAPIService) ContentRpmAdvisoriesCreateExecute(r ContentAdvisoriesAPIContentRpmAdvisoriesCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentAdvisoriesAPIService.ContentRpmAdvisoriesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/advisories/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "repository", r.repository, "") + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentAdvisoriesAPIContentRpmAdvisoriesListRequest struct { + ctx context.Context + ApiService *ContentAdvisoriesAPIService + id *string + idIn *[]string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + severity *string + severityIn *[]string + severityNe *string + status *string + statusIn *[]string + statusNe *string + type_ *string + typeIn *[]string + typeNe *string + fields *[]string + excludeFields *[]string +} + +// Filter results where id matches value +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) Id(id string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.id = &id + return r +} + +// Filter results where id is in a comma-separated list of values +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) IdIn(idIn []string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.idIn = &idIn + return r +} + +// Number of results to return per page. +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) Limit(limit int32) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) Offset(offset int32) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `id` - Id * `-id` - Id (descending) * `updated_date` - Updated date * `-updated_date` - Updated date (descending) * `description` - Description * `-description` - Description (descending) * `issued_date` - Issued date * `-issued_date` - Issued date (descending) * `fromstr` - Fromstr * `-fromstr` - Fromstr (descending) * `status` - Status * `-status` - Status (descending) * `title` - Title * `-title` - Title (descending) * `summary` - Summary * `-summary` - Summary (descending) * `version` - Version * `-version` - Version (descending) * `type` - Type * `-type` - Type (descending) * `severity` - Severity * `-severity` - Severity (descending) * `solution` - Solution * `-solution` - Solution (descending) * `release` - Release * `-release` - Release (descending) * `rights` - Rights * `-rights` - Rights (descending) * `reboot_suggested` - Reboot suggested * `-reboot_suggested` - Reboot suggested (descending) * `pushcount` - Pushcount * `-pushcount` - Pushcount (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) Ordering(ordering []string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) PulpHrefIn(pulpHrefIn []string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) PulpIdIn(pulpIdIn []string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) RepositoryVersion(repositoryVersion string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where severity matches value +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) Severity(severity string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.severity = &severity + return r +} + +// Filter results where severity is in a comma-separated list of values +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) SeverityIn(severityIn []string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.severityIn = &severityIn + return r +} + +// Filter results where severity not equal to value +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) SeverityNe(severityNe string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.severityNe = &severityNe + return r +} + +// Filter results where status matches value +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) Status(status string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.status = &status + return r +} + +// Filter results where status is in a comma-separated list of values +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) StatusIn(statusIn []string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.statusIn = &statusIn + return r +} + +// Filter results where status not equal to value +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) StatusNe(statusNe string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.statusNe = &statusNe + return r +} + +// Filter results where type matches value +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) Type_(type_ string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.type_ = &type_ + return r +} + +// Filter results where type is in a comma-separated list of values +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) TypeIn(typeIn []string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.typeIn = &typeIn + return r +} + +// Filter results where type not equal to value +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) TypeNe(typeNe string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.typeNe = &typeNe + return r +} + +// A list of fields to include in the response. +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) Fields(fields []string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) ExcludeFields(excludeFields []string) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) Execute() (*PaginatedrpmUpdateRecordResponseList, *http.Response, error) { + return r.ApiService.ContentRpmAdvisoriesListExecute(r) +} + +/* +ContentRpmAdvisoriesList List update records + +A ViewSet for UpdateRecord. + +Define endpoint name which will appear in the API endpoint for this content type. +For example:: + http://pulp.example.com/pulp/api/v3/content/rpm/advisories/ + +Also specify queryset and serializer for UpdateRecord. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentAdvisoriesAPIContentRpmAdvisoriesListRequest +*/ +func (a *ContentAdvisoriesAPIService) ContentRpmAdvisoriesList(ctx context.Context) ContentAdvisoriesAPIContentRpmAdvisoriesListRequest { + return ContentAdvisoriesAPIContentRpmAdvisoriesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmUpdateRecordResponseList +func (a *ContentAdvisoriesAPIService) ContentRpmAdvisoriesListExecute(r ContentAdvisoriesAPIContentRpmAdvisoriesListRequest) (*PaginatedrpmUpdateRecordResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmUpdateRecordResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentAdvisoriesAPIService.ContentRpmAdvisoriesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/advisories/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "") + } + if r.idIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id__in", r.idIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.severity != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "severity", r.severity, "") + } + if r.severityIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "severity__in", r.severityIn, "csv") + } + if r.severityNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "severity__ne", r.severityNe, "") + } + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "") + } + if r.statusIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status__in", r.statusIn, "csv") + } + if r.statusNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status__ne", r.statusNe, "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "") + } + if r.typeIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type__in", r.typeIn, "csv") + } + if r.typeNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type__ne", r.typeNe, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentAdvisoriesAPIContentRpmAdvisoriesReadRequest struct { + ctx context.Context + ApiService *ContentAdvisoriesAPIService + rpmUpdateRecordHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentAdvisoriesAPIContentRpmAdvisoriesReadRequest) Fields(fields []string) ContentAdvisoriesAPIContentRpmAdvisoriesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentAdvisoriesAPIContentRpmAdvisoriesReadRequest) ExcludeFields(excludeFields []string) ContentAdvisoriesAPIContentRpmAdvisoriesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentAdvisoriesAPIContentRpmAdvisoriesReadRequest) Execute() (*RpmUpdateRecordResponse, *http.Response, error) { + return r.ApiService.ContentRpmAdvisoriesReadExecute(r) +} + +/* +ContentRpmAdvisoriesRead Inspect an update record + +A ViewSet for UpdateRecord. + +Define endpoint name which will appear in the API endpoint for this content type. +For example:: + http://pulp.example.com/pulp/api/v3/content/rpm/advisories/ + +Also specify queryset and serializer for UpdateRecord. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmUpdateRecordHref + @return ContentAdvisoriesAPIContentRpmAdvisoriesReadRequest +*/ +func (a *ContentAdvisoriesAPIService) ContentRpmAdvisoriesRead(ctx context.Context, rpmUpdateRecordHref string) ContentAdvisoriesAPIContentRpmAdvisoriesReadRequest { + return ContentAdvisoriesAPIContentRpmAdvisoriesReadRequest{ + ApiService: a, + ctx: ctx, + rpmUpdateRecordHref: rpmUpdateRecordHref, + } +} + +// Execute executes the request +// @return RpmUpdateRecordResponse +func (a *ContentAdvisoriesAPIService) ContentRpmAdvisoriesReadExecute(r ContentAdvisoriesAPIContentRpmAdvisoriesReadRequest) (*RpmUpdateRecordResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmUpdateRecordResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentAdvisoriesAPIService.ContentRpmAdvisoriesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_update_record_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_update_record_href"+"}", parameterValueToString(r.rpmUpdateRecordHref, "rpmUpdateRecordHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_artifact.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_artifact.go new file mode 100644 index 0000000000..3d25bb7e67 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_artifact.go @@ -0,0 +1,530 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentArtifactAPIService ContentArtifactAPI service +type ContentArtifactAPIService service + +type ContentArtifactAPIContentMavenArtifactCreateRequest struct { + ctx context.Context + ApiService *ContentArtifactAPIService + mavenMavenArtifact *MavenMavenArtifact +} + +func (r ContentArtifactAPIContentMavenArtifactCreateRequest) MavenMavenArtifact(mavenMavenArtifact MavenMavenArtifact) ContentArtifactAPIContentMavenArtifactCreateRequest { + r.mavenMavenArtifact = &mavenMavenArtifact + return r +} + +func (r ContentArtifactAPIContentMavenArtifactCreateRequest) Execute() (*MavenMavenArtifactResponse, *http.Response, error) { + return r.ApiService.ContentMavenArtifactCreateExecute(r) +} + +/* +ContentMavenArtifactCreate Create a maven artifact + +A ViewSet for MavenArtifact. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentArtifactAPIContentMavenArtifactCreateRequest +*/ +func (a *ContentArtifactAPIService) ContentMavenArtifactCreate(ctx context.Context) ContentArtifactAPIContentMavenArtifactCreateRequest { + return ContentArtifactAPIContentMavenArtifactCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return MavenMavenArtifactResponse +func (a *ContentArtifactAPIService) ContentMavenArtifactCreateExecute(r ContentArtifactAPIContentMavenArtifactCreateRequest) (*MavenMavenArtifactResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MavenMavenArtifactResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentArtifactAPIService.ContentMavenArtifactCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/maven/artifact/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.mavenMavenArtifact == nil { + return localVarReturnValue, nil, reportError("mavenMavenArtifact is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.mavenMavenArtifact + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentArtifactAPIContentMavenArtifactListRequest struct { + ctx context.Context + ApiService *ContentArtifactAPIService + artifactId *string + filename *string + groupId *string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + version *string + fields *[]string + excludeFields *[]string +} + +// Filter results where artifact_id matches value +func (r ContentArtifactAPIContentMavenArtifactListRequest) ArtifactId(artifactId string) ContentArtifactAPIContentMavenArtifactListRequest { + r.artifactId = &artifactId + return r +} + +// Filter results where filename matches value +func (r ContentArtifactAPIContentMavenArtifactListRequest) Filename(filename string) ContentArtifactAPIContentMavenArtifactListRequest { + r.filename = &filename + return r +} + +// Filter results where group_id matches value +func (r ContentArtifactAPIContentMavenArtifactListRequest) GroupId(groupId string) ContentArtifactAPIContentMavenArtifactListRequest { + r.groupId = &groupId + return r +} + +// Number of results to return per page. +func (r ContentArtifactAPIContentMavenArtifactListRequest) Limit(limit int32) ContentArtifactAPIContentMavenArtifactListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentArtifactAPIContentMavenArtifactListRequest) Offset(offset int32) ContentArtifactAPIContentMavenArtifactListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `group_id` - Group id * `-group_id` - Group id (descending) * `artifact_id` - Artifact id * `-artifact_id` - Artifact id (descending) * `version` - Version * `-version` - Version (descending) * `filename` - Filename * `-filename` - Filename (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentArtifactAPIContentMavenArtifactListRequest) Ordering(ordering []string) ContentArtifactAPIContentMavenArtifactListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentArtifactAPIContentMavenArtifactListRequest) PulpHrefIn(pulpHrefIn []string) ContentArtifactAPIContentMavenArtifactListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentArtifactAPIContentMavenArtifactListRequest) PulpIdIn(pulpIdIn []string) ContentArtifactAPIContentMavenArtifactListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentArtifactAPIContentMavenArtifactListRequest) RepositoryVersion(repositoryVersion string) ContentArtifactAPIContentMavenArtifactListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentArtifactAPIContentMavenArtifactListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentArtifactAPIContentMavenArtifactListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentArtifactAPIContentMavenArtifactListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentArtifactAPIContentMavenArtifactListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where version matches value +func (r ContentArtifactAPIContentMavenArtifactListRequest) Version(version string) ContentArtifactAPIContentMavenArtifactListRequest { + r.version = &version + return r +} + +// A list of fields to include in the response. +func (r ContentArtifactAPIContentMavenArtifactListRequest) Fields(fields []string) ContentArtifactAPIContentMavenArtifactListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentArtifactAPIContentMavenArtifactListRequest) ExcludeFields(excludeFields []string) ContentArtifactAPIContentMavenArtifactListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentArtifactAPIContentMavenArtifactListRequest) Execute() (*PaginatedmavenMavenArtifactResponseList, *http.Response, error) { + return r.ApiService.ContentMavenArtifactListExecute(r) +} + +/* +ContentMavenArtifactList List maven artifacts + +A ViewSet for MavenArtifact. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentArtifactAPIContentMavenArtifactListRequest +*/ +func (a *ContentArtifactAPIService) ContentMavenArtifactList(ctx context.Context) ContentArtifactAPIContentMavenArtifactListRequest { + return ContentArtifactAPIContentMavenArtifactListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedmavenMavenArtifactResponseList +func (a *ContentArtifactAPIService) ContentMavenArtifactListExecute(r ContentArtifactAPIContentMavenArtifactListRequest) (*PaginatedmavenMavenArtifactResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedmavenMavenArtifactResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentArtifactAPIService.ContentMavenArtifactList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/maven/artifact/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.artifactId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "artifact_id", r.artifactId, "") + } + if r.filename != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filename", r.filename, "") + } + if r.groupId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "group_id", r.groupId, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentArtifactAPIContentMavenArtifactReadRequest struct { + ctx context.Context + ApiService *ContentArtifactAPIService + mavenMavenArtifactHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentArtifactAPIContentMavenArtifactReadRequest) Fields(fields []string) ContentArtifactAPIContentMavenArtifactReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentArtifactAPIContentMavenArtifactReadRequest) ExcludeFields(excludeFields []string) ContentArtifactAPIContentMavenArtifactReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentArtifactAPIContentMavenArtifactReadRequest) Execute() (*MavenMavenArtifactResponse, *http.Response, error) { + return r.ApiService.ContentMavenArtifactReadExecute(r) +} + +/* +ContentMavenArtifactRead Inspect a maven artifact + +A ViewSet for MavenArtifact. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenArtifactHref + @return ContentArtifactAPIContentMavenArtifactReadRequest +*/ +func (a *ContentArtifactAPIService) ContentMavenArtifactRead(ctx context.Context, mavenMavenArtifactHref string) ContentArtifactAPIContentMavenArtifactReadRequest { + return ContentArtifactAPIContentMavenArtifactReadRequest{ + ApiService: a, + ctx: ctx, + mavenMavenArtifactHref: mavenMavenArtifactHref, + } +} + +// Execute executes the request +// @return MavenMavenArtifactResponse +func (a *ContentArtifactAPIService) ContentMavenArtifactReadExecute(r ContentArtifactAPIContentMavenArtifactReadRequest) (*MavenMavenArtifactResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MavenMavenArtifactResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentArtifactAPIService.ContentMavenArtifactRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_artifact_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_artifact_href"+"}", parameterValueToString(r.mavenMavenArtifactHref, "mavenMavenArtifactHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_blobs.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_blobs.go new file mode 100644 index 0000000000..1f15465c77 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_blobs.go @@ -0,0 +1,400 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentBlobsAPIService ContentBlobsAPI service +type ContentBlobsAPIService service + +type ContentBlobsAPIContentContainerBlobsListRequest struct { + ctx context.Context + ApiService *ContentBlobsAPIService + digest *string + digestIn *[]string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Filter results where digest matches value +func (r ContentBlobsAPIContentContainerBlobsListRequest) Digest(digest string) ContentBlobsAPIContentContainerBlobsListRequest { + r.digest = &digest + return r +} + +// Filter results where digest is in a comma-separated list of values +func (r ContentBlobsAPIContentContainerBlobsListRequest) DigestIn(digestIn []string) ContentBlobsAPIContentContainerBlobsListRequest { + r.digestIn = &digestIn + return r +} + +// Number of results to return per page. +func (r ContentBlobsAPIContentContainerBlobsListRequest) Limit(limit int32) ContentBlobsAPIContentContainerBlobsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentBlobsAPIContentContainerBlobsListRequest) Offset(offset int32) ContentBlobsAPIContentContainerBlobsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentBlobsAPIContentContainerBlobsListRequest) Ordering(ordering []string) ContentBlobsAPIContentContainerBlobsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentBlobsAPIContentContainerBlobsListRequest) PulpHrefIn(pulpHrefIn []string) ContentBlobsAPIContentContainerBlobsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentBlobsAPIContentContainerBlobsListRequest) PulpIdIn(pulpIdIn []string) ContentBlobsAPIContentContainerBlobsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentBlobsAPIContentContainerBlobsListRequest) RepositoryVersion(repositoryVersion string) ContentBlobsAPIContentContainerBlobsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentBlobsAPIContentContainerBlobsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentBlobsAPIContentContainerBlobsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentBlobsAPIContentContainerBlobsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentBlobsAPIContentContainerBlobsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentBlobsAPIContentContainerBlobsListRequest) Fields(fields []string) ContentBlobsAPIContentContainerBlobsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentBlobsAPIContentContainerBlobsListRequest) ExcludeFields(excludeFields []string) ContentBlobsAPIContentContainerBlobsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentBlobsAPIContentContainerBlobsListRequest) Execute() (*PaginatedcontainerBlobResponseList, *http.Response, error) { + return r.ApiService.ContentContainerBlobsListExecute(r) +} + +/* +ContentContainerBlobsList List blobs + +ViewSet for Blobs. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentBlobsAPIContentContainerBlobsListRequest +*/ +func (a *ContentBlobsAPIService) ContentContainerBlobsList(ctx context.Context) ContentBlobsAPIContentContainerBlobsListRequest { + return ContentBlobsAPIContentContainerBlobsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedcontainerBlobResponseList +func (a *ContentBlobsAPIService) ContentContainerBlobsListExecute(r ContentBlobsAPIContentContainerBlobsListRequest) (*PaginatedcontainerBlobResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedcontainerBlobResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentBlobsAPIService.ContentContainerBlobsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/container/blobs/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.digest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "digest", r.digest, "") + } + if r.digestIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "digest__in", r.digestIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentBlobsAPIContentContainerBlobsReadRequest struct { + ctx context.Context + ApiService *ContentBlobsAPIService + containerBlobHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentBlobsAPIContentContainerBlobsReadRequest) Fields(fields []string) ContentBlobsAPIContentContainerBlobsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentBlobsAPIContentContainerBlobsReadRequest) ExcludeFields(excludeFields []string) ContentBlobsAPIContentContainerBlobsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentBlobsAPIContentContainerBlobsReadRequest) Execute() (*ContainerBlobResponse, *http.Response, error) { + return r.ApiService.ContentContainerBlobsReadExecute(r) +} + +/* +ContentContainerBlobsRead Inspect a blob + +ViewSet for Blobs. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerBlobHref + @return ContentBlobsAPIContentContainerBlobsReadRequest +*/ +func (a *ContentBlobsAPIService) ContentContainerBlobsRead(ctx context.Context, containerBlobHref string) ContentBlobsAPIContentContainerBlobsReadRequest { + return ContentBlobsAPIContentContainerBlobsReadRequest{ + ApiService: a, + ctx: ctx, + containerBlobHref: containerBlobHref, + } +} + +// Execute executes the request +// @return ContainerBlobResponse +func (a *ContentBlobsAPIService) ContentContainerBlobsReadExecute(r ContentBlobsAPIContentContainerBlobsReadRequest) (*ContainerBlobResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContainerBlobResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentBlobsAPIService.ContentContainerBlobsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_blob_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_blob_href"+"}", parameterValueToString(r.containerBlobHref, "containerBlobHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_deprecations.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_deprecations.go new file mode 100644 index 0000000000..1a783de49f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_deprecations.go @@ -0,0 +1,490 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentCollectionDeprecationsAPIService ContentCollectionDeprecationsAPI service +type ContentCollectionDeprecationsAPIService service + +type ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsCreateRequest struct { + ctx context.Context + ApiService *ContentCollectionDeprecationsAPIService + ansibleCollection *AnsibleCollection +} + +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsCreateRequest) AnsibleCollection(ansibleCollection AnsibleCollection) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsCreateRequest { + r.ansibleCollection = &ansibleCollection + return r +} + +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsCreateRequest) Execute() (*AnsibleCollectionResponse, *http.Response, error) { + return r.ApiService.ContentAnsibleCollectionDeprecationsCreateExecute(r) +} + +/* +ContentAnsibleCollectionDeprecationsCreate Create an ansible collection deprecated + +ViewSet for AnsibleCollectionDeprecated. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsCreateRequest +*/ +func (a *ContentCollectionDeprecationsAPIService) ContentAnsibleCollectionDeprecationsCreate(ctx context.Context) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsCreateRequest { + return ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AnsibleCollectionResponse +func (a *ContentCollectionDeprecationsAPIService) ContentAnsibleCollectionDeprecationsCreateExecute(r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsCreateRequest) (*AnsibleCollectionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleCollectionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCollectionDeprecationsAPIService.ContentAnsibleCollectionDeprecationsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ansible/collection_deprecations/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleCollection == nil { + return localVarReturnValue, nil, reportError("ansibleCollection is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleCollection + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest struct { + ctx context.Context + ApiService *ContentCollectionDeprecationsAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest) Limit(limit int32) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest) Offset(offset int32) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest) Ordering(ordering []string) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest) PulpHrefIn(pulpHrefIn []string) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest) PulpIdIn(pulpIdIn []string) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest) RepositoryVersion(repositoryVersion string) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest) Fields(fields []string) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest) ExcludeFields(excludeFields []string) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest) Execute() (*PaginatedansibleCollectionResponseList, *http.Response, error) { + return r.ApiService.ContentAnsibleCollectionDeprecationsListExecute(r) +} + +/* +ContentAnsibleCollectionDeprecationsList List ansible collection deprecateds + +ViewSet for AnsibleCollectionDeprecated. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest +*/ +func (a *ContentCollectionDeprecationsAPIService) ContentAnsibleCollectionDeprecationsList(ctx context.Context) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest { + return ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedansibleCollectionResponseList +func (a *ContentCollectionDeprecationsAPIService) ContentAnsibleCollectionDeprecationsListExecute(r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsListRequest) (*PaginatedansibleCollectionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleCollectionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCollectionDeprecationsAPIService.ContentAnsibleCollectionDeprecationsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ansible/collection_deprecations/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsReadRequest struct { + ctx context.Context + ApiService *ContentCollectionDeprecationsAPIService + ansibleAnsibleCollectionDeprecatedHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsReadRequest) Fields(fields []string) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsReadRequest) ExcludeFields(excludeFields []string) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsReadRequest) Execute() (*AnsibleCollectionResponse, *http.Response, error) { + return r.ApiService.ContentAnsibleCollectionDeprecationsReadExecute(r) +} + +/* +ContentAnsibleCollectionDeprecationsRead Inspect an ansible collection deprecated + +ViewSet for AnsibleCollectionDeprecated. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleCollectionDeprecatedHref + @return ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsReadRequest +*/ +func (a *ContentCollectionDeprecationsAPIService) ContentAnsibleCollectionDeprecationsRead(ctx context.Context, ansibleAnsibleCollectionDeprecatedHref string) ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsReadRequest { + return ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsReadRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleCollectionDeprecatedHref: ansibleAnsibleCollectionDeprecatedHref, + } +} + +// Execute executes the request +// @return AnsibleCollectionResponse +func (a *ContentCollectionDeprecationsAPIService) ContentAnsibleCollectionDeprecationsReadExecute(r ContentCollectionDeprecationsAPIContentAnsibleCollectionDeprecationsReadRequest) (*AnsibleCollectionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleCollectionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCollectionDeprecationsAPIService.ContentAnsibleCollectionDeprecationsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_collection_deprecated_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_collection_deprecated_href"+"}", parameterValueToString(r.ansibleAnsibleCollectionDeprecatedHref, "ansibleAnsibleCollectionDeprecatedHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_marks.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_marks.go new file mode 100644 index 0000000000..5a248c051e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_marks.go @@ -0,0 +1,520 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentCollectionMarksAPIService ContentCollectionMarksAPI service +type ContentCollectionMarksAPIService service + +type ContentCollectionMarksAPIContentAnsibleCollectionMarksCreateRequest struct { + ctx context.Context + ApiService *ContentCollectionMarksAPIService + ansibleCollectionVersionMark *AnsibleCollectionVersionMark +} + +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksCreateRequest) AnsibleCollectionVersionMark(ansibleCollectionVersionMark AnsibleCollectionVersionMark) ContentCollectionMarksAPIContentAnsibleCollectionMarksCreateRequest { + r.ansibleCollectionVersionMark = &ansibleCollectionVersionMark + return r +} + +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksCreateRequest) Execute() (*AnsibleCollectionVersionMarkResponse, *http.Response, error) { + return r.ApiService.ContentAnsibleCollectionMarksCreateExecute(r) +} + +/* +ContentAnsibleCollectionMarksCreate Create a collection version mark + +ViewSet for looking at mark objects for CollectionVersion content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentCollectionMarksAPIContentAnsibleCollectionMarksCreateRequest +*/ +func (a *ContentCollectionMarksAPIService) ContentAnsibleCollectionMarksCreate(ctx context.Context) ContentCollectionMarksAPIContentAnsibleCollectionMarksCreateRequest { + return ContentCollectionMarksAPIContentAnsibleCollectionMarksCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AnsibleCollectionVersionMarkResponse +func (a *ContentCollectionMarksAPIService) ContentAnsibleCollectionMarksCreateExecute(r ContentCollectionMarksAPIContentAnsibleCollectionMarksCreateRequest) (*AnsibleCollectionVersionMarkResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleCollectionVersionMarkResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCollectionMarksAPIService.ContentAnsibleCollectionMarksCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ansible/collection_marks/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleCollectionVersionMark == nil { + return localVarReturnValue, nil, reportError("ansibleCollectionVersionMark is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleCollectionVersionMark + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest struct { + ctx context.Context + ApiService *ContentCollectionMarksAPIService + limit *int32 + markedCollection *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + value *string + valueIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) Limit(limit int32) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + r.limit = &limit + return r +} + +// Filter marks for collection version +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) MarkedCollection(markedCollection string) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + r.markedCollection = &markedCollection + return r +} + +// The initial index from which to return the results. +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) Offset(offset int32) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `value` - Value * `-value` - Value (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) Ordering(ordering []string) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) PulpHrefIn(pulpHrefIn []string) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) PulpIdIn(pulpIdIn []string) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) RepositoryVersion(repositoryVersion string) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter marks by value +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) Value(value string) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + r.value = &value + return r +} + +// Filter results where value is in a comma-separated list of values +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) ValueIn(valueIn []string) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + r.valueIn = &valueIn + return r +} + +// A list of fields to include in the response. +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) Fields(fields []string) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) ExcludeFields(excludeFields []string) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) Execute() (*PaginatedansibleCollectionVersionMarkResponseList, *http.Response, error) { + return r.ApiService.ContentAnsibleCollectionMarksListExecute(r) +} + +/* +ContentAnsibleCollectionMarksList List collection version marks + +ViewSet for looking at mark objects for CollectionVersion content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest +*/ +func (a *ContentCollectionMarksAPIService) ContentAnsibleCollectionMarksList(ctx context.Context) ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest { + return ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedansibleCollectionVersionMarkResponseList +func (a *ContentCollectionMarksAPIService) ContentAnsibleCollectionMarksListExecute(r ContentCollectionMarksAPIContentAnsibleCollectionMarksListRequest) (*PaginatedansibleCollectionVersionMarkResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleCollectionVersionMarkResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCollectionMarksAPIService.ContentAnsibleCollectionMarksList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ansible/collection_marks/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.markedCollection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "marked_collection", r.markedCollection, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.value != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "value", r.value, "") + } + if r.valueIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "value__in", r.valueIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentCollectionMarksAPIContentAnsibleCollectionMarksReadRequest struct { + ctx context.Context + ApiService *ContentCollectionMarksAPIService + ansibleCollectionVersionMarkHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksReadRequest) Fields(fields []string) ContentCollectionMarksAPIContentAnsibleCollectionMarksReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksReadRequest) ExcludeFields(excludeFields []string) ContentCollectionMarksAPIContentAnsibleCollectionMarksReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentCollectionMarksAPIContentAnsibleCollectionMarksReadRequest) Execute() (*AnsibleCollectionVersionMarkResponse, *http.Response, error) { + return r.ApiService.ContentAnsibleCollectionMarksReadExecute(r) +} + +/* +ContentAnsibleCollectionMarksRead Inspect a collection version mark + +ViewSet for looking at mark objects for CollectionVersion content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionVersionMarkHref + @return ContentCollectionMarksAPIContentAnsibleCollectionMarksReadRequest +*/ +func (a *ContentCollectionMarksAPIService) ContentAnsibleCollectionMarksRead(ctx context.Context, ansibleCollectionVersionMarkHref string) ContentCollectionMarksAPIContentAnsibleCollectionMarksReadRequest { + return ContentCollectionMarksAPIContentAnsibleCollectionMarksReadRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionVersionMarkHref: ansibleCollectionVersionMarkHref, + } +} + +// Execute executes the request +// @return AnsibleCollectionVersionMarkResponse +func (a *ContentCollectionMarksAPIService) ContentAnsibleCollectionMarksReadExecute(r ContentCollectionMarksAPIContentAnsibleCollectionMarksReadRequest) (*AnsibleCollectionVersionMarkResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleCollectionVersionMarkResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCollectionMarksAPIService.ContentAnsibleCollectionMarksRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_version_mark_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_version_mark_href"+"}", parameterValueToString(r.ansibleCollectionVersionMarkHref, "ansibleCollectionVersionMarkHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_signatures.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_signatures.go new file mode 100644 index 0000000000..1c21464307 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_signatures.go @@ -0,0 +1,568 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "reflect" +) + + +// ContentCollectionSignaturesAPIService ContentCollectionSignaturesAPI service +type ContentCollectionSignaturesAPIService service + +type ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesCreateRequest struct { + ctx context.Context + ApiService *ContentCollectionSignaturesAPIService + file *os.File + signedCollection *string + repository *string +} + +// An uploaded file that may be turned into the artifact of the content unit. +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesCreateRequest) File(file *os.File) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesCreateRequest { + r.file = file + return r +} + +// The content this signature is pointing to. +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesCreateRequest) SignedCollection(signedCollection string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesCreateRequest { + r.signedCollection = &signedCollection + return r +} + +// A URI of a repository the new content unit should be associated with. +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesCreateRequest) Repository(repository string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesCreateRequest { + r.repository = &repository + return r +} + +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ContentAnsibleCollectionSignaturesCreateExecute(r) +} + +/* +ContentAnsibleCollectionSignaturesCreate Create a collection version signature + +Trigger an asynchronous task to create content,optionally create new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesCreateRequest +*/ +func (a *ContentCollectionSignaturesAPIService) ContentAnsibleCollectionSignaturesCreate(ctx context.Context) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesCreateRequest { + return ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ContentCollectionSignaturesAPIService) ContentAnsibleCollectionSignaturesCreateExecute(r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCollectionSignaturesAPIService.ContentAnsibleCollectionSignaturesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ansible/collection_signatures/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.file == nil { + return localVarReturnValue, nil, reportError("file is required and must be specified") + } + if r.signedCollection == nil { + return localVarReturnValue, nil, reportError("signedCollection is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "repository", r.repository, "") + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + parameterAddToHeaderOrQuery(localVarFormParams, "signed_collection", r.signedCollection, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest struct { + ctx context.Context + ApiService *ContentCollectionSignaturesAPIService + limit *int32 + offset *int32 + ordering *[]string + pubkeyFingerprint *string + pubkeyFingerprintIn *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + signedCollection *string + signingService *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) Limit(limit int32) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) Offset(offset int32) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `data` - Data * `-data` - Data (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pubkey_fingerprint` - Pubkey fingerprint * `-pubkey_fingerprint` - Pubkey fingerprint (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) Ordering(ordering []string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pubkey_fingerprint matches value +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) PubkeyFingerprint(pubkeyFingerprint string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.pubkeyFingerprint = &pubkeyFingerprint + return r +} + +// Filter results where pubkey_fingerprint is in a comma-separated list of values +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) PubkeyFingerprintIn(pubkeyFingerprintIn []string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.pubkeyFingerprintIn = &pubkeyFingerprintIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) PulpHrefIn(pulpHrefIn []string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) PulpIdIn(pulpIdIn []string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) RepositoryVersion(repositoryVersion string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter signatures for collection version +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) SignedCollection(signedCollection string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.signedCollection = &signedCollection + return r +} + +// Filter signatures produced by signature service +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) SigningService(signingService string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.signingService = &signingService + return r +} + +// A list of fields to include in the response. +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) Fields(fields []string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) ExcludeFields(excludeFields []string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) Execute() (*PaginatedansibleCollectionVersionSignatureResponseList, *http.Response, error) { + return r.ApiService.ContentAnsibleCollectionSignaturesListExecute(r) +} + +/* +ContentAnsibleCollectionSignaturesList List collection version signatures + +ViewSet for looking at signature objects for CollectionVersion content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest +*/ +func (a *ContentCollectionSignaturesAPIService) ContentAnsibleCollectionSignaturesList(ctx context.Context) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest { + return ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedansibleCollectionVersionSignatureResponseList +func (a *ContentCollectionSignaturesAPIService) ContentAnsibleCollectionSignaturesListExecute(r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesListRequest) (*PaginatedansibleCollectionVersionSignatureResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleCollectionVersionSignatureResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCollectionSignaturesAPIService.ContentAnsibleCollectionSignaturesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ansible/collection_signatures/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pubkeyFingerprint != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pubkey_fingerprint", r.pubkeyFingerprint, "") + } + if r.pubkeyFingerprintIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pubkey_fingerprint__in", r.pubkeyFingerprintIn, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.signedCollection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "signed_collection", r.signedCollection, "") + } + if r.signingService != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "signing_service", r.signingService, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesReadRequest struct { + ctx context.Context + ApiService *ContentCollectionSignaturesAPIService + ansibleCollectionVersionSignatureHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesReadRequest) Fields(fields []string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesReadRequest) ExcludeFields(excludeFields []string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesReadRequest) Execute() (*AnsibleCollectionVersionSignatureResponse, *http.Response, error) { + return r.ApiService.ContentAnsibleCollectionSignaturesReadExecute(r) +} + +/* +ContentAnsibleCollectionSignaturesRead Inspect a collection version signature + +ViewSet for looking at signature objects for CollectionVersion content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionVersionSignatureHref + @return ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesReadRequest +*/ +func (a *ContentCollectionSignaturesAPIService) ContentAnsibleCollectionSignaturesRead(ctx context.Context, ansibleCollectionVersionSignatureHref string) ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesReadRequest { + return ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesReadRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionVersionSignatureHref: ansibleCollectionVersionSignatureHref, + } +} + +// Execute executes the request +// @return AnsibleCollectionVersionSignatureResponse +func (a *ContentCollectionSignaturesAPIService) ContentAnsibleCollectionSignaturesReadExecute(r ContentCollectionSignaturesAPIContentAnsibleCollectionSignaturesReadRequest) (*AnsibleCollectionVersionSignatureResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleCollectionVersionSignatureResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCollectionSignaturesAPIService.ContentAnsibleCollectionSignaturesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_version_signature_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_version_signature_href"+"}", parameterValueToString(r.ansibleCollectionVersionSignatureHref, "ansibleCollectionVersionSignatureHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_versions.go new file mode 100644 index 0000000000..db8c0dca3f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_collection_versions.go @@ -0,0 +1,620 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "reflect" +) + + +// ContentCollectionVersionsAPIService ContentCollectionVersionsAPI service +type ContentCollectionVersionsAPIService service + +type ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest struct { + ctx context.Context + ApiService *ContentCollectionVersionsAPIService + upload *string + artifact *string + repository *string + file *os.File + expectedName *string + expectedNamespace *string + expectedVersion *string +} + +// An uncommitted upload that may be turned into the artifact of the content unit. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest) Upload(upload string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest { + r.upload = &upload + return r +} + +// Artifact file representing the physical content +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest) Artifact(artifact string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest { + r.artifact = &artifact + return r +} + +// A URI of a repository the new content unit should be associated with. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest) Repository(repository string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest { + r.repository = &repository + return r +} + +// An uploaded file that may be turned into the artifact of the content unit. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest) File(file *os.File) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest { + r.file = file + return r +} + +// The name of the collection. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest) ExpectedName(expectedName string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest { + r.expectedName = &expectedName + return r +} + +// The namespace of the collection. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest) ExpectedNamespace(expectedNamespace string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest { + r.expectedNamespace = &expectedNamespace + return r +} + +// The version of the collection. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest) ExpectedVersion(expectedVersion string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest { + r.expectedVersion = &expectedVersion + return r +} + +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ContentAnsibleCollectionVersionsCreateExecute(r) +} + +/* +ContentAnsibleCollectionVersionsCreate Create a collection version + +Trigger an asynchronous task to create content,optionally create new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest +*/ +func (a *ContentCollectionVersionsAPIService) ContentAnsibleCollectionVersionsCreate(ctx context.Context) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest { + return ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ContentCollectionVersionsAPIService) ContentAnsibleCollectionVersionsCreateExecute(r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCollectionVersionsAPIService.ContentAnsibleCollectionVersionsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ansible/collection_versions/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.upload != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "upload", r.upload, "") + } + if r.artifact != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "artifact", r.artifact, "") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "repository", r.repository, "") + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.expectedName != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_name", r.expectedName, "") + } + if r.expectedNamespace != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_namespace", r.expectedNamespace, "") + } + if r.expectedVersion != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_version", r.expectedVersion, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest struct { + ctx context.Context + ApiService *ContentCollectionVersionsAPIService + isHighest *bool + limit *int32 + name *string + namespace *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + q *string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + tags *string + version *string + fields *[]string + excludeFields *[]string +} + +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) IsHighest(isHighest bool) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.isHighest = &isHighest + return r +} + +// Number of results to return per page. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) Limit(limit int32) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.limit = &limit + return r +} + +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) Name(name string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.name = &name + return r +} + +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) Namespace(namespace string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.namespace = &namespace + return r +} + +// The initial index from which to return the results. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) Offset(offset int32) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `authors` - Authors * `-authors` - Authors (descending) * `contents` - Contents * `-contents` - Contents (descending) * `dependencies` - Dependencies * `-dependencies` - Dependencies (descending) * `description` - Description * `-description` - Description (descending) * `docs_blob` - Docs blob * `-docs_blob` - Docs blob (descending) * `manifest` - Manifest * `-manifest` - Manifest (descending) * `files` - Files * `-files` - Files (descending) * `documentation` - Documentation * `-documentation` - Documentation (descending) * `homepage` - Homepage * `-homepage` - Homepage (descending) * `issues` - Issues * `-issues` - Issues (descending) * `license` - License * `-license` - License (descending) * `name` - Name * `-name` - Name (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `repository` - Repository * `-repository` - Repository (descending) * `requires_ansible` - Requires ansible * `-requires_ansible` - Requires ansible (descending) * `version` - Version * `-version` - Version (descending) * `version_major` - Version major * `-version_major` - Version major (descending) * `version_minor` - Version minor * `-version_minor` - Version minor (descending) * `version_patch` - Version patch * `-version_patch` - Version patch (descending) * `version_prerelease` - Version prerelease * `-version_prerelease` - Version prerelease (descending) * `is_highest` - Is highest * `-is_highest` - Is highest (descending) * `search_vector` - Search vector * `-search_vector` - Search vector (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) Ordering(ordering []string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) PulpHrefIn(pulpHrefIn []string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) PulpIdIn(pulpIdIn []string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) Q(q string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.q = &q + return r +} + +// Repository Version referenced by HREF +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) RepositoryVersion(repositoryVersion string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter by comma separate list of tags that must all be matched +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) Tags(tags string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.tags = &tags + return r +} + +// Filter results where version matches value +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) Version(version string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.version = &version + return r +} + +// A list of fields to include in the response. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) Fields(fields []string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) ExcludeFields(excludeFields []string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) Execute() (*PaginatedansibleCollectionVersionResponseList, *http.Response, error) { + return r.ApiService.ContentAnsibleCollectionVersionsListExecute(r) +} + +/* +ContentAnsibleCollectionVersionsList List collection versions + +ViewSet for Ansible Collection. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest +*/ +func (a *ContentCollectionVersionsAPIService) ContentAnsibleCollectionVersionsList(ctx context.Context) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest { + return ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedansibleCollectionVersionResponseList +func (a *ContentCollectionVersionsAPIService) ContentAnsibleCollectionVersionsListExecute(r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsListRequest) (*PaginatedansibleCollectionVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleCollectionVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCollectionVersionsAPIService.ContentAnsibleCollectionVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ansible/collection_versions/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.isHighest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "is_highest", r.isHighest, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.q != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "q", r.q, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.tags != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "tags", r.tags, "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentCollectionVersionsAPIContentAnsibleCollectionVersionsReadRequest struct { + ctx context.Context + ApiService *ContentCollectionVersionsAPIService + ansibleCollectionVersionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsReadRequest) Fields(fields []string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsReadRequest) ExcludeFields(excludeFields []string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsReadRequest) Execute() (*AnsibleCollectionVersionResponse, *http.Response, error) { + return r.ApiService.ContentAnsibleCollectionVersionsReadExecute(r) +} + +/* +ContentAnsibleCollectionVersionsRead Inspect a collection version + +ViewSet for Ansible Collection. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionVersionHref + @return ContentCollectionVersionsAPIContentAnsibleCollectionVersionsReadRequest +*/ +func (a *ContentCollectionVersionsAPIService) ContentAnsibleCollectionVersionsRead(ctx context.Context, ansibleCollectionVersionHref string) ContentCollectionVersionsAPIContentAnsibleCollectionVersionsReadRequest { + return ContentCollectionVersionsAPIContentAnsibleCollectionVersionsReadRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionVersionHref: ansibleCollectionVersionHref, + } +} + +// Execute executes the request +// @return AnsibleCollectionVersionResponse +func (a *ContentCollectionVersionsAPIService) ContentAnsibleCollectionVersionsReadExecute(r ContentCollectionVersionsAPIContentAnsibleCollectionVersionsReadRequest) (*AnsibleCollectionVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleCollectionVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCollectionVersionsAPIService.ContentAnsibleCollectionVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_version_href"+"}", parameterValueToString(r.ansibleCollectionVersionHref, "ansibleCollectionVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_commits.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_commits.go new file mode 100644 index 0000000000..1bcd1632b0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_commits.go @@ -0,0 +1,390 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentCommitsAPIService ContentCommitsAPI service +type ContentCommitsAPIService service + +type ContentCommitsAPIContentOstreeCommitsListRequest struct { + ctx context.Context + ApiService *ContentCommitsAPIService + checksum *string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Filter results where checksum matches value +func (r ContentCommitsAPIContentOstreeCommitsListRequest) Checksum(checksum string) ContentCommitsAPIContentOstreeCommitsListRequest { + r.checksum = &checksum + return r +} + +// Number of results to return per page. +func (r ContentCommitsAPIContentOstreeCommitsListRequest) Limit(limit int32) ContentCommitsAPIContentOstreeCommitsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentCommitsAPIContentOstreeCommitsListRequest) Offset(offset int32) ContentCommitsAPIContentOstreeCommitsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `checksum` - Checksum * `-checksum` - Checksum (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentCommitsAPIContentOstreeCommitsListRequest) Ordering(ordering []string) ContentCommitsAPIContentOstreeCommitsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentCommitsAPIContentOstreeCommitsListRequest) PulpHrefIn(pulpHrefIn []string) ContentCommitsAPIContentOstreeCommitsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentCommitsAPIContentOstreeCommitsListRequest) PulpIdIn(pulpIdIn []string) ContentCommitsAPIContentOstreeCommitsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentCommitsAPIContentOstreeCommitsListRequest) RepositoryVersion(repositoryVersion string) ContentCommitsAPIContentOstreeCommitsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentCommitsAPIContentOstreeCommitsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentCommitsAPIContentOstreeCommitsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentCommitsAPIContentOstreeCommitsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentCommitsAPIContentOstreeCommitsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentCommitsAPIContentOstreeCommitsListRequest) Fields(fields []string) ContentCommitsAPIContentOstreeCommitsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentCommitsAPIContentOstreeCommitsListRequest) ExcludeFields(excludeFields []string) ContentCommitsAPIContentOstreeCommitsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentCommitsAPIContentOstreeCommitsListRequest) Execute() (*PaginatedostreeOstreeCommitResponseList, *http.Response, error) { + return r.ApiService.ContentOstreeCommitsListExecute(r) +} + +/* +ContentOstreeCommitsList List ostree commits + +A ViewSet class for OSTree commits. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentCommitsAPIContentOstreeCommitsListRequest +*/ +func (a *ContentCommitsAPIService) ContentOstreeCommitsList(ctx context.Context) ContentCommitsAPIContentOstreeCommitsListRequest { + return ContentCommitsAPIContentOstreeCommitsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedostreeOstreeCommitResponseList +func (a *ContentCommitsAPIService) ContentOstreeCommitsListExecute(r ContentCommitsAPIContentOstreeCommitsListRequest) (*PaginatedostreeOstreeCommitResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedostreeOstreeCommitResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCommitsAPIService.ContentOstreeCommitsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ostree/commits/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.checksum != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "checksum", r.checksum, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentCommitsAPIContentOstreeCommitsReadRequest struct { + ctx context.Context + ApiService *ContentCommitsAPIService + ostreeOstreeCommitHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentCommitsAPIContentOstreeCommitsReadRequest) Fields(fields []string) ContentCommitsAPIContentOstreeCommitsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentCommitsAPIContentOstreeCommitsReadRequest) ExcludeFields(excludeFields []string) ContentCommitsAPIContentOstreeCommitsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentCommitsAPIContentOstreeCommitsReadRequest) Execute() (*OstreeOstreeCommitResponse, *http.Response, error) { + return r.ApiService.ContentOstreeCommitsReadExecute(r) +} + +/* +ContentOstreeCommitsRead Inspect an ostree commit + +A ViewSet class for OSTree commits. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeCommitHref + @return ContentCommitsAPIContentOstreeCommitsReadRequest +*/ +func (a *ContentCommitsAPIService) ContentOstreeCommitsRead(ctx context.Context, ostreeOstreeCommitHref string) ContentCommitsAPIContentOstreeCommitsReadRequest { + return ContentCommitsAPIContentOstreeCommitsReadRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeCommitHref: ostreeOstreeCommitHref, + } +} + +// Execute executes the request +// @return OstreeOstreeCommitResponse +func (a *ContentCommitsAPIService) ContentOstreeCommitsReadExecute(r ContentCommitsAPIContentOstreeCommitsReadRequest) (*OstreeOstreeCommitResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OstreeOstreeCommitResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentCommitsAPIService.ContentOstreeCommitsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_commit_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_commit_href"+"}", parameterValueToString(r.ostreeOstreeCommitHref, "ostreeOstreeCommitHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_configs.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_configs.go new file mode 100644 index 0000000000..c846004cdf --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_configs.go @@ -0,0 +1,380 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentConfigsAPIService ContentConfigsAPI service +type ContentConfigsAPIService service + +type ContentConfigsAPIContentOstreeConfigsListRequest struct { + ctx context.Context + ApiService *ContentConfigsAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentConfigsAPIContentOstreeConfigsListRequest) Limit(limit int32) ContentConfigsAPIContentOstreeConfigsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentConfigsAPIContentOstreeConfigsListRequest) Offset(offset int32) ContentConfigsAPIContentOstreeConfigsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentConfigsAPIContentOstreeConfigsListRequest) Ordering(ordering []string) ContentConfigsAPIContentOstreeConfigsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentConfigsAPIContentOstreeConfigsListRequest) PulpHrefIn(pulpHrefIn []string) ContentConfigsAPIContentOstreeConfigsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentConfigsAPIContentOstreeConfigsListRequest) PulpIdIn(pulpIdIn []string) ContentConfigsAPIContentOstreeConfigsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentConfigsAPIContentOstreeConfigsListRequest) RepositoryVersion(repositoryVersion string) ContentConfigsAPIContentOstreeConfigsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentConfigsAPIContentOstreeConfigsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentConfigsAPIContentOstreeConfigsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentConfigsAPIContentOstreeConfigsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentConfigsAPIContentOstreeConfigsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentConfigsAPIContentOstreeConfigsListRequest) Fields(fields []string) ContentConfigsAPIContentOstreeConfigsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentConfigsAPIContentOstreeConfigsListRequest) ExcludeFields(excludeFields []string) ContentConfigsAPIContentOstreeConfigsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentConfigsAPIContentOstreeConfigsListRequest) Execute() (*PaginatedostreeOstreeConfigResponseList, *http.Response, error) { + return r.ApiService.ContentOstreeConfigsListExecute(r) +} + +/* +ContentOstreeConfigsList List ostree configs + +A ViewSet class for OSTree repository configurations. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentConfigsAPIContentOstreeConfigsListRequest +*/ +func (a *ContentConfigsAPIService) ContentOstreeConfigsList(ctx context.Context) ContentConfigsAPIContentOstreeConfigsListRequest { + return ContentConfigsAPIContentOstreeConfigsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedostreeOstreeConfigResponseList +func (a *ContentConfigsAPIService) ContentOstreeConfigsListExecute(r ContentConfigsAPIContentOstreeConfigsListRequest) (*PaginatedostreeOstreeConfigResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedostreeOstreeConfigResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentConfigsAPIService.ContentOstreeConfigsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ostree/configs/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentConfigsAPIContentOstreeConfigsReadRequest struct { + ctx context.Context + ApiService *ContentConfigsAPIService + ostreeOstreeConfigHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentConfigsAPIContentOstreeConfigsReadRequest) Fields(fields []string) ContentConfigsAPIContentOstreeConfigsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentConfigsAPIContentOstreeConfigsReadRequest) ExcludeFields(excludeFields []string) ContentConfigsAPIContentOstreeConfigsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentConfigsAPIContentOstreeConfigsReadRequest) Execute() (*OstreeOstreeConfigResponse, *http.Response, error) { + return r.ApiService.ContentOstreeConfigsReadExecute(r) +} + +/* +ContentOstreeConfigsRead Inspect an ostree config + +A ViewSet class for OSTree repository configurations. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeConfigHref + @return ContentConfigsAPIContentOstreeConfigsReadRequest +*/ +func (a *ContentConfigsAPIService) ContentOstreeConfigsRead(ctx context.Context, ostreeOstreeConfigHref string) ContentConfigsAPIContentOstreeConfigsReadRequest { + return ContentConfigsAPIContentOstreeConfigsReadRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeConfigHref: ostreeOstreeConfigHref, + } +} + +// Execute executes the request +// @return OstreeOstreeConfigResponse +func (a *ContentConfigsAPIService) ContentOstreeConfigsReadExecute(r ContentConfigsAPIContentOstreeConfigsReadRequest) (*OstreeOstreeConfigResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OstreeOstreeConfigResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentConfigsAPIService.ContentOstreeConfigsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_config_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_config_href"+"}", parameterValueToString(r.ostreeOstreeConfigHref, "ostreeOstreeConfigHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_content.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_content.go new file mode 100644 index 0000000000..6265d9721c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_content.go @@ -0,0 +1,380 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentContentAPIService ContentContentAPI service +type ContentContentAPIService service + +type ContentContentAPIContentOstreeContentListRequest struct { + ctx context.Context + ApiService *ContentContentAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentContentAPIContentOstreeContentListRequest) Limit(limit int32) ContentContentAPIContentOstreeContentListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentContentAPIContentOstreeContentListRequest) Offset(offset int32) ContentContentAPIContentOstreeContentListRequest { + r.offset = &offset + return r +} + +// Ordering * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentContentAPIContentOstreeContentListRequest) Ordering(ordering []string) ContentContentAPIContentOstreeContentListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentContentAPIContentOstreeContentListRequest) PulpHrefIn(pulpHrefIn []string) ContentContentAPIContentOstreeContentListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentContentAPIContentOstreeContentListRequest) PulpIdIn(pulpIdIn []string) ContentContentAPIContentOstreeContentListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentContentAPIContentOstreeContentListRequest) RepositoryVersion(repositoryVersion string) ContentContentAPIContentOstreeContentListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentContentAPIContentOstreeContentListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentContentAPIContentOstreeContentListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentContentAPIContentOstreeContentListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentContentAPIContentOstreeContentListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentContentAPIContentOstreeContentListRequest) Fields(fields []string) ContentContentAPIContentOstreeContentListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentContentAPIContentOstreeContentListRequest) ExcludeFields(excludeFields []string) ContentContentAPIContentOstreeContentListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentContentAPIContentOstreeContentListRequest) Execute() (*PaginatedostreeOstreeContentResponseList, *http.Response, error) { + return r.ApiService.ContentOstreeContentListExecute(r) +} + +/* +ContentOstreeContentList List ostree contents + +A ViewSet class for uncategorized content units (e.g., static deltas). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentContentAPIContentOstreeContentListRequest +*/ +func (a *ContentContentAPIService) ContentOstreeContentList(ctx context.Context) ContentContentAPIContentOstreeContentListRequest { + return ContentContentAPIContentOstreeContentListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedostreeOstreeContentResponseList +func (a *ContentContentAPIService) ContentOstreeContentListExecute(r ContentContentAPIContentOstreeContentListRequest) (*PaginatedostreeOstreeContentResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedostreeOstreeContentResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentContentAPIService.ContentOstreeContentList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ostree/content/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentContentAPIContentOstreeContentReadRequest struct { + ctx context.Context + ApiService *ContentContentAPIService + ostreeOstreeContentHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentContentAPIContentOstreeContentReadRequest) Fields(fields []string) ContentContentAPIContentOstreeContentReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentContentAPIContentOstreeContentReadRequest) ExcludeFields(excludeFields []string) ContentContentAPIContentOstreeContentReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentContentAPIContentOstreeContentReadRequest) Execute() (*OstreeOstreeContentResponse, *http.Response, error) { + return r.ApiService.ContentOstreeContentReadExecute(r) +} + +/* +ContentOstreeContentRead Inspect an ostree content + +A ViewSet class for uncategorized content units (e.g., static deltas). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeContentHref + @return ContentContentAPIContentOstreeContentReadRequest +*/ +func (a *ContentContentAPIService) ContentOstreeContentRead(ctx context.Context, ostreeOstreeContentHref string) ContentContentAPIContentOstreeContentReadRequest { + return ContentContentAPIContentOstreeContentReadRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeContentHref: ostreeOstreeContentHref, + } +} + +// Execute executes the request +// @return OstreeOstreeContentResponse +func (a *ContentContentAPIService) ContentOstreeContentReadExecute(r ContentContentAPIContentOstreeContentReadRequest) (*OstreeOstreeContentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OstreeOstreeContentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentContentAPIService.ContentOstreeContentRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_content_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_content_href"+"}", parameterValueToString(r.ostreeOstreeContentHref, "ostreeOstreeContentHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_distribution_trees.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_distribution_trees.go new file mode 100644 index 0000000000..ca996eeb8a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_distribution_trees.go @@ -0,0 +1,380 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentDistributionTreesAPIService ContentDistributionTreesAPI service +type ContentDistributionTreesAPIService service + +type ContentDistributionTreesAPIContentRpmDistributionTreesListRequest struct { + ctx context.Context + ApiService *ContentDistributionTreesAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentDistributionTreesAPIContentRpmDistributionTreesListRequest) Limit(limit int32) ContentDistributionTreesAPIContentRpmDistributionTreesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentDistributionTreesAPIContentRpmDistributionTreesListRequest) Offset(offset int32) ContentDistributionTreesAPIContentRpmDistributionTreesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentDistributionTreesAPIContentRpmDistributionTreesListRequest) Ordering(ordering []string) ContentDistributionTreesAPIContentRpmDistributionTreesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentDistributionTreesAPIContentRpmDistributionTreesListRequest) PulpHrefIn(pulpHrefIn []string) ContentDistributionTreesAPIContentRpmDistributionTreesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentDistributionTreesAPIContentRpmDistributionTreesListRequest) PulpIdIn(pulpIdIn []string) ContentDistributionTreesAPIContentRpmDistributionTreesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentDistributionTreesAPIContentRpmDistributionTreesListRequest) RepositoryVersion(repositoryVersion string) ContentDistributionTreesAPIContentRpmDistributionTreesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentDistributionTreesAPIContentRpmDistributionTreesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentDistributionTreesAPIContentRpmDistributionTreesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentDistributionTreesAPIContentRpmDistributionTreesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentDistributionTreesAPIContentRpmDistributionTreesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentDistributionTreesAPIContentRpmDistributionTreesListRequest) Fields(fields []string) ContentDistributionTreesAPIContentRpmDistributionTreesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentDistributionTreesAPIContentRpmDistributionTreesListRequest) ExcludeFields(excludeFields []string) ContentDistributionTreesAPIContentRpmDistributionTreesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentDistributionTreesAPIContentRpmDistributionTreesListRequest) Execute() (*PaginatedrpmDistributionTreeResponseList, *http.Response, error) { + return r.ApiService.ContentRpmDistributionTreesListExecute(r) +} + +/* +ContentRpmDistributionTreesList List distribution trees + +Distribution Tree Viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentDistributionTreesAPIContentRpmDistributionTreesListRequest +*/ +func (a *ContentDistributionTreesAPIService) ContentRpmDistributionTreesList(ctx context.Context) ContentDistributionTreesAPIContentRpmDistributionTreesListRequest { + return ContentDistributionTreesAPIContentRpmDistributionTreesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmDistributionTreeResponseList +func (a *ContentDistributionTreesAPIService) ContentRpmDistributionTreesListExecute(r ContentDistributionTreesAPIContentRpmDistributionTreesListRequest) (*PaginatedrpmDistributionTreeResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmDistributionTreeResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentDistributionTreesAPIService.ContentRpmDistributionTreesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/distribution_trees/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentDistributionTreesAPIContentRpmDistributionTreesReadRequest struct { + ctx context.Context + ApiService *ContentDistributionTreesAPIService + rpmDistributionTreeHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentDistributionTreesAPIContentRpmDistributionTreesReadRequest) Fields(fields []string) ContentDistributionTreesAPIContentRpmDistributionTreesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentDistributionTreesAPIContentRpmDistributionTreesReadRequest) ExcludeFields(excludeFields []string) ContentDistributionTreesAPIContentRpmDistributionTreesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentDistributionTreesAPIContentRpmDistributionTreesReadRequest) Execute() (*RpmDistributionTreeResponse, *http.Response, error) { + return r.ApiService.ContentRpmDistributionTreesReadExecute(r) +} + +/* +ContentRpmDistributionTreesRead Inspect a distribution tree + +Distribution Tree Viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmDistributionTreeHref + @return ContentDistributionTreesAPIContentRpmDistributionTreesReadRequest +*/ +func (a *ContentDistributionTreesAPIService) ContentRpmDistributionTreesRead(ctx context.Context, rpmDistributionTreeHref string) ContentDistributionTreesAPIContentRpmDistributionTreesReadRequest { + return ContentDistributionTreesAPIContentRpmDistributionTreesReadRequest{ + ApiService: a, + ctx: ctx, + rpmDistributionTreeHref: rpmDistributionTreeHref, + } +} + +// Execute executes the request +// @return RpmDistributionTreeResponse +func (a *ContentDistributionTreesAPIService) ContentRpmDistributionTreesReadExecute(r ContentDistributionTreesAPIContentRpmDistributionTreesReadRequest) (*RpmDistributionTreeResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmDistributionTreeResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentDistributionTreesAPIService.ContentRpmDistributionTreesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_distribution_tree_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_distribution_tree_href"+"}", parameterValueToString(r.rpmDistributionTreeHref, "rpmDistributionTreeHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_files.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_files.go new file mode 100644 index 0000000000..7c7c14a1ee --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_files.go @@ -0,0 +1,571 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "reflect" +) + + +// ContentFilesAPIService ContentFilesAPI service +type ContentFilesAPIService service + +type ContentFilesAPIContentFileFilesCreateRequest struct { + ctx context.Context + ApiService *ContentFilesAPIService + relativePath *string + repository *string + artifact *string + file *os.File + upload *string +} + +// Path where the artifact is located relative to distributions base_path +func (r ContentFilesAPIContentFileFilesCreateRequest) RelativePath(relativePath string) ContentFilesAPIContentFileFilesCreateRequest { + r.relativePath = &relativePath + return r +} + +// A URI of a repository the new content unit should be associated with. +func (r ContentFilesAPIContentFileFilesCreateRequest) Repository(repository string) ContentFilesAPIContentFileFilesCreateRequest { + r.repository = &repository + return r +} + +// Artifact file representing the physical content +func (r ContentFilesAPIContentFileFilesCreateRequest) Artifact(artifact string) ContentFilesAPIContentFileFilesCreateRequest { + r.artifact = &artifact + return r +} + +// An uploaded file that may be turned into the artifact of the content unit. +func (r ContentFilesAPIContentFileFilesCreateRequest) File(file *os.File) ContentFilesAPIContentFileFilesCreateRequest { + r.file = file + return r +} + +// An uncommitted upload that may be turned into the artifact of the content unit. +func (r ContentFilesAPIContentFileFilesCreateRequest) Upload(upload string) ContentFilesAPIContentFileFilesCreateRequest { + r.upload = &upload + return r +} + +func (r ContentFilesAPIContentFileFilesCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ContentFileFilesCreateExecute(r) +} + +/* +ContentFileFilesCreate Create a file content + +Trigger an asynchronous task to create content,optionally create new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentFilesAPIContentFileFilesCreateRequest +*/ +func (a *ContentFilesAPIService) ContentFileFilesCreate(ctx context.Context) ContentFilesAPIContentFileFilesCreateRequest { + return ContentFilesAPIContentFileFilesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ContentFilesAPIService) ContentFileFilesCreateExecute(r ContentFilesAPIContentFileFilesCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentFilesAPIService.ContentFileFilesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/file/files/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.relativePath == nil { + return localVarReturnValue, nil, reportError("relativePath is required and must be specified") + } + if strlen(*r.relativePath) < 1 { + return localVarReturnValue, nil, reportError("relativePath must have at least 1 elements") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "repository", r.repository, "") + } + if r.artifact != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "artifact", r.artifact, "") + } + parameterAddToHeaderOrQuery(localVarFormParams, "relative_path", r.relativePath, "") + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.upload != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "upload", r.upload, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentFilesAPIContentFileFilesListRequest struct { + ctx context.Context + ApiService *ContentFilesAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + relativePath *string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + sha256 *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentFilesAPIContentFileFilesListRequest) Limit(limit int32) ContentFilesAPIContentFileFilesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentFilesAPIContentFileFilesListRequest) Offset(offset int32) ContentFilesAPIContentFileFilesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentFilesAPIContentFileFilesListRequest) Ordering(ordering []string) ContentFilesAPIContentFileFilesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentFilesAPIContentFileFilesListRequest) PulpHrefIn(pulpHrefIn []string) ContentFilesAPIContentFileFilesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentFilesAPIContentFileFilesListRequest) PulpIdIn(pulpIdIn []string) ContentFilesAPIContentFileFilesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter results where relative_path matches value +func (r ContentFilesAPIContentFileFilesListRequest) RelativePath(relativePath string) ContentFilesAPIContentFileFilesListRequest { + r.relativePath = &relativePath + return r +} + +// Repository Version referenced by HREF +func (r ContentFilesAPIContentFileFilesListRequest) RepositoryVersion(repositoryVersion string) ContentFilesAPIContentFileFilesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentFilesAPIContentFileFilesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentFilesAPIContentFileFilesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentFilesAPIContentFileFilesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentFilesAPIContentFileFilesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +func (r ContentFilesAPIContentFileFilesListRequest) Sha256(sha256 string) ContentFilesAPIContentFileFilesListRequest { + r.sha256 = &sha256 + return r +} + +// A list of fields to include in the response. +func (r ContentFilesAPIContentFileFilesListRequest) Fields(fields []string) ContentFilesAPIContentFileFilesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentFilesAPIContentFileFilesListRequest) ExcludeFields(excludeFields []string) ContentFilesAPIContentFileFilesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentFilesAPIContentFileFilesListRequest) Execute() (*PaginatedfileFileContentResponseList, *http.Response, error) { + return r.ApiService.ContentFileFilesListExecute(r) +} + +/* +ContentFileFilesList List file contents + + +FileContent represents a single file and its metadata, which can be added and removed from +repositories. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentFilesAPIContentFileFilesListRequest +*/ +func (a *ContentFilesAPIService) ContentFileFilesList(ctx context.Context) ContentFilesAPIContentFileFilesListRequest { + return ContentFilesAPIContentFileFilesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedfileFileContentResponseList +func (a *ContentFilesAPIService) ContentFileFilesListExecute(r ContentFilesAPIContentFileFilesListRequest) (*PaginatedfileFileContentResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedfileFileContentResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentFilesAPIService.ContentFileFilesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/file/files/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.relativePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "relative_path", r.relativePath, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256", r.sha256, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentFilesAPIContentFileFilesReadRequest struct { + ctx context.Context + ApiService *ContentFilesAPIService + fileFileContentHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentFilesAPIContentFileFilesReadRequest) Fields(fields []string) ContentFilesAPIContentFileFilesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentFilesAPIContentFileFilesReadRequest) ExcludeFields(excludeFields []string) ContentFilesAPIContentFileFilesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentFilesAPIContentFileFilesReadRequest) Execute() (*FileFileContentResponse, *http.Response, error) { + return r.ApiService.ContentFileFilesReadExecute(r) +} + +/* +ContentFileFilesRead Inspect a file content + + +FileContent represents a single file and its metadata, which can be added and removed from +repositories. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileContentHref + @return ContentFilesAPIContentFileFilesReadRequest +*/ +func (a *ContentFilesAPIService) ContentFileFilesRead(ctx context.Context, fileFileContentHref string) ContentFilesAPIContentFileFilesReadRequest { + return ContentFilesAPIContentFileFilesReadRequest{ + ApiService: a, + ctx: ctx, + fileFileContentHref: fileFileContentHref, + } +} + +// Execute executes the request +// @return FileFileContentResponse +func (a *ContentFilesAPIService) ContentFileFilesReadExecute(r ContentFilesAPIContentFileFilesReadRequest) (*FileFileContentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FileFileContentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentFilesAPIService.ContentFileFilesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_content_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_content_href"+"}", parameterValueToString(r.fileFileContentHref, "fileFileContentHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_gem.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_gem.go new file mode 100644 index 0000000000..076272e0d4 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_gem.go @@ -0,0 +1,564 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "reflect" +) + + +// ContentGemAPIService ContentGemAPI service +type ContentGemAPIService service + +type ContentGemAPIContentGemGemCreateRequest struct { + ctx context.Context + ApiService *ContentGemAPIService + repository *string + artifact *string + file *os.File +} + +// A URI of a repository the new content unit should be associated with. +func (r ContentGemAPIContentGemGemCreateRequest) Repository(repository string) ContentGemAPIContentGemGemCreateRequest { + r.repository = &repository + return r +} + +// Artifact file representing the physical content +func (r ContentGemAPIContentGemGemCreateRequest) Artifact(artifact string) ContentGemAPIContentGemGemCreateRequest { + r.artifact = &artifact + return r +} + +// An uploaded file that should be turned into the artifact of the content unit. +func (r ContentGemAPIContentGemGemCreateRequest) File(file *os.File) ContentGemAPIContentGemGemCreateRequest { + r.file = file + return r +} + +func (r ContentGemAPIContentGemGemCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ContentGemGemCreateExecute(r) +} + +/* +ContentGemGemCreate Create a gem content + +Trigger an asynchronous task to create content,optionally create new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentGemAPIContentGemGemCreateRequest +*/ +func (a *ContentGemAPIService) ContentGemGemCreate(ctx context.Context) ContentGemAPIContentGemGemCreateRequest { + return ContentGemAPIContentGemGemCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ContentGemAPIService) ContentGemGemCreateExecute(r ContentGemAPIContentGemGemCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentGemAPIService.ContentGemGemCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/gem/gem/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "repository", r.repository, "") + } + if r.artifact != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "artifact", r.artifact, "") + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentGemAPIContentGemGemListRequest struct { + ctx context.Context + ApiService *ContentGemAPIService + checksum *string + limit *int32 + name *string + offset *int32 + ordering *[]string + prerelease *bool + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + version *string + fields *[]string + excludeFields *[]string +} + +// Filter results where checksum matches value +func (r ContentGemAPIContentGemGemListRequest) Checksum(checksum string) ContentGemAPIContentGemGemListRequest { + r.checksum = &checksum + return r +} + +// Number of results to return per page. +func (r ContentGemAPIContentGemGemListRequest) Limit(limit int32) ContentGemAPIContentGemGemListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ContentGemAPIContentGemGemListRequest) Name(name string) ContentGemAPIContentGemGemListRequest { + r.name = &name + return r +} + +// The initial index from which to return the results. +func (r ContentGemAPIContentGemGemListRequest) Offset(offset int32) ContentGemAPIContentGemGemListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `version` - Version * `-version` - Version (descending) * `checksum` - Checksum * `-checksum` - Checksum (descending) * `prerelease` - Prerelease * `-prerelease` - Prerelease (descending) * `dependencies` - Dependencies * `-dependencies` - Dependencies (descending) * `required_ruby_version` - Required ruby version * `-required_ruby_version` - Required ruby version (descending) * `required_rubygems_version` - Required rubygems version * `-required_rubygems_version` - Required rubygems version (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentGemAPIContentGemGemListRequest) Ordering(ordering []string) ContentGemAPIContentGemGemListRequest { + r.ordering = &ordering + return r +} + +// Filter results where prerelease matches value +func (r ContentGemAPIContentGemGemListRequest) Prerelease(prerelease bool) ContentGemAPIContentGemGemListRequest { + r.prerelease = &prerelease + return r +} + +// Multiple values may be separated by commas. +func (r ContentGemAPIContentGemGemListRequest) PulpHrefIn(pulpHrefIn []string) ContentGemAPIContentGemGemListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentGemAPIContentGemGemListRequest) PulpIdIn(pulpIdIn []string) ContentGemAPIContentGemGemListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentGemAPIContentGemGemListRequest) RepositoryVersion(repositoryVersion string) ContentGemAPIContentGemGemListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentGemAPIContentGemGemListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentGemAPIContentGemGemListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentGemAPIContentGemGemListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentGemAPIContentGemGemListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where version matches value +func (r ContentGemAPIContentGemGemListRequest) Version(version string) ContentGemAPIContentGemGemListRequest { + r.version = &version + return r +} + +// A list of fields to include in the response. +func (r ContentGemAPIContentGemGemListRequest) Fields(fields []string) ContentGemAPIContentGemGemListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentGemAPIContentGemGemListRequest) ExcludeFields(excludeFields []string) ContentGemAPIContentGemGemListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentGemAPIContentGemGemListRequest) Execute() (*PaginatedgemGemContentResponseList, *http.Response, error) { + return r.ApiService.ContentGemGemListExecute(r) +} + +/* +ContentGemGemList List gem contents + +A ViewSet for GemContent. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentGemAPIContentGemGemListRequest +*/ +func (a *ContentGemAPIService) ContentGemGemList(ctx context.Context) ContentGemAPIContentGemGemListRequest { + return ContentGemAPIContentGemGemListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedgemGemContentResponseList +func (a *ContentGemAPIService) ContentGemGemListExecute(r ContentGemAPIContentGemGemListRequest) (*PaginatedgemGemContentResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedgemGemContentResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentGemAPIService.ContentGemGemList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/gem/gem/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.checksum != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "checksum", r.checksum, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.prerelease != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "prerelease", r.prerelease, "") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentGemAPIContentGemGemReadRequest struct { + ctx context.Context + ApiService *ContentGemAPIService + gemGemContentHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentGemAPIContentGemGemReadRequest) Fields(fields []string) ContentGemAPIContentGemGemReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentGemAPIContentGemGemReadRequest) ExcludeFields(excludeFields []string) ContentGemAPIContentGemGemReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentGemAPIContentGemGemReadRequest) Execute() (*GemGemContentResponse, *http.Response, error) { + return r.ApiService.ContentGemGemReadExecute(r) +} + +/* +ContentGemGemRead Inspect a gem content + +A ViewSet for GemContent. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemContentHref + @return ContentGemAPIContentGemGemReadRequest +*/ +func (a *ContentGemAPIService) ContentGemGemRead(ctx context.Context, gemGemContentHref string) ContentGemAPIContentGemGemReadRequest { + return ContentGemAPIContentGemGemReadRequest{ + ApiService: a, + ctx: ctx, + gemGemContentHref: gemGemContentHref, + } +} + +// Execute executes the request +// @return GemGemContentResponse +func (a *ContentGemAPIService) ContentGemGemReadExecute(r ContentGemAPIContentGemGemReadRequest) (*GemGemContentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GemGemContentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentGemAPIService.ContentGemGemRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_content_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_content_href"+"}", parameterValueToString(r.gemGemContentHref, "gemGemContentHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_generic_contents.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_generic_contents.go new file mode 100644 index 0000000000..96d70ae7db --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_generic_contents.go @@ -0,0 +1,578 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "reflect" +) + + +// ContentGenericContentsAPIService ContentGenericContentsAPI service +type ContentGenericContentsAPIService service + +type ContentGenericContentsAPIContentDebGenericContentsCreateRequest struct { + ctx context.Context + ApiService *ContentGenericContentsAPIService + relativePath *string + repository *string + artifact *string + file *os.File + upload *string +} + +// Path where the artifact is located relative to distributions base_path +func (r ContentGenericContentsAPIContentDebGenericContentsCreateRequest) RelativePath(relativePath string) ContentGenericContentsAPIContentDebGenericContentsCreateRequest { + r.relativePath = &relativePath + return r +} + +// A URI of a repository the new content unit should be associated with. +func (r ContentGenericContentsAPIContentDebGenericContentsCreateRequest) Repository(repository string) ContentGenericContentsAPIContentDebGenericContentsCreateRequest { + r.repository = &repository + return r +} + +// Artifact file representing the physical content +func (r ContentGenericContentsAPIContentDebGenericContentsCreateRequest) Artifact(artifact string) ContentGenericContentsAPIContentDebGenericContentsCreateRequest { + r.artifact = &artifact + return r +} + +// An uploaded file that may be turned into the artifact of the content unit. +func (r ContentGenericContentsAPIContentDebGenericContentsCreateRequest) File(file *os.File) ContentGenericContentsAPIContentDebGenericContentsCreateRequest { + r.file = file + return r +} + +// An uncommitted upload that may be turned into the artifact of the content unit. +func (r ContentGenericContentsAPIContentDebGenericContentsCreateRequest) Upload(upload string) ContentGenericContentsAPIContentDebGenericContentsCreateRequest { + r.upload = &upload + return r +} + +func (r ContentGenericContentsAPIContentDebGenericContentsCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ContentDebGenericContentsCreateExecute(r) +} + +/* +ContentDebGenericContentsCreate Create a generic content + +Trigger an asynchronous task to create content,optionally create new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentGenericContentsAPIContentDebGenericContentsCreateRequest +*/ +func (a *ContentGenericContentsAPIService) ContentDebGenericContentsCreate(ctx context.Context) ContentGenericContentsAPIContentDebGenericContentsCreateRequest { + return ContentGenericContentsAPIContentDebGenericContentsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ContentGenericContentsAPIService) ContentDebGenericContentsCreateExecute(r ContentGenericContentsAPIContentDebGenericContentsCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentGenericContentsAPIService.ContentDebGenericContentsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/generic_contents/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.relativePath == nil { + return localVarReturnValue, nil, reportError("relativePath is required and must be specified") + } + if strlen(*r.relativePath) < 1 { + return localVarReturnValue, nil, reportError("relativePath must have at least 1 elements") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "repository", r.repository, "") + } + if r.artifact != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "artifact", r.artifact, "") + } + parameterAddToHeaderOrQuery(localVarFormParams, "relative_path", r.relativePath, "") + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.upload != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "upload", r.upload, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentGenericContentsAPIContentDebGenericContentsListRequest struct { + ctx context.Context + ApiService *ContentGenericContentsAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + relativePath *string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + sha256 *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentGenericContentsAPIContentDebGenericContentsListRequest) Limit(limit int32) ContentGenericContentsAPIContentDebGenericContentsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentGenericContentsAPIContentDebGenericContentsListRequest) Offset(offset int32) ContentGenericContentsAPIContentDebGenericContentsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `sha256` - Sha256 * `-sha256` - Sha256 (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentGenericContentsAPIContentDebGenericContentsListRequest) Ordering(ordering []string) ContentGenericContentsAPIContentDebGenericContentsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentGenericContentsAPIContentDebGenericContentsListRequest) PulpHrefIn(pulpHrefIn []string) ContentGenericContentsAPIContentDebGenericContentsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentGenericContentsAPIContentDebGenericContentsListRequest) PulpIdIn(pulpIdIn []string) ContentGenericContentsAPIContentDebGenericContentsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter results where relative_path matches value +func (r ContentGenericContentsAPIContentDebGenericContentsListRequest) RelativePath(relativePath string) ContentGenericContentsAPIContentDebGenericContentsListRequest { + r.relativePath = &relativePath + return r +} + +// Repository Version referenced by HREF +func (r ContentGenericContentsAPIContentDebGenericContentsListRequest) RepositoryVersion(repositoryVersion string) ContentGenericContentsAPIContentDebGenericContentsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentGenericContentsAPIContentDebGenericContentsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentGenericContentsAPIContentDebGenericContentsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentGenericContentsAPIContentDebGenericContentsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentGenericContentsAPIContentDebGenericContentsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where sha256 matches value +func (r ContentGenericContentsAPIContentDebGenericContentsListRequest) Sha256(sha256 string) ContentGenericContentsAPIContentDebGenericContentsListRequest { + r.sha256 = &sha256 + return r +} + +// A list of fields to include in the response. +func (r ContentGenericContentsAPIContentDebGenericContentsListRequest) Fields(fields []string) ContentGenericContentsAPIContentDebGenericContentsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentGenericContentsAPIContentDebGenericContentsListRequest) ExcludeFields(excludeFields []string) ContentGenericContentsAPIContentDebGenericContentsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentGenericContentsAPIContentDebGenericContentsListRequest) Execute() (*PaginateddebGenericContentResponseList, *http.Response, error) { + return r.ApiService.ContentDebGenericContentsListExecute(r) +} + +/* +ContentDebGenericContentsList List generic contents + +GenericContent is a catch all category for storing files not covered by any other type. + +Associated artifacts: Exactly one arbitrary file that does not match any other type. + +This is needed to store arbitrary files for use with the verbatim publisher. If you are not +using the verbatim publisher, you may ignore this type. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentGenericContentsAPIContentDebGenericContentsListRequest +*/ +func (a *ContentGenericContentsAPIService) ContentDebGenericContentsList(ctx context.Context) ContentGenericContentsAPIContentDebGenericContentsListRequest { + return ContentGenericContentsAPIContentDebGenericContentsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebGenericContentResponseList +func (a *ContentGenericContentsAPIService) ContentDebGenericContentsListExecute(r ContentGenericContentsAPIContentDebGenericContentsListRequest) (*PaginateddebGenericContentResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebGenericContentResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentGenericContentsAPIService.ContentDebGenericContentsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/generic_contents/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.relativePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "relative_path", r.relativePath, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256", r.sha256, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentGenericContentsAPIContentDebGenericContentsReadRequest struct { + ctx context.Context + ApiService *ContentGenericContentsAPIService + debGenericContentHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentGenericContentsAPIContentDebGenericContentsReadRequest) Fields(fields []string) ContentGenericContentsAPIContentDebGenericContentsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentGenericContentsAPIContentDebGenericContentsReadRequest) ExcludeFields(excludeFields []string) ContentGenericContentsAPIContentDebGenericContentsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentGenericContentsAPIContentDebGenericContentsReadRequest) Execute() (*DebGenericContentResponse, *http.Response, error) { + return r.ApiService.ContentDebGenericContentsReadExecute(r) +} + +/* +ContentDebGenericContentsRead Inspect a generic content + +GenericContent is a catch all category for storing files not covered by any other type. + +Associated artifacts: Exactly one arbitrary file that does not match any other type. + +This is needed to store arbitrary files for use with the verbatim publisher. If you are not +using the verbatim publisher, you may ignore this type. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debGenericContentHref + @return ContentGenericContentsAPIContentDebGenericContentsReadRequest +*/ +func (a *ContentGenericContentsAPIService) ContentDebGenericContentsRead(ctx context.Context, debGenericContentHref string) ContentGenericContentsAPIContentDebGenericContentsReadRequest { + return ContentGenericContentsAPIContentDebGenericContentsReadRequest{ + ApiService: a, + ctx: ctx, + debGenericContentHref: debGenericContentHref, + } +} + +// Execute executes the request +// @return DebGenericContentResponse +func (a *ContentGenericContentsAPIService) ContentDebGenericContentsReadExecute(r ContentGenericContentsAPIContentDebGenericContentsReadRequest) (*DebGenericContentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebGenericContentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentGenericContentsAPIService.ContentDebGenericContentsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_generic_content_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_generic_content_href"+"}", parameterValueToString(r.debGenericContentHref, "debGenericContentHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_installer_file_indices.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_installer_file_indices.go new file mode 100644 index 0000000000..18c8d94705 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_installer_file_indices.go @@ -0,0 +1,551 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentInstallerFileIndicesAPIService ContentInstallerFileIndicesAPI service +type ContentInstallerFileIndicesAPIService service + +type ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesCreateRequest struct { + ctx context.Context + ApiService *ContentInstallerFileIndicesAPIService + debInstallerFileIndex *DebInstallerFileIndex +} + +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesCreateRequest) DebInstallerFileIndex(debInstallerFileIndex DebInstallerFileIndex) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesCreateRequest { + r.debInstallerFileIndex = &debInstallerFileIndex + return r +} + +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesCreateRequest) Execute() (*DebInstallerFileIndexResponse, *http.Response, error) { + return r.ApiService.ContentDebInstallerFileIndicesCreateExecute(r) +} + +/* +ContentDebInstallerFileIndicesCreate Create an installer file index + +An InstallerFileIndex represents the indices for a set of installer files. + +Associated artifacts: Exactly one 'SHA256SUMS' and/or 'MD5SUMS' file. + +Each InstallerFileIndes is associated with a single component-architecture combination within +a single Release. Note that installer files are currently used exclusively for verbatim +publications. The APT publisher (both simple and structured mode) does not make use of installer +content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesCreateRequest +*/ +func (a *ContentInstallerFileIndicesAPIService) ContentDebInstallerFileIndicesCreate(ctx context.Context) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesCreateRequest { + return ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DebInstallerFileIndexResponse +func (a *ContentInstallerFileIndicesAPIService) ContentDebInstallerFileIndicesCreateExecute(r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesCreateRequest) (*DebInstallerFileIndexResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebInstallerFileIndexResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentInstallerFileIndicesAPIService.ContentDebInstallerFileIndicesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/installer_file_indices/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debInstallerFileIndex == nil { + return localVarReturnValue, nil, reportError("debInstallerFileIndex is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debInstallerFileIndex + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest struct { + ctx context.Context + ApiService *ContentInstallerFileIndicesAPIService + architecture *string + component *string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + relativePath *string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + sha256 *string + fields *[]string + excludeFields *[]string +} + +// Filter results where architecture matches value +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) Architecture(architecture string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.architecture = &architecture + return r +} + +// Filter results where component matches value +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) Component(component string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.component = &component + return r +} + +// Number of results to return per page. +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) Limit(limit int32) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) Offset(offset int32) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `component` - Component * `-component` - Component (descending) * `architecture` - Architecture * `-architecture` - Architecture (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `sha256` - Sha256 * `-sha256` - Sha256 (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) Ordering(ordering []string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) PulpHrefIn(pulpHrefIn []string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) PulpIdIn(pulpIdIn []string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter results where relative_path matches value +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) RelativePath(relativePath string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.relativePath = &relativePath + return r +} + +// Repository Version referenced by HREF +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) RepositoryVersion(repositoryVersion string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where sha256 matches value +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) Sha256(sha256 string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.sha256 = &sha256 + return r +} + +// A list of fields to include in the response. +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) Fields(fields []string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) ExcludeFields(excludeFields []string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) Execute() (*PaginateddebInstallerFileIndexResponseList, *http.Response, error) { + return r.ApiService.ContentDebInstallerFileIndicesListExecute(r) +} + +/* +ContentDebInstallerFileIndicesList List InstallerFileIndices + +An InstallerFileIndex represents the indices for a set of installer files. + +Associated artifacts: Exactly one 'SHA256SUMS' and/or 'MD5SUMS' file. + +Each InstallerFileIndes is associated with a single component-architecture combination within +a single Release. Note that installer files are currently used exclusively for verbatim +publications. The APT publisher (both simple and structured mode) does not make use of installer +content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest +*/ +func (a *ContentInstallerFileIndicesAPIService) ContentDebInstallerFileIndicesList(ctx context.Context) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest { + return ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebInstallerFileIndexResponseList +func (a *ContentInstallerFileIndicesAPIService) ContentDebInstallerFileIndicesListExecute(r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesListRequest) (*PaginateddebInstallerFileIndexResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebInstallerFileIndexResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentInstallerFileIndicesAPIService.ContentDebInstallerFileIndicesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/installer_file_indices/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.architecture != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "architecture", r.architecture, "") + } + if r.component != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "component", r.component, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.relativePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "relative_path", r.relativePath, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256", r.sha256, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesReadRequest struct { + ctx context.Context + ApiService *ContentInstallerFileIndicesAPIService + debInstallerFileIndexHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesReadRequest) Fields(fields []string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesReadRequest) ExcludeFields(excludeFields []string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesReadRequest) Execute() (*DebInstallerFileIndexResponse, *http.Response, error) { + return r.ApiService.ContentDebInstallerFileIndicesReadExecute(r) +} + +/* +ContentDebInstallerFileIndicesRead Inspect an installer file index + +An InstallerFileIndex represents the indices for a set of installer files. + +Associated artifacts: Exactly one 'SHA256SUMS' and/or 'MD5SUMS' file. + +Each InstallerFileIndes is associated with a single component-architecture combination within +a single Release. Note that installer files are currently used exclusively for verbatim +publications. The APT publisher (both simple and structured mode) does not make use of installer +content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debInstallerFileIndexHref + @return ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesReadRequest +*/ +func (a *ContentInstallerFileIndicesAPIService) ContentDebInstallerFileIndicesRead(ctx context.Context, debInstallerFileIndexHref string) ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesReadRequest { + return ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesReadRequest{ + ApiService: a, + ctx: ctx, + debInstallerFileIndexHref: debInstallerFileIndexHref, + } +} + +// Execute executes the request +// @return DebInstallerFileIndexResponse +func (a *ContentInstallerFileIndicesAPIService) ContentDebInstallerFileIndicesReadExecute(r ContentInstallerFileIndicesAPIContentDebInstallerFileIndicesReadRequest) (*DebInstallerFileIndexResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebInstallerFileIndexResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentInstallerFileIndicesAPIService.ContentDebInstallerFileIndicesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_installer_file_index_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_installer_file_index_href"+"}", parameterValueToString(r.debInstallerFileIndexHref, "debInstallerFileIndexHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_installer_packages.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_installer_packages.go new file mode 100644 index 0000000000..27d53c02c2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_installer_packages.go @@ -0,0 +1,724 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "reflect" +) + + +// ContentInstallerPackagesAPIService ContentInstallerPackagesAPI service +type ContentInstallerPackagesAPIService service + +type ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest struct { + ctx context.Context + ApiService *ContentInstallerPackagesAPIService + repository *string + artifact *string + relativePath *string + file *os.File + upload *string +} + +// A URI of a repository the new content unit should be associated with. +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest) Repository(repository string) ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest { + r.repository = &repository + return r +} + +// Artifact file representing the physical content +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest) Artifact(artifact string) ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest { + r.artifact = &artifact + return r +} + +// Path where the artifact is located relative to distributions base_path +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest) RelativePath(relativePath string) ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest { + r.relativePath = &relativePath + return r +} + +// An uploaded file that may be turned into the artifact of the content unit. +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest) File(file *os.File) ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest { + r.file = file + return r +} + +// An uncommitted upload that may be turned into the artifact of the content unit. +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest) Upload(upload string) ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest { + r.upload = &upload + return r +} + +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ContentDebInstallerPackagesCreateExecute(r) +} + +/* +ContentDebInstallerPackagesCreate Create an installer package + +Trigger an asynchronous task to create content,optionally create new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest +*/ +func (a *ContentInstallerPackagesAPIService) ContentDebInstallerPackagesCreate(ctx context.Context) ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest { + return ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ContentInstallerPackagesAPIService) ContentDebInstallerPackagesCreateExecute(r ContentInstallerPackagesAPIContentDebInstallerPackagesCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentInstallerPackagesAPIService.ContentDebInstallerPackagesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/installer_packages/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "repository", r.repository, "") + } + if r.artifact != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "artifact", r.artifact, "") + } + if r.relativePath != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "relative_path", r.relativePath, "") + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.upload != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "upload", r.upload, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest struct { + ctx context.Context + ApiService *ContentInstallerPackagesAPIService + architecture *string + autoBuiltPackage *string + buildEssential *bool + builtUsing *string + essential *bool + installedSize *int32 + limit *int32 + maintainer *string + multiArch *string + offset *int32 + ordering *[]string + origin *string + originalMaintainer *string + package_ *string + priority *string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + section *string + sha256 *string + source *string + tag *string + version *string + fields *[]string + excludeFields *[]string +} + +// Filter results where architecture matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Architecture(architecture string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.architecture = &architecture + return r +} + +// Filter results where auto_built_package matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) AutoBuiltPackage(autoBuiltPackage string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.autoBuiltPackage = &autoBuiltPackage + return r +} + +// Filter results where build_essential matches value * `True` - yes * `False` - no +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) BuildEssential(buildEssential bool) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.buildEssential = &buildEssential + return r +} + +// Filter results where built_using matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) BuiltUsing(builtUsing string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.builtUsing = &builtUsing + return r +} + +// Filter results where essential matches value * `True` - yes * `False` - no +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Essential(essential bool) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.essential = &essential + return r +} + +// Filter results where installed_size matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) InstalledSize(installedSize int32) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.installedSize = &installedSize + return r +} + +// Number of results to return per page. +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Limit(limit int32) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.limit = &limit + return r +} + +// Filter results where maintainer matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Maintainer(maintainer string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.maintainer = &maintainer + return r +} + +// Filter results where multi_arch matches value * `no` - no * `same` - same * `foreign` - foreign * `allowed` - allowed +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) MultiArch(multiArch string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.multiArch = &multiArch + return r +} + +// The initial index from which to return the results. +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Offset(offset int32) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `package` - Package * `-package` - Package (descending) * `source` - Source * `-source` - Source (descending) * `version` - Version * `-version` - Version (descending) * `architecture` - Architecture * `-architecture` - Architecture (descending) * `section` - Section * `-section` - Section (descending) * `priority` - Priority * `-priority` - Priority (descending) * `origin` - Origin * `-origin` - Origin (descending) * `tag` - Tag * `-tag` - Tag (descending) * `bugs` - Bugs * `-bugs` - Bugs (descending) * `essential` - Essential * `-essential` - Essential (descending) * `build_essential` - Build essential * `-build_essential` - Build essential (descending) * `installed_size` - Installed size * `-installed_size` - Installed size (descending) * `maintainer` - Maintainer * `-maintainer` - Maintainer (descending) * `original_maintainer` - Original maintainer * `-original_maintainer` - Original maintainer (descending) * `description` - Description * `-description` - Description (descending) * `description_md5` - Description md5 * `-description_md5` - Description md5 (descending) * `homepage` - Homepage * `-homepage` - Homepage (descending) * `built_using` - Built using * `-built_using` - Built using (descending) * `auto_built_package` - Auto built package * `-auto_built_package` - Auto built package (descending) * `multi_arch` - Multi arch * `-multi_arch` - Multi arch (descending) * `breaks` - Breaks * `-breaks` - Breaks (descending) * `conflicts` - Conflicts * `-conflicts` - Conflicts (descending) * `depends` - Depends * `-depends` - Depends (descending) * `recommends` - Recommends * `-recommends` - Recommends (descending) * `suggests` - Suggests * `-suggests` - Suggests (descending) * `enhances` - Enhances * `-enhances` - Enhances (descending) * `pre_depends` - Pre depends * `-pre_depends` - Pre depends (descending) * `provides` - Provides * `-provides` - Provides (descending) * `replaces` - Replaces * `-replaces` - Replaces (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `sha256` - Sha256 * `-sha256` - Sha256 (descending) * `custom_fields` - Custom fields * `-custom_fields` - Custom fields (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Ordering(ordering []string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.ordering = &ordering + return r +} + +// Filter results where origin matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Origin(origin string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.origin = &origin + return r +} + +// Filter results where original_maintainer matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) OriginalMaintainer(originalMaintainer string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.originalMaintainer = &originalMaintainer + return r +} + +// Filter results where package matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Package_(package_ string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.package_ = &package_ + return r +} + +// Filter results where priority matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Priority(priority string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.priority = &priority + return r +} + +// Multiple values may be separated by commas. +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) PulpHrefIn(pulpHrefIn []string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) PulpIdIn(pulpIdIn []string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) RepositoryVersion(repositoryVersion string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where section matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Section(section string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.section = §ion + return r +} + +// Filter results where sha256 matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Sha256(sha256 string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.sha256 = &sha256 + return r +} + +// Filter results where source matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Source(source string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.source = &source + return r +} + +// Filter results where tag matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Tag(tag string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.tag = &tag + return r +} + +// Filter results where version matches value +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Version(version string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.version = &version + return r +} + +// A list of fields to include in the response. +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Fields(fields []string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) ExcludeFields(excludeFields []string) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) Execute() (*PaginateddebInstallerPackageResponseList, *http.Response, error) { + return r.ApiService.ContentDebInstallerPackagesListExecute(r) +} + +/* +ContentDebInstallerPackagesList List installer packages + +An InstallerPackage represents a '.udeb' installer package. + +Associated artifacts: Exactly one '.udeb' installer package file. + +Note that installer packages are currently used exclusively for verbatim publications. The APT +publisher (both simple and structured mode) will not include these packages. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest +*/ +func (a *ContentInstallerPackagesAPIService) ContentDebInstallerPackagesList(ctx context.Context) ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest { + return ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebInstallerPackageResponseList +func (a *ContentInstallerPackagesAPIService) ContentDebInstallerPackagesListExecute(r ContentInstallerPackagesAPIContentDebInstallerPackagesListRequest) (*PaginateddebInstallerPackageResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebInstallerPackageResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentInstallerPackagesAPIService.ContentDebInstallerPackagesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/installer_packages/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.architecture != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "architecture", r.architecture, "") + } + if r.autoBuiltPackage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "auto_built_package", r.autoBuiltPackage, "") + } + if r.buildEssential != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "build_essential", r.buildEssential, "") + } + if r.builtUsing != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "built_using", r.builtUsing, "") + } + if r.essential != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "essential", r.essential, "") + } + if r.installedSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "installed_size", r.installedSize, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.maintainer != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "maintainer", r.maintainer, "") + } + if r.multiArch != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "multi_arch", r.multiArch, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.origin != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "origin", r.origin, "") + } + if r.originalMaintainer != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "original_maintainer", r.originalMaintainer, "") + } + if r.package_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "package", r.package_, "") + } + if r.priority != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "priority", r.priority, "") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.section != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "section", r.section, "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256", r.sha256, "") + } + if r.source != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "source", r.source, "") + } + if r.tag != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "tag", r.tag, "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentInstallerPackagesAPIContentDebInstallerPackagesReadRequest struct { + ctx context.Context + ApiService *ContentInstallerPackagesAPIService + debInstallerPackageHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesReadRequest) Fields(fields []string) ContentInstallerPackagesAPIContentDebInstallerPackagesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesReadRequest) ExcludeFields(excludeFields []string) ContentInstallerPackagesAPIContentDebInstallerPackagesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentInstallerPackagesAPIContentDebInstallerPackagesReadRequest) Execute() (*DebInstallerPackageResponse, *http.Response, error) { + return r.ApiService.ContentDebInstallerPackagesReadExecute(r) +} + +/* +ContentDebInstallerPackagesRead Inspect an installer package + +An InstallerPackage represents a '.udeb' installer package. + +Associated artifacts: Exactly one '.udeb' installer package file. + +Note that installer packages are currently used exclusively for verbatim publications. The APT +publisher (both simple and structured mode) will not include these packages. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debInstallerPackageHref + @return ContentInstallerPackagesAPIContentDebInstallerPackagesReadRequest +*/ +func (a *ContentInstallerPackagesAPIService) ContentDebInstallerPackagesRead(ctx context.Context, debInstallerPackageHref string) ContentInstallerPackagesAPIContentDebInstallerPackagesReadRequest { + return ContentInstallerPackagesAPIContentDebInstallerPackagesReadRequest{ + ApiService: a, + ctx: ctx, + debInstallerPackageHref: debInstallerPackageHref, + } +} + +// Execute executes the request +// @return DebInstallerPackageResponse +func (a *ContentInstallerPackagesAPIService) ContentDebInstallerPackagesReadExecute(r ContentInstallerPackagesAPIContentDebInstallerPackagesReadRequest) (*DebInstallerPackageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebInstallerPackageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentInstallerPackagesAPIService.ContentDebInstallerPackagesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_installer_package_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_installer_package_href"+"}", parameterValueToString(r.debInstallerPackageHref, "debInstallerPackageHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_manifests.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_manifests.go new file mode 100644 index 0000000000..276e605ffe --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_manifests.go @@ -0,0 +1,418 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentManifestsAPIService ContentManifestsAPI service +type ContentManifestsAPIService service + +type ContentManifestsAPIContentContainerManifestsListRequest struct { + ctx context.Context + ApiService *ContentManifestsAPIService + digest *string + digestIn *[]string + limit *int32 + mediaType *[]string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Filter results where digest matches value +func (r ContentManifestsAPIContentContainerManifestsListRequest) Digest(digest string) ContentManifestsAPIContentContainerManifestsListRequest { + r.digest = &digest + return r +} + +// Filter results where digest is in a comma-separated list of values +func (r ContentManifestsAPIContentContainerManifestsListRequest) DigestIn(digestIn []string) ContentManifestsAPIContentContainerManifestsListRequest { + r.digestIn = &digestIn + return r +} + +// Number of results to return per page. +func (r ContentManifestsAPIContentContainerManifestsListRequest) Limit(limit int32) ContentManifestsAPIContentContainerManifestsListRequest { + r.limit = &limit + return r +} + +// * `application/vnd.docker.distribution.manifest.v1+json` - application/vnd.docker.distribution.manifest.v1+json * `application/vnd.docker.distribution.manifest.v2+json` - application/vnd.docker.distribution.manifest.v2+json * `application/vnd.docker.distribution.manifest.list.v2+json` - application/vnd.docker.distribution.manifest.list.v2+json * `application/vnd.oci.image.manifest.v1+json` - application/vnd.oci.image.manifest.v1+json * `application/vnd.oci.image.index.v1+json` - application/vnd.oci.image.index.v1+json +func (r ContentManifestsAPIContentContainerManifestsListRequest) MediaType(mediaType []string) ContentManifestsAPIContentContainerManifestsListRequest { + r.mediaType = &mediaType + return r +} + +// The initial index from which to return the results. +func (r ContentManifestsAPIContentContainerManifestsListRequest) Offset(offset int32) ContentManifestsAPIContentContainerManifestsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `digest` - Digest * `-digest` - Digest (descending) * `schema_version` - Schema version * `-schema_version` - Schema version (descending) * `media_type` - Media type * `-media_type` - Media type (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentManifestsAPIContentContainerManifestsListRequest) Ordering(ordering []string) ContentManifestsAPIContentContainerManifestsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentManifestsAPIContentContainerManifestsListRequest) PulpHrefIn(pulpHrefIn []string) ContentManifestsAPIContentContainerManifestsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentManifestsAPIContentContainerManifestsListRequest) PulpIdIn(pulpIdIn []string) ContentManifestsAPIContentContainerManifestsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentManifestsAPIContentContainerManifestsListRequest) RepositoryVersion(repositoryVersion string) ContentManifestsAPIContentContainerManifestsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentManifestsAPIContentContainerManifestsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentManifestsAPIContentContainerManifestsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentManifestsAPIContentContainerManifestsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentManifestsAPIContentContainerManifestsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentManifestsAPIContentContainerManifestsListRequest) Fields(fields []string) ContentManifestsAPIContentContainerManifestsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentManifestsAPIContentContainerManifestsListRequest) ExcludeFields(excludeFields []string) ContentManifestsAPIContentContainerManifestsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentManifestsAPIContentContainerManifestsListRequest) Execute() (*PaginatedcontainerManifestResponseList, *http.Response, error) { + return r.ApiService.ContentContainerManifestsListExecute(r) +} + +/* +ContentContainerManifestsList List manifests + +ViewSet for Manifest. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentManifestsAPIContentContainerManifestsListRequest +*/ +func (a *ContentManifestsAPIService) ContentContainerManifestsList(ctx context.Context) ContentManifestsAPIContentContainerManifestsListRequest { + return ContentManifestsAPIContentContainerManifestsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedcontainerManifestResponseList +func (a *ContentManifestsAPIService) ContentContainerManifestsListExecute(r ContentManifestsAPIContentContainerManifestsListRequest) (*PaginatedcontainerManifestResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedcontainerManifestResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentManifestsAPIService.ContentContainerManifestsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/container/manifests/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.digest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "digest", r.digest, "") + } + if r.digestIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "digest__in", r.digestIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.mediaType != nil { + t := *r.mediaType + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "media_type", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "media_type", t, "multi") + } + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentManifestsAPIContentContainerManifestsReadRequest struct { + ctx context.Context + ApiService *ContentManifestsAPIService + containerManifestHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentManifestsAPIContentContainerManifestsReadRequest) Fields(fields []string) ContentManifestsAPIContentContainerManifestsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentManifestsAPIContentContainerManifestsReadRequest) ExcludeFields(excludeFields []string) ContentManifestsAPIContentContainerManifestsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentManifestsAPIContentContainerManifestsReadRequest) Execute() (*ContainerManifestResponse, *http.Response, error) { + return r.ApiService.ContentContainerManifestsReadExecute(r) +} + +/* +ContentContainerManifestsRead Inspect a manifest + +ViewSet for Manifest. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerManifestHref + @return ContentManifestsAPIContentContainerManifestsReadRequest +*/ +func (a *ContentManifestsAPIService) ContentContainerManifestsRead(ctx context.Context, containerManifestHref string) ContentManifestsAPIContentContainerManifestsReadRequest { + return ContentManifestsAPIContentContainerManifestsReadRequest{ + ApiService: a, + ctx: ctx, + containerManifestHref: containerManifestHref, + } +} + +// Execute executes the request +// @return ContainerManifestResponse +func (a *ContentManifestsAPIService) ContentContainerManifestsReadExecute(r ContentManifestsAPIContentContainerManifestsReadRequest) (*ContainerManifestResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContainerManifestResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentManifestsAPIService.ContentContainerManifestsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_manifest_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_manifest_href"+"}", parameterValueToString(r.containerManifestHref, "containerManifestHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_modulemd_defaults.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_modulemd_defaults.go new file mode 100644 index 0000000000..7aee4479f2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_modulemd_defaults.go @@ -0,0 +1,539 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentModulemdDefaultsAPIService ContentModulemdDefaultsAPI service +type ContentModulemdDefaultsAPIService service + +type ContentModulemdDefaultsAPIContentRpmModulemdDefaultsCreateRequest struct { + ctx context.Context + ApiService *ContentModulemdDefaultsAPIService + rpmModulemdDefaults *RpmModulemdDefaults +} + +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsCreateRequest) RpmModulemdDefaults(rpmModulemdDefaults RpmModulemdDefaults) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsCreateRequest { + r.rpmModulemdDefaults = &rpmModulemdDefaults + return r +} + +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ContentRpmModulemdDefaultsCreateExecute(r) +} + +/* +ContentRpmModulemdDefaultsCreate Create a modulemd defaults + +Trigger an asynchronous task to create content,optionally create new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentModulemdDefaultsAPIContentRpmModulemdDefaultsCreateRequest +*/ +func (a *ContentModulemdDefaultsAPIService) ContentRpmModulemdDefaultsCreate(ctx context.Context) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsCreateRequest { + return ContentModulemdDefaultsAPIContentRpmModulemdDefaultsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ContentModulemdDefaultsAPIService) ContentRpmModulemdDefaultsCreateExecute(r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentModulemdDefaultsAPIService.ContentRpmModulemdDefaultsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/modulemd_defaults/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmModulemdDefaults == nil { + return localVarReturnValue, nil, reportError("rpmModulemdDefaults is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmModulemdDefaults + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest struct { + ctx context.Context + ApiService *ContentModulemdDefaultsAPIService + limit *int32 + module *string + moduleIn *[]string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + sha256 *string + stream *string + streamIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) Limit(limit int32) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.limit = &limit + return r +} + +// Filter results where module matches value +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) Module(module string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.module = &module + return r +} + +// Filter results where module is in a comma-separated list of values +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) ModuleIn(moduleIn []string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.moduleIn = &moduleIn + return r +} + +// The initial index from which to return the results. +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) Offset(offset int32) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `module` - Module * `-module` - Module (descending) * `stream` - Stream * `-stream` - Stream (descending) * `profiles` - Profiles * `-profiles` - Profiles (descending) * `digest` - Digest * `-digest` - Digest (descending) * `snippet` - Snippet * `-snippet` - Snippet (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) Ordering(ordering []string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) PulpHrefIn(pulpHrefIn []string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) PulpIdIn(pulpIdIn []string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) RepositoryVersion(repositoryVersion string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) Sha256(sha256 string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.sha256 = &sha256 + return r +} + +// Filter results where stream matches value +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) Stream(stream string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.stream = &stream + return r +} + +// Filter results where stream is in a comma-separated list of values +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) StreamIn(streamIn []string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.streamIn = &streamIn + return r +} + +// A list of fields to include in the response. +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) Fields(fields []string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) ExcludeFields(excludeFields []string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) Execute() (*PaginatedrpmModulemdDefaultsResponseList, *http.Response, error) { + return r.ApiService.ContentRpmModulemdDefaultsListExecute(r) +} + +/* +ContentRpmModulemdDefaultsList List modulemd defaultss + +ViewSet for Modulemd. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest +*/ +func (a *ContentModulemdDefaultsAPIService) ContentRpmModulemdDefaultsList(ctx context.Context) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest { + return ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmModulemdDefaultsResponseList +func (a *ContentModulemdDefaultsAPIService) ContentRpmModulemdDefaultsListExecute(r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsListRequest) (*PaginatedrpmModulemdDefaultsResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmModulemdDefaultsResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentModulemdDefaultsAPIService.ContentRpmModulemdDefaultsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/modulemd_defaults/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.module != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "module", r.module, "") + } + if r.moduleIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "module__in", r.moduleIn, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256", r.sha256, "") + } + if r.stream != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "stream", r.stream, "") + } + if r.streamIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "stream__in", r.streamIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentModulemdDefaultsAPIContentRpmModulemdDefaultsReadRequest struct { + ctx context.Context + ApiService *ContentModulemdDefaultsAPIService + rpmModulemdDefaultsHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsReadRequest) Fields(fields []string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsReadRequest) ExcludeFields(excludeFields []string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsReadRequest) Execute() (*RpmModulemdDefaultsResponse, *http.Response, error) { + return r.ApiService.ContentRpmModulemdDefaultsReadExecute(r) +} + +/* +ContentRpmModulemdDefaultsRead Inspect a modulemd defaults + +ViewSet for Modulemd. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmModulemdDefaultsHref + @return ContentModulemdDefaultsAPIContentRpmModulemdDefaultsReadRequest +*/ +func (a *ContentModulemdDefaultsAPIService) ContentRpmModulemdDefaultsRead(ctx context.Context, rpmModulemdDefaultsHref string) ContentModulemdDefaultsAPIContentRpmModulemdDefaultsReadRequest { + return ContentModulemdDefaultsAPIContentRpmModulemdDefaultsReadRequest{ + ApiService: a, + ctx: ctx, + rpmModulemdDefaultsHref: rpmModulemdDefaultsHref, + } +} + +// Execute executes the request +// @return RpmModulemdDefaultsResponse +func (a *ContentModulemdDefaultsAPIService) ContentRpmModulemdDefaultsReadExecute(r ContentModulemdDefaultsAPIContentRpmModulemdDefaultsReadRequest) (*RpmModulemdDefaultsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmModulemdDefaultsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentModulemdDefaultsAPIService.ContentRpmModulemdDefaultsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_modulemd_defaults_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_modulemd_defaults_href"+"}", parameterValueToString(r.rpmModulemdDefaultsHref, "rpmModulemdDefaultsHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_modulemd_obsoletes.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_modulemd_obsoletes.go new file mode 100644 index 0000000000..abf4669380 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_modulemd_obsoletes.go @@ -0,0 +1,490 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentModulemdObsoletesAPIService ContentModulemdObsoletesAPI service +type ContentModulemdObsoletesAPIService service + +type ContentModulemdObsoletesAPIContentRpmModulemdObsoletesCreateRequest struct { + ctx context.Context + ApiService *ContentModulemdObsoletesAPIService + rpmModulemdObsolete *RpmModulemdObsolete +} + +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesCreateRequest) RpmModulemdObsolete(rpmModulemdObsolete RpmModulemdObsolete) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesCreateRequest { + r.rpmModulemdObsolete = &rpmModulemdObsolete + return r +} + +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ContentRpmModulemdObsoletesCreateExecute(r) +} + +/* +ContentRpmModulemdObsoletesCreate Create a modulemd obsolete + +Trigger an asynchronous task to create content,optionally create new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentModulemdObsoletesAPIContentRpmModulemdObsoletesCreateRequest +*/ +func (a *ContentModulemdObsoletesAPIService) ContentRpmModulemdObsoletesCreate(ctx context.Context) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesCreateRequest { + return ContentModulemdObsoletesAPIContentRpmModulemdObsoletesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ContentModulemdObsoletesAPIService) ContentRpmModulemdObsoletesCreateExecute(r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentModulemdObsoletesAPIService.ContentRpmModulemdObsoletesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/modulemd_obsoletes/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmModulemdObsolete == nil { + return localVarReturnValue, nil, reportError("rpmModulemdObsolete is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmModulemdObsolete + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest struct { + ctx context.Context + ApiService *ContentModulemdObsoletesAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest) Limit(limit int32) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest) Offset(offset int32) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest) Ordering(ordering []string) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest) PulpHrefIn(pulpHrefIn []string) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest) PulpIdIn(pulpIdIn []string) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest) RepositoryVersion(repositoryVersion string) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest) Fields(fields []string) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest) ExcludeFields(excludeFields []string) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest) Execute() (*PaginatedrpmModulemdObsoleteResponseList, *http.Response, error) { + return r.ApiService.ContentRpmModulemdObsoletesListExecute(r) +} + +/* +ContentRpmModulemdObsoletesList List modulemd obsoletes + +ViewSet for Modulemd. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest +*/ +func (a *ContentModulemdObsoletesAPIService) ContentRpmModulemdObsoletesList(ctx context.Context) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest { + return ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmModulemdObsoleteResponseList +func (a *ContentModulemdObsoletesAPIService) ContentRpmModulemdObsoletesListExecute(r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesListRequest) (*PaginatedrpmModulemdObsoleteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmModulemdObsoleteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentModulemdObsoletesAPIService.ContentRpmModulemdObsoletesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/modulemd_obsoletes/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentModulemdObsoletesAPIContentRpmModulemdObsoletesReadRequest struct { + ctx context.Context + ApiService *ContentModulemdObsoletesAPIService + rpmModulemdObsoleteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesReadRequest) Fields(fields []string) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesReadRequest) ExcludeFields(excludeFields []string) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesReadRequest) Execute() (*RpmModulemdObsoleteResponse, *http.Response, error) { + return r.ApiService.ContentRpmModulemdObsoletesReadExecute(r) +} + +/* +ContentRpmModulemdObsoletesRead Inspect a modulemd obsolete + +ViewSet for Modulemd. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmModulemdObsoleteHref + @return ContentModulemdObsoletesAPIContentRpmModulemdObsoletesReadRequest +*/ +func (a *ContentModulemdObsoletesAPIService) ContentRpmModulemdObsoletesRead(ctx context.Context, rpmModulemdObsoleteHref string) ContentModulemdObsoletesAPIContentRpmModulemdObsoletesReadRequest { + return ContentModulemdObsoletesAPIContentRpmModulemdObsoletesReadRequest{ + ApiService: a, + ctx: ctx, + rpmModulemdObsoleteHref: rpmModulemdObsoleteHref, + } +} + +// Execute executes the request +// @return RpmModulemdObsoleteResponse +func (a *ContentModulemdObsoletesAPIService) ContentRpmModulemdObsoletesReadExecute(r ContentModulemdObsoletesAPIContentRpmModulemdObsoletesReadRequest) (*RpmModulemdObsoleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmModulemdObsoleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentModulemdObsoletesAPIService.ContentRpmModulemdObsoletesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_modulemd_obsolete_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_modulemd_obsolete_href"+"}", parameterValueToString(r.rpmModulemdObsoleteHref, "rpmModulemdObsoleteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_modulemds.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_modulemds.go new file mode 100644 index 0000000000..1b4d2776af --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_modulemds.go @@ -0,0 +1,599 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentModulemdsAPIService ContentModulemdsAPI service +type ContentModulemdsAPIService service + +type ContentModulemdsAPIContentRpmModulemdsCreateRequest struct { + ctx context.Context + ApiService *ContentModulemdsAPIService + rpmModulemd *RpmModulemd +} + +func (r ContentModulemdsAPIContentRpmModulemdsCreateRequest) RpmModulemd(rpmModulemd RpmModulemd) ContentModulemdsAPIContentRpmModulemdsCreateRequest { + r.rpmModulemd = &rpmModulemd + return r +} + +func (r ContentModulemdsAPIContentRpmModulemdsCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ContentRpmModulemdsCreateExecute(r) +} + +/* +ContentRpmModulemdsCreate Create a modulemd + +Trigger an asynchronous task to create content,optionally create new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentModulemdsAPIContentRpmModulemdsCreateRequest +*/ +func (a *ContentModulemdsAPIService) ContentRpmModulemdsCreate(ctx context.Context) ContentModulemdsAPIContentRpmModulemdsCreateRequest { + return ContentModulemdsAPIContentRpmModulemdsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ContentModulemdsAPIService) ContentRpmModulemdsCreateExecute(r ContentModulemdsAPIContentRpmModulemdsCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentModulemdsAPIService.ContentRpmModulemdsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/modulemds/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmModulemd == nil { + return localVarReturnValue, nil, reportError("rpmModulemd is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmModulemd + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentModulemdsAPIContentRpmModulemdsListRequest struct { + ctx context.Context + ApiService *ContentModulemdsAPIService + arch *string + archIn *[]string + context *string + contextIn *[]string + limit *int32 + name *string + nameIn *[]string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + sha256 *string + stream *string + streamIn *[]string + version *string + versionIn *[]string + fields *[]string + excludeFields *[]string +} + +// Filter results where arch matches value +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) Arch(arch string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.arch = &arch + return r +} + +// Filter results where arch is in a comma-separated list of values +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) ArchIn(archIn []string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.archIn = &archIn + return r +} + +// Filter results where context matches value +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) Context(context string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.context = &context + return r +} + +// Filter results where context is in a comma-separated list of values +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) ContextIn(contextIn []string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.contextIn = &contextIn + return r +} + +// Number of results to return per page. +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) Limit(limit int32) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) Name(name string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.name = &name + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) NameIn(nameIn []string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.nameIn = &nameIn + return r +} + +// The initial index from which to return the results. +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) Offset(offset int32) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `stream` - Stream * `-stream` - Stream (descending) * `version` - Version * `-version` - Version (descending) * `context` - Context * `-context` - Context (descending) * `arch` - Arch * `-arch` - Arch (descending) * `static_context` - Static context * `-static_context` - Static context (descending) * `dependencies` - Dependencies * `-dependencies` - Dependencies (descending) * `artifacts` - Artifacts * `-artifacts` - Artifacts (descending) * `profiles` - Profiles * `-profiles` - Profiles (descending) * `description` - Description * `-description` - Description (descending) * `snippet` - Snippet * `-snippet` - Snippet (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) Ordering(ordering []string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) PulpHrefIn(pulpHrefIn []string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) PulpIdIn(pulpIdIn []string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) RepositoryVersion(repositoryVersion string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) Sha256(sha256 string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.sha256 = &sha256 + return r +} + +// Filter results where stream matches value +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) Stream(stream string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.stream = &stream + return r +} + +// Filter results where stream is in a comma-separated list of values +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) StreamIn(streamIn []string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.streamIn = &streamIn + return r +} + +// Filter results where version matches value +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) Version(version string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.version = &version + return r +} + +// Filter results where version is in a comma-separated list of values +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) VersionIn(versionIn []string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.versionIn = &versionIn + return r +} + +// A list of fields to include in the response. +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) Fields(fields []string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) ExcludeFields(excludeFields []string) ContentModulemdsAPIContentRpmModulemdsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentModulemdsAPIContentRpmModulemdsListRequest) Execute() (*PaginatedrpmModulemdResponseList, *http.Response, error) { + return r.ApiService.ContentRpmModulemdsListExecute(r) +} + +/* +ContentRpmModulemdsList List modulemds + +ViewSet for Modulemd. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentModulemdsAPIContentRpmModulemdsListRequest +*/ +func (a *ContentModulemdsAPIService) ContentRpmModulemdsList(ctx context.Context) ContentModulemdsAPIContentRpmModulemdsListRequest { + return ContentModulemdsAPIContentRpmModulemdsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmModulemdResponseList +func (a *ContentModulemdsAPIService) ContentRpmModulemdsListExecute(r ContentModulemdsAPIContentRpmModulemdsListRequest) (*PaginatedrpmModulemdResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmModulemdResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentModulemdsAPIService.ContentRpmModulemdsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/modulemds/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.arch != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "arch", r.arch, "") + } + if r.archIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "arch__in", r.archIn, "csv") + } + if r.context != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "context", r.context, "") + } + if r.contextIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "context__in", r.contextIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256", r.sha256, "") + } + if r.stream != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "stream", r.stream, "") + } + if r.streamIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "stream__in", r.streamIn, "csv") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.versionIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version__in", r.versionIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentModulemdsAPIContentRpmModulemdsReadRequest struct { + ctx context.Context + ApiService *ContentModulemdsAPIService + rpmModulemdHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentModulemdsAPIContentRpmModulemdsReadRequest) Fields(fields []string) ContentModulemdsAPIContentRpmModulemdsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentModulemdsAPIContentRpmModulemdsReadRequest) ExcludeFields(excludeFields []string) ContentModulemdsAPIContentRpmModulemdsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentModulemdsAPIContentRpmModulemdsReadRequest) Execute() (*RpmModulemdResponse, *http.Response, error) { + return r.ApiService.ContentRpmModulemdsReadExecute(r) +} + +/* +ContentRpmModulemdsRead Inspect a modulemd + +ViewSet for Modulemd. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmModulemdHref + @return ContentModulemdsAPIContentRpmModulemdsReadRequest +*/ +func (a *ContentModulemdsAPIService) ContentRpmModulemdsRead(ctx context.Context, rpmModulemdHref string) ContentModulemdsAPIContentRpmModulemdsReadRequest { + return ContentModulemdsAPIContentRpmModulemdsReadRequest{ + ApiService: a, + ctx: ctx, + rpmModulemdHref: rpmModulemdHref, + } +} + +// Execute executes the request +// @return RpmModulemdResponse +func (a *ContentModulemdsAPIService) ContentRpmModulemdsReadExecute(r ContentModulemdsAPIContentRpmModulemdsReadRequest) (*RpmModulemdResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmModulemdResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentModulemdsAPIService.ContentRpmModulemdsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_modulemd_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_modulemd_href"+"}", parameterValueToString(r.rpmModulemdHref, "rpmModulemdHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_namespaces.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_namespaces.go new file mode 100644 index 0000000000..b882fd3e8d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_namespaces.go @@ -0,0 +1,638 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentNamespacesAPIService ContentNamespacesAPI service +type ContentNamespacesAPIService service + +type ContentNamespacesAPIContentAnsibleNamespacesAvatarRequest struct { + ctx context.Context + ApiService *ContentNamespacesAPIService + ansibleAnsibleNamespaceMetadataHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentNamespacesAPIContentAnsibleNamespacesAvatarRequest) Fields(fields []string) ContentNamespacesAPIContentAnsibleNamespacesAvatarRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentNamespacesAPIContentAnsibleNamespacesAvatarRequest) ExcludeFields(excludeFields []string) ContentNamespacesAPIContentAnsibleNamespacesAvatarRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentNamespacesAPIContentAnsibleNamespacesAvatarRequest) Execute() (*http.Response, error) { + return r.ApiService.ContentAnsibleNamespacesAvatarExecute(r) +} + +/* +ContentAnsibleNamespacesAvatar Method for ContentAnsibleNamespacesAvatar + +Get the logo for the this namespace. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleNamespaceMetadataHref + @return ContentNamespacesAPIContentAnsibleNamespacesAvatarRequest +*/ +func (a *ContentNamespacesAPIService) ContentAnsibleNamespacesAvatar(ctx context.Context, ansibleAnsibleNamespaceMetadataHref string) ContentNamespacesAPIContentAnsibleNamespacesAvatarRequest { + return ContentNamespacesAPIContentAnsibleNamespacesAvatarRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleNamespaceMetadataHref: ansibleAnsibleNamespaceMetadataHref, + } +} + +// Execute executes the request +func (a *ContentNamespacesAPIService) ContentAnsibleNamespacesAvatarExecute(r ContentNamespacesAPIContentAnsibleNamespacesAvatarRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentNamespacesAPIService.ContentAnsibleNamespacesAvatar") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_namespace_metadata_href}avatar/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_namespace_metadata_href"+"}", parameterValueToString(r.ansibleAnsibleNamespaceMetadataHref, "ansibleAnsibleNamespaceMetadataHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 302 { + var v map[string]interface{} + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ContentNamespacesAPIContentAnsibleNamespacesListRequest struct { + ctx context.Context + ApiService *ContentNamespacesAPIService + company *string + companyContains *string + companyIcontains *string + companyIn *[]string + companyStartswith *string + limit *int32 + metadataSha256 *string + metadataSha256In *[]string + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Filter results where company matches value +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) Company(company string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.company = &company + return r +} + +// Filter results where company contains value +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) CompanyContains(companyContains string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.companyContains = &companyContains + return r +} + +// Filter results where company contains value +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) CompanyIcontains(companyIcontains string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.companyIcontains = &companyIcontains + return r +} + +// Filter results where company is in a comma-separated list of values +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) CompanyIn(companyIn []string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.companyIn = &companyIn + return r +} + +// Filter results where company starts with value +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) CompanyStartswith(companyStartswith string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.companyStartswith = &companyStartswith + return r +} + +// Number of results to return per page. +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) Limit(limit int32) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.limit = &limit + return r +} + +// Filter results where metadata_sha256 matches value +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) MetadataSha256(metadataSha256 string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.metadataSha256 = &metadataSha256 + return r +} + +// Filter results where metadata_sha256 is in a comma-separated list of values +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) MetadataSha256In(metadataSha256In []string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.metadataSha256In = &metadataSha256In + return r +} + +// Filter results where name matches value +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) Name(name string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) NameContains(nameContains string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) NameIcontains(nameIcontains string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) NameIn(nameIn []string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) NameStartswith(nameStartswith string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) Offset(offset int32) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `company` - Company * `-company` - Company (descending) * `email` - Email * `-email` - Email (descending) * `description` - Description * `-description` - Description (descending) * `resources` - Resources * `-resources` - Resources (descending) * `links` - Links * `-links` - Links (descending) * `avatar_sha256` - Avatar sha256 * `-avatar_sha256` - Avatar sha256 (descending) * `metadata_sha256` - Metadata sha256 * `-metadata_sha256` - Metadata sha256 (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) Ordering(ordering []string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) PulpHrefIn(pulpHrefIn []string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) PulpIdIn(pulpIdIn []string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) RepositoryVersion(repositoryVersion string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) Fields(fields []string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) ExcludeFields(excludeFields []string) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentNamespacesAPIContentAnsibleNamespacesListRequest) Execute() (*PaginatedansibleAnsibleNamespaceMetadataResponseList, *http.Response, error) { + return r.ApiService.ContentAnsibleNamespacesListExecute(r) +} + +/* +ContentAnsibleNamespacesList List ansible namespace metadatas + +ViewSet for AnsibleNamespace. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentNamespacesAPIContentAnsibleNamespacesListRequest +*/ +func (a *ContentNamespacesAPIService) ContentAnsibleNamespacesList(ctx context.Context) ContentNamespacesAPIContentAnsibleNamespacesListRequest { + return ContentNamespacesAPIContentAnsibleNamespacesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedansibleAnsibleNamespaceMetadataResponseList +func (a *ContentNamespacesAPIService) ContentAnsibleNamespacesListExecute(r ContentNamespacesAPIContentAnsibleNamespacesListRequest) (*PaginatedansibleAnsibleNamespaceMetadataResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleAnsibleNamespaceMetadataResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentNamespacesAPIService.ContentAnsibleNamespacesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ansible/namespaces/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.company != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company", r.company, "") + } + if r.companyContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__contains", r.companyContains, "") + } + if r.companyIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__icontains", r.companyIcontains, "") + } + if r.companyIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__in", r.companyIn, "csv") + } + if r.companyStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__startswith", r.companyStartswith, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.metadataSha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "metadata_sha256", r.metadataSha256, "") + } + if r.metadataSha256In != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "metadata_sha256__in", r.metadataSha256In, "csv") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentNamespacesAPIContentAnsibleNamespacesReadRequest struct { + ctx context.Context + ApiService *ContentNamespacesAPIService + ansibleAnsibleNamespaceMetadataHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentNamespacesAPIContentAnsibleNamespacesReadRequest) Fields(fields []string) ContentNamespacesAPIContentAnsibleNamespacesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentNamespacesAPIContentAnsibleNamespacesReadRequest) ExcludeFields(excludeFields []string) ContentNamespacesAPIContentAnsibleNamespacesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentNamespacesAPIContentAnsibleNamespacesReadRequest) Execute() (*AnsibleAnsibleNamespaceMetadataResponse, *http.Response, error) { + return r.ApiService.ContentAnsibleNamespacesReadExecute(r) +} + +/* +ContentAnsibleNamespacesRead Inspect an ansible namespace metadata + +ViewSet for AnsibleNamespace. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleNamespaceMetadataHref + @return ContentNamespacesAPIContentAnsibleNamespacesReadRequest +*/ +func (a *ContentNamespacesAPIService) ContentAnsibleNamespacesRead(ctx context.Context, ansibleAnsibleNamespaceMetadataHref string) ContentNamespacesAPIContentAnsibleNamespacesReadRequest { + return ContentNamespacesAPIContentAnsibleNamespacesReadRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleNamespaceMetadataHref: ansibleAnsibleNamespaceMetadataHref, + } +} + +// Execute executes the request +// @return AnsibleAnsibleNamespaceMetadataResponse +func (a *ContentNamespacesAPIService) ContentAnsibleNamespacesReadExecute(r ContentNamespacesAPIContentAnsibleNamespacesReadRequest) (*AnsibleAnsibleNamespaceMetadataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleAnsibleNamespaceMetadataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentNamespacesAPIService.ContentAnsibleNamespacesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_namespace_metadata_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_namespace_metadata_href"+"}", parameterValueToString(r.ansibleAnsibleNamespaceMetadataHref, "ansibleAnsibleNamespaceMetadataHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_objects.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_objects.go new file mode 100644 index 0000000000..b3e160e0de --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_objects.go @@ -0,0 +1,390 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentObjectsAPIService ContentObjectsAPI service +type ContentObjectsAPIService service + +type ContentObjectsAPIContentOstreeObjectsListRequest struct { + ctx context.Context + ApiService *ContentObjectsAPIService + checksum *string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Filter results where checksum matches value +func (r ContentObjectsAPIContentOstreeObjectsListRequest) Checksum(checksum string) ContentObjectsAPIContentOstreeObjectsListRequest { + r.checksum = &checksum + return r +} + +// Number of results to return per page. +func (r ContentObjectsAPIContentOstreeObjectsListRequest) Limit(limit int32) ContentObjectsAPIContentOstreeObjectsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentObjectsAPIContentOstreeObjectsListRequest) Offset(offset int32) ContentObjectsAPIContentOstreeObjectsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `typ` - Typ * `-typ` - Typ (descending) * `checksum` - Checksum * `-checksum` - Checksum (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentObjectsAPIContentOstreeObjectsListRequest) Ordering(ordering []string) ContentObjectsAPIContentOstreeObjectsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentObjectsAPIContentOstreeObjectsListRequest) PulpHrefIn(pulpHrefIn []string) ContentObjectsAPIContentOstreeObjectsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentObjectsAPIContentOstreeObjectsListRequest) PulpIdIn(pulpIdIn []string) ContentObjectsAPIContentOstreeObjectsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentObjectsAPIContentOstreeObjectsListRequest) RepositoryVersion(repositoryVersion string) ContentObjectsAPIContentOstreeObjectsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentObjectsAPIContentOstreeObjectsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentObjectsAPIContentOstreeObjectsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentObjectsAPIContentOstreeObjectsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentObjectsAPIContentOstreeObjectsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentObjectsAPIContentOstreeObjectsListRequest) Fields(fields []string) ContentObjectsAPIContentOstreeObjectsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentObjectsAPIContentOstreeObjectsListRequest) ExcludeFields(excludeFields []string) ContentObjectsAPIContentOstreeObjectsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentObjectsAPIContentOstreeObjectsListRequest) Execute() (*PaginatedostreeOstreeObjectResponseList, *http.Response, error) { + return r.ApiService.ContentOstreeObjectsListExecute(r) +} + +/* +ContentOstreeObjectsList List ostree objects + +A ViewSet class for OSTree objects (e.g., dirtree, dirmeta, file). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentObjectsAPIContentOstreeObjectsListRequest +*/ +func (a *ContentObjectsAPIService) ContentOstreeObjectsList(ctx context.Context) ContentObjectsAPIContentOstreeObjectsListRequest { + return ContentObjectsAPIContentOstreeObjectsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedostreeOstreeObjectResponseList +func (a *ContentObjectsAPIService) ContentOstreeObjectsListExecute(r ContentObjectsAPIContentOstreeObjectsListRequest) (*PaginatedostreeOstreeObjectResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedostreeOstreeObjectResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentObjectsAPIService.ContentOstreeObjectsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ostree/objects/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.checksum != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "checksum", r.checksum, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentObjectsAPIContentOstreeObjectsReadRequest struct { + ctx context.Context + ApiService *ContentObjectsAPIService + ostreeOstreeObjectHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentObjectsAPIContentOstreeObjectsReadRequest) Fields(fields []string) ContentObjectsAPIContentOstreeObjectsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentObjectsAPIContentOstreeObjectsReadRequest) ExcludeFields(excludeFields []string) ContentObjectsAPIContentOstreeObjectsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentObjectsAPIContentOstreeObjectsReadRequest) Execute() (*OstreeOstreeObjectResponse, *http.Response, error) { + return r.ApiService.ContentOstreeObjectsReadExecute(r) +} + +/* +ContentOstreeObjectsRead Inspect an ostree object + +A ViewSet class for OSTree objects (e.g., dirtree, dirmeta, file). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeObjectHref + @return ContentObjectsAPIContentOstreeObjectsReadRequest +*/ +func (a *ContentObjectsAPIService) ContentOstreeObjectsRead(ctx context.Context, ostreeOstreeObjectHref string) ContentObjectsAPIContentOstreeObjectsReadRequest { + return ContentObjectsAPIContentOstreeObjectsReadRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeObjectHref: ostreeOstreeObjectHref, + } +} + +// Execute executes the request +// @return OstreeOstreeObjectResponse +func (a *ContentObjectsAPIService) ContentOstreeObjectsReadExecute(r ContentObjectsAPIContentOstreeObjectsReadRequest) (*OstreeOstreeObjectResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OstreeOstreeObjectResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentObjectsAPIService.ContentOstreeObjectsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_object_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_object_href"+"}", parameterValueToString(r.ostreeOstreeObjectHref, "ostreeOstreeObjectHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_package_indices.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_package_indices.go new file mode 100644 index 0000000000..87d1b3394a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_package_indices.go @@ -0,0 +1,554 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentPackageIndicesAPIService ContentPackageIndicesAPI service +type ContentPackageIndicesAPIService service + +type ContentPackageIndicesAPIContentDebPackageIndicesCreateRequest struct { + ctx context.Context + ApiService *ContentPackageIndicesAPIService + debPackageIndex *DebPackageIndex +} + +func (r ContentPackageIndicesAPIContentDebPackageIndicesCreateRequest) DebPackageIndex(debPackageIndex DebPackageIndex) ContentPackageIndicesAPIContentDebPackageIndicesCreateRequest { + r.debPackageIndex = &debPackageIndex + return r +} + +func (r ContentPackageIndicesAPIContentDebPackageIndicesCreateRequest) Execute() (*DebPackageIndexResponse, *http.Response, error) { + return r.ApiService.ContentDebPackageIndicesCreateExecute(r) +} + +/* +ContentDebPackageIndicesCreate Create a package index + +A PackageIndex represents the package indices of a single component-architecture combination. + +Associated artifacts: Exactly one 'Packages' file. May optionally include one or more of +'Packages.gz', 'Packages.xz', 'Release'. If included, the 'Release' file is a legacy +per-component-and-architecture Release file. + +Note: The verbatim publisher will republish all associated artifacts, while the APT publisher +(both simple and structured mode) will generate any 'Packages' files it needs when creating the +publication. It does not make use of PackageIndex content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackageIndicesAPIContentDebPackageIndicesCreateRequest +*/ +func (a *ContentPackageIndicesAPIService) ContentDebPackageIndicesCreate(ctx context.Context) ContentPackageIndicesAPIContentDebPackageIndicesCreateRequest { + return ContentPackageIndicesAPIContentDebPackageIndicesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DebPackageIndexResponse +func (a *ContentPackageIndicesAPIService) ContentDebPackageIndicesCreateExecute(r ContentPackageIndicesAPIContentDebPackageIndicesCreateRequest) (*DebPackageIndexResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebPackageIndexResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackageIndicesAPIService.ContentDebPackageIndicesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/package_indices/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debPackageIndex == nil { + return localVarReturnValue, nil, reportError("debPackageIndex is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debPackageIndex + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackageIndicesAPIContentDebPackageIndicesListRequest struct { + ctx context.Context + ApiService *ContentPackageIndicesAPIService + architecture *string + component *string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + relativePath *string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + sha256 *string + fields *[]string + excludeFields *[]string +} + +// Filter results where architecture matches value +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) Architecture(architecture string) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.architecture = &architecture + return r +} + +// Filter results where component matches value +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) Component(component string) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.component = &component + return r +} + +// Number of results to return per page. +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) Limit(limit int32) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) Offset(offset int32) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `component` - Component * `-component` - Component (descending) * `architecture` - Architecture * `-architecture` - Architecture (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `sha256` - Sha256 * `-sha256` - Sha256 (descending) * `artifact_set_sha256` - Artifact set sha256 * `-artifact_set_sha256` - Artifact set sha256 (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) Ordering(ordering []string) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) PulpHrefIn(pulpHrefIn []string) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) PulpIdIn(pulpIdIn []string) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter results where relative_path matches value +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) RelativePath(relativePath string) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.relativePath = &relativePath + return r +} + +// Repository Version referenced by HREF +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) RepositoryVersion(repositoryVersion string) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where sha256 matches value +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) Sha256(sha256 string) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.sha256 = &sha256 + return r +} + +// A list of fields to include in the response. +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) Fields(fields []string) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) ExcludeFields(excludeFields []string) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) Execute() (*PaginateddebPackageIndexResponseList, *http.Response, error) { + return r.ApiService.ContentDebPackageIndicesListExecute(r) +} + +/* +ContentDebPackageIndicesList List PackageIndices + +A PackageIndex represents the package indices of a single component-architecture combination. + +Associated artifacts: Exactly one 'Packages' file. May optionally include one or more of +'Packages.gz', 'Packages.xz', 'Release'. If included, the 'Release' file is a legacy +per-component-and-architecture Release file. + +Note: The verbatim publisher will republish all associated artifacts, while the APT publisher +(both simple and structured mode) will generate any 'Packages' files it needs when creating the +publication. It does not make use of PackageIndex content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackageIndicesAPIContentDebPackageIndicesListRequest +*/ +func (a *ContentPackageIndicesAPIService) ContentDebPackageIndicesList(ctx context.Context) ContentPackageIndicesAPIContentDebPackageIndicesListRequest { + return ContentPackageIndicesAPIContentDebPackageIndicesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebPackageIndexResponseList +func (a *ContentPackageIndicesAPIService) ContentDebPackageIndicesListExecute(r ContentPackageIndicesAPIContentDebPackageIndicesListRequest) (*PaginateddebPackageIndexResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebPackageIndexResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackageIndicesAPIService.ContentDebPackageIndicesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/package_indices/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.architecture != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "architecture", r.architecture, "") + } + if r.component != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "component", r.component, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.relativePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "relative_path", r.relativePath, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256", r.sha256, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackageIndicesAPIContentDebPackageIndicesReadRequest struct { + ctx context.Context + ApiService *ContentPackageIndicesAPIService + debPackageIndexHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentPackageIndicesAPIContentDebPackageIndicesReadRequest) Fields(fields []string) ContentPackageIndicesAPIContentDebPackageIndicesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackageIndicesAPIContentDebPackageIndicesReadRequest) ExcludeFields(excludeFields []string) ContentPackageIndicesAPIContentDebPackageIndicesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackageIndicesAPIContentDebPackageIndicesReadRequest) Execute() (*DebPackageIndexResponse, *http.Response, error) { + return r.ApiService.ContentDebPackageIndicesReadExecute(r) +} + +/* +ContentDebPackageIndicesRead Inspect a package index + +A PackageIndex represents the package indices of a single component-architecture combination. + +Associated artifacts: Exactly one 'Packages' file. May optionally include one or more of +'Packages.gz', 'Packages.xz', 'Release'. If included, the 'Release' file is a legacy +per-component-and-architecture Release file. + +Note: The verbatim publisher will republish all associated artifacts, while the APT publisher +(both simple and structured mode) will generate any 'Packages' files it needs when creating the +publication. It does not make use of PackageIndex content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debPackageIndexHref + @return ContentPackageIndicesAPIContentDebPackageIndicesReadRequest +*/ +func (a *ContentPackageIndicesAPIService) ContentDebPackageIndicesRead(ctx context.Context, debPackageIndexHref string) ContentPackageIndicesAPIContentDebPackageIndicesReadRequest { + return ContentPackageIndicesAPIContentDebPackageIndicesReadRequest{ + ApiService: a, + ctx: ctx, + debPackageIndexHref: debPackageIndexHref, + } +} + +// Execute executes the request +// @return DebPackageIndexResponse +func (a *ContentPackageIndicesAPIService) ContentDebPackageIndicesReadExecute(r ContentPackageIndicesAPIContentDebPackageIndicesReadRequest) (*DebPackageIndexResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebPackageIndexResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackageIndicesAPIService.ContentDebPackageIndicesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_package_index_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_package_index_href"+"}", parameterValueToString(r.debPackageIndexHref, "debPackageIndexHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_package_release_components.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_package_release_components.go new file mode 100644 index 0000000000..6e2ebf5f57 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_package_release_components.go @@ -0,0 +1,522 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentPackageReleaseComponentsAPIService ContentPackageReleaseComponentsAPI service +type ContentPackageReleaseComponentsAPIService service + +type ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsCreateRequest struct { + ctx context.Context + ApiService *ContentPackageReleaseComponentsAPIService + debPackageReleaseComponent *DebPackageReleaseComponent +} + +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsCreateRequest) DebPackageReleaseComponent(debPackageReleaseComponent DebPackageReleaseComponent) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsCreateRequest { + r.debPackageReleaseComponent = &debPackageReleaseComponent + return r +} + +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsCreateRequest) Execute() (*DebPackageReleaseComponentResponse, *http.Response, error) { + return r.ApiService.ContentDebPackageReleaseComponentsCreateExecute(r) +} + +/* +ContentDebPackageReleaseComponentsCreate Create a package release component + +A PackageReleaseComponent associates a Package with a ReleaseComponent. + +Associated artifacts: None; contains only metadata. + +This simply stores the information which packages are part of which components. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsCreateRequest +*/ +func (a *ContentPackageReleaseComponentsAPIService) ContentDebPackageReleaseComponentsCreate(ctx context.Context) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsCreateRequest { + return ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DebPackageReleaseComponentResponse +func (a *ContentPackageReleaseComponentsAPIService) ContentDebPackageReleaseComponentsCreateExecute(r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsCreateRequest) (*DebPackageReleaseComponentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebPackageReleaseComponentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackageReleaseComponentsAPIService.ContentDebPackageReleaseComponentsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/package_release_components/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debPackageReleaseComponent == nil { + return localVarReturnValue, nil, reportError("debPackageReleaseComponent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debPackageReleaseComponent + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest struct { + ctx context.Context + ApiService *ContentPackageReleaseComponentsAPIService + limit *int32 + offset *int32 + ordering *[]string + package_ *string + pulpHrefIn *[]string + pulpIdIn *[]string + releaseComponent *string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) Limit(limit int32) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) Offset(offset int32) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) Ordering(ordering []string) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest { + r.ordering = &ordering + return r +} + +// Filter results where package matches value +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) Package_(package_ string) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest { + r.package_ = &package_ + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) PulpHrefIn(pulpHrefIn []string) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) PulpIdIn(pulpIdIn []string) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter results where release_component matches value +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) ReleaseComponent(releaseComponent string) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest { + r.releaseComponent = &releaseComponent + return r +} + +// Repository Version referenced by HREF +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) RepositoryVersion(repositoryVersion string) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) Fields(fields []string) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) ExcludeFields(excludeFields []string) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) Execute() (*PaginateddebPackageReleaseComponentResponseList, *http.Response, error) { + return r.ApiService.ContentDebPackageReleaseComponentsListExecute(r) +} + +/* +ContentDebPackageReleaseComponentsList List package release components + +A PackageReleaseComponent associates a Package with a ReleaseComponent. + +Associated artifacts: None; contains only metadata. + +This simply stores the information which packages are part of which components. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest +*/ +func (a *ContentPackageReleaseComponentsAPIService) ContentDebPackageReleaseComponentsList(ctx context.Context) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest { + return ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebPackageReleaseComponentResponseList +func (a *ContentPackageReleaseComponentsAPIService) ContentDebPackageReleaseComponentsListExecute(r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsListRequest) (*PaginateddebPackageReleaseComponentResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebPackageReleaseComponentResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackageReleaseComponentsAPIService.ContentDebPackageReleaseComponentsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/package_release_components/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.package_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "package", r.package_, "") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.releaseComponent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "release_component", r.releaseComponent, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsReadRequest struct { + ctx context.Context + ApiService *ContentPackageReleaseComponentsAPIService + debPackageReleaseComponentHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsReadRequest) Fields(fields []string) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsReadRequest) ExcludeFields(excludeFields []string) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsReadRequest) Execute() (*DebPackageReleaseComponentResponse, *http.Response, error) { + return r.ApiService.ContentDebPackageReleaseComponentsReadExecute(r) +} + +/* +ContentDebPackageReleaseComponentsRead Inspect a package release component + +A PackageReleaseComponent associates a Package with a ReleaseComponent. + +Associated artifacts: None; contains only metadata. + +This simply stores the information which packages are part of which components. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debPackageReleaseComponentHref + @return ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsReadRequest +*/ +func (a *ContentPackageReleaseComponentsAPIService) ContentDebPackageReleaseComponentsRead(ctx context.Context, debPackageReleaseComponentHref string) ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsReadRequest { + return ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsReadRequest{ + ApiService: a, + ctx: ctx, + debPackageReleaseComponentHref: debPackageReleaseComponentHref, + } +} + +// Execute executes the request +// @return DebPackageReleaseComponentResponse +func (a *ContentPackageReleaseComponentsAPIService) ContentDebPackageReleaseComponentsReadExecute(r ContentPackageReleaseComponentsAPIContentDebPackageReleaseComponentsReadRequest) (*DebPackageReleaseComponentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebPackageReleaseComponentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackageReleaseComponentsAPIService.ContentDebPackageReleaseComponentsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_package_release_component_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_package_release_component_href"+"}", parameterValueToString(r.debPackageReleaseComponentHref, "debPackageReleaseComponentHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packagecategories.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packagecategories.go new file mode 100644 index 0000000000..2531d79c1d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packagecategories.go @@ -0,0 +1,380 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentPackagecategoriesAPIService ContentPackagecategoriesAPI service +type ContentPackagecategoriesAPIService service + +type ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest struct { + ctx context.Context + ApiService *ContentPackagecategoriesAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest) Limit(limit int32) ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest) Offset(offset int32) ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest) Ordering(ordering []string) ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest) PulpHrefIn(pulpHrefIn []string) ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest) PulpIdIn(pulpIdIn []string) ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest) RepositoryVersion(repositoryVersion string) ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest) Fields(fields []string) ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest) ExcludeFields(excludeFields []string) ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest) Execute() (*PaginatedrpmPackageCategoryResponseList, *http.Response, error) { + return r.ApiService.ContentRpmPackagecategoriesListExecute(r) +} + +/* +ContentRpmPackagecategoriesList List package categorys + +PackageCategory ViewSet. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest +*/ +func (a *ContentPackagecategoriesAPIService) ContentRpmPackagecategoriesList(ctx context.Context) ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest { + return ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmPackageCategoryResponseList +func (a *ContentPackagecategoriesAPIService) ContentRpmPackagecategoriesListExecute(r ContentPackagecategoriesAPIContentRpmPackagecategoriesListRequest) (*PaginatedrpmPackageCategoryResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmPackageCategoryResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagecategoriesAPIService.ContentRpmPackagecategoriesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/packagecategories/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackagecategoriesAPIContentRpmPackagecategoriesReadRequest struct { + ctx context.Context + ApiService *ContentPackagecategoriesAPIService + rpmPackageCategoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesReadRequest) Fields(fields []string) ContentPackagecategoriesAPIContentRpmPackagecategoriesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesReadRequest) ExcludeFields(excludeFields []string) ContentPackagecategoriesAPIContentRpmPackagecategoriesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackagecategoriesAPIContentRpmPackagecategoriesReadRequest) Execute() (*RpmPackageCategoryResponse, *http.Response, error) { + return r.ApiService.ContentRpmPackagecategoriesReadExecute(r) +} + +/* +ContentRpmPackagecategoriesRead Inspect a package category + +PackageCategory ViewSet. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmPackageCategoryHref + @return ContentPackagecategoriesAPIContentRpmPackagecategoriesReadRequest +*/ +func (a *ContentPackagecategoriesAPIService) ContentRpmPackagecategoriesRead(ctx context.Context, rpmPackageCategoryHref string) ContentPackagecategoriesAPIContentRpmPackagecategoriesReadRequest { + return ContentPackagecategoriesAPIContentRpmPackagecategoriesReadRequest{ + ApiService: a, + ctx: ctx, + rpmPackageCategoryHref: rpmPackageCategoryHref, + } +} + +// Execute executes the request +// @return RpmPackageCategoryResponse +func (a *ContentPackagecategoriesAPIService) ContentRpmPackagecategoriesReadExecute(r ContentPackagecategoriesAPIContentRpmPackagecategoriesReadRequest) (*RpmPackageCategoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmPackageCategoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagecategoriesAPIService.ContentRpmPackagecategoriesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_package_category_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_package_category_href"+"}", parameterValueToString(r.rpmPackageCategoryHref, "rpmPackageCategoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packageenvironments.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packageenvironments.go new file mode 100644 index 0000000000..1a1aa01414 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packageenvironments.go @@ -0,0 +1,380 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentPackageenvironmentsAPIService ContentPackageenvironmentsAPI service +type ContentPackageenvironmentsAPIService service + +type ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest struct { + ctx context.Context + ApiService *ContentPackageenvironmentsAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest) Limit(limit int32) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest) Offset(offset int32) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest) Ordering(ordering []string) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest) PulpHrefIn(pulpHrefIn []string) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest) PulpIdIn(pulpIdIn []string) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest) RepositoryVersion(repositoryVersion string) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest) Fields(fields []string) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest) ExcludeFields(excludeFields []string) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest) Execute() (*PaginatedrpmPackageEnvironmentResponseList, *http.Response, error) { + return r.ApiService.ContentRpmPackageenvironmentsListExecute(r) +} + +/* +ContentRpmPackageenvironmentsList List package environments + +PackageEnvironment ViewSet. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest +*/ +func (a *ContentPackageenvironmentsAPIService) ContentRpmPackageenvironmentsList(ctx context.Context) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest { + return ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmPackageEnvironmentResponseList +func (a *ContentPackageenvironmentsAPIService) ContentRpmPackageenvironmentsListExecute(r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsListRequest) (*PaginatedrpmPackageEnvironmentResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmPackageEnvironmentResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackageenvironmentsAPIService.ContentRpmPackageenvironmentsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/packageenvironments/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackageenvironmentsAPIContentRpmPackageenvironmentsReadRequest struct { + ctx context.Context + ApiService *ContentPackageenvironmentsAPIService + rpmPackageEnvironmentHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsReadRequest) Fields(fields []string) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsReadRequest) ExcludeFields(excludeFields []string) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsReadRequest) Execute() (*RpmPackageEnvironmentResponse, *http.Response, error) { + return r.ApiService.ContentRpmPackageenvironmentsReadExecute(r) +} + +/* +ContentRpmPackageenvironmentsRead Inspect a package environment + +PackageEnvironment ViewSet. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmPackageEnvironmentHref + @return ContentPackageenvironmentsAPIContentRpmPackageenvironmentsReadRequest +*/ +func (a *ContentPackageenvironmentsAPIService) ContentRpmPackageenvironmentsRead(ctx context.Context, rpmPackageEnvironmentHref string) ContentPackageenvironmentsAPIContentRpmPackageenvironmentsReadRequest { + return ContentPackageenvironmentsAPIContentRpmPackageenvironmentsReadRequest{ + ApiService: a, + ctx: ctx, + rpmPackageEnvironmentHref: rpmPackageEnvironmentHref, + } +} + +// Execute executes the request +// @return RpmPackageEnvironmentResponse +func (a *ContentPackageenvironmentsAPIService) ContentRpmPackageenvironmentsReadExecute(r ContentPackageenvironmentsAPIContentRpmPackageenvironmentsReadRequest) (*RpmPackageEnvironmentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmPackageEnvironmentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackageenvironmentsAPIService.ContentRpmPackageenvironmentsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_package_environment_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_package_environment_href"+"}", parameterValueToString(r.rpmPackageEnvironmentHref, "rpmPackageEnvironmentHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packagegroups.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packagegroups.go new file mode 100644 index 0000000000..63e58604a9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packagegroups.go @@ -0,0 +1,380 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentPackagegroupsAPIService ContentPackagegroupsAPI service +type ContentPackagegroupsAPIService service + +type ContentPackagegroupsAPIContentRpmPackagegroupsListRequest struct { + ctx context.Context + ApiService *ContentPackagegroupsAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentPackagegroupsAPIContentRpmPackagegroupsListRequest) Limit(limit int32) ContentPackagegroupsAPIContentRpmPackagegroupsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentPackagegroupsAPIContentRpmPackagegroupsListRequest) Offset(offset int32) ContentPackagegroupsAPIContentRpmPackagegroupsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentPackagegroupsAPIContentRpmPackagegroupsListRequest) Ordering(ordering []string) ContentPackagegroupsAPIContentRpmPackagegroupsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackagegroupsAPIContentRpmPackagegroupsListRequest) PulpHrefIn(pulpHrefIn []string) ContentPackagegroupsAPIContentRpmPackagegroupsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackagegroupsAPIContentRpmPackagegroupsListRequest) PulpIdIn(pulpIdIn []string) ContentPackagegroupsAPIContentRpmPackagegroupsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagegroupsAPIContentRpmPackagegroupsListRequest) RepositoryVersion(repositoryVersion string) ContentPackagegroupsAPIContentRpmPackagegroupsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagegroupsAPIContentRpmPackagegroupsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentPackagegroupsAPIContentRpmPackagegroupsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagegroupsAPIContentRpmPackagegroupsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentPackagegroupsAPIContentRpmPackagegroupsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentPackagegroupsAPIContentRpmPackagegroupsListRequest) Fields(fields []string) ContentPackagegroupsAPIContentRpmPackagegroupsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackagegroupsAPIContentRpmPackagegroupsListRequest) ExcludeFields(excludeFields []string) ContentPackagegroupsAPIContentRpmPackagegroupsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackagegroupsAPIContentRpmPackagegroupsListRequest) Execute() (*PaginatedrpmPackageGroupResponseList, *http.Response, error) { + return r.ApiService.ContentRpmPackagegroupsListExecute(r) +} + +/* +ContentRpmPackagegroupsList List package groups + +PackageGroup ViewSet. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackagegroupsAPIContentRpmPackagegroupsListRequest +*/ +func (a *ContentPackagegroupsAPIService) ContentRpmPackagegroupsList(ctx context.Context) ContentPackagegroupsAPIContentRpmPackagegroupsListRequest { + return ContentPackagegroupsAPIContentRpmPackagegroupsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmPackageGroupResponseList +func (a *ContentPackagegroupsAPIService) ContentRpmPackagegroupsListExecute(r ContentPackagegroupsAPIContentRpmPackagegroupsListRequest) (*PaginatedrpmPackageGroupResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmPackageGroupResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagegroupsAPIService.ContentRpmPackagegroupsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/packagegroups/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackagegroupsAPIContentRpmPackagegroupsReadRequest struct { + ctx context.Context + ApiService *ContentPackagegroupsAPIService + rpmPackageGroupHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentPackagegroupsAPIContentRpmPackagegroupsReadRequest) Fields(fields []string) ContentPackagegroupsAPIContentRpmPackagegroupsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackagegroupsAPIContentRpmPackagegroupsReadRequest) ExcludeFields(excludeFields []string) ContentPackagegroupsAPIContentRpmPackagegroupsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackagegroupsAPIContentRpmPackagegroupsReadRequest) Execute() (*RpmPackageGroupResponse, *http.Response, error) { + return r.ApiService.ContentRpmPackagegroupsReadExecute(r) +} + +/* +ContentRpmPackagegroupsRead Inspect a package group + +PackageGroup ViewSet. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmPackageGroupHref + @return ContentPackagegroupsAPIContentRpmPackagegroupsReadRequest +*/ +func (a *ContentPackagegroupsAPIService) ContentRpmPackagegroupsRead(ctx context.Context, rpmPackageGroupHref string) ContentPackagegroupsAPIContentRpmPackagegroupsReadRequest { + return ContentPackagegroupsAPIContentRpmPackagegroupsReadRequest{ + ApiService: a, + ctx: ctx, + rpmPackageGroupHref: rpmPackageGroupHref, + } +} + +// Execute executes the request +// @return RpmPackageGroupResponse +func (a *ContentPackagegroupsAPIService) ContentRpmPackagegroupsReadExecute(r ContentPackagegroupsAPIContentRpmPackagegroupsReadRequest) (*RpmPackageGroupResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmPackageGroupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagegroupsAPIService.ContentRpmPackagegroupsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_package_group_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_package_group_href"+"}", parameterValueToString(r.rpmPackageGroupHref, "rpmPackageGroupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packagelangpacks.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packagelangpacks.go new file mode 100644 index 0000000000..c1ea83417c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packagelangpacks.go @@ -0,0 +1,380 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentPackagelangpacksAPIService ContentPackagelangpacksAPI service +type ContentPackagelangpacksAPIService service + +type ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest struct { + ctx context.Context + ApiService *ContentPackagelangpacksAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest) Limit(limit int32) ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest) Offset(offset int32) ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest { + r.offset = &offset + return r +} + +// Ordering * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest) Ordering(ordering []string) ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest) PulpHrefIn(pulpHrefIn []string) ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest) PulpIdIn(pulpIdIn []string) ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest) RepositoryVersion(repositoryVersion string) ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest) Fields(fields []string) ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest) ExcludeFields(excludeFields []string) ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest) Execute() (*PaginatedrpmPackageLangpacksResponseList, *http.Response, error) { + return r.ApiService.ContentRpmPackagelangpacksListExecute(r) +} + +/* +ContentRpmPackagelangpacksList List package langpackss + +PackageLangpacks ViewSet. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest +*/ +func (a *ContentPackagelangpacksAPIService) ContentRpmPackagelangpacksList(ctx context.Context) ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest { + return ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmPackageLangpacksResponseList +func (a *ContentPackagelangpacksAPIService) ContentRpmPackagelangpacksListExecute(r ContentPackagelangpacksAPIContentRpmPackagelangpacksListRequest) (*PaginatedrpmPackageLangpacksResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmPackageLangpacksResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagelangpacksAPIService.ContentRpmPackagelangpacksList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/packagelangpacks/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackagelangpacksAPIContentRpmPackagelangpacksReadRequest struct { + ctx context.Context + ApiService *ContentPackagelangpacksAPIService + rpmPackageLangpacksHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksReadRequest) Fields(fields []string) ContentPackagelangpacksAPIContentRpmPackagelangpacksReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksReadRequest) ExcludeFields(excludeFields []string) ContentPackagelangpacksAPIContentRpmPackagelangpacksReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackagelangpacksAPIContentRpmPackagelangpacksReadRequest) Execute() (*RpmPackageLangpacksResponse, *http.Response, error) { + return r.ApiService.ContentRpmPackagelangpacksReadExecute(r) +} + +/* +ContentRpmPackagelangpacksRead Inspect a package langpacks + +PackageLangpacks ViewSet. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmPackageLangpacksHref + @return ContentPackagelangpacksAPIContentRpmPackagelangpacksReadRequest +*/ +func (a *ContentPackagelangpacksAPIService) ContentRpmPackagelangpacksRead(ctx context.Context, rpmPackageLangpacksHref string) ContentPackagelangpacksAPIContentRpmPackagelangpacksReadRequest { + return ContentPackagelangpacksAPIContentRpmPackagelangpacksReadRequest{ + ApiService: a, + ctx: ctx, + rpmPackageLangpacksHref: rpmPackageLangpacksHref, + } +} + +// Execute executes the request +// @return RpmPackageLangpacksResponse +func (a *ContentPackagelangpacksAPIService) ContentRpmPackagelangpacksReadExecute(r ContentPackagelangpacksAPIContentRpmPackagelangpacksReadRequest) (*RpmPackageLangpacksResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmPackageLangpacksResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagelangpacksAPIService.ContentRpmPackagelangpacksRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_package_langpacks_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_package_langpacks_href"+"}", parameterValueToString(r.rpmPackageLangpacksHref, "rpmPackageLangpacksHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packages.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packages.go new file mode 100644 index 0000000000..48202fd01c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_packages.go @@ -0,0 +1,2507 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "reflect" +) + + +// ContentPackagesAPIService ContentPackagesAPI service +type ContentPackagesAPIService service + +type ContentPackagesAPIContentDebPackagesCreateRequest struct { + ctx context.Context + ApiService *ContentPackagesAPIService + repository *string + artifact *string + relativePath *string + file *os.File + upload *string + distribution *string + component *string +} + +// A URI of a repository the new content unit should be associated with. +func (r ContentPackagesAPIContentDebPackagesCreateRequest) Repository(repository string) ContentPackagesAPIContentDebPackagesCreateRequest { + r.repository = &repository + return r +} + +// Artifact file representing the physical content +func (r ContentPackagesAPIContentDebPackagesCreateRequest) Artifact(artifact string) ContentPackagesAPIContentDebPackagesCreateRequest { + r.artifact = &artifact + return r +} + +// Path where the artifact is located relative to distributions base_path +func (r ContentPackagesAPIContentDebPackagesCreateRequest) RelativePath(relativePath string) ContentPackagesAPIContentDebPackagesCreateRequest { + r.relativePath = &relativePath + return r +} + +// An uploaded file that may be turned into the artifact of the content unit. +func (r ContentPackagesAPIContentDebPackagesCreateRequest) File(file *os.File) ContentPackagesAPIContentDebPackagesCreateRequest { + r.file = file + return r +} + +// An uncommitted upload that may be turned into the artifact of the content unit. +func (r ContentPackagesAPIContentDebPackagesCreateRequest) Upload(upload string) ContentPackagesAPIContentDebPackagesCreateRequest { + r.upload = &upload + return r +} + +// Name of the distribution. +func (r ContentPackagesAPIContentDebPackagesCreateRequest) Distribution(distribution string) ContentPackagesAPIContentDebPackagesCreateRequest { + r.distribution = &distribution + return r +} + +// Name of the component. +func (r ContentPackagesAPIContentDebPackagesCreateRequest) Component(component string) ContentPackagesAPIContentDebPackagesCreateRequest { + r.component = &component + return r +} + +func (r ContentPackagesAPIContentDebPackagesCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ContentDebPackagesCreateExecute(r) +} + +/* +ContentDebPackagesCreate Create a package + +Trigger an asynchronous task to create content,optionally create new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackagesAPIContentDebPackagesCreateRequest +*/ +func (a *ContentPackagesAPIService) ContentDebPackagesCreate(ctx context.Context) ContentPackagesAPIContentDebPackagesCreateRequest { + return ContentPackagesAPIContentDebPackagesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ContentPackagesAPIService) ContentDebPackagesCreateExecute(r ContentPackagesAPIContentDebPackagesCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagesAPIService.ContentDebPackagesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/packages/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "repository", r.repository, "") + } + if r.artifact != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "artifact", r.artifact, "") + } + if r.relativePath != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "relative_path", r.relativePath, "") + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.upload != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "upload", r.upload, "") + } + if r.distribution != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "distribution", r.distribution, "") + } + if r.component != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "component", r.component, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackagesAPIContentDebPackagesListRequest struct { + ctx context.Context + ApiService *ContentPackagesAPIService + architecture *string + autoBuiltPackage *string + buildEssential *bool + builtUsing *string + essential *bool + installedSize *int32 + limit *int32 + maintainer *string + multiArch *string + offset *int32 + ordering *[]string + origin *string + originalMaintainer *string + package_ *string + priority *string + pulpHrefIn *[]string + pulpIdIn *[]string + relativePath *string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + section *string + sha256 *string + source *string + tag *string + version *string + fields *[]string + excludeFields *[]string +} + +// Filter results where architecture matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) Architecture(architecture string) ContentPackagesAPIContentDebPackagesListRequest { + r.architecture = &architecture + return r +} + +// Filter results where auto_built_package matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) AutoBuiltPackage(autoBuiltPackage string) ContentPackagesAPIContentDebPackagesListRequest { + r.autoBuiltPackage = &autoBuiltPackage + return r +} + +// Filter results where build_essential matches value * `True` - yes * `False` - no +func (r ContentPackagesAPIContentDebPackagesListRequest) BuildEssential(buildEssential bool) ContentPackagesAPIContentDebPackagesListRequest { + r.buildEssential = &buildEssential + return r +} + +// Filter results where built_using matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) BuiltUsing(builtUsing string) ContentPackagesAPIContentDebPackagesListRequest { + r.builtUsing = &builtUsing + return r +} + +// Filter results where essential matches value * `True` - yes * `False` - no +func (r ContentPackagesAPIContentDebPackagesListRequest) Essential(essential bool) ContentPackagesAPIContentDebPackagesListRequest { + r.essential = &essential + return r +} + +// Filter results where installed_size matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) InstalledSize(installedSize int32) ContentPackagesAPIContentDebPackagesListRequest { + r.installedSize = &installedSize + return r +} + +// Number of results to return per page. +func (r ContentPackagesAPIContentDebPackagesListRequest) Limit(limit int32) ContentPackagesAPIContentDebPackagesListRequest { + r.limit = &limit + return r +} + +// Filter results where maintainer matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) Maintainer(maintainer string) ContentPackagesAPIContentDebPackagesListRequest { + r.maintainer = &maintainer + return r +} + +// Filter results where multi_arch matches value * `no` - no * `same` - same * `foreign` - foreign * `allowed` - allowed +func (r ContentPackagesAPIContentDebPackagesListRequest) MultiArch(multiArch string) ContentPackagesAPIContentDebPackagesListRequest { + r.multiArch = &multiArch + return r +} + +// The initial index from which to return the results. +func (r ContentPackagesAPIContentDebPackagesListRequest) Offset(offset int32) ContentPackagesAPIContentDebPackagesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `package` - Package * `-package` - Package (descending) * `source` - Source * `-source` - Source (descending) * `version` - Version * `-version` - Version (descending) * `architecture` - Architecture * `-architecture` - Architecture (descending) * `section` - Section * `-section` - Section (descending) * `priority` - Priority * `-priority` - Priority (descending) * `origin` - Origin * `-origin` - Origin (descending) * `tag` - Tag * `-tag` - Tag (descending) * `bugs` - Bugs * `-bugs` - Bugs (descending) * `essential` - Essential * `-essential` - Essential (descending) * `build_essential` - Build essential * `-build_essential` - Build essential (descending) * `installed_size` - Installed size * `-installed_size` - Installed size (descending) * `maintainer` - Maintainer * `-maintainer` - Maintainer (descending) * `original_maintainer` - Original maintainer * `-original_maintainer` - Original maintainer (descending) * `description` - Description * `-description` - Description (descending) * `description_md5` - Description md5 * `-description_md5` - Description md5 (descending) * `homepage` - Homepage * `-homepage` - Homepage (descending) * `built_using` - Built using * `-built_using` - Built using (descending) * `auto_built_package` - Auto built package * `-auto_built_package` - Auto built package (descending) * `multi_arch` - Multi arch * `-multi_arch` - Multi arch (descending) * `breaks` - Breaks * `-breaks` - Breaks (descending) * `conflicts` - Conflicts * `-conflicts` - Conflicts (descending) * `depends` - Depends * `-depends` - Depends (descending) * `recommends` - Recommends * `-recommends` - Recommends (descending) * `suggests` - Suggests * `-suggests` - Suggests (descending) * `enhances` - Enhances * `-enhances` - Enhances (descending) * `pre_depends` - Pre depends * `-pre_depends` - Pre depends (descending) * `provides` - Provides * `-provides` - Provides (descending) * `replaces` - Replaces * `-replaces` - Replaces (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `sha256` - Sha256 * `-sha256` - Sha256 (descending) * `custom_fields` - Custom fields * `-custom_fields` - Custom fields (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentPackagesAPIContentDebPackagesListRequest) Ordering(ordering []string) ContentPackagesAPIContentDebPackagesListRequest { + r.ordering = &ordering + return r +} + +// Filter results where origin matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) Origin(origin string) ContentPackagesAPIContentDebPackagesListRequest { + r.origin = &origin + return r +} + +// Filter results where original_maintainer matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) OriginalMaintainer(originalMaintainer string) ContentPackagesAPIContentDebPackagesListRequest { + r.originalMaintainer = &originalMaintainer + return r +} + +// Filter results where package matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) Package_(package_ string) ContentPackagesAPIContentDebPackagesListRequest { + r.package_ = &package_ + return r +} + +// Filter results where priority matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) Priority(priority string) ContentPackagesAPIContentDebPackagesListRequest { + r.priority = &priority + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackagesAPIContentDebPackagesListRequest) PulpHrefIn(pulpHrefIn []string) ContentPackagesAPIContentDebPackagesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackagesAPIContentDebPackagesListRequest) PulpIdIn(pulpIdIn []string) ContentPackagesAPIContentDebPackagesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter results where relative_path matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) RelativePath(relativePath string) ContentPackagesAPIContentDebPackagesListRequest { + r.relativePath = &relativePath + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagesAPIContentDebPackagesListRequest) RepositoryVersion(repositoryVersion string) ContentPackagesAPIContentDebPackagesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagesAPIContentDebPackagesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentPackagesAPIContentDebPackagesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagesAPIContentDebPackagesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentPackagesAPIContentDebPackagesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where section matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) Section(section string) ContentPackagesAPIContentDebPackagesListRequest { + r.section = §ion + return r +} + +// Filter results where sha256 matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) Sha256(sha256 string) ContentPackagesAPIContentDebPackagesListRequest { + r.sha256 = &sha256 + return r +} + +// Filter results where source matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) Source(source string) ContentPackagesAPIContentDebPackagesListRequest { + r.source = &source + return r +} + +// Filter results where tag matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) Tag(tag string) ContentPackagesAPIContentDebPackagesListRequest { + r.tag = &tag + return r +} + +// Filter results where version matches value +func (r ContentPackagesAPIContentDebPackagesListRequest) Version(version string) ContentPackagesAPIContentDebPackagesListRequest { + r.version = &version + return r +} + +// A list of fields to include in the response. +func (r ContentPackagesAPIContentDebPackagesListRequest) Fields(fields []string) ContentPackagesAPIContentDebPackagesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackagesAPIContentDebPackagesListRequest) ExcludeFields(excludeFields []string) ContentPackagesAPIContentDebPackagesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackagesAPIContentDebPackagesListRequest) Execute() (*PaginateddebPackageResponseList, *http.Response, error) { + return r.ApiService.ContentDebPackagesListExecute(r) +} + +/* +ContentDebPackagesList List packages + +A Package represents a '.deb' binary package. + +Associated artifacts: Exactly one '.deb' package file. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackagesAPIContentDebPackagesListRequest +*/ +func (a *ContentPackagesAPIService) ContentDebPackagesList(ctx context.Context) ContentPackagesAPIContentDebPackagesListRequest { + return ContentPackagesAPIContentDebPackagesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebPackageResponseList +func (a *ContentPackagesAPIService) ContentDebPackagesListExecute(r ContentPackagesAPIContentDebPackagesListRequest) (*PaginateddebPackageResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebPackageResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagesAPIService.ContentDebPackagesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/packages/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.architecture != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "architecture", r.architecture, "") + } + if r.autoBuiltPackage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "auto_built_package", r.autoBuiltPackage, "") + } + if r.buildEssential != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "build_essential", r.buildEssential, "") + } + if r.builtUsing != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "built_using", r.builtUsing, "") + } + if r.essential != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "essential", r.essential, "") + } + if r.installedSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "installed_size", r.installedSize, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.maintainer != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "maintainer", r.maintainer, "") + } + if r.multiArch != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "multi_arch", r.multiArch, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.origin != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "origin", r.origin, "") + } + if r.originalMaintainer != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "original_maintainer", r.originalMaintainer, "") + } + if r.package_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "package", r.package_, "") + } + if r.priority != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "priority", r.priority, "") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.relativePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "relative_path", r.relativePath, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.section != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "section", r.section, "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256", r.sha256, "") + } + if r.source != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "source", r.source, "") + } + if r.tag != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "tag", r.tag, "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackagesAPIContentDebPackagesReadRequest struct { + ctx context.Context + ApiService *ContentPackagesAPIService + debPackageHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentPackagesAPIContentDebPackagesReadRequest) Fields(fields []string) ContentPackagesAPIContentDebPackagesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackagesAPIContentDebPackagesReadRequest) ExcludeFields(excludeFields []string) ContentPackagesAPIContentDebPackagesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackagesAPIContentDebPackagesReadRequest) Execute() (*DebPackageResponse, *http.Response, error) { + return r.ApiService.ContentDebPackagesReadExecute(r) +} + +/* +ContentDebPackagesRead Inspect a package + +A Package represents a '.deb' binary package. + +Associated artifacts: Exactly one '.deb' package file. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debPackageHref + @return ContentPackagesAPIContentDebPackagesReadRequest +*/ +func (a *ContentPackagesAPIService) ContentDebPackagesRead(ctx context.Context, debPackageHref string) ContentPackagesAPIContentDebPackagesReadRequest { + return ContentPackagesAPIContentDebPackagesReadRequest{ + ApiService: a, + ctx: ctx, + debPackageHref: debPackageHref, + } +} + +// Execute executes the request +// @return DebPackageResponse +func (a *ContentPackagesAPIService) ContentDebPackagesReadExecute(r ContentPackagesAPIContentDebPackagesReadRequest) (*DebPackageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebPackageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagesAPIService.ContentDebPackagesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_package_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_package_href"+"}", parameterValueToString(r.debPackageHref, "debPackageHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackagesAPIContentPythonPackagesCreateRequest struct { + ctx context.Context + ApiService *ContentPackagesAPIService + relativePath *string + repository *string + artifact *string + file *os.File + upload *string + sha256 *string + summary *string + description *string + descriptionContentType *string + keywords *string + homePage *string + downloadUrl *string + author *string + authorEmail *string + maintainer *string + maintainerEmail *string + license *string + requiresPython *string + projectUrl *string + projectUrls *map[string]interface{} + platform *string + supportedPlatform *string + requiresDist *map[string]interface{} + providesDist *map[string]interface{} + obsoletesDist *map[string]interface{} + requiresExternal *map[string]interface{} + classifiers *map[string]interface{} +} + +// Path where the artifact is located relative to distributions base_path +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) RelativePath(relativePath string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.relativePath = &relativePath + return r +} + +// A URI of a repository the new content unit should be associated with. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) Repository(repository string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.repository = &repository + return r +} + +// Artifact file representing the physical content +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) Artifact(artifact string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.artifact = &artifact + return r +} + +// An uploaded file that may be turned into the artifact of the content unit. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) File(file *os.File) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.file = file + return r +} + +// An uncommitted upload that may be turned into the artifact of the content unit. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) Upload(upload string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.upload = &upload + return r +} + +// The SHA256 digest of this package. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) Sha256(sha256 string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.sha256 = &sha256 + return r +} + +// A one-line summary of what the package does. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) Summary(summary string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.summary = &summary + return r +} + +// A longer description of the package that can run to several paragraphs. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) Description(description string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.description = &description + return r +} + +// A string stating the markup syntax (if any) used in the distributionโ€™s description, so that tools can intelligently render the description. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) DescriptionContentType(descriptionContentType string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.descriptionContentType = &descriptionContentType + return r +} + +// Additional keywords to be used to assist searching for the package in a larger catalog. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) Keywords(keywords string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.keywords = &keywords + return r +} + +// The URL for the package's home page. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) HomePage(homePage string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.homePage = &homePage + return r +} + +// Legacy field denoting the URL from which this package can be downloaded. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) DownloadUrl(downloadUrl string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.downloadUrl = &downloadUrl + return r +} + +// Text containing the author's name. Contact information can also be added, separated with newlines. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) Author(author string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.author = &author + return r +} + +// The author's e-mail address. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) AuthorEmail(authorEmail string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.authorEmail = &authorEmail + return r +} + +// The maintainer's name at a minimum; additional contact information may be provided. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) Maintainer(maintainer string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.maintainer = &maintainer + return r +} + +// The maintainer's e-mail address. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) MaintainerEmail(maintainerEmail string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.maintainerEmail = &maintainerEmail + return r +} + +// Text indicating the license covering the distribution +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) License(license string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.license = &license + return r +} + +// The Python version(s) that the distribution is guaranteed to be compatible with. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) RequiresPython(requiresPython string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.requiresPython = &requiresPython + return r +} + +// A browsable URL for the project and a label for it, separated by a comma. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) ProjectUrl(projectUrl string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.projectUrl = &projectUrl + return r +} + +// A dictionary of labels and URLs for the project. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) ProjectUrls(projectUrls map[string]interface{}) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.projectUrls = &projectUrls + return r +} + +// A comma-separated list of platform specifications, summarizing the operating systems supported by the package. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) Platform(platform string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.platform = &platform + return r +} + +// Field to specify the OS and CPU for which the binary package was compiled. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) SupportedPlatform(supportedPlatform string) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.supportedPlatform = &supportedPlatform + return r +} + +// A JSON list containing names of some other distutils project required by this distribution. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) RequiresDist(requiresDist map[string]interface{}) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.requiresDist = &requiresDist + return r +} + +// A JSON list containing names of a Distutils project which is contained within this distribution. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) ProvidesDist(providesDist map[string]interface{}) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.providesDist = &providesDist + return r +} + +// A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) ObsoletesDist(obsoletesDist map[string]interface{}) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.obsoletesDist = &obsoletesDist + return r +} + +// A JSON list containing some dependency in the system that the distribution is to be used. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) RequiresExternal(requiresExternal map[string]interface{}) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.requiresExternal = &requiresExternal + return r +} + +// A JSON list containing classification values for a Python package. +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) Classifiers(classifiers map[string]interface{}) ContentPackagesAPIContentPythonPackagesCreateRequest { + r.classifiers = &classifiers + return r +} + +func (r ContentPackagesAPIContentPythonPackagesCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ContentPythonPackagesCreateExecute(r) +} + +/* +ContentPythonPackagesCreate Create a python package content + +Trigger an asynchronous task to create content,optionally create new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackagesAPIContentPythonPackagesCreateRequest +*/ +func (a *ContentPackagesAPIService) ContentPythonPackagesCreate(ctx context.Context) ContentPackagesAPIContentPythonPackagesCreateRequest { + return ContentPackagesAPIContentPythonPackagesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ContentPackagesAPIService) ContentPythonPackagesCreateExecute(r ContentPackagesAPIContentPythonPackagesCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagesAPIService.ContentPythonPackagesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/python/packages/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.relativePath == nil { + return localVarReturnValue, nil, reportError("relativePath is required and must be specified") + } + if strlen(*r.relativePath) < 1 { + return localVarReturnValue, nil, reportError("relativePath must have at least 1 elements") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "repository", r.repository, "") + } + if r.artifact != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "artifact", r.artifact, "") + } + parameterAddToHeaderOrQuery(localVarFormParams, "relative_path", r.relativePath, "") + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.upload != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "upload", r.upload, "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha256", r.sha256, "") + } + if r.summary != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "summary", r.summary, "") + } + if r.description != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "description", r.description, "") + } + if r.descriptionContentType != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "description_content_type", r.descriptionContentType, "") + } + if r.keywords != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "keywords", r.keywords, "") + } + if r.homePage != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "home_page", r.homePage, "") + } + if r.downloadUrl != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "download_url", r.downloadUrl, "") + } + if r.author != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "author", r.author, "") + } + if r.authorEmail != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "author_email", r.authorEmail, "") + } + if r.maintainer != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "maintainer", r.maintainer, "") + } + if r.maintainerEmail != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "maintainer_email", r.maintainerEmail, "") + } + if r.license != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "license", r.license, "") + } + if r.requiresPython != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "requires_python", r.requiresPython, "") + } + if r.projectUrl != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "project_url", r.projectUrl, "") + } + if r.projectUrls != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "project_urls", r.projectUrls, "") + } + if r.platform != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "platform", r.platform, "") + } + if r.supportedPlatform != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "supported_platform", r.supportedPlatform, "") + } + if r.requiresDist != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "requires_dist", r.requiresDist, "") + } + if r.providesDist != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "provides_dist", r.providesDist, "") + } + if r.obsoletesDist != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "obsoletes_dist", r.obsoletesDist, "") + } + if r.requiresExternal != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "requires_external", r.requiresExternal, "") + } + if r.classifiers != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "classifiers", r.classifiers, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackagesAPIContentPythonPackagesListRequest struct { + ctx context.Context + ApiService *ContentPackagesAPIService + author *string + authorIn *[]string + filename *string + filenameContains *string + filenameIn *[]string + keywordsContains *string + keywordsIn *[]string + limit *int32 + name *string + nameIn *[]string + offset *int32 + ordering *[]string + packagetype *string + packagetypeIn *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + requiresPython *string + requiresPythonContains *string + requiresPythonIn *[]string + sha256 *string + sha256In *[]string + version *string + versionGt *string + versionGte *string + versionLt *string + versionLte *string + fields *[]string + excludeFields *[]string +} + +// Filter results where author matches value +func (r ContentPackagesAPIContentPythonPackagesListRequest) Author(author string) ContentPackagesAPIContentPythonPackagesListRequest { + r.author = &author + return r +} + +// Filter results where author is in a comma-separated list of values +func (r ContentPackagesAPIContentPythonPackagesListRequest) AuthorIn(authorIn []string) ContentPackagesAPIContentPythonPackagesListRequest { + r.authorIn = &authorIn + return r +} + +// Filter results where filename matches value +func (r ContentPackagesAPIContentPythonPackagesListRequest) Filename(filename string) ContentPackagesAPIContentPythonPackagesListRequest { + r.filename = &filename + return r +} + +// Filter results where filename contains value +func (r ContentPackagesAPIContentPythonPackagesListRequest) FilenameContains(filenameContains string) ContentPackagesAPIContentPythonPackagesListRequest { + r.filenameContains = &filenameContains + return r +} + +// Filter results where filename is in a comma-separated list of values +func (r ContentPackagesAPIContentPythonPackagesListRequest) FilenameIn(filenameIn []string) ContentPackagesAPIContentPythonPackagesListRequest { + r.filenameIn = &filenameIn + return r +} + +// Filter results where keywords contains value +func (r ContentPackagesAPIContentPythonPackagesListRequest) KeywordsContains(keywordsContains string) ContentPackagesAPIContentPythonPackagesListRequest { + r.keywordsContains = &keywordsContains + return r +} + +// Filter results where keywords is in a comma-separated list of values +func (r ContentPackagesAPIContentPythonPackagesListRequest) KeywordsIn(keywordsIn []string) ContentPackagesAPIContentPythonPackagesListRequest { + r.keywordsIn = &keywordsIn + return r +} + +// Number of results to return per page. +func (r ContentPackagesAPIContentPythonPackagesListRequest) Limit(limit int32) ContentPackagesAPIContentPythonPackagesListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ContentPackagesAPIContentPythonPackagesListRequest) Name(name string) ContentPackagesAPIContentPythonPackagesListRequest { + r.name = &name + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentPackagesAPIContentPythonPackagesListRequest) NameIn(nameIn []string) ContentPackagesAPIContentPythonPackagesListRequest { + r.nameIn = &nameIn + return r +} + +// The initial index from which to return the results. +func (r ContentPackagesAPIContentPythonPackagesListRequest) Offset(offset int32) ContentPackagesAPIContentPythonPackagesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `filename` - Filename * `-filename` - Filename (descending) * `packagetype` - Packagetype * `-packagetype` - Packagetype (descending) * `name` - Name * `-name` - Name (descending) * `version` - Version * `-version` - Version (descending) * `sha256` - Sha256 * `-sha256` - Sha256 (descending) * `python_version` - Python version * `-python_version` - Python version (descending) * `metadata_version` - Metadata version * `-metadata_version` - Metadata version (descending) * `summary` - Summary * `-summary` - Summary (descending) * `description` - Description * `-description` - Description (descending) * `keywords` - Keywords * `-keywords` - Keywords (descending) * `home_page` - Home page * `-home_page` - Home page (descending) * `download_url` - Download url * `-download_url` - Download url (descending) * `author` - Author * `-author` - Author (descending) * `author_email` - Author email * `-author_email` - Author email (descending) * `maintainer` - Maintainer * `-maintainer` - Maintainer (descending) * `maintainer_email` - Maintainer email * `-maintainer_email` - Maintainer email (descending) * `license` - License * `-license` - License (descending) * `requires_python` - Requires python * `-requires_python` - Requires python (descending) * `project_url` - Project url * `-project_url` - Project url (descending) * `platform` - Platform * `-platform` - Platform (descending) * `supported_platform` - Supported platform * `-supported_platform` - Supported platform (descending) * `requires_dist` - Requires dist * `-requires_dist` - Requires dist (descending) * `provides_dist` - Provides dist * `-provides_dist` - Provides dist (descending) * `obsoletes_dist` - Obsoletes dist * `-obsoletes_dist` - Obsoletes dist (descending) * `requires_external` - Requires external * `-requires_external` - Requires external (descending) * `classifiers` - Classifiers * `-classifiers` - Classifiers (descending) * `project_urls` - Project urls * `-project_urls` - Project urls (descending) * `description_content_type` - Description content type * `-description_content_type` - Description content type (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentPackagesAPIContentPythonPackagesListRequest) Ordering(ordering []string) ContentPackagesAPIContentPythonPackagesListRequest { + r.ordering = &ordering + return r +} + +// Filter results where packagetype matches value * `bdist_dmg` - bdist_dmg * `bdist_dumb` - bdist_dumb * `bdist_egg` - bdist_egg * `bdist_msi` - bdist_msi * `bdist_rpm` - bdist_rpm * `bdist_wheel` - bdist_wheel * `bdist_wininst` - bdist_wininst * `sdist` - sdist +func (r ContentPackagesAPIContentPythonPackagesListRequest) Packagetype(packagetype string) ContentPackagesAPIContentPythonPackagesListRequest { + r.packagetype = &packagetype + return r +} + +// Filter results where packagetype is in a comma-separated list of values +func (r ContentPackagesAPIContentPythonPackagesListRequest) PackagetypeIn(packagetypeIn []string) ContentPackagesAPIContentPythonPackagesListRequest { + r.packagetypeIn = &packagetypeIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackagesAPIContentPythonPackagesListRequest) PulpHrefIn(pulpHrefIn []string) ContentPackagesAPIContentPythonPackagesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackagesAPIContentPythonPackagesListRequest) PulpIdIn(pulpIdIn []string) ContentPackagesAPIContentPythonPackagesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagesAPIContentPythonPackagesListRequest) RepositoryVersion(repositoryVersion string) ContentPackagesAPIContentPythonPackagesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagesAPIContentPythonPackagesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentPackagesAPIContentPythonPackagesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagesAPIContentPythonPackagesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentPackagesAPIContentPythonPackagesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where requires_python matches value +func (r ContentPackagesAPIContentPythonPackagesListRequest) RequiresPython(requiresPython string) ContentPackagesAPIContentPythonPackagesListRequest { + r.requiresPython = &requiresPython + return r +} + +// Filter results where requires_python contains value +func (r ContentPackagesAPIContentPythonPackagesListRequest) RequiresPythonContains(requiresPythonContains string) ContentPackagesAPIContentPythonPackagesListRequest { + r.requiresPythonContains = &requiresPythonContains + return r +} + +// Filter results where requires_python is in a comma-separated list of values +func (r ContentPackagesAPIContentPythonPackagesListRequest) RequiresPythonIn(requiresPythonIn []string) ContentPackagesAPIContentPythonPackagesListRequest { + r.requiresPythonIn = &requiresPythonIn + return r +} + +// Filter results where sha256 matches value +func (r ContentPackagesAPIContentPythonPackagesListRequest) Sha256(sha256 string) ContentPackagesAPIContentPythonPackagesListRequest { + r.sha256 = &sha256 + return r +} + +// Filter results where sha256 is in a comma-separated list of values +func (r ContentPackagesAPIContentPythonPackagesListRequest) Sha256In(sha256In []string) ContentPackagesAPIContentPythonPackagesListRequest { + r.sha256In = &sha256In + return r +} + +// Filter results where version matches value +func (r ContentPackagesAPIContentPythonPackagesListRequest) Version(version string) ContentPackagesAPIContentPythonPackagesListRequest { + r.version = &version + return r +} + +// Filter results where version is greater than value +func (r ContentPackagesAPIContentPythonPackagesListRequest) VersionGt(versionGt string) ContentPackagesAPIContentPythonPackagesListRequest { + r.versionGt = &versionGt + return r +} + +// Filter results where version is greater than or equal to value +func (r ContentPackagesAPIContentPythonPackagesListRequest) VersionGte(versionGte string) ContentPackagesAPIContentPythonPackagesListRequest { + r.versionGte = &versionGte + return r +} + +// Filter results where version is less than value +func (r ContentPackagesAPIContentPythonPackagesListRequest) VersionLt(versionLt string) ContentPackagesAPIContentPythonPackagesListRequest { + r.versionLt = &versionLt + return r +} + +// Filter results where version is less than or equal to value +func (r ContentPackagesAPIContentPythonPackagesListRequest) VersionLte(versionLte string) ContentPackagesAPIContentPythonPackagesListRequest { + r.versionLte = &versionLte + return r +} + +// A list of fields to include in the response. +func (r ContentPackagesAPIContentPythonPackagesListRequest) Fields(fields []string) ContentPackagesAPIContentPythonPackagesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackagesAPIContentPythonPackagesListRequest) ExcludeFields(excludeFields []string) ContentPackagesAPIContentPythonPackagesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackagesAPIContentPythonPackagesListRequest) Execute() (*PaginatedpythonPythonPackageContentResponseList, *http.Response, error) { + return r.ApiService.ContentPythonPackagesListExecute(r) +} + +/* +ContentPythonPackagesList List python package contents + + +PythonPackageContent represents each individually installable Python package. In the Python +ecosystem, this is called a Python Distribution, sometimes (ambiguously) refered to as a +package. In Pulp Python, we refer to it as PythonPackageContent. Each +PythonPackageContent corresponds to a single filename, for example +`pulpcore-3.0.0rc1-py3-none-any.whl` or `pulpcore-3.0.0rc1.tar.gz`. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackagesAPIContentPythonPackagesListRequest +*/ +func (a *ContentPackagesAPIService) ContentPythonPackagesList(ctx context.Context) ContentPackagesAPIContentPythonPackagesListRequest { + return ContentPackagesAPIContentPythonPackagesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedpythonPythonPackageContentResponseList +func (a *ContentPackagesAPIService) ContentPythonPackagesListExecute(r ContentPackagesAPIContentPythonPackagesListRequest) (*PaginatedpythonPythonPackageContentResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedpythonPythonPackageContentResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagesAPIService.ContentPythonPackagesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/python/packages/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.author != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "author", r.author, "") + } + if r.authorIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "author__in", r.authorIn, "csv") + } + if r.filename != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filename", r.filename, "") + } + if r.filenameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filename__contains", r.filenameContains, "") + } + if r.filenameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filename__in", r.filenameIn, "csv") + } + if r.keywordsContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "keywords__contains", r.keywordsContains, "") + } + if r.keywordsIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "keywords__in", r.keywordsIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.packagetype != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "packagetype", r.packagetype, "") + } + if r.packagetypeIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "packagetype__in", r.packagetypeIn, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.requiresPython != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "requires_python", r.requiresPython, "") + } + if r.requiresPythonContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "requires_python__contains", r.requiresPythonContains, "") + } + if r.requiresPythonIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "requires_python__in", r.requiresPythonIn, "csv") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256", r.sha256, "") + } + if r.sha256In != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256__in", r.sha256In, "csv") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.versionGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version__gt", r.versionGt, "") + } + if r.versionGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version__gte", r.versionGte, "") + } + if r.versionLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version__lt", r.versionLt, "") + } + if r.versionLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version__lte", r.versionLte, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackagesAPIContentPythonPackagesReadRequest struct { + ctx context.Context + ApiService *ContentPackagesAPIService + pythonPythonPackageContentHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentPackagesAPIContentPythonPackagesReadRequest) Fields(fields []string) ContentPackagesAPIContentPythonPackagesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackagesAPIContentPythonPackagesReadRequest) ExcludeFields(excludeFields []string) ContentPackagesAPIContentPythonPackagesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackagesAPIContentPythonPackagesReadRequest) Execute() (*PythonPythonPackageContentResponse, *http.Response, error) { + return r.ApiService.ContentPythonPackagesReadExecute(r) +} + +/* +ContentPythonPackagesRead Inspect a python package content + + +PythonPackageContent represents each individually installable Python package. In the Python +ecosystem, this is called a Python Distribution, sometimes (ambiguously) refered to as a +package. In Pulp Python, we refer to it as PythonPackageContent. Each +PythonPackageContent corresponds to a single filename, for example +`pulpcore-3.0.0rc1-py3-none-any.whl` or `pulpcore-3.0.0rc1.tar.gz`. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonPackageContentHref + @return ContentPackagesAPIContentPythonPackagesReadRequest +*/ +func (a *ContentPackagesAPIService) ContentPythonPackagesRead(ctx context.Context, pythonPythonPackageContentHref string) ContentPackagesAPIContentPythonPackagesReadRequest { + return ContentPackagesAPIContentPythonPackagesReadRequest{ + ApiService: a, + ctx: ctx, + pythonPythonPackageContentHref: pythonPythonPackageContentHref, + } +} + +// Execute executes the request +// @return PythonPythonPackageContentResponse +func (a *ContentPackagesAPIService) ContentPythonPackagesReadExecute(r ContentPackagesAPIContentPythonPackagesReadRequest) (*PythonPythonPackageContentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PythonPythonPackageContentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagesAPIService.ContentPythonPackagesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_package_content_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_package_content_href"+"}", parameterValueToString(r.pythonPythonPackageContentHref, "pythonPythonPackageContentHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackagesAPIContentRpmPackagesCreateRequest struct { + ctx context.Context + ApiService *ContentPackagesAPIService + repository *string + artifact *string + relativePath *string + file *os.File + upload *string +} + +// A URI of a repository the new content unit should be associated with. +func (r ContentPackagesAPIContentRpmPackagesCreateRequest) Repository(repository string) ContentPackagesAPIContentRpmPackagesCreateRequest { + r.repository = &repository + return r +} + +// Artifact file representing the physical content +func (r ContentPackagesAPIContentRpmPackagesCreateRequest) Artifact(artifact string) ContentPackagesAPIContentRpmPackagesCreateRequest { + r.artifact = &artifact + return r +} + +// Path where the artifact is located relative to distributions base_path +func (r ContentPackagesAPIContentRpmPackagesCreateRequest) RelativePath(relativePath string) ContentPackagesAPIContentRpmPackagesCreateRequest { + r.relativePath = &relativePath + return r +} + +// An uploaded file that may be turned into the artifact of the content unit. +func (r ContentPackagesAPIContentRpmPackagesCreateRequest) File(file *os.File) ContentPackagesAPIContentRpmPackagesCreateRequest { + r.file = file + return r +} + +// An uncommitted upload that may be turned into the artifact of the content unit. +func (r ContentPackagesAPIContentRpmPackagesCreateRequest) Upload(upload string) ContentPackagesAPIContentRpmPackagesCreateRequest { + r.upload = &upload + return r +} + +func (r ContentPackagesAPIContentRpmPackagesCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ContentRpmPackagesCreateExecute(r) +} + +/* +ContentRpmPackagesCreate Create a package + +Trigger an asynchronous task to create content,optionally create new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackagesAPIContentRpmPackagesCreateRequest +*/ +func (a *ContentPackagesAPIService) ContentRpmPackagesCreate(ctx context.Context) ContentPackagesAPIContentRpmPackagesCreateRequest { + return ContentPackagesAPIContentRpmPackagesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ContentPackagesAPIService) ContentRpmPackagesCreateExecute(r ContentPackagesAPIContentRpmPackagesCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagesAPIService.ContentRpmPackagesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/packages/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "repository", r.repository, "") + } + if r.artifact != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "artifact", r.artifact, "") + } + if r.relativePath != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "relative_path", r.relativePath, "") + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.upload != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "upload", r.upload, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackagesAPIContentRpmPackagesListRequest struct { + ctx context.Context + ApiService *ContentPackagesAPIService + arch *string + archContains *string + archIn *[]string + archNe *string + archStartswith *string + checksumType *string + checksumTypeIn *[]string + checksumTypeNe *string + epoch *string + epochIn *[]string + epochNe *string + limit *int32 + name *string + nameContains *string + nameIn *[]string + nameNe *string + nameStartswith *string + offset *int32 + ordering *[]string + pkgId *string + pkgIdIn *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + release *string + releaseContains *string + releaseIn *[]string + releaseNe *string + releaseStartswith *string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + sha256 *string + version *string + versionIn *[]string + versionNe *string + fields *[]string + excludeFields *[]string +} + +// Filter results where arch matches value +func (r ContentPackagesAPIContentRpmPackagesListRequest) Arch(arch string) ContentPackagesAPIContentRpmPackagesListRequest { + r.arch = &arch + return r +} + +// Filter results where arch contains value +func (r ContentPackagesAPIContentRpmPackagesListRequest) ArchContains(archContains string) ContentPackagesAPIContentRpmPackagesListRequest { + r.archContains = &archContains + return r +} + +// Filter results where arch is in a comma-separated list of values +func (r ContentPackagesAPIContentRpmPackagesListRequest) ArchIn(archIn []string) ContentPackagesAPIContentRpmPackagesListRequest { + r.archIn = &archIn + return r +} + +// Filter results where arch not equal to value +func (r ContentPackagesAPIContentRpmPackagesListRequest) ArchNe(archNe string) ContentPackagesAPIContentRpmPackagesListRequest { + r.archNe = &archNe + return r +} + +// Filter results where arch starts with value +func (r ContentPackagesAPIContentRpmPackagesListRequest) ArchStartswith(archStartswith string) ContentPackagesAPIContentRpmPackagesListRequest { + r.archStartswith = &archStartswith + return r +} + +// Filter results where checksum_type matches value * `unknown` - unknown * `md5` - md5 * `sha1` - sha1 * `sha1` - sha1 * `sha224` - sha224 * `sha256` - sha256 * `sha384` - sha384 * `sha512` - sha512 +func (r ContentPackagesAPIContentRpmPackagesListRequest) ChecksumType(checksumType string) ContentPackagesAPIContentRpmPackagesListRequest { + r.checksumType = &checksumType + return r +} + +// Filter results where checksum_type is in a comma-separated list of values +func (r ContentPackagesAPIContentRpmPackagesListRequest) ChecksumTypeIn(checksumTypeIn []string) ContentPackagesAPIContentRpmPackagesListRequest { + r.checksumTypeIn = &checksumTypeIn + return r +} + +// Filter results where checksum_type not equal to value +func (r ContentPackagesAPIContentRpmPackagesListRequest) ChecksumTypeNe(checksumTypeNe string) ContentPackagesAPIContentRpmPackagesListRequest { + r.checksumTypeNe = &checksumTypeNe + return r +} + +// Filter results where epoch matches value +func (r ContentPackagesAPIContentRpmPackagesListRequest) Epoch(epoch string) ContentPackagesAPIContentRpmPackagesListRequest { + r.epoch = &epoch + return r +} + +// Filter results where epoch is in a comma-separated list of values +func (r ContentPackagesAPIContentRpmPackagesListRequest) EpochIn(epochIn []string) ContentPackagesAPIContentRpmPackagesListRequest { + r.epochIn = &epochIn + return r +} + +// Filter results where epoch not equal to value +func (r ContentPackagesAPIContentRpmPackagesListRequest) EpochNe(epochNe string) ContentPackagesAPIContentRpmPackagesListRequest { + r.epochNe = &epochNe + return r +} + +// Number of results to return per page. +func (r ContentPackagesAPIContentRpmPackagesListRequest) Limit(limit int32) ContentPackagesAPIContentRpmPackagesListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ContentPackagesAPIContentRpmPackagesListRequest) Name(name string) ContentPackagesAPIContentRpmPackagesListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ContentPackagesAPIContentRpmPackagesListRequest) NameContains(nameContains string) ContentPackagesAPIContentRpmPackagesListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentPackagesAPIContentRpmPackagesListRequest) NameIn(nameIn []string) ContentPackagesAPIContentRpmPackagesListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name not equal to value +func (r ContentPackagesAPIContentRpmPackagesListRequest) NameNe(nameNe string) ContentPackagesAPIContentRpmPackagesListRequest { + r.nameNe = &nameNe + return r +} + +// Filter results where name starts with value +func (r ContentPackagesAPIContentRpmPackagesListRequest) NameStartswith(nameStartswith string) ContentPackagesAPIContentRpmPackagesListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ContentPackagesAPIContentRpmPackagesListRequest) Offset(offset int32) ContentPackagesAPIContentRpmPackagesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `epoch` - Epoch * `-epoch` - Epoch (descending) * `version` - Version * `-version` - Version (descending) * `release` - Release * `-release` - Release (descending) * `arch` - Arch * `-arch` - Arch (descending) * `evr` - Evr * `-evr` - Evr (descending) * `pkgId` - Pkgid * `-pkgId` - Pkgid (descending) * `checksum_type` - Checksum type * `-checksum_type` - Checksum type (descending) * `summary` - Summary * `-summary` - Summary (descending) * `description` - Description * `-description` - Description (descending) * `url` - Url * `-url` - Url (descending) * `changelogs` - Changelogs * `-changelogs` - Changelogs (descending) * `files` - Files * `-files` - Files (descending) * `requires` - Requires * `-requires` - Requires (descending) * `provides` - Provides * `-provides` - Provides (descending) * `conflicts` - Conflicts * `-conflicts` - Conflicts (descending) * `obsoletes` - Obsoletes * `-obsoletes` - Obsoletes (descending) * `suggests` - Suggests * `-suggests` - Suggests (descending) * `enhances` - Enhances * `-enhances` - Enhances (descending) * `recommends` - Recommends * `-recommends` - Recommends (descending) * `supplements` - Supplements * `-supplements` - Supplements (descending) * `location_base` - Location base * `-location_base` - Location base (descending) * `location_href` - Location href * `-location_href` - Location href (descending) * `rpm_buildhost` - Rpm buildhost * `-rpm_buildhost` - Rpm buildhost (descending) * `rpm_group` - Rpm group * `-rpm_group` - Rpm group (descending) * `rpm_license` - Rpm license * `-rpm_license` - Rpm license (descending) * `rpm_packager` - Rpm packager * `-rpm_packager` - Rpm packager (descending) * `rpm_sourcerpm` - Rpm sourcerpm * `-rpm_sourcerpm` - Rpm sourcerpm (descending) * `rpm_vendor` - Rpm vendor * `-rpm_vendor` - Rpm vendor (descending) * `rpm_header_start` - Rpm header start * `-rpm_header_start` - Rpm header start (descending) * `rpm_header_end` - Rpm header end * `-rpm_header_end` - Rpm header end (descending) * `size_archive` - Size archive * `-size_archive` - Size archive (descending) * `size_installed` - Size installed * `-size_installed` - Size installed (descending) * `size_package` - Size package * `-size_package` - Size package (descending) * `time_build` - Time build * `-time_build` - Time build (descending) * `time_file` - Time file * `-time_file` - Time file (descending) * `is_modular` - Is modular * `-is_modular` - Is modular (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentPackagesAPIContentRpmPackagesListRequest) Ordering(ordering []string) ContentPackagesAPIContentRpmPackagesListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pkgId matches value +func (r ContentPackagesAPIContentRpmPackagesListRequest) PkgId(pkgId string) ContentPackagesAPIContentRpmPackagesListRequest { + r.pkgId = &pkgId + return r +} + +// Filter results where pkgId is in a comma-separated list of values +func (r ContentPackagesAPIContentRpmPackagesListRequest) PkgIdIn(pkgIdIn []string) ContentPackagesAPIContentRpmPackagesListRequest { + r.pkgIdIn = &pkgIdIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackagesAPIContentRpmPackagesListRequest) PulpHrefIn(pulpHrefIn []string) ContentPackagesAPIContentRpmPackagesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentPackagesAPIContentRpmPackagesListRequest) PulpIdIn(pulpIdIn []string) ContentPackagesAPIContentRpmPackagesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter results where release matches value +func (r ContentPackagesAPIContentRpmPackagesListRequest) Release(release string) ContentPackagesAPIContentRpmPackagesListRequest { + r.release = &release + return r +} + +// Filter results where release contains value +func (r ContentPackagesAPIContentRpmPackagesListRequest) ReleaseContains(releaseContains string) ContentPackagesAPIContentRpmPackagesListRequest { + r.releaseContains = &releaseContains + return r +} + +// Filter results where release is in a comma-separated list of values +func (r ContentPackagesAPIContentRpmPackagesListRequest) ReleaseIn(releaseIn []string) ContentPackagesAPIContentRpmPackagesListRequest { + r.releaseIn = &releaseIn + return r +} + +// Filter results where release not equal to value +func (r ContentPackagesAPIContentRpmPackagesListRequest) ReleaseNe(releaseNe string) ContentPackagesAPIContentRpmPackagesListRequest { + r.releaseNe = &releaseNe + return r +} + +// Filter results where release starts with value +func (r ContentPackagesAPIContentRpmPackagesListRequest) ReleaseStartswith(releaseStartswith string) ContentPackagesAPIContentRpmPackagesListRequest { + r.releaseStartswith = &releaseStartswith + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagesAPIContentRpmPackagesListRequest) RepositoryVersion(repositoryVersion string) ContentPackagesAPIContentRpmPackagesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagesAPIContentRpmPackagesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentPackagesAPIContentRpmPackagesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentPackagesAPIContentRpmPackagesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentPackagesAPIContentRpmPackagesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +func (r ContentPackagesAPIContentRpmPackagesListRequest) Sha256(sha256 string) ContentPackagesAPIContentRpmPackagesListRequest { + r.sha256 = &sha256 + return r +} + +// Filter results where version matches value +func (r ContentPackagesAPIContentRpmPackagesListRequest) Version(version string) ContentPackagesAPIContentRpmPackagesListRequest { + r.version = &version + return r +} + +// Filter results where version is in a comma-separated list of values +func (r ContentPackagesAPIContentRpmPackagesListRequest) VersionIn(versionIn []string) ContentPackagesAPIContentRpmPackagesListRequest { + r.versionIn = &versionIn + return r +} + +// Filter results where version not equal to value +func (r ContentPackagesAPIContentRpmPackagesListRequest) VersionNe(versionNe string) ContentPackagesAPIContentRpmPackagesListRequest { + r.versionNe = &versionNe + return r +} + +// A list of fields to include in the response. +func (r ContentPackagesAPIContentRpmPackagesListRequest) Fields(fields []string) ContentPackagesAPIContentRpmPackagesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackagesAPIContentRpmPackagesListRequest) ExcludeFields(excludeFields []string) ContentPackagesAPIContentRpmPackagesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackagesAPIContentRpmPackagesListRequest) Execute() (*PaginatedrpmPackageResponseList, *http.Response, error) { + return r.ApiService.ContentRpmPackagesListExecute(r) +} + +/* +ContentRpmPackagesList List packages + +A ViewSet for Package. + +Define endpoint name which will appear in the API endpoint for this content type. +For example:: + http://pulp.example.com/pulp/api/v3/content/rpm/packages/ + +Also specify queryset and serializer for Package. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentPackagesAPIContentRpmPackagesListRequest +*/ +func (a *ContentPackagesAPIService) ContentRpmPackagesList(ctx context.Context) ContentPackagesAPIContentRpmPackagesListRequest { + return ContentPackagesAPIContentRpmPackagesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmPackageResponseList +func (a *ContentPackagesAPIService) ContentRpmPackagesListExecute(r ContentPackagesAPIContentRpmPackagesListRequest) (*PaginatedrpmPackageResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmPackageResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagesAPIService.ContentRpmPackagesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/packages/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.arch != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "arch", r.arch, "") + } + if r.archContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "arch__contains", r.archContains, "") + } + if r.archIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "arch__in", r.archIn, "csv") + } + if r.archNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "arch__ne", r.archNe, "") + } + if r.archStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "arch__startswith", r.archStartswith, "") + } + if r.checksumType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "checksum_type", r.checksumType, "") + } + if r.checksumTypeIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "checksum_type__in", r.checksumTypeIn, "csv") + } + if r.checksumTypeNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "checksum_type__ne", r.checksumTypeNe, "") + } + if r.epoch != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "epoch", r.epoch, "") + } + if r.epochIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "epoch__in", r.epochIn, "csv") + } + if r.epochNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "epoch__ne", r.epochNe, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__ne", r.nameNe, "") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pkgId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pkgId", r.pkgId, "") + } + if r.pkgIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pkgId__in", r.pkgIdIn, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.release != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "release", r.release, "") + } + if r.releaseContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "release__contains", r.releaseContains, "") + } + if r.releaseIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "release__in", r.releaseIn, "csv") + } + if r.releaseNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "release__ne", r.releaseNe, "") + } + if r.releaseStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "release__startswith", r.releaseStartswith, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256", r.sha256, "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.versionIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version__in", r.versionIn, "csv") + } + if r.versionNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version__ne", r.versionNe, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentPackagesAPIContentRpmPackagesReadRequest struct { + ctx context.Context + ApiService *ContentPackagesAPIService + rpmPackageHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentPackagesAPIContentRpmPackagesReadRequest) Fields(fields []string) ContentPackagesAPIContentRpmPackagesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentPackagesAPIContentRpmPackagesReadRequest) ExcludeFields(excludeFields []string) ContentPackagesAPIContentRpmPackagesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentPackagesAPIContentRpmPackagesReadRequest) Execute() (*RpmPackageResponse, *http.Response, error) { + return r.ApiService.ContentRpmPackagesReadExecute(r) +} + +/* +ContentRpmPackagesRead Inspect a package + +A ViewSet for Package. + +Define endpoint name which will appear in the API endpoint for this content type. +For example:: + http://pulp.example.com/pulp/api/v3/content/rpm/packages/ + +Also specify queryset and serializer for Package. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmPackageHref + @return ContentPackagesAPIContentRpmPackagesReadRequest +*/ +func (a *ContentPackagesAPIService) ContentRpmPackagesRead(ctx context.Context, rpmPackageHref string) ContentPackagesAPIContentRpmPackagesReadRequest { + return ContentPackagesAPIContentRpmPackagesReadRequest{ + ApiService: a, + ctx: ctx, + rpmPackageHref: rpmPackageHref, + } +} + +// Execute executes the request +// @return RpmPackageResponse +func (a *ContentPackagesAPIService) ContentRpmPackagesReadExecute(r ContentPackagesAPIContentRpmPackagesReadRequest) (*RpmPackageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmPackageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentPackagesAPIService.ContentRpmPackagesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_package_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_package_href"+"}", parameterValueToString(r.rpmPackageHref, "rpmPackageHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_refs.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_refs.go new file mode 100644 index 0000000000..0d7b208c0b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_refs.go @@ -0,0 +1,439 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentRefsAPIService ContentRefsAPI service +type ContentRefsAPIService service + +type ContentRefsAPIContentOstreeRefsListRequest struct { + ctx context.Context + ApiService *ContentRefsAPIService + checksum *string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +func (r ContentRefsAPIContentOstreeRefsListRequest) Checksum(checksum string) ContentRefsAPIContentOstreeRefsListRequest { + r.checksum = &checksum + return r +} + +// Number of results to return per page. +func (r ContentRefsAPIContentOstreeRefsListRequest) Limit(limit int32) ContentRefsAPIContentOstreeRefsListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ContentRefsAPIContentOstreeRefsListRequest) Name(name string) ContentRefsAPIContentOstreeRefsListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ContentRefsAPIContentOstreeRefsListRequest) NameContains(nameContains string) ContentRefsAPIContentOstreeRefsListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r ContentRefsAPIContentOstreeRefsListRequest) NameIcontains(nameIcontains string) ContentRefsAPIContentOstreeRefsListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentRefsAPIContentOstreeRefsListRequest) NameIn(nameIn []string) ContentRefsAPIContentOstreeRefsListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r ContentRefsAPIContentOstreeRefsListRequest) NameStartswith(nameStartswith string) ContentRefsAPIContentOstreeRefsListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ContentRefsAPIContentOstreeRefsListRequest) Offset(offset int32) ContentRefsAPIContentOstreeRefsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentRefsAPIContentOstreeRefsListRequest) Ordering(ordering []string) ContentRefsAPIContentOstreeRefsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentRefsAPIContentOstreeRefsListRequest) PulpHrefIn(pulpHrefIn []string) ContentRefsAPIContentOstreeRefsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentRefsAPIContentOstreeRefsListRequest) PulpIdIn(pulpIdIn []string) ContentRefsAPIContentOstreeRefsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentRefsAPIContentOstreeRefsListRequest) RepositoryVersion(repositoryVersion string) ContentRefsAPIContentOstreeRefsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentRefsAPIContentOstreeRefsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentRefsAPIContentOstreeRefsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentRefsAPIContentOstreeRefsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentRefsAPIContentOstreeRefsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentRefsAPIContentOstreeRefsListRequest) Fields(fields []string) ContentRefsAPIContentOstreeRefsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentRefsAPIContentOstreeRefsListRequest) ExcludeFields(excludeFields []string) ContentRefsAPIContentOstreeRefsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentRefsAPIContentOstreeRefsListRequest) Execute() (*PaginatedostreeOstreeRefResponseList, *http.Response, error) { + return r.ApiService.ContentOstreeRefsListExecute(r) +} + +/* +ContentOstreeRefsList List ostree refs + +A ViewSet class for OSTree head commits. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentRefsAPIContentOstreeRefsListRequest +*/ +func (a *ContentRefsAPIService) ContentOstreeRefsList(ctx context.Context) ContentRefsAPIContentOstreeRefsListRequest { + return ContentRefsAPIContentOstreeRefsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedostreeOstreeRefResponseList +func (a *ContentRefsAPIService) ContentOstreeRefsListExecute(r ContentRefsAPIContentOstreeRefsListRequest) (*PaginatedostreeOstreeRefResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedostreeOstreeRefResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentRefsAPIService.ContentOstreeRefsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ostree/refs/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.checksum != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "checksum", r.checksum, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentRefsAPIContentOstreeRefsReadRequest struct { + ctx context.Context + ApiService *ContentRefsAPIService + ostreeOstreeRefHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentRefsAPIContentOstreeRefsReadRequest) Fields(fields []string) ContentRefsAPIContentOstreeRefsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentRefsAPIContentOstreeRefsReadRequest) ExcludeFields(excludeFields []string) ContentRefsAPIContentOstreeRefsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentRefsAPIContentOstreeRefsReadRequest) Execute() (*OstreeOstreeRefResponse, *http.Response, error) { + return r.ApiService.ContentOstreeRefsReadExecute(r) +} + +/* +ContentOstreeRefsRead Inspect an ostree ref + +A ViewSet class for OSTree head commits. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRefHref + @return ContentRefsAPIContentOstreeRefsReadRequest +*/ +func (a *ContentRefsAPIService) ContentOstreeRefsRead(ctx context.Context, ostreeOstreeRefHref string) ContentRefsAPIContentOstreeRefsReadRequest { + return ContentRefsAPIContentOstreeRefsReadRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRefHref: ostreeOstreeRefHref, + } +} + +// Execute executes the request +// @return OstreeOstreeRefResponse +func (a *ContentRefsAPIService) ContentOstreeRefsReadExecute(r ContentRefsAPIContentOstreeRefsReadRequest) (*OstreeOstreeRefResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OstreeOstreeRefResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentRefsAPIService.ContentOstreeRefsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_ref_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_ref_href"+"}", parameterValueToString(r.ostreeOstreeRefHref, "ostreeOstreeRefHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_release_architectures.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_release_architectures.go new file mode 100644 index 0000000000..94cdc16237 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_release_architectures.go @@ -0,0 +1,545 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentReleaseArchitecturesAPIService ContentReleaseArchitecturesAPI service +type ContentReleaseArchitecturesAPIService service + +type ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesCreateRequest struct { + ctx context.Context + ApiService *ContentReleaseArchitecturesAPIService + debReleaseArchitecture *DebReleaseArchitecture +} + +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesCreateRequest) DebReleaseArchitecture(debReleaseArchitecture DebReleaseArchitecture) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesCreateRequest { + r.debReleaseArchitecture = &debReleaseArchitecture + return r +} + +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesCreateRequest) Execute() (*DebReleaseArchitectureResponse, *http.Response, error) { + return r.ApiService.ContentDebReleaseArchitecturesCreateExecute(r) +} + +/* +ContentDebReleaseArchitecturesCreate Create a release architecture + +A ReleaseArchitecture represents a single dpkg architecture string. + +Associated artifacts: None; contains only metadata. + +Every ReleaseArchitecture is always associated with exactly one Release. This indicates that +the release/distribution in question supports this architecture. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesCreateRequest +*/ +func (a *ContentReleaseArchitecturesAPIService) ContentDebReleaseArchitecturesCreate(ctx context.Context) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesCreateRequest { + return ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DebReleaseArchitectureResponse +func (a *ContentReleaseArchitecturesAPIService) ContentDebReleaseArchitecturesCreateExecute(r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesCreateRequest) (*DebReleaseArchitectureResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebReleaseArchitectureResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentReleaseArchitecturesAPIService.ContentDebReleaseArchitecturesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/release_architectures/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debReleaseArchitecture == nil { + return localVarReturnValue, nil, reportError("debReleaseArchitecture is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debReleaseArchitecture + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest struct { + ctx context.Context + ApiService *ContentReleaseArchitecturesAPIService + architecture *string + codename *string + distribution *string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + suite *string + fields *[]string + excludeFields *[]string +} + +// Filter results where architecture matches value +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) Architecture(architecture string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.architecture = &architecture + return r +} + +// Filter results where codename matches value +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) Codename(codename string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.codename = &codename + return r +} + +// Filter results where distribution matches value +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) Distribution(distribution string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.distribution = &distribution + return r +} + +// Number of results to return per page. +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) Limit(limit int32) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) Offset(offset int32) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `architecture` - Architecture * `-architecture` - Architecture (descending) * `distribution` - Distribution * `-distribution` - Distribution (descending) * `codename` - Codename * `-codename` - Codename (descending) * `suite` - Suite * `-suite` - Suite (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) Ordering(ordering []string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) PulpHrefIn(pulpHrefIn []string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) PulpIdIn(pulpIdIn []string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) RepositoryVersion(repositoryVersion string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where suite matches value +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) Suite(suite string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.suite = &suite + return r +} + +// A list of fields to include in the response. +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) Fields(fields []string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) ExcludeFields(excludeFields []string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) Execute() (*PaginateddebReleaseArchitectureResponseList, *http.Response, error) { + return r.ApiService.ContentDebReleaseArchitecturesListExecute(r) +} + +/* +ContentDebReleaseArchitecturesList List release architectures + +A ReleaseArchitecture represents a single dpkg architecture string. + +Associated artifacts: None; contains only metadata. + +Every ReleaseArchitecture is always associated with exactly one Release. This indicates that +the release/distribution in question supports this architecture. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest +*/ +func (a *ContentReleaseArchitecturesAPIService) ContentDebReleaseArchitecturesList(ctx context.Context) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest { + return ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebReleaseArchitectureResponseList +func (a *ContentReleaseArchitecturesAPIService) ContentDebReleaseArchitecturesListExecute(r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesListRequest) (*PaginateddebReleaseArchitectureResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebReleaseArchitectureResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentReleaseArchitecturesAPIService.ContentDebReleaseArchitecturesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/release_architectures/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.architecture != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "architecture", r.architecture, "") + } + if r.codename != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "codename", r.codename, "") + } + if r.distribution != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "distribution", r.distribution, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.suite != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "suite", r.suite, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesReadRequest struct { + ctx context.Context + ApiService *ContentReleaseArchitecturesAPIService + debReleaseArchitectureHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesReadRequest) Fields(fields []string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesReadRequest) ExcludeFields(excludeFields []string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesReadRequest) Execute() (*DebReleaseArchitectureResponse, *http.Response, error) { + return r.ApiService.ContentDebReleaseArchitecturesReadExecute(r) +} + +/* +ContentDebReleaseArchitecturesRead Inspect a release architecture + +A ReleaseArchitecture represents a single dpkg architecture string. + +Associated artifacts: None; contains only metadata. + +Every ReleaseArchitecture is always associated with exactly one Release. This indicates that +the release/distribution in question supports this architecture. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debReleaseArchitectureHref + @return ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesReadRequest +*/ +func (a *ContentReleaseArchitecturesAPIService) ContentDebReleaseArchitecturesRead(ctx context.Context, debReleaseArchitectureHref string) ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesReadRequest { + return ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesReadRequest{ + ApiService: a, + ctx: ctx, + debReleaseArchitectureHref: debReleaseArchitectureHref, + } +} + +// Execute executes the request +// @return DebReleaseArchitectureResponse +func (a *ContentReleaseArchitecturesAPIService) ContentDebReleaseArchitecturesReadExecute(r ContentReleaseArchitecturesAPIContentDebReleaseArchitecturesReadRequest) (*DebReleaseArchitectureResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebReleaseArchitectureResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentReleaseArchitecturesAPIService.ContentDebReleaseArchitecturesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_release_architecture_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_release_architecture_href"+"}", parameterValueToString(r.debReleaseArchitectureHref, "debReleaseArchitectureHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_release_components.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_release_components.go new file mode 100644 index 0000000000..e302911041 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_release_components.go @@ -0,0 +1,536 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentReleaseComponentsAPIService ContentReleaseComponentsAPI service +type ContentReleaseComponentsAPIService service + +type ContentReleaseComponentsAPIContentDebReleaseComponentsCreateRequest struct { + ctx context.Context + ApiService *ContentReleaseComponentsAPIService + debReleaseComponent *DebReleaseComponent +} + +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsCreateRequest) DebReleaseComponent(debReleaseComponent DebReleaseComponent) ContentReleaseComponentsAPIContentDebReleaseComponentsCreateRequest { + r.debReleaseComponent = &debReleaseComponent + return r +} + +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsCreateRequest) Execute() (*DebReleaseComponentResponse, *http.Response, error) { + return r.ApiService.ContentDebReleaseComponentsCreateExecute(r) +} + +/* +ContentDebReleaseComponentsCreate Create a release component + +A ReleaseComponent represents a single APT repository component. + +Associated artifacts: None; contains only metadata. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentReleaseComponentsAPIContentDebReleaseComponentsCreateRequest +*/ +func (a *ContentReleaseComponentsAPIService) ContentDebReleaseComponentsCreate(ctx context.Context) ContentReleaseComponentsAPIContentDebReleaseComponentsCreateRequest { + return ContentReleaseComponentsAPIContentDebReleaseComponentsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DebReleaseComponentResponse +func (a *ContentReleaseComponentsAPIService) ContentDebReleaseComponentsCreateExecute(r ContentReleaseComponentsAPIContentDebReleaseComponentsCreateRequest) (*DebReleaseComponentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebReleaseComponentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentReleaseComponentsAPIService.ContentDebReleaseComponentsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/release_components/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debReleaseComponent == nil { + return localVarReturnValue, nil, reportError("debReleaseComponent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debReleaseComponent + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest struct { + ctx context.Context + ApiService *ContentReleaseComponentsAPIService + codename *string + component *string + distribution *string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + suite *string + fields *[]string + excludeFields *[]string +} + +// Filter results where codename matches value +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) Codename(codename string) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.codename = &codename + return r +} + +// Filter results where component matches value +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) Component(component string) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.component = &component + return r +} + +// Filter results where distribution matches value +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) Distribution(distribution string) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.distribution = &distribution + return r +} + +// Number of results to return per page. +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) Limit(limit int32) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) Offset(offset int32) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `distribution` - Distribution * `-distribution` - Distribution (descending) * `component` - Component * `-component` - Component (descending) * `codename` - Codename * `-codename` - Codename (descending) * `suite` - Suite * `-suite` - Suite (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) Ordering(ordering []string) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) PulpHrefIn(pulpHrefIn []string) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) PulpIdIn(pulpIdIn []string) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) RepositoryVersion(repositoryVersion string) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where suite matches value +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) Suite(suite string) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.suite = &suite + return r +} + +// A list of fields to include in the response. +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) Fields(fields []string) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) ExcludeFields(excludeFields []string) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) Execute() (*PaginateddebReleaseComponentResponseList, *http.Response, error) { + return r.ApiService.ContentDebReleaseComponentsListExecute(r) +} + +/* +ContentDebReleaseComponentsList List release components + +A ReleaseComponent represents a single APT repository component. + +Associated artifacts: None; contains only metadata. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest +*/ +func (a *ContentReleaseComponentsAPIService) ContentDebReleaseComponentsList(ctx context.Context) ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest { + return ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebReleaseComponentResponseList +func (a *ContentReleaseComponentsAPIService) ContentDebReleaseComponentsListExecute(r ContentReleaseComponentsAPIContentDebReleaseComponentsListRequest) (*PaginateddebReleaseComponentResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebReleaseComponentResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentReleaseComponentsAPIService.ContentDebReleaseComponentsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/release_components/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.codename != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "codename", r.codename, "") + } + if r.component != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "component", r.component, "") + } + if r.distribution != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "distribution", r.distribution, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.suite != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "suite", r.suite, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentReleaseComponentsAPIContentDebReleaseComponentsReadRequest struct { + ctx context.Context + ApiService *ContentReleaseComponentsAPIService + debReleaseComponentHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsReadRequest) Fields(fields []string) ContentReleaseComponentsAPIContentDebReleaseComponentsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsReadRequest) ExcludeFields(excludeFields []string) ContentReleaseComponentsAPIContentDebReleaseComponentsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentReleaseComponentsAPIContentDebReleaseComponentsReadRequest) Execute() (*DebReleaseComponentResponse, *http.Response, error) { + return r.ApiService.ContentDebReleaseComponentsReadExecute(r) +} + +/* +ContentDebReleaseComponentsRead Inspect a release component + +A ReleaseComponent represents a single APT repository component. + +Associated artifacts: None; contains only metadata. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debReleaseComponentHref + @return ContentReleaseComponentsAPIContentDebReleaseComponentsReadRequest +*/ +func (a *ContentReleaseComponentsAPIService) ContentDebReleaseComponentsRead(ctx context.Context, debReleaseComponentHref string) ContentReleaseComponentsAPIContentDebReleaseComponentsReadRequest { + return ContentReleaseComponentsAPIContentDebReleaseComponentsReadRequest{ + ApiService: a, + ctx: ctx, + debReleaseComponentHref: debReleaseComponentHref, + } +} + +// Execute executes the request +// @return DebReleaseComponentResponse +func (a *ContentReleaseComponentsAPIService) ContentDebReleaseComponentsReadExecute(r ContentReleaseComponentsAPIContentDebReleaseComponentsReadRequest) (*DebReleaseComponentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebReleaseComponentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentReleaseComponentsAPIService.ContentDebReleaseComponentsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_release_component_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_release_component_href"+"}", parameterValueToString(r.debReleaseComponentHref, "debReleaseComponentHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_release_files.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_release_files.go new file mode 100644 index 0000000000..574abaacc2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_release_files.go @@ -0,0 +1,551 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentReleaseFilesAPIService ContentReleaseFilesAPI service +type ContentReleaseFilesAPIService service + +type ContentReleaseFilesAPIContentDebReleaseFilesCreateRequest struct { + ctx context.Context + ApiService *ContentReleaseFilesAPIService + debReleaseFile *DebReleaseFile +} + +func (r ContentReleaseFilesAPIContentDebReleaseFilesCreateRequest) DebReleaseFile(debReleaseFile DebReleaseFile) ContentReleaseFilesAPIContentDebReleaseFilesCreateRequest { + r.debReleaseFile = &debReleaseFile + return r +} + +func (r ContentReleaseFilesAPIContentDebReleaseFilesCreateRequest) Execute() (*DebReleaseFileResponse, *http.Response, error) { + return r.ApiService.ContentDebReleaseFilesCreateExecute(r) +} + +/* +ContentDebReleaseFilesCreate Create a release file + +A ReleaseFile represents the Release file(s) from a single APT distribution. + +Associated artifacts: At least one of 'Release' and 'InRelease' file. If the 'Release' file is +present, then there may also be a 'Release.gpg' detached signature file for it. + +Note: The verbatim publisher will republish all associated artifacts, while the APT publisher +(both simple and structured mode) will generate any 'Release' files it needs when creating the +publication. It does not make use of ReleaseFile content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentReleaseFilesAPIContentDebReleaseFilesCreateRequest +*/ +func (a *ContentReleaseFilesAPIService) ContentDebReleaseFilesCreate(ctx context.Context) ContentReleaseFilesAPIContentDebReleaseFilesCreateRequest { + return ContentReleaseFilesAPIContentDebReleaseFilesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DebReleaseFileResponse +func (a *ContentReleaseFilesAPIService) ContentDebReleaseFilesCreateExecute(r ContentReleaseFilesAPIContentDebReleaseFilesCreateRequest) (*DebReleaseFileResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebReleaseFileResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentReleaseFilesAPIService.ContentDebReleaseFilesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/release_files/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debReleaseFile == nil { + return localVarReturnValue, nil, reportError("debReleaseFile is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debReleaseFile + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentReleaseFilesAPIContentDebReleaseFilesListRequest struct { + ctx context.Context + ApiService *ContentReleaseFilesAPIService + codename *string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + relativePath *string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + sha256 *string + suite *string + fields *[]string + excludeFields *[]string +} + +// Filter results where codename matches value +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) Codename(codename string) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.codename = &codename + return r +} + +// Number of results to return per page. +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) Limit(limit int32) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) Offset(offset int32) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `codename` - Codename * `-codename` - Codename (descending) * `suite` - Suite * `-suite` - Suite (descending) * `distribution` - Distribution * `-distribution` - Distribution (descending) * `components` - Components * `-components` - Components (descending) * `architectures` - Architectures * `-architectures` - Architectures (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `sha256` - Sha256 * `-sha256` - Sha256 (descending) * `artifact_set_sha256` - Artifact set sha256 * `-artifact_set_sha256` - Artifact set sha256 (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) Ordering(ordering []string) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) PulpHrefIn(pulpHrefIn []string) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) PulpIdIn(pulpIdIn []string) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter results where relative_path matches value +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) RelativePath(relativePath string) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.relativePath = &relativePath + return r +} + +// Repository Version referenced by HREF +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) RepositoryVersion(repositoryVersion string) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where sha256 matches value +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) Sha256(sha256 string) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.sha256 = &sha256 + return r +} + +// Filter results where suite matches value +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) Suite(suite string) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.suite = &suite + return r +} + +// A list of fields to include in the response. +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) Fields(fields []string) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) ExcludeFields(excludeFields []string) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) Execute() (*PaginateddebReleaseFileResponseList, *http.Response, error) { + return r.ApiService.ContentDebReleaseFilesListExecute(r) +} + +/* +ContentDebReleaseFilesList List release files + +A ReleaseFile represents the Release file(s) from a single APT distribution. + +Associated artifacts: At least one of 'Release' and 'InRelease' file. If the 'Release' file is +present, then there may also be a 'Release.gpg' detached signature file for it. + +Note: The verbatim publisher will republish all associated artifacts, while the APT publisher +(both simple and structured mode) will generate any 'Release' files it needs when creating the +publication. It does not make use of ReleaseFile content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentReleaseFilesAPIContentDebReleaseFilesListRequest +*/ +func (a *ContentReleaseFilesAPIService) ContentDebReleaseFilesList(ctx context.Context) ContentReleaseFilesAPIContentDebReleaseFilesListRequest { + return ContentReleaseFilesAPIContentDebReleaseFilesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebReleaseFileResponseList +func (a *ContentReleaseFilesAPIService) ContentDebReleaseFilesListExecute(r ContentReleaseFilesAPIContentDebReleaseFilesListRequest) (*PaginateddebReleaseFileResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebReleaseFileResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentReleaseFilesAPIService.ContentDebReleaseFilesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/release_files/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.codename != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "codename", r.codename, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.relativePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "relative_path", r.relativePath, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sha256", r.sha256, "") + } + if r.suite != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "suite", r.suite, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentReleaseFilesAPIContentDebReleaseFilesReadRequest struct { + ctx context.Context + ApiService *ContentReleaseFilesAPIService + debReleaseFileHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentReleaseFilesAPIContentDebReleaseFilesReadRequest) Fields(fields []string) ContentReleaseFilesAPIContentDebReleaseFilesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentReleaseFilesAPIContentDebReleaseFilesReadRequest) ExcludeFields(excludeFields []string) ContentReleaseFilesAPIContentDebReleaseFilesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentReleaseFilesAPIContentDebReleaseFilesReadRequest) Execute() (*DebReleaseFileResponse, *http.Response, error) { + return r.ApiService.ContentDebReleaseFilesReadExecute(r) +} + +/* +ContentDebReleaseFilesRead Inspect a release file + +A ReleaseFile represents the Release file(s) from a single APT distribution. + +Associated artifacts: At least one of 'Release' and 'InRelease' file. If the 'Release' file is +present, then there may also be a 'Release.gpg' detached signature file for it. + +Note: The verbatim publisher will republish all associated artifacts, while the APT publisher +(both simple and structured mode) will generate any 'Release' files it needs when creating the +publication. It does not make use of ReleaseFile content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debReleaseFileHref + @return ContentReleaseFilesAPIContentDebReleaseFilesReadRequest +*/ +func (a *ContentReleaseFilesAPIService) ContentDebReleaseFilesRead(ctx context.Context, debReleaseFileHref string) ContentReleaseFilesAPIContentDebReleaseFilesReadRequest { + return ContentReleaseFilesAPIContentDebReleaseFilesReadRequest{ + ApiService: a, + ctx: ctx, + debReleaseFileHref: debReleaseFileHref, + } +} + +// Execute executes the request +// @return DebReleaseFileResponse +func (a *ContentReleaseFilesAPIService) ContentDebReleaseFilesReadExecute(r ContentReleaseFilesAPIContentDebReleaseFilesReadRequest) (*DebReleaseFileResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebReleaseFileResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentReleaseFilesAPIService.ContentDebReleaseFilesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_release_file_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_release_file_href"+"}", parameterValueToString(r.debReleaseFileHref, "debReleaseFileHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_releases.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_releases.go new file mode 100644 index 0000000000..018dfc1be1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_releases.go @@ -0,0 +1,550 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentReleasesAPIService ContentReleasesAPI service +type ContentReleasesAPIService service + +type ContentReleasesAPIContentDebReleasesCreateRequest struct { + ctx context.Context + ApiService *ContentReleasesAPIService + debRelease *DebRelease +} + +func (r ContentReleasesAPIContentDebReleasesCreateRequest) DebRelease(debRelease DebRelease) ContentReleasesAPIContentDebReleasesCreateRequest { + r.debRelease = &debRelease + return r +} + +func (r ContentReleasesAPIContentDebReleasesCreateRequest) Execute() (*DebReleaseResponse, *http.Response, error) { + return r.ApiService.ContentDebReleasesCreateExecute(r) +} + +/* +ContentDebReleasesCreate Create a release + +The Release contains release file fields, that are not relevant to the APT repo structure. + +Associated artifacts: None; contains only metadata. + +By non-structure relevant release file fields, we mean anything other than the Components and +Architectures fields. These are handled by their own models and are not part of this model. + +Note that the distribution field is part of this model, but is not added to any published +release files. The "distribution" is defined as the path between 'dists/' and some 'Release' +file. As such, it encodes the path to the relevant release file within the APT repository. +It is often (but not always) equal to the "codename" or the "suite". + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentReleasesAPIContentDebReleasesCreateRequest +*/ +func (a *ContentReleasesAPIService) ContentDebReleasesCreate(ctx context.Context) ContentReleasesAPIContentDebReleasesCreateRequest { + return ContentReleasesAPIContentDebReleasesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DebReleaseResponse +func (a *ContentReleasesAPIService) ContentDebReleasesCreateExecute(r ContentReleasesAPIContentDebReleasesCreateRequest) (*DebReleaseResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebReleaseResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentReleasesAPIService.ContentDebReleasesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/releases/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debRelease == nil { + return localVarReturnValue, nil, reportError("debRelease is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debRelease + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentReleasesAPIContentDebReleasesListRequest struct { + ctx context.Context + ApiService *ContentReleasesAPIService + codename *string + distribution *string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + suite *string + fields *[]string + excludeFields *[]string +} + +// Filter results where codename matches value +func (r ContentReleasesAPIContentDebReleasesListRequest) Codename(codename string) ContentReleasesAPIContentDebReleasesListRequest { + r.codename = &codename + return r +} + +// Filter results where distribution matches value +func (r ContentReleasesAPIContentDebReleasesListRequest) Distribution(distribution string) ContentReleasesAPIContentDebReleasesListRequest { + r.distribution = &distribution + return r +} + +// Number of results to return per page. +func (r ContentReleasesAPIContentDebReleasesListRequest) Limit(limit int32) ContentReleasesAPIContentDebReleasesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentReleasesAPIContentDebReleasesListRequest) Offset(offset int32) ContentReleasesAPIContentDebReleasesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `codename` - Codename * `-codename` - Codename (descending) * `suite` - Suite * `-suite` - Suite (descending) * `distribution` - Distribution * `-distribution` - Distribution (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentReleasesAPIContentDebReleasesListRequest) Ordering(ordering []string) ContentReleasesAPIContentDebReleasesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentReleasesAPIContentDebReleasesListRequest) PulpHrefIn(pulpHrefIn []string) ContentReleasesAPIContentDebReleasesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentReleasesAPIContentDebReleasesListRequest) PulpIdIn(pulpIdIn []string) ContentReleasesAPIContentDebReleasesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentReleasesAPIContentDebReleasesListRequest) RepositoryVersion(repositoryVersion string) ContentReleasesAPIContentDebReleasesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentReleasesAPIContentDebReleasesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentReleasesAPIContentDebReleasesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentReleasesAPIContentDebReleasesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentReleasesAPIContentDebReleasesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where suite matches value +func (r ContentReleasesAPIContentDebReleasesListRequest) Suite(suite string) ContentReleasesAPIContentDebReleasesListRequest { + r.suite = &suite + return r +} + +// A list of fields to include in the response. +func (r ContentReleasesAPIContentDebReleasesListRequest) Fields(fields []string) ContentReleasesAPIContentDebReleasesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentReleasesAPIContentDebReleasesListRequest) ExcludeFields(excludeFields []string) ContentReleasesAPIContentDebReleasesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentReleasesAPIContentDebReleasesListRequest) Execute() (*PaginateddebReleaseResponseList, *http.Response, error) { + return r.ApiService.ContentDebReleasesListExecute(r) +} + +/* +ContentDebReleasesList List releases + +The Release contains release file fields, that are not relevant to the APT repo structure. + +Associated artifacts: None; contains only metadata. + +By non-structure relevant release file fields, we mean anything other than the Components and +Architectures fields. These are handled by their own models and are not part of this model. + +Note that the distribution field is part of this model, but is not added to any published +release files. The "distribution" is defined as the path between 'dists/' and some 'Release' +file. As such, it encodes the path to the relevant release file within the APT repository. +It is often (but not always) equal to the "codename" or the "suite". + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentReleasesAPIContentDebReleasesListRequest +*/ +func (a *ContentReleasesAPIService) ContentDebReleasesList(ctx context.Context) ContentReleasesAPIContentDebReleasesListRequest { + return ContentReleasesAPIContentDebReleasesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebReleaseResponseList +func (a *ContentReleasesAPIService) ContentDebReleasesListExecute(r ContentReleasesAPIContentDebReleasesListRequest) (*PaginateddebReleaseResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebReleaseResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentReleasesAPIService.ContentDebReleasesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/deb/releases/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.codename != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "codename", r.codename, "") + } + if r.distribution != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "distribution", r.distribution, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.suite != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "suite", r.suite, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentReleasesAPIContentDebReleasesReadRequest struct { + ctx context.Context + ApiService *ContentReleasesAPIService + debReleaseHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentReleasesAPIContentDebReleasesReadRequest) Fields(fields []string) ContentReleasesAPIContentDebReleasesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentReleasesAPIContentDebReleasesReadRequest) ExcludeFields(excludeFields []string) ContentReleasesAPIContentDebReleasesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentReleasesAPIContentDebReleasesReadRequest) Execute() (*DebReleaseResponse, *http.Response, error) { + return r.ApiService.ContentDebReleasesReadExecute(r) +} + +/* +ContentDebReleasesRead Inspect a release + +The Release contains release file fields, that are not relevant to the APT repo structure. + +Associated artifacts: None; contains only metadata. + +By non-structure relevant release file fields, we mean anything other than the Components and +Architectures fields. These are handled by their own models and are not part of this model. + +Note that the distribution field is part of this model, but is not added to any published +release files. The "distribution" is defined as the path between 'dists/' and some 'Release' +file. As such, it encodes the path to the relevant release file within the APT repository. +It is often (but not always) equal to the "codename" or the "suite". + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debReleaseHref + @return ContentReleasesAPIContentDebReleasesReadRequest +*/ +func (a *ContentReleasesAPIService) ContentDebReleasesRead(ctx context.Context, debReleaseHref string) ContentReleasesAPIContentDebReleasesReadRequest { + return ContentReleasesAPIContentDebReleasesReadRequest{ + ApiService: a, + ctx: ctx, + debReleaseHref: debReleaseHref, + } +} + +// Execute executes the request +// @return DebReleaseResponse +func (a *ContentReleasesAPIService) ContentDebReleasesReadExecute(r ContentReleasesAPIContentDebReleasesReadRequest) (*DebReleaseResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebReleaseResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentReleasesAPIService.ContentDebReleasesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_release_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_release_href"+"}", parameterValueToString(r.debReleaseHref, "debReleaseHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_repo_metadata_files.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_repo_metadata_files.go new file mode 100644 index 0000000000..fae8addd03 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_repo_metadata_files.go @@ -0,0 +1,380 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentRepoMetadataFilesAPIService ContentRepoMetadataFilesAPI service +type ContentRepoMetadataFilesAPIService service + +type ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest struct { + ctx context.Context + ApiService *ContentRepoMetadataFilesAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest) Limit(limit int32) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest) Offset(offset int32) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest) Ordering(ordering []string) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest) PulpHrefIn(pulpHrefIn []string) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest) PulpIdIn(pulpIdIn []string) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest) RepositoryVersion(repositoryVersion string) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest) Fields(fields []string) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest) ExcludeFields(excludeFields []string) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest) Execute() (*PaginatedrpmRepoMetadataFileResponseList, *http.Response, error) { + return r.ApiService.ContentRpmRepoMetadataFilesListExecute(r) +} + +/* +ContentRpmRepoMetadataFilesList List repo metadata files + +RepoMetadataFile Viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest +*/ +func (a *ContentRepoMetadataFilesAPIService) ContentRpmRepoMetadataFilesList(ctx context.Context) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest { + return ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmRepoMetadataFileResponseList +func (a *ContentRepoMetadataFilesAPIService) ContentRpmRepoMetadataFilesListExecute(r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesListRequest) (*PaginatedrpmRepoMetadataFileResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmRepoMetadataFileResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentRepoMetadataFilesAPIService.ContentRpmRepoMetadataFilesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/rpm/repo_metadata_files/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesReadRequest struct { + ctx context.Context + ApiService *ContentRepoMetadataFilesAPIService + rpmRepoMetadataFileHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesReadRequest) Fields(fields []string) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesReadRequest) ExcludeFields(excludeFields []string) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesReadRequest) Execute() (*RpmRepoMetadataFileResponse, *http.Response, error) { + return r.ApiService.ContentRpmRepoMetadataFilesReadExecute(r) +} + +/* +ContentRpmRepoMetadataFilesRead Inspect a repo metadata file + +RepoMetadataFile Viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRepoMetadataFileHref + @return ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesReadRequest +*/ +func (a *ContentRepoMetadataFilesAPIService) ContentRpmRepoMetadataFilesRead(ctx context.Context, rpmRepoMetadataFileHref string) ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesReadRequest { + return ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesReadRequest{ + ApiService: a, + ctx: ctx, + rpmRepoMetadataFileHref: rpmRepoMetadataFileHref, + } +} + +// Execute executes the request +// @return RpmRepoMetadataFileResponse +func (a *ContentRepoMetadataFilesAPIService) ContentRpmRepoMetadataFilesReadExecute(r ContentRepoMetadataFilesAPIContentRpmRepoMetadataFilesReadRequest) (*RpmRepoMetadataFileResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmRepoMetadataFileResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentRepoMetadataFilesAPIService.ContentRpmRepoMetadataFilesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_repo_metadata_file_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_repo_metadata_file_href"+"}", parameterValueToString(r.rpmRepoMetadataFileHref, "rpmRepoMetadataFileHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_roles.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_roles.go new file mode 100644 index 0000000000..e7bd80b9bc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_roles.go @@ -0,0 +1,520 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentRolesAPIService ContentRolesAPI service +type ContentRolesAPIService service + +type ContentRolesAPIContentAnsibleRolesCreateRequest struct { + ctx context.Context + ApiService *ContentRolesAPIService + ansibleRole *AnsibleRole +} + +func (r ContentRolesAPIContentAnsibleRolesCreateRequest) AnsibleRole(ansibleRole AnsibleRole) ContentRolesAPIContentAnsibleRolesCreateRequest { + r.ansibleRole = &ansibleRole + return r +} + +func (r ContentRolesAPIContentAnsibleRolesCreateRequest) Execute() (*AnsibleRoleResponse, *http.Response, error) { + return r.ApiService.ContentAnsibleRolesCreateExecute(r) +} + +/* +ContentAnsibleRolesCreate Create a role + +ViewSet for Role. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentRolesAPIContentAnsibleRolesCreateRequest +*/ +func (a *ContentRolesAPIService) ContentAnsibleRolesCreate(ctx context.Context) ContentRolesAPIContentAnsibleRolesCreateRequest { + return ContentRolesAPIContentAnsibleRolesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AnsibleRoleResponse +func (a *ContentRolesAPIService) ContentAnsibleRolesCreateExecute(r ContentRolesAPIContentAnsibleRolesCreateRequest) (*AnsibleRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentRolesAPIService.ContentAnsibleRolesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ansible/roles/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleRole == nil { + return localVarReturnValue, nil, reportError("ansibleRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentRolesAPIContentAnsibleRolesListRequest struct { + ctx context.Context + ApiService *ContentRolesAPIService + limit *int32 + name *string + namespace *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + version *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentRolesAPIContentAnsibleRolesListRequest) Limit(limit int32) ContentRolesAPIContentAnsibleRolesListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ContentRolesAPIContentAnsibleRolesListRequest) Name(name string) ContentRolesAPIContentAnsibleRolesListRequest { + r.name = &name + return r +} + +// Filter results where namespace matches value +func (r ContentRolesAPIContentAnsibleRolesListRequest) Namespace(namespace string) ContentRolesAPIContentAnsibleRolesListRequest { + r.namespace = &namespace + return r +} + +// The initial index from which to return the results. +func (r ContentRolesAPIContentAnsibleRolesListRequest) Offset(offset int32) ContentRolesAPIContentAnsibleRolesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `version` - Version * `-version` - Version (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentRolesAPIContentAnsibleRolesListRequest) Ordering(ordering []string) ContentRolesAPIContentAnsibleRolesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentRolesAPIContentAnsibleRolesListRequest) PulpHrefIn(pulpHrefIn []string) ContentRolesAPIContentAnsibleRolesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentRolesAPIContentAnsibleRolesListRequest) PulpIdIn(pulpIdIn []string) ContentRolesAPIContentAnsibleRolesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentRolesAPIContentAnsibleRolesListRequest) RepositoryVersion(repositoryVersion string) ContentRolesAPIContentAnsibleRolesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentRolesAPIContentAnsibleRolesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentRolesAPIContentAnsibleRolesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentRolesAPIContentAnsibleRolesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentRolesAPIContentAnsibleRolesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter results where version matches value +func (r ContentRolesAPIContentAnsibleRolesListRequest) Version(version string) ContentRolesAPIContentAnsibleRolesListRequest { + r.version = &version + return r +} + +// A list of fields to include in the response. +func (r ContentRolesAPIContentAnsibleRolesListRequest) Fields(fields []string) ContentRolesAPIContentAnsibleRolesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentRolesAPIContentAnsibleRolesListRequest) ExcludeFields(excludeFields []string) ContentRolesAPIContentAnsibleRolesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentRolesAPIContentAnsibleRolesListRequest) Execute() (*PaginatedansibleRoleResponseList, *http.Response, error) { + return r.ApiService.ContentAnsibleRolesListExecute(r) +} + +/* +ContentAnsibleRolesList List roles + +ViewSet for Role. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentRolesAPIContentAnsibleRolesListRequest +*/ +func (a *ContentRolesAPIService) ContentAnsibleRolesList(ctx context.Context) ContentRolesAPIContentAnsibleRolesListRequest { + return ContentRolesAPIContentAnsibleRolesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedansibleRoleResponseList +func (a *ContentRolesAPIService) ContentAnsibleRolesListExecute(r ContentRolesAPIContentAnsibleRolesListRequest) (*PaginatedansibleRoleResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleRoleResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentRolesAPIService.ContentAnsibleRolesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ansible/roles/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentRolesAPIContentAnsibleRolesReadRequest struct { + ctx context.Context + ApiService *ContentRolesAPIService + ansibleRoleHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentRolesAPIContentAnsibleRolesReadRequest) Fields(fields []string) ContentRolesAPIContentAnsibleRolesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentRolesAPIContentAnsibleRolesReadRequest) ExcludeFields(excludeFields []string) ContentRolesAPIContentAnsibleRolesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentRolesAPIContentAnsibleRolesReadRequest) Execute() (*AnsibleRoleResponse, *http.Response, error) { + return r.ApiService.ContentAnsibleRolesReadExecute(r) +} + +/* +ContentAnsibleRolesRead Inspect a role + +ViewSet for Role. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleRoleHref + @return ContentRolesAPIContentAnsibleRolesReadRequest +*/ +func (a *ContentRolesAPIService) ContentAnsibleRolesRead(ctx context.Context, ansibleRoleHref string) ContentRolesAPIContentAnsibleRolesReadRequest { + return ContentRolesAPIContentAnsibleRolesReadRequest{ + ApiService: a, + ctx: ctx, + ansibleRoleHref: ansibleRoleHref, + } +} + +// Execute executes the request +// @return AnsibleRoleResponse +func (a *ContentRolesAPIService) ContentAnsibleRolesReadExecute(r ContentRolesAPIContentAnsibleRolesReadRequest) (*AnsibleRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentRolesAPIService.ContentAnsibleRolesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_role_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_role_href"+"}", parameterValueToString(r.ansibleRoleHref, "ansibleRoleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_signatures.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_signatures.go new file mode 100644 index 0000000000..d3cd551018 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_signatures.go @@ -0,0 +1,480 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentSignaturesAPIService ContentSignaturesAPI service +type ContentSignaturesAPIService service + +type ContentSignaturesAPIContentContainerSignaturesListRequest struct { + ctx context.Context + ApiService *ContentSignaturesAPIService + digest *string + digestIn *[]string + keyId *string + keyIdIn *[]string + limit *int32 + manifest *[]string + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Filter results where digest matches value +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) Digest(digest string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.digest = &digest + return r +} + +// Filter results where digest is in a comma-separated list of values +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) DigestIn(digestIn []string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.digestIn = &digestIn + return r +} + +// Filter results where key_id matches value +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) KeyId(keyId string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.keyId = &keyId + return r +} + +// Filter results where key_id is in a comma-separated list of values +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) KeyIdIn(keyIdIn []string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.keyIdIn = &keyIdIn + return r +} + +// Number of results to return per page. +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) Limit(limit int32) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.limit = &limit + return r +} + +// Multiple values may be separated by commas. +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) Manifest(manifest []string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.manifest = &manifest + return r +} + +// Filter results where name matches value +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) Name(name string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) NameContains(nameContains string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) NameIcontains(nameIcontains string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) NameIn(nameIn []string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) NameStartswith(nameStartswith string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) Offset(offset int32) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `digest` - Digest * `-digest` - Digest (descending) * `type` - Type * `-type` - Type (descending) * `key_id` - Key id * `-key_id` - Key id (descending) * `timestamp` - Timestamp * `-timestamp` - Timestamp (descending) * `creator` - Creator * `-creator` - Creator (descending) * `data` - Data * `-data` - Data (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) Ordering(ordering []string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) PulpHrefIn(pulpHrefIn []string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) PulpIdIn(pulpIdIn []string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) RepositoryVersion(repositoryVersion string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) Fields(fields []string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) ExcludeFields(excludeFields []string) ContentSignaturesAPIContentContainerSignaturesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentSignaturesAPIContentContainerSignaturesListRequest) Execute() (*PaginatedcontainerManifestSignatureResponseList, *http.Response, error) { + return r.ApiService.ContentContainerSignaturesListExecute(r) +} + +/* +ContentContainerSignaturesList List manifest signatures + +ViewSet for image signatures. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentSignaturesAPIContentContainerSignaturesListRequest +*/ +func (a *ContentSignaturesAPIService) ContentContainerSignaturesList(ctx context.Context) ContentSignaturesAPIContentContainerSignaturesListRequest { + return ContentSignaturesAPIContentContainerSignaturesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedcontainerManifestSignatureResponseList +func (a *ContentSignaturesAPIService) ContentContainerSignaturesListExecute(r ContentSignaturesAPIContentContainerSignaturesListRequest) (*PaginatedcontainerManifestSignatureResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedcontainerManifestSignatureResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentSignaturesAPIService.ContentContainerSignaturesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/container/signatures/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.digest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "digest", r.digest, "") + } + if r.digestIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "digest__in", r.digestIn, "csv") + } + if r.keyId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "key_id", r.keyId, "") + } + if r.keyIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "key_id__in", r.keyIdIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.manifest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "manifest", r.manifest, "csv") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentSignaturesAPIContentContainerSignaturesReadRequest struct { + ctx context.Context + ApiService *ContentSignaturesAPIService + containerManifestSignatureHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentSignaturesAPIContentContainerSignaturesReadRequest) Fields(fields []string) ContentSignaturesAPIContentContainerSignaturesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentSignaturesAPIContentContainerSignaturesReadRequest) ExcludeFields(excludeFields []string) ContentSignaturesAPIContentContainerSignaturesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentSignaturesAPIContentContainerSignaturesReadRequest) Execute() (*ContainerManifestSignatureResponse, *http.Response, error) { + return r.ApiService.ContentContainerSignaturesReadExecute(r) +} + +/* +ContentContainerSignaturesRead Inspect a manifest signature + +ViewSet for image signatures. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerManifestSignatureHref + @return ContentSignaturesAPIContentContainerSignaturesReadRequest +*/ +func (a *ContentSignaturesAPIService) ContentContainerSignaturesRead(ctx context.Context, containerManifestSignatureHref string) ContentSignaturesAPIContentContainerSignaturesReadRequest { + return ContentSignaturesAPIContentContainerSignaturesReadRequest{ + ApiService: a, + ctx: ctx, + containerManifestSignatureHref: containerManifestSignatureHref, + } +} + +// Execute executes the request +// @return ContainerManifestSignatureResponse +func (a *ContentSignaturesAPIService) ContentContainerSignaturesReadExecute(r ContentSignaturesAPIContentContainerSignaturesReadRequest) (*ContainerManifestSignatureResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContainerManifestSignatureResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentSignaturesAPIService.ContentContainerSignaturesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_manifest_signature_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_manifest_signature_href"+"}", parameterValueToString(r.containerManifestSignatureHref, "containerManifestSignatureHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_summaries.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_summaries.go new file mode 100644 index 0000000000..72fb779d56 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_summaries.go @@ -0,0 +1,380 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentSummariesAPIService ContentSummariesAPI service +type ContentSummariesAPIService service + +type ContentSummariesAPIContentOstreeSummariesListRequest struct { + ctx context.Context + ApiService *ContentSummariesAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentSummariesAPIContentOstreeSummariesListRequest) Limit(limit int32) ContentSummariesAPIContentOstreeSummariesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ContentSummariesAPIContentOstreeSummariesListRequest) Offset(offset int32) ContentSummariesAPIContentOstreeSummariesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentSummariesAPIContentOstreeSummariesListRequest) Ordering(ordering []string) ContentSummariesAPIContentOstreeSummariesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentSummariesAPIContentOstreeSummariesListRequest) PulpHrefIn(pulpHrefIn []string) ContentSummariesAPIContentOstreeSummariesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentSummariesAPIContentOstreeSummariesListRequest) PulpIdIn(pulpIdIn []string) ContentSummariesAPIContentOstreeSummariesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentSummariesAPIContentOstreeSummariesListRequest) RepositoryVersion(repositoryVersion string) ContentSummariesAPIContentOstreeSummariesListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentSummariesAPIContentOstreeSummariesListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentSummariesAPIContentOstreeSummariesListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentSummariesAPIContentOstreeSummariesListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentSummariesAPIContentOstreeSummariesListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentSummariesAPIContentOstreeSummariesListRequest) Fields(fields []string) ContentSummariesAPIContentOstreeSummariesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentSummariesAPIContentOstreeSummariesListRequest) ExcludeFields(excludeFields []string) ContentSummariesAPIContentOstreeSummariesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentSummariesAPIContentOstreeSummariesListRequest) Execute() (*PaginatedostreeOstreeSummaryResponseList, *http.Response, error) { + return r.ApiService.ContentOstreeSummariesListExecute(r) +} + +/* +ContentOstreeSummariesList List ostree summarys + +A ViewSet class for OSTree repository summary files. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentSummariesAPIContentOstreeSummariesListRequest +*/ +func (a *ContentSummariesAPIService) ContentOstreeSummariesList(ctx context.Context) ContentSummariesAPIContentOstreeSummariesListRequest { + return ContentSummariesAPIContentOstreeSummariesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedostreeOstreeSummaryResponseList +func (a *ContentSummariesAPIService) ContentOstreeSummariesListExecute(r ContentSummariesAPIContentOstreeSummariesListRequest) (*PaginatedostreeOstreeSummaryResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedostreeOstreeSummaryResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentSummariesAPIService.ContentOstreeSummariesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/ostree/summaries/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentSummariesAPIContentOstreeSummariesReadRequest struct { + ctx context.Context + ApiService *ContentSummariesAPIService + ostreeOstreeSummaryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentSummariesAPIContentOstreeSummariesReadRequest) Fields(fields []string) ContentSummariesAPIContentOstreeSummariesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentSummariesAPIContentOstreeSummariesReadRequest) ExcludeFields(excludeFields []string) ContentSummariesAPIContentOstreeSummariesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentSummariesAPIContentOstreeSummariesReadRequest) Execute() (*OstreeOstreeSummaryResponse, *http.Response, error) { + return r.ApiService.ContentOstreeSummariesReadExecute(r) +} + +/* +ContentOstreeSummariesRead Inspect an ostree summary + +A ViewSet class for OSTree repository summary files. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeSummaryHref + @return ContentSummariesAPIContentOstreeSummariesReadRequest +*/ +func (a *ContentSummariesAPIService) ContentOstreeSummariesRead(ctx context.Context, ostreeOstreeSummaryHref string) ContentSummariesAPIContentOstreeSummariesReadRequest { + return ContentSummariesAPIContentOstreeSummariesReadRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeSummaryHref: ostreeOstreeSummaryHref, + } +} + +// Execute executes the request +// @return OstreeOstreeSummaryResponse +func (a *ContentSummariesAPIService) ContentOstreeSummariesReadExecute(r ContentSummariesAPIContentOstreeSummariesReadRequest) (*OstreeOstreeSummaryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OstreeOstreeSummaryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentSummariesAPIService.ContentOstreeSummariesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_summary_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_summary_href"+"}", parameterValueToString(r.ostreeOstreeSummaryHref, "ostreeOstreeSummaryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_tags.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_tags.go new file mode 100644 index 0000000000..330f91765f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_content_tags.go @@ -0,0 +1,428 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentTagsAPIService ContentTagsAPI service +type ContentTagsAPIService service + +type ContentTagsAPIContentContainerTagsListRequest struct { + ctx context.Context + ApiService *ContentTagsAPIService + digest *[]string + limit *int32 + mediaType *[]string + name *string + nameIn *[]string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + fields *[]string + excludeFields *[]string +} + +// Multiple values may be separated by commas. +func (r ContentTagsAPIContentContainerTagsListRequest) Digest(digest []string) ContentTagsAPIContentContainerTagsListRequest { + r.digest = &digest + return r +} + +// Number of results to return per page. +func (r ContentTagsAPIContentContainerTagsListRequest) Limit(limit int32) ContentTagsAPIContentContainerTagsListRequest { + r.limit = &limit + return r +} + +// * `application/vnd.docker.distribution.manifest.v1+json` - application/vnd.docker.distribution.manifest.v1+json * `application/vnd.docker.distribution.manifest.v2+json` - application/vnd.docker.distribution.manifest.v2+json * `application/vnd.docker.distribution.manifest.list.v2+json` - application/vnd.docker.distribution.manifest.list.v2+json * `application/vnd.oci.image.manifest.v1+json` - application/vnd.oci.image.manifest.v1+json * `application/vnd.oci.image.index.v1+json` - application/vnd.oci.image.index.v1+json +func (r ContentTagsAPIContentContainerTagsListRequest) MediaType(mediaType []string) ContentTagsAPIContentContainerTagsListRequest { + r.mediaType = &mediaType + return r +} + +// Filter results where name matches value +func (r ContentTagsAPIContentContainerTagsListRequest) Name(name string) ContentTagsAPIContentContainerTagsListRequest { + r.name = &name + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentTagsAPIContentContainerTagsListRequest) NameIn(nameIn []string) ContentTagsAPIContentContainerTagsListRequest { + r.nameIn = &nameIn + return r +} + +// The initial index from which to return the results. +func (r ContentTagsAPIContentContainerTagsListRequest) Offset(offset int32) ContentTagsAPIContentContainerTagsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentTagsAPIContentContainerTagsListRequest) Ordering(ordering []string) ContentTagsAPIContentContainerTagsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentTagsAPIContentContainerTagsListRequest) PulpHrefIn(pulpHrefIn []string) ContentTagsAPIContentContainerTagsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentTagsAPIContentContainerTagsListRequest) PulpIdIn(pulpIdIn []string) ContentTagsAPIContentContainerTagsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository Version referenced by HREF +func (r ContentTagsAPIContentContainerTagsListRequest) RepositoryVersion(repositoryVersion string) ContentTagsAPIContentContainerTagsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r ContentTagsAPIContentContainerTagsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) ContentTagsAPIContentContainerTagsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r ContentTagsAPIContentContainerTagsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) ContentTagsAPIContentContainerTagsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// A list of fields to include in the response. +func (r ContentTagsAPIContentContainerTagsListRequest) Fields(fields []string) ContentTagsAPIContentContainerTagsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentTagsAPIContentContainerTagsListRequest) ExcludeFields(excludeFields []string) ContentTagsAPIContentContainerTagsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentTagsAPIContentContainerTagsListRequest) Execute() (*PaginatedcontainerTagResponseList, *http.Response, error) { + return r.ApiService.ContentContainerTagsListExecute(r) +} + +/* +ContentContainerTagsList List tags + +ViewSet for Tag. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentTagsAPIContentContainerTagsListRequest +*/ +func (a *ContentTagsAPIService) ContentContainerTagsList(ctx context.Context) ContentTagsAPIContentContainerTagsListRequest { + return ContentTagsAPIContentContainerTagsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedcontainerTagResponseList +func (a *ContentTagsAPIService) ContentContainerTagsListExecute(r ContentTagsAPIContentContainerTagsListRequest) (*PaginatedcontainerTagResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedcontainerTagResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentTagsAPIService.ContentContainerTagsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/content/container/tags/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.digest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "digest", r.digest, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.mediaType != nil { + t := *r.mediaType + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "media_type", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "media_type", t, "multi") + } + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentTagsAPIContentContainerTagsReadRequest struct { + ctx context.Context + ApiService *ContentTagsAPIService + containerTagHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentTagsAPIContentContainerTagsReadRequest) Fields(fields []string) ContentTagsAPIContentContainerTagsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentTagsAPIContentContainerTagsReadRequest) ExcludeFields(excludeFields []string) ContentTagsAPIContentContainerTagsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentTagsAPIContentContainerTagsReadRequest) Execute() (*ContainerTagResponse, *http.Response, error) { + return r.ApiService.ContentContainerTagsReadExecute(r) +} + +/* +ContentContainerTagsRead Inspect a tag + +ViewSet for Tag. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerTagHref + @return ContentTagsAPIContentContainerTagsReadRequest +*/ +func (a *ContentTagsAPIService) ContentContainerTagsRead(ctx context.Context, containerTagHref string) ContentTagsAPIContentContainerTagsReadRequest { + return ContentTagsAPIContentContainerTagsReadRequest{ + ApiService: a, + ctx: ctx, + containerTagHref: containerTagHref, + } +} + +// Execute executes the request +// @return ContainerTagResponse +func (a *ContentTagsAPIService) ContentContainerTagsReadExecute(r ContentTagsAPIContentContainerTagsReadRequest) (*ContainerTagResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContainerTagResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentTagsAPIService.ContentContainerTagsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_tag_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_tag_href"+"}", parameterValueToString(r.containerTagHref, "containerTagHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards.go new file mode 100644 index 0000000000..01b484a895 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards.go @@ -0,0 +1,270 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" +) + + +// ContentguardsAPIService ContentguardsAPI service +type ContentguardsAPIService service + +type ContentguardsAPIContentguardsListRequest struct { + ctx context.Context + ApiService *ContentguardsAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpTypeIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentguardsAPIContentguardsListRequest) Limit(limit int32) ContentguardsAPIContentguardsListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ContentguardsAPIContentguardsListRequest) Name(name string) ContentguardsAPIContentguardsListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ContentguardsAPIContentguardsListRequest) NameContains(nameContains string) ContentguardsAPIContentguardsListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r ContentguardsAPIContentguardsListRequest) NameIcontains(nameIcontains string) ContentguardsAPIContentguardsListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentguardsAPIContentguardsListRequest) NameIn(nameIn []string) ContentguardsAPIContentguardsListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r ContentguardsAPIContentguardsListRequest) NameStartswith(nameStartswith string) ContentguardsAPIContentguardsListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ContentguardsAPIContentguardsListRequest) Offset(offset int32) ContentguardsAPIContentguardsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentguardsAPIContentguardsListRequest) Ordering(ordering []string) ContentguardsAPIContentguardsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsAPIContentguardsListRequest) PulpHrefIn(pulpHrefIn []string) ContentguardsAPIContentguardsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsAPIContentguardsListRequest) PulpIdIn(pulpIdIn []string) ContentguardsAPIContentguardsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Pulp type is in * `core.rbac` - core.rbac * `core.content_redirect` - core.content_redirect * `certguard.rhsm` - certguard.rhsm * `certguard.x509` - certguard.x509 +func (r ContentguardsAPIContentguardsListRequest) PulpTypeIn(pulpTypeIn []string) ContentguardsAPIContentguardsListRequest { + r.pulpTypeIn = &pulpTypeIn + return r +} + +// A list of fields to include in the response. +func (r ContentguardsAPIContentguardsListRequest) Fields(fields []string) ContentguardsAPIContentguardsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsAPIContentguardsListRequest) ExcludeFields(excludeFields []string) ContentguardsAPIContentguardsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsAPIContentguardsListRequest) Execute() (*PaginatedContentGuardResponseList, *http.Response, error) { + return r.ApiService.ContentguardsListExecute(r) +} + +/* +ContentguardsList List content guards + +Endpoint to list all contentguards. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentguardsAPIContentguardsListRequest +*/ +func (a *ContentguardsAPIService) ContentguardsList(ctx context.Context) ContentguardsAPIContentguardsListRequest { + return ContentguardsAPIContentguardsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedContentGuardResponseList +func (a *ContentguardsAPIService) ContentguardsListExecute(r ContentguardsAPIContentguardsListRequest) (*PaginatedContentGuardResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedContentGuardResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsAPIService.ContentguardsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/contentguards/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpTypeIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_type__in", r.pulpTypeIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_content_redirect.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_content_redirect.go new file mode 100644 index 0000000000..74a595d082 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_content_redirect.go @@ -0,0 +1,1336 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentguardsContentRedirectAPIService ContentguardsContentRedirectAPI service +type ContentguardsContentRedirectAPIService service + +type ContentguardsContentRedirectAPIContentguardsCoreContentRedirectAddRoleRequest struct { + ctx context.Context + ApiService *ContentguardsContentRedirectAPIService + contentRedirectContentGuardHref string + nestedRole *NestedRole +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectAddRoleRequest) NestedRole(nestedRole NestedRole) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreContentRedirectAddRoleExecute(r) +} + +/* +ContentguardsCoreContentRedirectAddRole Method for ContentguardsCoreContentRedirectAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param contentRedirectContentGuardHref + @return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectAddRoleRequest +*/ +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectAddRole(ctx context.Context, contentRedirectContentGuardHref string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectAddRoleRequest { + return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectAddRoleRequest{ + ApiService: a, + ctx: ctx, + contentRedirectContentGuardHref: contentRedirectContentGuardHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectAddRoleExecute(r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsContentRedirectAPIService.ContentguardsCoreContentRedirectAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{content_redirect_content_guard_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"content_redirect_content_guard_href"+"}", parameterValueToString(r.contentRedirectContentGuardHref, "contentRedirectContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsContentRedirectAPIContentguardsCoreContentRedirectCreateRequest struct { + ctx context.Context + ApiService *ContentguardsContentRedirectAPIService + contentRedirectContentGuard *ContentRedirectContentGuard +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectCreateRequest) ContentRedirectContentGuard(contentRedirectContentGuard ContentRedirectContentGuard) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectCreateRequest { + r.contentRedirectContentGuard = &contentRedirectContentGuard + return r +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectCreateRequest) Execute() (*ContentRedirectContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreContentRedirectCreateExecute(r) +} + +/* +ContentguardsCoreContentRedirectCreate Create a content redirect content guard + +Content guard to protect preauthenticated redirects to the content app. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectCreateRequest +*/ +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectCreate(ctx context.Context) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectCreateRequest { + return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ContentRedirectContentGuardResponse +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectCreateExecute(r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectCreateRequest) (*ContentRedirectContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContentRedirectContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsContentRedirectAPIService.ContentguardsCoreContentRedirectCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/contentguards/core/content_redirect/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.contentRedirectContentGuard == nil { + return localVarReturnValue, nil, reportError("contentRedirectContentGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.contentRedirectContentGuard + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsContentRedirectAPIContentguardsCoreContentRedirectDeleteRequest struct { + ctx context.Context + ApiService *ContentguardsContentRedirectAPIService + contentRedirectContentGuardHref string +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ContentguardsCoreContentRedirectDeleteExecute(r) +} + +/* +ContentguardsCoreContentRedirectDelete Delete a content redirect content guard + +Content guard to protect preauthenticated redirects to the content app. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param contentRedirectContentGuardHref + @return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectDeleteRequest +*/ +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectDelete(ctx context.Context, contentRedirectContentGuardHref string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectDeleteRequest { + return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectDeleteRequest{ + ApiService: a, + ctx: ctx, + contentRedirectContentGuardHref: contentRedirectContentGuardHref, + } +} + +// Execute executes the request +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectDeleteExecute(r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsContentRedirectAPIService.ContentguardsCoreContentRedirectDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{content_redirect_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"content_redirect_content_guard_href"+"}", parameterValueToString(r.contentRedirectContentGuardHref, "contentRedirectContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest struct { + ctx context.Context + ApiService *ContentguardsContentRedirectAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) Limit(limit int32) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) Name(name string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) NameContains(nameContains string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) NameIcontains(nameIcontains string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) NameIn(nameIn []string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) NameStartswith(nameStartswith string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) Offset(offset int32) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) Ordering(ordering []string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) PulpHrefIn(pulpHrefIn []string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) PulpIdIn(pulpIdIn []string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) Fields(fields []string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) ExcludeFields(excludeFields []string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) Execute() (*PaginatedContentRedirectContentGuardResponseList, *http.Response, error) { + return r.ApiService.ContentguardsCoreContentRedirectListExecute(r) +} + +/* +ContentguardsCoreContentRedirectList List content redirect content guards + +Content guard to protect preauthenticated redirects to the content app. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest +*/ +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectList(ctx context.Context) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest { + return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedContentRedirectContentGuardResponseList +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectListExecute(r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRequest) (*PaginatedContentRedirectContentGuardResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedContentRedirectContentGuardResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsContentRedirectAPIService.ContentguardsCoreContentRedirectList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/contentguards/core/content_redirect/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRolesRequest struct { + ctx context.Context + ApiService *ContentguardsContentRedirectAPIService + contentRedirectContentGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRolesRequest) Fields(fields []string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRolesRequest) ExcludeFields(excludeFields []string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreContentRedirectListRolesExecute(r) +} + +/* +ContentguardsCoreContentRedirectListRoles Method for ContentguardsCoreContentRedirectListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param contentRedirectContentGuardHref + @return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRolesRequest +*/ +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectListRoles(ctx context.Context, contentRedirectContentGuardHref string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRolesRequest { + return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRolesRequest{ + ApiService: a, + ctx: ctx, + contentRedirectContentGuardHref: contentRedirectContentGuardHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectListRolesExecute(r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsContentRedirectAPIService.ContentguardsCoreContentRedirectListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{content_redirect_content_guard_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"content_redirect_content_guard_href"+"}", parameterValueToString(r.contentRedirectContentGuardHref, "contentRedirectContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsContentRedirectAPIContentguardsCoreContentRedirectMyPermissionsRequest struct { + ctx context.Context + ApiService *ContentguardsContentRedirectAPIService + contentRedirectContentGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectMyPermissionsRequest) Fields(fields []string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectMyPermissionsRequest) ExcludeFields(excludeFields []string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreContentRedirectMyPermissionsExecute(r) +} + +/* +ContentguardsCoreContentRedirectMyPermissions Method for ContentguardsCoreContentRedirectMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param contentRedirectContentGuardHref + @return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectMyPermissionsRequest +*/ +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectMyPermissions(ctx context.Context, contentRedirectContentGuardHref string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectMyPermissionsRequest { + return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + contentRedirectContentGuardHref: contentRedirectContentGuardHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectMyPermissionsExecute(r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsContentRedirectAPIService.ContentguardsCoreContentRedirectMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{content_redirect_content_guard_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"content_redirect_content_guard_href"+"}", parameterValueToString(r.contentRedirectContentGuardHref, "contentRedirectContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsContentRedirectAPIContentguardsCoreContentRedirectPartialUpdateRequest struct { + ctx context.Context + ApiService *ContentguardsContentRedirectAPIService + contentRedirectContentGuardHref string + patchedContentRedirectContentGuard *PatchedContentRedirectContentGuard +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectPartialUpdateRequest) PatchedContentRedirectContentGuard(patchedContentRedirectContentGuard PatchedContentRedirectContentGuard) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectPartialUpdateRequest { + r.patchedContentRedirectContentGuard = &patchedContentRedirectContentGuard + return r +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectPartialUpdateRequest) Execute() (*ContentRedirectContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreContentRedirectPartialUpdateExecute(r) +} + +/* +ContentguardsCoreContentRedirectPartialUpdate Update a content redirect content guard + +Content guard to protect preauthenticated redirects to the content app. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param contentRedirectContentGuardHref + @return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectPartialUpdateRequest +*/ +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectPartialUpdate(ctx context.Context, contentRedirectContentGuardHref string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectPartialUpdateRequest { + return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + contentRedirectContentGuardHref: contentRedirectContentGuardHref, + } +} + +// Execute executes the request +// @return ContentRedirectContentGuardResponse +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectPartialUpdateExecute(r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectPartialUpdateRequest) (*ContentRedirectContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContentRedirectContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsContentRedirectAPIService.ContentguardsCoreContentRedirectPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{content_redirect_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"content_redirect_content_guard_href"+"}", parameterValueToString(r.contentRedirectContentGuardHref, "contentRedirectContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedContentRedirectContentGuard == nil { + return localVarReturnValue, nil, reportError("patchedContentRedirectContentGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedContentRedirectContentGuard + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsContentRedirectAPIContentguardsCoreContentRedirectReadRequest struct { + ctx context.Context + ApiService *ContentguardsContentRedirectAPIService + contentRedirectContentGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectReadRequest) Fields(fields []string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectReadRequest) ExcludeFields(excludeFields []string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectReadRequest) Execute() (*ContentRedirectContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreContentRedirectReadExecute(r) +} + +/* +ContentguardsCoreContentRedirectRead Inspect a content redirect content guard + +Content guard to protect preauthenticated redirects to the content app. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param contentRedirectContentGuardHref + @return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectReadRequest +*/ +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectRead(ctx context.Context, contentRedirectContentGuardHref string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectReadRequest { + return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectReadRequest{ + ApiService: a, + ctx: ctx, + contentRedirectContentGuardHref: contentRedirectContentGuardHref, + } +} + +// Execute executes the request +// @return ContentRedirectContentGuardResponse +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectReadExecute(r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectReadRequest) (*ContentRedirectContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContentRedirectContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsContentRedirectAPIService.ContentguardsCoreContentRedirectRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{content_redirect_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"content_redirect_content_guard_href"+"}", parameterValueToString(r.contentRedirectContentGuardHref, "contentRedirectContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsContentRedirectAPIContentguardsCoreContentRedirectRemoveRoleRequest struct { + ctx context.Context + ApiService *ContentguardsContentRedirectAPIService + contentRedirectContentGuardHref string + nestedRole *NestedRole +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectRemoveRoleRequest) NestedRole(nestedRole NestedRole) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreContentRedirectRemoveRoleExecute(r) +} + +/* +ContentguardsCoreContentRedirectRemoveRole Method for ContentguardsCoreContentRedirectRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param contentRedirectContentGuardHref + @return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectRemoveRoleRequest +*/ +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectRemoveRole(ctx context.Context, contentRedirectContentGuardHref string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectRemoveRoleRequest { + return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + contentRedirectContentGuardHref: contentRedirectContentGuardHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectRemoveRoleExecute(r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsContentRedirectAPIService.ContentguardsCoreContentRedirectRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{content_redirect_content_guard_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"content_redirect_content_guard_href"+"}", parameterValueToString(r.contentRedirectContentGuardHref, "contentRedirectContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsContentRedirectAPIContentguardsCoreContentRedirectUpdateRequest struct { + ctx context.Context + ApiService *ContentguardsContentRedirectAPIService + contentRedirectContentGuardHref string + contentRedirectContentGuard *ContentRedirectContentGuard +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectUpdateRequest) ContentRedirectContentGuard(contentRedirectContentGuard ContentRedirectContentGuard) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectUpdateRequest { + r.contentRedirectContentGuard = &contentRedirectContentGuard + return r +} + +func (r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectUpdateRequest) Execute() (*ContentRedirectContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreContentRedirectUpdateExecute(r) +} + +/* +ContentguardsCoreContentRedirectUpdate Update a content redirect content guard + +Content guard to protect preauthenticated redirects to the content app. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param contentRedirectContentGuardHref + @return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectUpdateRequest +*/ +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectUpdate(ctx context.Context, contentRedirectContentGuardHref string) ContentguardsContentRedirectAPIContentguardsCoreContentRedirectUpdateRequest { + return ContentguardsContentRedirectAPIContentguardsCoreContentRedirectUpdateRequest{ + ApiService: a, + ctx: ctx, + contentRedirectContentGuardHref: contentRedirectContentGuardHref, + } +} + +// Execute executes the request +// @return ContentRedirectContentGuardResponse +func (a *ContentguardsContentRedirectAPIService) ContentguardsCoreContentRedirectUpdateExecute(r ContentguardsContentRedirectAPIContentguardsCoreContentRedirectUpdateRequest) (*ContentRedirectContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContentRedirectContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsContentRedirectAPIService.ContentguardsCoreContentRedirectUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{content_redirect_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"content_redirect_content_guard_href"+"}", parameterValueToString(r.contentRedirectContentGuardHref, "contentRedirectContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.contentRedirectContentGuard == nil { + return localVarReturnValue, nil, reportError("contentRedirectContentGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.contentRedirectContentGuard + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_rbac.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_rbac.go new file mode 100644 index 0000000000..6b230bf921 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_rbac.go @@ -0,0 +1,1348 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentguardsRbacAPIService ContentguardsRbacAPI service +type ContentguardsRbacAPIService service + +type ContentguardsRbacAPIContentguardsCoreRbacAddRoleRequest struct { + ctx context.Context + ApiService *ContentguardsRbacAPIService + rBACContentGuardHref string + nestedRole *NestedRole +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacAddRoleRequest) NestedRole(nestedRole NestedRole) ContentguardsRbacAPIContentguardsCoreRbacAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreRbacAddRoleExecute(r) +} + +/* +ContentguardsCoreRbacAddRole Method for ContentguardsCoreRbacAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rBACContentGuardHref + @return ContentguardsRbacAPIContentguardsCoreRbacAddRoleRequest +*/ +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacAddRole(ctx context.Context, rBACContentGuardHref string) ContentguardsRbacAPIContentguardsCoreRbacAddRoleRequest { + return ContentguardsRbacAPIContentguardsCoreRbacAddRoleRequest{ + ApiService: a, + ctx: ctx, + rBACContentGuardHref: rBACContentGuardHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacAddRoleExecute(r ContentguardsRbacAPIContentguardsCoreRbacAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRbacAPIService.ContentguardsCoreRbacAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{r_b_a_c_content_guard_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"r_b_a_c_content_guard_href"+"}", parameterValueToString(r.rBACContentGuardHref, "rBACContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsRbacAPIContentguardsCoreRbacCreateRequest struct { + ctx context.Context + ApiService *ContentguardsRbacAPIService + rBACContentGuard *RBACContentGuard +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacCreateRequest) RBACContentGuard(rBACContentGuard RBACContentGuard) ContentguardsRbacAPIContentguardsCoreRbacCreateRequest { + r.rBACContentGuard = &rBACContentGuard + return r +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacCreateRequest) Execute() (*RBACContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreRbacCreateExecute(r) +} + +/* +ContentguardsCoreRbacCreate Create a rbac content guard + +Viewset for creating contentguards that use RBAC to protect content. +Has add and remove actions for managing permission for users and groups to download content +protected by this guard. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentguardsRbacAPIContentguardsCoreRbacCreateRequest +*/ +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacCreate(ctx context.Context) ContentguardsRbacAPIContentguardsCoreRbacCreateRequest { + return ContentguardsRbacAPIContentguardsCoreRbacCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return RBACContentGuardResponse +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacCreateExecute(r ContentguardsRbacAPIContentguardsCoreRbacCreateRequest) (*RBACContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RBACContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRbacAPIService.ContentguardsCoreRbacCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/contentguards/core/rbac/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rBACContentGuard == nil { + return localVarReturnValue, nil, reportError("rBACContentGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rBACContentGuard + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsRbacAPIContentguardsCoreRbacDeleteRequest struct { + ctx context.Context + ApiService *ContentguardsRbacAPIService + rBACContentGuardHref string +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ContentguardsCoreRbacDeleteExecute(r) +} + +/* +ContentguardsCoreRbacDelete Delete a rbac content guard + +Viewset for creating contentguards that use RBAC to protect content. +Has add and remove actions for managing permission for users and groups to download content +protected by this guard. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rBACContentGuardHref + @return ContentguardsRbacAPIContentguardsCoreRbacDeleteRequest +*/ +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacDelete(ctx context.Context, rBACContentGuardHref string) ContentguardsRbacAPIContentguardsCoreRbacDeleteRequest { + return ContentguardsRbacAPIContentguardsCoreRbacDeleteRequest{ + ApiService: a, + ctx: ctx, + rBACContentGuardHref: rBACContentGuardHref, + } +} + +// Execute executes the request +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacDeleteExecute(r ContentguardsRbacAPIContentguardsCoreRbacDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRbacAPIService.ContentguardsCoreRbacDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{r_b_a_c_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"r_b_a_c_content_guard_href"+"}", parameterValueToString(r.rBACContentGuardHref, "rBACContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ContentguardsRbacAPIContentguardsCoreRbacListRequest struct { + ctx context.Context + ApiService *ContentguardsRbacAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentguardsRbacAPIContentguardsCoreRbacListRequest) Limit(limit int32) ContentguardsRbacAPIContentguardsCoreRbacListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ContentguardsRbacAPIContentguardsCoreRbacListRequest) Name(name string) ContentguardsRbacAPIContentguardsCoreRbacListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ContentguardsRbacAPIContentguardsCoreRbacListRequest) NameContains(nameContains string) ContentguardsRbacAPIContentguardsCoreRbacListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r ContentguardsRbacAPIContentguardsCoreRbacListRequest) NameIcontains(nameIcontains string) ContentguardsRbacAPIContentguardsCoreRbacListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentguardsRbacAPIContentguardsCoreRbacListRequest) NameIn(nameIn []string) ContentguardsRbacAPIContentguardsCoreRbacListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r ContentguardsRbacAPIContentguardsCoreRbacListRequest) NameStartswith(nameStartswith string) ContentguardsRbacAPIContentguardsCoreRbacListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ContentguardsRbacAPIContentguardsCoreRbacListRequest) Offset(offset int32) ContentguardsRbacAPIContentguardsCoreRbacListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentguardsRbacAPIContentguardsCoreRbacListRequest) Ordering(ordering []string) ContentguardsRbacAPIContentguardsCoreRbacListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsRbacAPIContentguardsCoreRbacListRequest) PulpHrefIn(pulpHrefIn []string) ContentguardsRbacAPIContentguardsCoreRbacListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsRbacAPIContentguardsCoreRbacListRequest) PulpIdIn(pulpIdIn []string) ContentguardsRbacAPIContentguardsCoreRbacListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r ContentguardsRbacAPIContentguardsCoreRbacListRequest) Fields(fields []string) ContentguardsRbacAPIContentguardsCoreRbacListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsRbacAPIContentguardsCoreRbacListRequest) ExcludeFields(excludeFields []string) ContentguardsRbacAPIContentguardsCoreRbacListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacListRequest) Execute() (*PaginatedRBACContentGuardResponseList, *http.Response, error) { + return r.ApiService.ContentguardsCoreRbacListExecute(r) +} + +/* +ContentguardsCoreRbacList List rbac content guards + +Viewset for creating contentguards that use RBAC to protect content. +Has add and remove actions for managing permission for users and groups to download content +protected by this guard. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentguardsRbacAPIContentguardsCoreRbacListRequest +*/ +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacList(ctx context.Context) ContentguardsRbacAPIContentguardsCoreRbacListRequest { + return ContentguardsRbacAPIContentguardsCoreRbacListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedRBACContentGuardResponseList +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacListExecute(r ContentguardsRbacAPIContentguardsCoreRbacListRequest) (*PaginatedRBACContentGuardResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRBACContentGuardResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRbacAPIService.ContentguardsCoreRbacList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/contentguards/core/rbac/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsRbacAPIContentguardsCoreRbacListRolesRequest struct { + ctx context.Context + ApiService *ContentguardsRbacAPIService + rBACContentGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsRbacAPIContentguardsCoreRbacListRolesRequest) Fields(fields []string) ContentguardsRbacAPIContentguardsCoreRbacListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsRbacAPIContentguardsCoreRbacListRolesRequest) ExcludeFields(excludeFields []string) ContentguardsRbacAPIContentguardsCoreRbacListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreRbacListRolesExecute(r) +} + +/* +ContentguardsCoreRbacListRoles Method for ContentguardsCoreRbacListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rBACContentGuardHref + @return ContentguardsRbacAPIContentguardsCoreRbacListRolesRequest +*/ +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacListRoles(ctx context.Context, rBACContentGuardHref string) ContentguardsRbacAPIContentguardsCoreRbacListRolesRequest { + return ContentguardsRbacAPIContentguardsCoreRbacListRolesRequest{ + ApiService: a, + ctx: ctx, + rBACContentGuardHref: rBACContentGuardHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacListRolesExecute(r ContentguardsRbacAPIContentguardsCoreRbacListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRbacAPIService.ContentguardsCoreRbacListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{r_b_a_c_content_guard_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"r_b_a_c_content_guard_href"+"}", parameterValueToString(r.rBACContentGuardHref, "rBACContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsRbacAPIContentguardsCoreRbacMyPermissionsRequest struct { + ctx context.Context + ApiService *ContentguardsRbacAPIService + rBACContentGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsRbacAPIContentguardsCoreRbacMyPermissionsRequest) Fields(fields []string) ContentguardsRbacAPIContentguardsCoreRbacMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsRbacAPIContentguardsCoreRbacMyPermissionsRequest) ExcludeFields(excludeFields []string) ContentguardsRbacAPIContentguardsCoreRbacMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreRbacMyPermissionsExecute(r) +} + +/* +ContentguardsCoreRbacMyPermissions Method for ContentguardsCoreRbacMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rBACContentGuardHref + @return ContentguardsRbacAPIContentguardsCoreRbacMyPermissionsRequest +*/ +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacMyPermissions(ctx context.Context, rBACContentGuardHref string) ContentguardsRbacAPIContentguardsCoreRbacMyPermissionsRequest { + return ContentguardsRbacAPIContentguardsCoreRbacMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + rBACContentGuardHref: rBACContentGuardHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacMyPermissionsExecute(r ContentguardsRbacAPIContentguardsCoreRbacMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRbacAPIService.ContentguardsCoreRbacMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{r_b_a_c_content_guard_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"r_b_a_c_content_guard_href"+"}", parameterValueToString(r.rBACContentGuardHref, "rBACContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsRbacAPIContentguardsCoreRbacPartialUpdateRequest struct { + ctx context.Context + ApiService *ContentguardsRbacAPIService + rBACContentGuardHref string + patchedRBACContentGuard *PatchedRBACContentGuard +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacPartialUpdateRequest) PatchedRBACContentGuard(patchedRBACContentGuard PatchedRBACContentGuard) ContentguardsRbacAPIContentguardsCoreRbacPartialUpdateRequest { + r.patchedRBACContentGuard = &patchedRBACContentGuard + return r +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacPartialUpdateRequest) Execute() (*RBACContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreRbacPartialUpdateExecute(r) +} + +/* +ContentguardsCoreRbacPartialUpdate Update a rbac content guard + +Viewset for creating contentguards that use RBAC to protect content. +Has add and remove actions for managing permission for users and groups to download content +protected by this guard. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rBACContentGuardHref + @return ContentguardsRbacAPIContentguardsCoreRbacPartialUpdateRequest +*/ +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacPartialUpdate(ctx context.Context, rBACContentGuardHref string) ContentguardsRbacAPIContentguardsCoreRbacPartialUpdateRequest { + return ContentguardsRbacAPIContentguardsCoreRbacPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + rBACContentGuardHref: rBACContentGuardHref, + } +} + +// Execute executes the request +// @return RBACContentGuardResponse +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacPartialUpdateExecute(r ContentguardsRbacAPIContentguardsCoreRbacPartialUpdateRequest) (*RBACContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RBACContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRbacAPIService.ContentguardsCoreRbacPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{r_b_a_c_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"r_b_a_c_content_guard_href"+"}", parameterValueToString(r.rBACContentGuardHref, "rBACContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedRBACContentGuard == nil { + return localVarReturnValue, nil, reportError("patchedRBACContentGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedRBACContentGuard + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsRbacAPIContentguardsCoreRbacReadRequest struct { + ctx context.Context + ApiService *ContentguardsRbacAPIService + rBACContentGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsRbacAPIContentguardsCoreRbacReadRequest) Fields(fields []string) ContentguardsRbacAPIContentguardsCoreRbacReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsRbacAPIContentguardsCoreRbacReadRequest) ExcludeFields(excludeFields []string) ContentguardsRbacAPIContentguardsCoreRbacReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacReadRequest) Execute() (*RBACContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreRbacReadExecute(r) +} + +/* +ContentguardsCoreRbacRead Inspect a rbac content guard + +Viewset for creating contentguards that use RBAC to protect content. +Has add and remove actions for managing permission for users and groups to download content +protected by this guard. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rBACContentGuardHref + @return ContentguardsRbacAPIContentguardsCoreRbacReadRequest +*/ +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacRead(ctx context.Context, rBACContentGuardHref string) ContentguardsRbacAPIContentguardsCoreRbacReadRequest { + return ContentguardsRbacAPIContentguardsCoreRbacReadRequest{ + ApiService: a, + ctx: ctx, + rBACContentGuardHref: rBACContentGuardHref, + } +} + +// Execute executes the request +// @return RBACContentGuardResponse +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacReadExecute(r ContentguardsRbacAPIContentguardsCoreRbacReadRequest) (*RBACContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RBACContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRbacAPIService.ContentguardsCoreRbacRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{r_b_a_c_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"r_b_a_c_content_guard_href"+"}", parameterValueToString(r.rBACContentGuardHref, "rBACContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsRbacAPIContentguardsCoreRbacRemoveRoleRequest struct { + ctx context.Context + ApiService *ContentguardsRbacAPIService + rBACContentGuardHref string + nestedRole *NestedRole +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacRemoveRoleRequest) NestedRole(nestedRole NestedRole) ContentguardsRbacAPIContentguardsCoreRbacRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreRbacRemoveRoleExecute(r) +} + +/* +ContentguardsCoreRbacRemoveRole Method for ContentguardsCoreRbacRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rBACContentGuardHref + @return ContentguardsRbacAPIContentguardsCoreRbacRemoveRoleRequest +*/ +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacRemoveRole(ctx context.Context, rBACContentGuardHref string) ContentguardsRbacAPIContentguardsCoreRbacRemoveRoleRequest { + return ContentguardsRbacAPIContentguardsCoreRbacRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + rBACContentGuardHref: rBACContentGuardHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacRemoveRoleExecute(r ContentguardsRbacAPIContentguardsCoreRbacRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRbacAPIService.ContentguardsCoreRbacRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{r_b_a_c_content_guard_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"r_b_a_c_content_guard_href"+"}", parameterValueToString(r.rBACContentGuardHref, "rBACContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsRbacAPIContentguardsCoreRbacUpdateRequest struct { + ctx context.Context + ApiService *ContentguardsRbacAPIService + rBACContentGuardHref string + rBACContentGuard *RBACContentGuard +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacUpdateRequest) RBACContentGuard(rBACContentGuard RBACContentGuard) ContentguardsRbacAPIContentguardsCoreRbacUpdateRequest { + r.rBACContentGuard = &rBACContentGuard + return r +} + +func (r ContentguardsRbacAPIContentguardsCoreRbacUpdateRequest) Execute() (*RBACContentGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCoreRbacUpdateExecute(r) +} + +/* +ContentguardsCoreRbacUpdate Update a rbac content guard + +Viewset for creating contentguards that use RBAC to protect content. +Has add and remove actions for managing permission for users and groups to download content +protected by this guard. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rBACContentGuardHref + @return ContentguardsRbacAPIContentguardsCoreRbacUpdateRequest +*/ +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacUpdate(ctx context.Context, rBACContentGuardHref string) ContentguardsRbacAPIContentguardsCoreRbacUpdateRequest { + return ContentguardsRbacAPIContentguardsCoreRbacUpdateRequest{ + ApiService: a, + ctx: ctx, + rBACContentGuardHref: rBACContentGuardHref, + } +} + +// Execute executes the request +// @return RBACContentGuardResponse +func (a *ContentguardsRbacAPIService) ContentguardsCoreRbacUpdateExecute(r ContentguardsRbacAPIContentguardsCoreRbacUpdateRequest) (*RBACContentGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RBACContentGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRbacAPIService.ContentguardsCoreRbacUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{r_b_a_c_content_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"r_b_a_c_content_guard_href"+"}", parameterValueToString(r.rBACContentGuardHref, "rBACContentGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rBACContentGuard == nil { + return localVarReturnValue, nil, reportError("rBACContentGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rBACContentGuard + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_rhsm.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_rhsm.go new file mode 100644 index 0000000000..76f77fe8c5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_rhsm.go @@ -0,0 +1,830 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentguardsRhsmAPIService ContentguardsRhsmAPI service +type ContentguardsRhsmAPIService service + +type ContentguardsRhsmAPIContentguardsCertguardRhsmCreateRequest struct { + ctx context.Context + ApiService *ContentguardsRhsmAPIService + certguardRHSMCertGuard *CertguardRHSMCertGuard +} + +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmCreateRequest) CertguardRHSMCertGuard(certguardRHSMCertGuard CertguardRHSMCertGuard) ContentguardsRhsmAPIContentguardsCertguardRhsmCreateRequest { + r.certguardRHSMCertGuard = &certguardRHSMCertGuard + return r +} + +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmCreateRequest) Execute() (*CertguardRHSMCertGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCertguardRhsmCreateExecute(r) +} + +/* +ContentguardsCertguardRhsmCreate Create a rhsm cert guard + +RHSMCertGuard API Viewsets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentguardsRhsmAPIContentguardsCertguardRhsmCreateRequest +*/ +func (a *ContentguardsRhsmAPIService) ContentguardsCertguardRhsmCreate(ctx context.Context) ContentguardsRhsmAPIContentguardsCertguardRhsmCreateRequest { + return ContentguardsRhsmAPIContentguardsCertguardRhsmCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CertguardRHSMCertGuardResponse +func (a *ContentguardsRhsmAPIService) ContentguardsCertguardRhsmCreateExecute(r ContentguardsRhsmAPIContentguardsCertguardRhsmCreateRequest) (*CertguardRHSMCertGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertguardRHSMCertGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRhsmAPIService.ContentguardsCertguardRhsmCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/contentguards/certguard/rhsm/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.certguardRHSMCertGuard == nil { + return localVarReturnValue, nil, reportError("certguardRHSMCertGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.certguardRHSMCertGuard + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsRhsmAPIContentguardsCertguardRhsmDeleteRequest struct { + ctx context.Context + ApiService *ContentguardsRhsmAPIService + certguardRHSMCertGuardHref string +} + +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ContentguardsCertguardRhsmDeleteExecute(r) +} + +/* +ContentguardsCertguardRhsmDelete Delete a rhsm cert guard + +RHSMCertGuard API Viewsets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certguardRHSMCertGuardHref + @return ContentguardsRhsmAPIContentguardsCertguardRhsmDeleteRequest +*/ +func (a *ContentguardsRhsmAPIService) ContentguardsCertguardRhsmDelete(ctx context.Context, certguardRHSMCertGuardHref string) ContentguardsRhsmAPIContentguardsCertguardRhsmDeleteRequest { + return ContentguardsRhsmAPIContentguardsCertguardRhsmDeleteRequest{ + ApiService: a, + ctx: ctx, + certguardRHSMCertGuardHref: certguardRHSMCertGuardHref, + } +} + +// Execute executes the request +func (a *ContentguardsRhsmAPIService) ContentguardsCertguardRhsmDeleteExecute(r ContentguardsRhsmAPIContentguardsCertguardRhsmDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRhsmAPIService.ContentguardsCertguardRhsmDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{certguard_r_h_s_m_cert_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"certguard_r_h_s_m_cert_guard_href"+"}", parameterValueToString(r.certguardRHSMCertGuardHref, "certguardRHSMCertGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest struct { + ctx context.Context + ApiService *ContentguardsRhsmAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) Limit(limit int32) ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) Name(name string) ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) NameContains(nameContains string) ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) NameIcontains(nameIcontains string) ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) NameIn(nameIn []string) ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) NameStartswith(nameStartswith string) ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) Offset(offset int32) ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) Ordering(ordering []string) ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) PulpHrefIn(pulpHrefIn []string) ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) PulpIdIn(pulpIdIn []string) ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) Fields(fields []string) ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) ExcludeFields(excludeFields []string) ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) Execute() (*PaginatedcertguardRHSMCertGuardResponseList, *http.Response, error) { + return r.ApiService.ContentguardsCertguardRhsmListExecute(r) +} + +/* +ContentguardsCertguardRhsmList List rhsm cert guards + +RHSMCertGuard API Viewsets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest +*/ +func (a *ContentguardsRhsmAPIService) ContentguardsCertguardRhsmList(ctx context.Context) ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest { + return ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedcertguardRHSMCertGuardResponseList +func (a *ContentguardsRhsmAPIService) ContentguardsCertguardRhsmListExecute(r ContentguardsRhsmAPIContentguardsCertguardRhsmListRequest) (*PaginatedcertguardRHSMCertGuardResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedcertguardRHSMCertGuardResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRhsmAPIService.ContentguardsCertguardRhsmList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/contentguards/certguard/rhsm/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsRhsmAPIContentguardsCertguardRhsmPartialUpdateRequest struct { + ctx context.Context + ApiService *ContentguardsRhsmAPIService + certguardRHSMCertGuardHref string + patchedcertguardRHSMCertGuard *PatchedcertguardRHSMCertGuard +} + +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmPartialUpdateRequest) PatchedcertguardRHSMCertGuard(patchedcertguardRHSMCertGuard PatchedcertguardRHSMCertGuard) ContentguardsRhsmAPIContentguardsCertguardRhsmPartialUpdateRequest { + r.patchedcertguardRHSMCertGuard = &patchedcertguardRHSMCertGuard + return r +} + +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmPartialUpdateRequest) Execute() (*CertguardRHSMCertGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCertguardRhsmPartialUpdateExecute(r) +} + +/* +ContentguardsCertguardRhsmPartialUpdate Update a rhsm cert guard + +RHSMCertGuard API Viewsets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certguardRHSMCertGuardHref + @return ContentguardsRhsmAPIContentguardsCertguardRhsmPartialUpdateRequest +*/ +func (a *ContentguardsRhsmAPIService) ContentguardsCertguardRhsmPartialUpdate(ctx context.Context, certguardRHSMCertGuardHref string) ContentguardsRhsmAPIContentguardsCertguardRhsmPartialUpdateRequest { + return ContentguardsRhsmAPIContentguardsCertguardRhsmPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + certguardRHSMCertGuardHref: certguardRHSMCertGuardHref, + } +} + +// Execute executes the request +// @return CertguardRHSMCertGuardResponse +func (a *ContentguardsRhsmAPIService) ContentguardsCertguardRhsmPartialUpdateExecute(r ContentguardsRhsmAPIContentguardsCertguardRhsmPartialUpdateRequest) (*CertguardRHSMCertGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertguardRHSMCertGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRhsmAPIService.ContentguardsCertguardRhsmPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{certguard_r_h_s_m_cert_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"certguard_r_h_s_m_cert_guard_href"+"}", parameterValueToString(r.certguardRHSMCertGuardHref, "certguardRHSMCertGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedcertguardRHSMCertGuard == nil { + return localVarReturnValue, nil, reportError("patchedcertguardRHSMCertGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedcertguardRHSMCertGuard + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsRhsmAPIContentguardsCertguardRhsmReadRequest struct { + ctx context.Context + ApiService *ContentguardsRhsmAPIService + certguardRHSMCertGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmReadRequest) Fields(fields []string) ContentguardsRhsmAPIContentguardsCertguardRhsmReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmReadRequest) ExcludeFields(excludeFields []string) ContentguardsRhsmAPIContentguardsCertguardRhsmReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmReadRequest) Execute() (*CertguardRHSMCertGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCertguardRhsmReadExecute(r) +} + +/* +ContentguardsCertguardRhsmRead Inspect a rhsm cert guard + +RHSMCertGuard API Viewsets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certguardRHSMCertGuardHref + @return ContentguardsRhsmAPIContentguardsCertguardRhsmReadRequest +*/ +func (a *ContentguardsRhsmAPIService) ContentguardsCertguardRhsmRead(ctx context.Context, certguardRHSMCertGuardHref string) ContentguardsRhsmAPIContentguardsCertguardRhsmReadRequest { + return ContentguardsRhsmAPIContentguardsCertguardRhsmReadRequest{ + ApiService: a, + ctx: ctx, + certguardRHSMCertGuardHref: certguardRHSMCertGuardHref, + } +} + +// Execute executes the request +// @return CertguardRHSMCertGuardResponse +func (a *ContentguardsRhsmAPIService) ContentguardsCertguardRhsmReadExecute(r ContentguardsRhsmAPIContentguardsCertguardRhsmReadRequest) (*CertguardRHSMCertGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertguardRHSMCertGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRhsmAPIService.ContentguardsCertguardRhsmRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{certguard_r_h_s_m_cert_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"certguard_r_h_s_m_cert_guard_href"+"}", parameterValueToString(r.certguardRHSMCertGuardHref, "certguardRHSMCertGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsRhsmAPIContentguardsCertguardRhsmUpdateRequest struct { + ctx context.Context + ApiService *ContentguardsRhsmAPIService + certguardRHSMCertGuardHref string + certguardRHSMCertGuard *CertguardRHSMCertGuard +} + +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmUpdateRequest) CertguardRHSMCertGuard(certguardRHSMCertGuard CertguardRHSMCertGuard) ContentguardsRhsmAPIContentguardsCertguardRhsmUpdateRequest { + r.certguardRHSMCertGuard = &certguardRHSMCertGuard + return r +} + +func (r ContentguardsRhsmAPIContentguardsCertguardRhsmUpdateRequest) Execute() (*CertguardRHSMCertGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCertguardRhsmUpdateExecute(r) +} + +/* +ContentguardsCertguardRhsmUpdate Update a rhsm cert guard + +RHSMCertGuard API Viewsets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certguardRHSMCertGuardHref + @return ContentguardsRhsmAPIContentguardsCertguardRhsmUpdateRequest +*/ +func (a *ContentguardsRhsmAPIService) ContentguardsCertguardRhsmUpdate(ctx context.Context, certguardRHSMCertGuardHref string) ContentguardsRhsmAPIContentguardsCertguardRhsmUpdateRequest { + return ContentguardsRhsmAPIContentguardsCertguardRhsmUpdateRequest{ + ApiService: a, + ctx: ctx, + certguardRHSMCertGuardHref: certguardRHSMCertGuardHref, + } +} + +// Execute executes the request +// @return CertguardRHSMCertGuardResponse +func (a *ContentguardsRhsmAPIService) ContentguardsCertguardRhsmUpdateExecute(r ContentguardsRhsmAPIContentguardsCertguardRhsmUpdateRequest) (*CertguardRHSMCertGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertguardRHSMCertGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsRhsmAPIService.ContentguardsCertguardRhsmUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{certguard_r_h_s_m_cert_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"certguard_r_h_s_m_cert_guard_href"+"}", parameterValueToString(r.certguardRHSMCertGuardHref, "certguardRHSMCertGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.certguardRHSMCertGuard == nil { + return localVarReturnValue, nil, reportError("certguardRHSMCertGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.certguardRHSMCertGuard + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_x509.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_x509.go new file mode 100644 index 0000000000..9cbe8f549c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_contentguards_x509.go @@ -0,0 +1,830 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ContentguardsX509APIService ContentguardsX509API service +type ContentguardsX509APIService service + +type ContentguardsX509APIContentguardsCertguardX509CreateRequest struct { + ctx context.Context + ApiService *ContentguardsX509APIService + certguardX509CertGuard *CertguardX509CertGuard +} + +func (r ContentguardsX509APIContentguardsCertguardX509CreateRequest) CertguardX509CertGuard(certguardX509CertGuard CertguardX509CertGuard) ContentguardsX509APIContentguardsCertguardX509CreateRequest { + r.certguardX509CertGuard = &certguardX509CertGuard + return r +} + +func (r ContentguardsX509APIContentguardsCertguardX509CreateRequest) Execute() (*CertguardX509CertGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCertguardX509CreateExecute(r) +} + +/* +ContentguardsCertguardX509Create Create a x509 cert guard + +X509CertGuard API Viewsets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentguardsX509APIContentguardsCertguardX509CreateRequest +*/ +func (a *ContentguardsX509APIService) ContentguardsCertguardX509Create(ctx context.Context) ContentguardsX509APIContentguardsCertguardX509CreateRequest { + return ContentguardsX509APIContentguardsCertguardX509CreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CertguardX509CertGuardResponse +func (a *ContentguardsX509APIService) ContentguardsCertguardX509CreateExecute(r ContentguardsX509APIContentguardsCertguardX509CreateRequest) (*CertguardX509CertGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertguardX509CertGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsX509APIService.ContentguardsCertguardX509Create") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/contentguards/certguard/x509/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.certguardX509CertGuard == nil { + return localVarReturnValue, nil, reportError("certguardX509CertGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.certguardX509CertGuard + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsX509APIContentguardsCertguardX509DeleteRequest struct { + ctx context.Context + ApiService *ContentguardsX509APIService + certguardX509CertGuardHref string +} + +func (r ContentguardsX509APIContentguardsCertguardX509DeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ContentguardsCertguardX509DeleteExecute(r) +} + +/* +ContentguardsCertguardX509Delete Delete a x509 cert guard + +X509CertGuard API Viewsets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certguardX509CertGuardHref + @return ContentguardsX509APIContentguardsCertguardX509DeleteRequest +*/ +func (a *ContentguardsX509APIService) ContentguardsCertguardX509Delete(ctx context.Context, certguardX509CertGuardHref string) ContentguardsX509APIContentguardsCertguardX509DeleteRequest { + return ContentguardsX509APIContentguardsCertguardX509DeleteRequest{ + ApiService: a, + ctx: ctx, + certguardX509CertGuardHref: certguardX509CertGuardHref, + } +} + +// Execute executes the request +func (a *ContentguardsX509APIService) ContentguardsCertguardX509DeleteExecute(r ContentguardsX509APIContentguardsCertguardX509DeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsX509APIService.ContentguardsCertguardX509Delete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{certguard_x509_cert_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"certguard_x509_cert_guard_href"+"}", parameterValueToString(r.certguardX509CertGuardHref, "certguardX509CertGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ContentguardsX509APIContentguardsCertguardX509ListRequest struct { + ctx context.Context + ApiService *ContentguardsX509APIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ContentguardsX509APIContentguardsCertguardX509ListRequest) Limit(limit int32) ContentguardsX509APIContentguardsCertguardX509ListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ContentguardsX509APIContentguardsCertguardX509ListRequest) Name(name string) ContentguardsX509APIContentguardsCertguardX509ListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ContentguardsX509APIContentguardsCertguardX509ListRequest) NameContains(nameContains string) ContentguardsX509APIContentguardsCertguardX509ListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r ContentguardsX509APIContentguardsCertguardX509ListRequest) NameIcontains(nameIcontains string) ContentguardsX509APIContentguardsCertguardX509ListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ContentguardsX509APIContentguardsCertguardX509ListRequest) NameIn(nameIn []string) ContentguardsX509APIContentguardsCertguardX509ListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r ContentguardsX509APIContentguardsCertguardX509ListRequest) NameStartswith(nameStartswith string) ContentguardsX509APIContentguardsCertguardX509ListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ContentguardsX509APIContentguardsCertguardX509ListRequest) Offset(offset int32) ContentguardsX509APIContentguardsCertguardX509ListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ContentguardsX509APIContentguardsCertguardX509ListRequest) Ordering(ordering []string) ContentguardsX509APIContentguardsCertguardX509ListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsX509APIContentguardsCertguardX509ListRequest) PulpHrefIn(pulpHrefIn []string) ContentguardsX509APIContentguardsCertguardX509ListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ContentguardsX509APIContentguardsCertguardX509ListRequest) PulpIdIn(pulpIdIn []string) ContentguardsX509APIContentguardsCertguardX509ListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r ContentguardsX509APIContentguardsCertguardX509ListRequest) Fields(fields []string) ContentguardsX509APIContentguardsCertguardX509ListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsX509APIContentguardsCertguardX509ListRequest) ExcludeFields(excludeFields []string) ContentguardsX509APIContentguardsCertguardX509ListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsX509APIContentguardsCertguardX509ListRequest) Execute() (*PaginatedcertguardX509CertGuardResponseList, *http.Response, error) { + return r.ApiService.ContentguardsCertguardX509ListExecute(r) +} + +/* +ContentguardsCertguardX509List List x509 cert guards + +X509CertGuard API Viewsets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ContentguardsX509APIContentguardsCertguardX509ListRequest +*/ +func (a *ContentguardsX509APIService) ContentguardsCertguardX509List(ctx context.Context) ContentguardsX509APIContentguardsCertguardX509ListRequest { + return ContentguardsX509APIContentguardsCertguardX509ListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedcertguardX509CertGuardResponseList +func (a *ContentguardsX509APIService) ContentguardsCertguardX509ListExecute(r ContentguardsX509APIContentguardsCertguardX509ListRequest) (*PaginatedcertguardX509CertGuardResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedcertguardX509CertGuardResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsX509APIService.ContentguardsCertguardX509List") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/contentguards/certguard/x509/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsX509APIContentguardsCertguardX509PartialUpdateRequest struct { + ctx context.Context + ApiService *ContentguardsX509APIService + certguardX509CertGuardHref string + patchedcertguardX509CertGuard *PatchedcertguardX509CertGuard +} + +func (r ContentguardsX509APIContentguardsCertguardX509PartialUpdateRequest) PatchedcertguardX509CertGuard(patchedcertguardX509CertGuard PatchedcertguardX509CertGuard) ContentguardsX509APIContentguardsCertguardX509PartialUpdateRequest { + r.patchedcertguardX509CertGuard = &patchedcertguardX509CertGuard + return r +} + +func (r ContentguardsX509APIContentguardsCertguardX509PartialUpdateRequest) Execute() (*CertguardX509CertGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCertguardX509PartialUpdateExecute(r) +} + +/* +ContentguardsCertguardX509PartialUpdate Update a x509 cert guard + +X509CertGuard API Viewsets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certguardX509CertGuardHref + @return ContentguardsX509APIContentguardsCertguardX509PartialUpdateRequest +*/ +func (a *ContentguardsX509APIService) ContentguardsCertguardX509PartialUpdate(ctx context.Context, certguardX509CertGuardHref string) ContentguardsX509APIContentguardsCertguardX509PartialUpdateRequest { + return ContentguardsX509APIContentguardsCertguardX509PartialUpdateRequest{ + ApiService: a, + ctx: ctx, + certguardX509CertGuardHref: certguardX509CertGuardHref, + } +} + +// Execute executes the request +// @return CertguardX509CertGuardResponse +func (a *ContentguardsX509APIService) ContentguardsCertguardX509PartialUpdateExecute(r ContentguardsX509APIContentguardsCertguardX509PartialUpdateRequest) (*CertguardX509CertGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertguardX509CertGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsX509APIService.ContentguardsCertguardX509PartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{certguard_x509_cert_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"certguard_x509_cert_guard_href"+"}", parameterValueToString(r.certguardX509CertGuardHref, "certguardX509CertGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedcertguardX509CertGuard == nil { + return localVarReturnValue, nil, reportError("patchedcertguardX509CertGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedcertguardX509CertGuard + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsX509APIContentguardsCertguardX509ReadRequest struct { + ctx context.Context + ApiService *ContentguardsX509APIService + certguardX509CertGuardHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ContentguardsX509APIContentguardsCertguardX509ReadRequest) Fields(fields []string) ContentguardsX509APIContentguardsCertguardX509ReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ContentguardsX509APIContentguardsCertguardX509ReadRequest) ExcludeFields(excludeFields []string) ContentguardsX509APIContentguardsCertguardX509ReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ContentguardsX509APIContentguardsCertguardX509ReadRequest) Execute() (*CertguardX509CertGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCertguardX509ReadExecute(r) +} + +/* +ContentguardsCertguardX509Read Inspect a x509 cert guard + +X509CertGuard API Viewsets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certguardX509CertGuardHref + @return ContentguardsX509APIContentguardsCertguardX509ReadRequest +*/ +func (a *ContentguardsX509APIService) ContentguardsCertguardX509Read(ctx context.Context, certguardX509CertGuardHref string) ContentguardsX509APIContentguardsCertguardX509ReadRequest { + return ContentguardsX509APIContentguardsCertguardX509ReadRequest{ + ApiService: a, + ctx: ctx, + certguardX509CertGuardHref: certguardX509CertGuardHref, + } +} + +// Execute executes the request +// @return CertguardX509CertGuardResponse +func (a *ContentguardsX509APIService) ContentguardsCertguardX509ReadExecute(r ContentguardsX509APIContentguardsCertguardX509ReadRequest) (*CertguardX509CertGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertguardX509CertGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsX509APIService.ContentguardsCertguardX509Read") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{certguard_x509_cert_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"certguard_x509_cert_guard_href"+"}", parameterValueToString(r.certguardX509CertGuardHref, "certguardX509CertGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ContentguardsX509APIContentguardsCertguardX509UpdateRequest struct { + ctx context.Context + ApiService *ContentguardsX509APIService + certguardX509CertGuardHref string + certguardX509CertGuard *CertguardX509CertGuard +} + +func (r ContentguardsX509APIContentguardsCertguardX509UpdateRequest) CertguardX509CertGuard(certguardX509CertGuard CertguardX509CertGuard) ContentguardsX509APIContentguardsCertguardX509UpdateRequest { + r.certguardX509CertGuard = &certguardX509CertGuard + return r +} + +func (r ContentguardsX509APIContentguardsCertguardX509UpdateRequest) Execute() (*CertguardX509CertGuardResponse, *http.Response, error) { + return r.ApiService.ContentguardsCertguardX509UpdateExecute(r) +} + +/* +ContentguardsCertguardX509Update Update a x509 cert guard + +X509CertGuard API Viewsets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certguardX509CertGuardHref + @return ContentguardsX509APIContentguardsCertguardX509UpdateRequest +*/ +func (a *ContentguardsX509APIService) ContentguardsCertguardX509Update(ctx context.Context, certguardX509CertGuardHref string) ContentguardsX509APIContentguardsCertguardX509UpdateRequest { + return ContentguardsX509APIContentguardsCertguardX509UpdateRequest{ + ApiService: a, + ctx: ctx, + certguardX509CertGuardHref: certguardX509CertGuardHref, + } +} + +// Execute executes the request +// @return CertguardX509CertGuardResponse +func (a *ContentguardsX509APIService) ContentguardsCertguardX509UpdateExecute(r ContentguardsX509APIContentguardsCertguardX509UpdateRequest) (*CertguardX509CertGuardResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertguardX509CertGuardResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContentguardsX509APIService.ContentguardsCertguardX509Update") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{certguard_x509_cert_guard_href}" + localVarPath = strings.Replace(localVarPath, "{"+"certguard_x509_cert_guard_href"+"}", parameterValueToString(r.certguardX509CertGuardHref, "certguardX509CertGuardHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.certguardX509CertGuard == nil { + return localVarReturnValue, nil, reportError("certguardX509CertGuard is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.certguardX509CertGuard + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_deb_copy.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_deb_copy.go new file mode 100644 index 0000000000..5f95a81a79 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_deb_copy.go @@ -0,0 +1,134 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// DebCopyAPIService DebCopyAPI service +type DebCopyAPIService service + +type DebCopyAPICopyContentRequest struct { + ctx context.Context + ApiService *DebCopyAPIService + copy *Copy +} + +func (r DebCopyAPICopyContentRequest) Copy(copy Copy) DebCopyAPICopyContentRequest { + r.copy = © + return r +} + +func (r DebCopyAPICopyContentRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.CopyContentExecute(r) +} + +/* +CopyContent Copy content + +Trigger an asynchronous task to copy APT contentfrom one repository into another, creating a newrepository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DebCopyAPICopyContentRequest +*/ +func (a *DebCopyAPIService) CopyContent(ctx context.Context) DebCopyAPICopyContentRequest { + return DebCopyAPICopyContentRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DebCopyAPIService) CopyContentExecute(r DebCopyAPICopyContentRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DebCopyAPIService.CopyContent") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/deb/copy/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.copy == nil { + return localVarReturnValue, nil, reportError("copy is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.copy + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions.go new file mode 100644 index 0000000000..a5e158dcf8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions.go @@ -0,0 +1,350 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" +) + + +// DistributionsAPIService DistributionsAPI service +type DistributionsAPIService service + +type DistributionsAPIDistributionsListRequest struct { + ctx context.Context + ApiService *DistributionsAPIService + basePath *string + basePathContains *string + basePathIcontains *string + basePathIn *[]string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpTypeIn *[]string + repository *string + repositoryIn *[]string + withContent *string + fields *[]string + excludeFields *[]string +} + +// Filter results where base_path matches value +func (r DistributionsAPIDistributionsListRequest) BasePath(basePath string) DistributionsAPIDistributionsListRequest { + r.basePath = &basePath + return r +} + +// Filter results where base_path contains value +func (r DistributionsAPIDistributionsListRequest) BasePathContains(basePathContains string) DistributionsAPIDistributionsListRequest { + r.basePathContains = &basePathContains + return r +} + +// Filter results where base_path contains value +func (r DistributionsAPIDistributionsListRequest) BasePathIcontains(basePathIcontains string) DistributionsAPIDistributionsListRequest { + r.basePathIcontains = &basePathIcontains + return r +} + +// Filter results where base_path is in a comma-separated list of values +func (r DistributionsAPIDistributionsListRequest) BasePathIn(basePathIn []string) DistributionsAPIDistributionsListRequest { + r.basePathIn = &basePathIn + return r +} + +// Number of results to return per page. +func (r DistributionsAPIDistributionsListRequest) Limit(limit int32) DistributionsAPIDistributionsListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r DistributionsAPIDistributionsListRequest) Name(name string) DistributionsAPIDistributionsListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r DistributionsAPIDistributionsListRequest) NameContains(nameContains string) DistributionsAPIDistributionsListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r DistributionsAPIDistributionsListRequest) NameIcontains(nameIcontains string) DistributionsAPIDistributionsListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r DistributionsAPIDistributionsListRequest) NameIn(nameIn []string) DistributionsAPIDistributionsListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r DistributionsAPIDistributionsListRequest) NameStartswith(nameStartswith string) DistributionsAPIDistributionsListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r DistributionsAPIDistributionsListRequest) Offset(offset int32) DistributionsAPIDistributionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r DistributionsAPIDistributionsListRequest) Ordering(ordering []string) DistributionsAPIDistributionsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsAPIDistributionsListRequest) PulpHrefIn(pulpHrefIn []string) DistributionsAPIDistributionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsAPIDistributionsListRequest) PulpIdIn(pulpIdIn []string) DistributionsAPIDistributionsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r DistributionsAPIDistributionsListRequest) PulpLabelSelect(pulpLabelSelect string) DistributionsAPIDistributionsListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Pulp type is in * `core.artifact` - core.artifact * `ansible.ansible` - ansible.ansible * `container.container` - container.container * `deb.apt-distribution` - deb.apt-distribution * `file.file` - file.file * `gem.gem` - gem.gem * `maven.maven` - maven.maven * `ostree.ostree` - ostree.ostree * `python.python` - python.python * `rpm.rpm` - rpm.rpm +func (r DistributionsAPIDistributionsListRequest) PulpTypeIn(pulpTypeIn []string) DistributionsAPIDistributionsListRequest { + r.pulpTypeIn = &pulpTypeIn + return r +} + +// Filter results where repository matches value +func (r DistributionsAPIDistributionsListRequest) Repository(repository string) DistributionsAPIDistributionsListRequest { + r.repository = &repository + return r +} + +// Filter results where repository is in a comma-separated list of values +func (r DistributionsAPIDistributionsListRequest) RepositoryIn(repositoryIn []string) DistributionsAPIDistributionsListRequest { + r.repositoryIn = &repositoryIn + return r +} + +// Filter distributions based on the content served by them +func (r DistributionsAPIDistributionsListRequest) WithContent(withContent string) DistributionsAPIDistributionsListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r DistributionsAPIDistributionsListRequest) Fields(fields []string) DistributionsAPIDistributionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsAPIDistributionsListRequest) ExcludeFields(excludeFields []string) DistributionsAPIDistributionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsAPIDistributionsListRequest) Execute() (*PaginatedDistributionResponseList, *http.Response, error) { + return r.ApiService.DistributionsListExecute(r) +} + +/* +DistributionsList List distributions + +Provides base viewset for Distributions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsAPIDistributionsListRequest +*/ +func (a *DistributionsAPIService) DistributionsList(ctx context.Context) DistributionsAPIDistributionsListRequest { + return DistributionsAPIDistributionsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedDistributionResponseList +func (a *DistributionsAPIService) DistributionsListExecute(r DistributionsAPIDistributionsListRequest) (*PaginatedDistributionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedDistributionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAPIService.DistributionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.basePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path", r.basePath, "") + } + if r.basePathContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__contains", r.basePathContains, "") + } + if r.basePathIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__icontains", r.basePathIcontains, "") + } + if r.basePathIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__in", r.basePathIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpTypeIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_type__in", r.pulpTypeIn, "csv") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository__in", r.repositoryIn, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_ansible.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_ansible.go new file mode 100644 index 0000000000..83af832700 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_ansible.go @@ -0,0 +1,1427 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// DistributionsAnsibleAPIService DistributionsAnsibleAPI service +type DistributionsAnsibleAPIService service + +type DistributionsAnsibleAPIDistributionsAnsibleAnsibleAddRoleRequest struct { + ctx context.Context + ApiService *DistributionsAnsibleAPIService + ansibleAnsibleDistributionHref string + nestedRole *NestedRole +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleAddRoleRequest) NestedRole(nestedRole NestedRole) DistributionsAnsibleAPIDistributionsAnsibleAnsibleAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.DistributionsAnsibleAnsibleAddRoleExecute(r) +} + +/* +DistributionsAnsibleAnsibleAddRole Method for DistributionsAnsibleAnsibleAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleDistributionHref + @return DistributionsAnsibleAPIDistributionsAnsibleAnsibleAddRoleRequest +*/ +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleAddRole(ctx context.Context, ansibleAnsibleDistributionHref string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleAddRoleRequest { + return DistributionsAnsibleAPIDistributionsAnsibleAnsibleAddRoleRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleDistributionHref: ansibleAnsibleDistributionHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleAddRoleExecute(r DistributionsAnsibleAPIDistributionsAnsibleAnsibleAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAnsibleAPIService.DistributionsAnsibleAnsibleAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_distribution_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_distribution_href"+"}", parameterValueToString(r.ansibleAnsibleDistributionHref, "ansibleAnsibleDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAnsibleAPIDistributionsAnsibleAnsibleCreateRequest struct { + ctx context.Context + ApiService *DistributionsAnsibleAPIService + ansibleAnsibleDistribution *AnsibleAnsibleDistribution +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleCreateRequest) AnsibleAnsibleDistribution(ansibleAnsibleDistribution AnsibleAnsibleDistribution) DistributionsAnsibleAPIDistributionsAnsibleAnsibleCreateRequest { + r.ansibleAnsibleDistribution = &ansibleAnsibleDistribution + return r +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsAnsibleAnsibleCreateExecute(r) +} + +/* +DistributionsAnsibleAnsibleCreate Create an ansible distribution + +Trigger an asynchronous create task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsAnsibleAPIDistributionsAnsibleAnsibleCreateRequest +*/ +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleCreate(ctx context.Context) DistributionsAnsibleAPIDistributionsAnsibleAnsibleCreateRequest { + return DistributionsAnsibleAPIDistributionsAnsibleAnsibleCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleCreateExecute(r DistributionsAnsibleAPIDistributionsAnsibleAnsibleCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAnsibleAPIService.DistributionsAnsibleAnsibleCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/ansible/ansible/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleAnsibleDistribution == nil { + return localVarReturnValue, nil, reportError("ansibleAnsibleDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleAnsibleDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAnsibleAPIDistributionsAnsibleAnsibleDeleteRequest struct { + ctx context.Context + ApiService *DistributionsAnsibleAPIService + ansibleAnsibleDistributionHref string +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsAnsibleAnsibleDeleteExecute(r) +} + +/* +DistributionsAnsibleAnsibleDelete Delete an ansible distribution + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleDistributionHref + @return DistributionsAnsibleAPIDistributionsAnsibleAnsibleDeleteRequest +*/ +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleDelete(ctx context.Context, ansibleAnsibleDistributionHref string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleDeleteRequest { + return DistributionsAnsibleAPIDistributionsAnsibleAnsibleDeleteRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleDistributionHref: ansibleAnsibleDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleDeleteExecute(r DistributionsAnsibleAPIDistributionsAnsibleAnsibleDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAnsibleAPIService.DistributionsAnsibleAnsibleDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_distribution_href"+"}", parameterValueToString(r.ansibleAnsibleDistributionHref, "ansibleAnsibleDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest struct { + ctx context.Context + ApiService *DistributionsAnsibleAPIService + basePath *string + basePathContains *string + basePathIcontains *string + basePathIn *[]string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + repository *string + repositoryIn *[]string + withContent *string + fields *[]string + excludeFields *[]string +} + +// Filter results where base_path matches value +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) BasePath(basePath string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.basePath = &basePath + return r +} + +// Filter results where base_path contains value +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) BasePathContains(basePathContains string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.basePathContains = &basePathContains + return r +} + +// Filter results where base_path contains value +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) BasePathIcontains(basePathIcontains string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.basePathIcontains = &basePathIcontains + return r +} + +// Filter results where base_path is in a comma-separated list of values +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) BasePathIn(basePathIn []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.basePathIn = &basePathIn + return r +} + +// Number of results to return per page. +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) Limit(limit int32) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) Name(name string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) NameContains(nameContains string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) NameIcontains(nameIcontains string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) NameIn(nameIn []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) NameStartswith(nameStartswith string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) Offset(offset int32) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) Ordering(ordering []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) PulpHrefIn(pulpHrefIn []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) PulpIdIn(pulpIdIn []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) PulpLabelSelect(pulpLabelSelect string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where repository matches value +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) Repository(repository string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.repository = &repository + return r +} + +// Filter results where repository is in a comma-separated list of values +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) RepositoryIn(repositoryIn []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.repositoryIn = &repositoryIn + return r +} + +// Filter distributions based on the content served by them +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) WithContent(withContent string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) Fields(fields []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) ExcludeFields(excludeFields []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) Execute() (*PaginatedansibleAnsibleDistributionResponseList, *http.Response, error) { + return r.ApiService.DistributionsAnsibleAnsibleListExecute(r) +} + +/* +DistributionsAnsibleAnsibleList List ansible distributions + +ViewSet for Ansible Distributions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest +*/ +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleList(ctx context.Context) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest { + return DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedansibleAnsibleDistributionResponseList +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleListExecute(r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRequest) (*PaginatedansibleAnsibleDistributionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleAnsibleDistributionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAnsibleAPIService.DistributionsAnsibleAnsibleList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/ansible/ansible/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.basePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path", r.basePath, "") + } + if r.basePathContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__contains", r.basePathContains, "") + } + if r.basePathIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__icontains", r.basePathIcontains, "") + } + if r.basePathIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__in", r.basePathIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository__in", r.repositoryIn, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRolesRequest struct { + ctx context.Context + ApiService *DistributionsAnsibleAPIService + ansibleAnsibleDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRolesRequest) Fields(fields []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRolesRequest) ExcludeFields(excludeFields []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.DistributionsAnsibleAnsibleListRolesExecute(r) +} + +/* +DistributionsAnsibleAnsibleListRoles Method for DistributionsAnsibleAnsibleListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleDistributionHref + @return DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRolesRequest +*/ +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleListRoles(ctx context.Context, ansibleAnsibleDistributionHref string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRolesRequest { + return DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRolesRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleDistributionHref: ansibleAnsibleDistributionHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleListRolesExecute(r DistributionsAnsibleAPIDistributionsAnsibleAnsibleListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAnsibleAPIService.DistributionsAnsibleAnsibleListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_distribution_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_distribution_href"+"}", parameterValueToString(r.ansibleAnsibleDistributionHref, "ansibleAnsibleDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAnsibleAPIDistributionsAnsibleAnsibleMyPermissionsRequest struct { + ctx context.Context + ApiService *DistributionsAnsibleAPIService + ansibleAnsibleDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleMyPermissionsRequest) Fields(fields []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleMyPermissionsRequest) ExcludeFields(excludeFields []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.DistributionsAnsibleAnsibleMyPermissionsExecute(r) +} + +/* +DistributionsAnsibleAnsibleMyPermissions Method for DistributionsAnsibleAnsibleMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleDistributionHref + @return DistributionsAnsibleAPIDistributionsAnsibleAnsibleMyPermissionsRequest +*/ +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleMyPermissions(ctx context.Context, ansibleAnsibleDistributionHref string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleMyPermissionsRequest { + return DistributionsAnsibleAPIDistributionsAnsibleAnsibleMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleDistributionHref: ansibleAnsibleDistributionHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleMyPermissionsExecute(r DistributionsAnsibleAPIDistributionsAnsibleAnsibleMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAnsibleAPIService.DistributionsAnsibleAnsibleMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_distribution_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_distribution_href"+"}", parameterValueToString(r.ansibleAnsibleDistributionHref, "ansibleAnsibleDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAnsibleAPIDistributionsAnsibleAnsiblePartialUpdateRequest struct { + ctx context.Context + ApiService *DistributionsAnsibleAPIService + ansibleAnsibleDistributionHref string + patchedansibleAnsibleDistribution *PatchedansibleAnsibleDistribution +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsiblePartialUpdateRequest) PatchedansibleAnsibleDistribution(patchedansibleAnsibleDistribution PatchedansibleAnsibleDistribution) DistributionsAnsibleAPIDistributionsAnsibleAnsiblePartialUpdateRequest { + r.patchedansibleAnsibleDistribution = &patchedansibleAnsibleDistribution + return r +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsiblePartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsAnsibleAnsiblePartialUpdateExecute(r) +} + +/* +DistributionsAnsibleAnsiblePartialUpdate Update an ansible distribution + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleDistributionHref + @return DistributionsAnsibleAPIDistributionsAnsibleAnsiblePartialUpdateRequest +*/ +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsiblePartialUpdate(ctx context.Context, ansibleAnsibleDistributionHref string) DistributionsAnsibleAPIDistributionsAnsibleAnsiblePartialUpdateRequest { + return DistributionsAnsibleAPIDistributionsAnsibleAnsiblePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleDistributionHref: ansibleAnsibleDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsiblePartialUpdateExecute(r DistributionsAnsibleAPIDistributionsAnsibleAnsiblePartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAnsibleAPIService.DistributionsAnsibleAnsiblePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_distribution_href"+"}", parameterValueToString(r.ansibleAnsibleDistributionHref, "ansibleAnsibleDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedansibleAnsibleDistribution == nil { + return localVarReturnValue, nil, reportError("patchedansibleAnsibleDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedansibleAnsibleDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAnsibleAPIDistributionsAnsibleAnsibleReadRequest struct { + ctx context.Context + ApiService *DistributionsAnsibleAPIService + ansibleAnsibleDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleReadRequest) Fields(fields []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleReadRequest) ExcludeFields(excludeFields []string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleReadRequest) Execute() (*AnsibleAnsibleDistributionResponse, *http.Response, error) { + return r.ApiService.DistributionsAnsibleAnsibleReadExecute(r) +} + +/* +DistributionsAnsibleAnsibleRead Inspect an ansible distribution + +ViewSet for Ansible Distributions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleDistributionHref + @return DistributionsAnsibleAPIDistributionsAnsibleAnsibleReadRequest +*/ +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleRead(ctx context.Context, ansibleAnsibleDistributionHref string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleReadRequest { + return DistributionsAnsibleAPIDistributionsAnsibleAnsibleReadRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleDistributionHref: ansibleAnsibleDistributionHref, + } +} + +// Execute executes the request +// @return AnsibleAnsibleDistributionResponse +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleReadExecute(r DistributionsAnsibleAPIDistributionsAnsibleAnsibleReadRequest) (*AnsibleAnsibleDistributionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleAnsibleDistributionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAnsibleAPIService.DistributionsAnsibleAnsibleRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_distribution_href"+"}", parameterValueToString(r.ansibleAnsibleDistributionHref, "ansibleAnsibleDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAnsibleAPIDistributionsAnsibleAnsibleRemoveRoleRequest struct { + ctx context.Context + ApiService *DistributionsAnsibleAPIService + ansibleAnsibleDistributionHref string + nestedRole *NestedRole +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleRemoveRoleRequest) NestedRole(nestedRole NestedRole) DistributionsAnsibleAPIDistributionsAnsibleAnsibleRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.DistributionsAnsibleAnsibleRemoveRoleExecute(r) +} + +/* +DistributionsAnsibleAnsibleRemoveRole Method for DistributionsAnsibleAnsibleRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleDistributionHref + @return DistributionsAnsibleAPIDistributionsAnsibleAnsibleRemoveRoleRequest +*/ +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleRemoveRole(ctx context.Context, ansibleAnsibleDistributionHref string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleRemoveRoleRequest { + return DistributionsAnsibleAPIDistributionsAnsibleAnsibleRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleDistributionHref: ansibleAnsibleDistributionHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleRemoveRoleExecute(r DistributionsAnsibleAPIDistributionsAnsibleAnsibleRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAnsibleAPIService.DistributionsAnsibleAnsibleRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_distribution_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_distribution_href"+"}", parameterValueToString(r.ansibleAnsibleDistributionHref, "ansibleAnsibleDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAnsibleAPIDistributionsAnsibleAnsibleUpdateRequest struct { + ctx context.Context + ApiService *DistributionsAnsibleAPIService + ansibleAnsibleDistributionHref string + ansibleAnsibleDistribution *AnsibleAnsibleDistribution +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleUpdateRequest) AnsibleAnsibleDistribution(ansibleAnsibleDistribution AnsibleAnsibleDistribution) DistributionsAnsibleAPIDistributionsAnsibleAnsibleUpdateRequest { + r.ansibleAnsibleDistribution = &ansibleAnsibleDistribution + return r +} + +func (r DistributionsAnsibleAPIDistributionsAnsibleAnsibleUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsAnsibleAnsibleUpdateExecute(r) +} + +/* +DistributionsAnsibleAnsibleUpdate Update an ansible distribution + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleDistributionHref + @return DistributionsAnsibleAPIDistributionsAnsibleAnsibleUpdateRequest +*/ +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleUpdate(ctx context.Context, ansibleAnsibleDistributionHref string) DistributionsAnsibleAPIDistributionsAnsibleAnsibleUpdateRequest { + return DistributionsAnsibleAPIDistributionsAnsibleAnsibleUpdateRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleDistributionHref: ansibleAnsibleDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsAnsibleAPIService) DistributionsAnsibleAnsibleUpdateExecute(r DistributionsAnsibleAPIDistributionsAnsibleAnsibleUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAnsibleAPIService.DistributionsAnsibleAnsibleUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_distribution_href"+"}", parameterValueToString(r.ansibleAnsibleDistributionHref, "ansibleAnsibleDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleAnsibleDistribution == nil { + return localVarReturnValue, nil, reportError("ansibleAnsibleDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleAnsibleDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_apt.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_apt.go new file mode 100644 index 0000000000..cf81c3f288 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_apt.go @@ -0,0 +1,929 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// DistributionsAptAPIService DistributionsAptAPI service +type DistributionsAptAPIService service + +type DistributionsAptAPIDistributionsDebAptCreateRequest struct { + ctx context.Context + ApiService *DistributionsAptAPIService + debAptDistribution *DebAptDistribution +} + +func (r DistributionsAptAPIDistributionsDebAptCreateRequest) DebAptDistribution(debAptDistribution DebAptDistribution) DistributionsAptAPIDistributionsDebAptCreateRequest { + r.debAptDistribution = &debAptDistribution + return r +} + +func (r DistributionsAptAPIDistributionsDebAptCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsDebAptCreateExecute(r) +} + +/* +DistributionsDebAptCreate Create an apt distribution + +Trigger an asynchronous create task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsAptAPIDistributionsDebAptCreateRequest +*/ +func (a *DistributionsAptAPIService) DistributionsDebAptCreate(ctx context.Context) DistributionsAptAPIDistributionsDebAptCreateRequest { + return DistributionsAptAPIDistributionsDebAptCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsAptAPIService) DistributionsDebAptCreateExecute(r DistributionsAptAPIDistributionsDebAptCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAptAPIService.DistributionsDebAptCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/deb/apt/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debAptDistribution == nil { + return localVarReturnValue, nil, reportError("debAptDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debAptDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAptAPIDistributionsDebAptDeleteRequest struct { + ctx context.Context + ApiService *DistributionsAptAPIService + debAptDistributionHref string +} + +func (r DistributionsAptAPIDistributionsDebAptDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsDebAptDeleteExecute(r) +} + +/* +DistributionsDebAptDelete Delete an apt distribution + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptDistributionHref + @return DistributionsAptAPIDistributionsDebAptDeleteRequest +*/ +func (a *DistributionsAptAPIService) DistributionsDebAptDelete(ctx context.Context, debAptDistributionHref string) DistributionsAptAPIDistributionsDebAptDeleteRequest { + return DistributionsAptAPIDistributionsDebAptDeleteRequest{ + ApiService: a, + ctx: ctx, + debAptDistributionHref: debAptDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsAptAPIService) DistributionsDebAptDeleteExecute(r DistributionsAptAPIDistributionsDebAptDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAptAPIService.DistributionsDebAptDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_distribution_href"+"}", parameterValueToString(r.debAptDistributionHref, "debAptDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAptAPIDistributionsDebAptListRequest struct { + ctx context.Context + ApiService *DistributionsAptAPIService + basePath *string + basePathContains *string + basePathIcontains *string + basePathIn *[]string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + repository *string + repositoryIn *[]string + withContent *string + fields *[]string + excludeFields *[]string +} + +// Filter results where base_path matches value +func (r DistributionsAptAPIDistributionsDebAptListRequest) BasePath(basePath string) DistributionsAptAPIDistributionsDebAptListRequest { + r.basePath = &basePath + return r +} + +// Filter results where base_path contains value +func (r DistributionsAptAPIDistributionsDebAptListRequest) BasePathContains(basePathContains string) DistributionsAptAPIDistributionsDebAptListRequest { + r.basePathContains = &basePathContains + return r +} + +// Filter results where base_path contains value +func (r DistributionsAptAPIDistributionsDebAptListRequest) BasePathIcontains(basePathIcontains string) DistributionsAptAPIDistributionsDebAptListRequest { + r.basePathIcontains = &basePathIcontains + return r +} + +// Filter results where base_path is in a comma-separated list of values +func (r DistributionsAptAPIDistributionsDebAptListRequest) BasePathIn(basePathIn []string) DistributionsAptAPIDistributionsDebAptListRequest { + r.basePathIn = &basePathIn + return r +} + +// Number of results to return per page. +func (r DistributionsAptAPIDistributionsDebAptListRequest) Limit(limit int32) DistributionsAptAPIDistributionsDebAptListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r DistributionsAptAPIDistributionsDebAptListRequest) Name(name string) DistributionsAptAPIDistributionsDebAptListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r DistributionsAptAPIDistributionsDebAptListRequest) NameContains(nameContains string) DistributionsAptAPIDistributionsDebAptListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r DistributionsAptAPIDistributionsDebAptListRequest) NameIcontains(nameIcontains string) DistributionsAptAPIDistributionsDebAptListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r DistributionsAptAPIDistributionsDebAptListRequest) NameIn(nameIn []string) DistributionsAptAPIDistributionsDebAptListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r DistributionsAptAPIDistributionsDebAptListRequest) NameStartswith(nameStartswith string) DistributionsAptAPIDistributionsDebAptListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r DistributionsAptAPIDistributionsDebAptListRequest) Offset(offset int32) DistributionsAptAPIDistributionsDebAptListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r DistributionsAptAPIDistributionsDebAptListRequest) Ordering(ordering []string) DistributionsAptAPIDistributionsDebAptListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsAptAPIDistributionsDebAptListRequest) PulpHrefIn(pulpHrefIn []string) DistributionsAptAPIDistributionsDebAptListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsAptAPIDistributionsDebAptListRequest) PulpIdIn(pulpIdIn []string) DistributionsAptAPIDistributionsDebAptListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r DistributionsAptAPIDistributionsDebAptListRequest) PulpLabelSelect(pulpLabelSelect string) DistributionsAptAPIDistributionsDebAptListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where repository matches value +func (r DistributionsAptAPIDistributionsDebAptListRequest) Repository(repository string) DistributionsAptAPIDistributionsDebAptListRequest { + r.repository = &repository + return r +} + +// Filter results where repository is in a comma-separated list of values +func (r DistributionsAptAPIDistributionsDebAptListRequest) RepositoryIn(repositoryIn []string) DistributionsAptAPIDistributionsDebAptListRequest { + r.repositoryIn = &repositoryIn + return r +} + +// Filter distributions based on the content served by them +func (r DistributionsAptAPIDistributionsDebAptListRequest) WithContent(withContent string) DistributionsAptAPIDistributionsDebAptListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r DistributionsAptAPIDistributionsDebAptListRequest) Fields(fields []string) DistributionsAptAPIDistributionsDebAptListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsAptAPIDistributionsDebAptListRequest) ExcludeFields(excludeFields []string) DistributionsAptAPIDistributionsDebAptListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsAptAPIDistributionsDebAptListRequest) Execute() (*PaginateddebAptDistributionResponseList, *http.Response, error) { + return r.ApiService.DistributionsDebAptListExecute(r) +} + +/* +DistributionsDebAptList List apt distributions + +An AptDistribution is just an AptPublication made available via the content app. + +Creating an AptDistribution is a comparatively quick action. This way Pulp users may take as +much time as is needed to prepare a VerbatimPublication or AptPublication, and then control the +exact moment when that publication is made available. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsAptAPIDistributionsDebAptListRequest +*/ +func (a *DistributionsAptAPIService) DistributionsDebAptList(ctx context.Context) DistributionsAptAPIDistributionsDebAptListRequest { + return DistributionsAptAPIDistributionsDebAptListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebAptDistributionResponseList +func (a *DistributionsAptAPIService) DistributionsDebAptListExecute(r DistributionsAptAPIDistributionsDebAptListRequest) (*PaginateddebAptDistributionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebAptDistributionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAptAPIService.DistributionsDebAptList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/deb/apt/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.basePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path", r.basePath, "") + } + if r.basePathContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__contains", r.basePathContains, "") + } + if r.basePathIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__icontains", r.basePathIcontains, "") + } + if r.basePathIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__in", r.basePathIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository__in", r.repositoryIn, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAptAPIDistributionsDebAptPartialUpdateRequest struct { + ctx context.Context + ApiService *DistributionsAptAPIService + debAptDistributionHref string + patcheddebAptDistribution *PatcheddebAptDistribution +} + +func (r DistributionsAptAPIDistributionsDebAptPartialUpdateRequest) PatcheddebAptDistribution(patcheddebAptDistribution PatcheddebAptDistribution) DistributionsAptAPIDistributionsDebAptPartialUpdateRequest { + r.patcheddebAptDistribution = &patcheddebAptDistribution + return r +} + +func (r DistributionsAptAPIDistributionsDebAptPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsDebAptPartialUpdateExecute(r) +} + +/* +DistributionsDebAptPartialUpdate Update an apt distribution + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptDistributionHref + @return DistributionsAptAPIDistributionsDebAptPartialUpdateRequest +*/ +func (a *DistributionsAptAPIService) DistributionsDebAptPartialUpdate(ctx context.Context, debAptDistributionHref string) DistributionsAptAPIDistributionsDebAptPartialUpdateRequest { + return DistributionsAptAPIDistributionsDebAptPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + debAptDistributionHref: debAptDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsAptAPIService) DistributionsDebAptPartialUpdateExecute(r DistributionsAptAPIDistributionsDebAptPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAptAPIService.DistributionsDebAptPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_distribution_href"+"}", parameterValueToString(r.debAptDistributionHref, "debAptDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patcheddebAptDistribution == nil { + return localVarReturnValue, nil, reportError("patcheddebAptDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patcheddebAptDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAptAPIDistributionsDebAptReadRequest struct { + ctx context.Context + ApiService *DistributionsAptAPIService + debAptDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsAptAPIDistributionsDebAptReadRequest) Fields(fields []string) DistributionsAptAPIDistributionsDebAptReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsAptAPIDistributionsDebAptReadRequest) ExcludeFields(excludeFields []string) DistributionsAptAPIDistributionsDebAptReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsAptAPIDistributionsDebAptReadRequest) Execute() (*DebAptDistributionResponse, *http.Response, error) { + return r.ApiService.DistributionsDebAptReadExecute(r) +} + +/* +DistributionsDebAptRead Inspect an apt distribution + +An AptDistribution is just an AptPublication made available via the content app. + +Creating an AptDistribution is a comparatively quick action. This way Pulp users may take as +much time as is needed to prepare a VerbatimPublication or AptPublication, and then control the +exact moment when that publication is made available. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptDistributionHref + @return DistributionsAptAPIDistributionsDebAptReadRequest +*/ +func (a *DistributionsAptAPIService) DistributionsDebAptRead(ctx context.Context, debAptDistributionHref string) DistributionsAptAPIDistributionsDebAptReadRequest { + return DistributionsAptAPIDistributionsDebAptReadRequest{ + ApiService: a, + ctx: ctx, + debAptDistributionHref: debAptDistributionHref, + } +} + +// Execute executes the request +// @return DebAptDistributionResponse +func (a *DistributionsAptAPIService) DistributionsDebAptReadExecute(r DistributionsAptAPIDistributionsDebAptReadRequest) (*DebAptDistributionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebAptDistributionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAptAPIService.DistributionsDebAptRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_distribution_href"+"}", parameterValueToString(r.debAptDistributionHref, "debAptDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsAptAPIDistributionsDebAptUpdateRequest struct { + ctx context.Context + ApiService *DistributionsAptAPIService + debAptDistributionHref string + debAptDistribution *DebAptDistribution +} + +func (r DistributionsAptAPIDistributionsDebAptUpdateRequest) DebAptDistribution(debAptDistribution DebAptDistribution) DistributionsAptAPIDistributionsDebAptUpdateRequest { + r.debAptDistribution = &debAptDistribution + return r +} + +func (r DistributionsAptAPIDistributionsDebAptUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsDebAptUpdateExecute(r) +} + +/* +DistributionsDebAptUpdate Update an apt distribution + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptDistributionHref + @return DistributionsAptAPIDistributionsDebAptUpdateRequest +*/ +func (a *DistributionsAptAPIService) DistributionsDebAptUpdate(ctx context.Context, debAptDistributionHref string) DistributionsAptAPIDistributionsDebAptUpdateRequest { + return DistributionsAptAPIDistributionsDebAptUpdateRequest{ + ApiService: a, + ctx: ctx, + debAptDistributionHref: debAptDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsAptAPIService) DistributionsDebAptUpdateExecute(r DistributionsAptAPIDistributionsDebAptUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsAptAPIService.DistributionsDebAptUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_distribution_href"+"}", parameterValueToString(r.debAptDistributionHref, "debAptDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debAptDistribution == nil { + return localVarReturnValue, nil, reportError("debAptDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debAptDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_artifacts.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_artifacts.go new file mode 100644 index 0000000000..abbc004cad --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_artifacts.go @@ -0,0 +1,480 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// DistributionsArtifactsAPIService DistributionsArtifactsAPI service +type DistributionsArtifactsAPIService service + +type DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest struct { + ctx context.Context + ApiService *DistributionsArtifactsAPIService + basePath *string + basePathContains *string + basePathIcontains *string + basePathIn *[]string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + repository *string + repositoryIn *[]string + withContent *string + fields *[]string + excludeFields *[]string +} + +// Filter results where base_path matches value +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) BasePath(basePath string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.basePath = &basePath + return r +} + +// Filter results where base_path contains value +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) BasePathContains(basePathContains string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.basePathContains = &basePathContains + return r +} + +// Filter results where base_path contains value +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) BasePathIcontains(basePathIcontains string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.basePathIcontains = &basePathIcontains + return r +} + +// Filter results where base_path is in a comma-separated list of values +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) BasePathIn(basePathIn []string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.basePathIn = &basePathIn + return r +} + +// Number of results to return per page. +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) Limit(limit int32) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) Name(name string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) NameContains(nameContains string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) NameIcontains(nameIcontains string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) NameIn(nameIn []string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) NameStartswith(nameStartswith string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) Offset(offset int32) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) Ordering(ordering []string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) PulpHrefIn(pulpHrefIn []string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) PulpIdIn(pulpIdIn []string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) PulpLabelSelect(pulpLabelSelect string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where repository matches value +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) Repository(repository string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.repository = &repository + return r +} + +// Filter results where repository is in a comma-separated list of values +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) RepositoryIn(repositoryIn []string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.repositoryIn = &repositoryIn + return r +} + +// Filter distributions based on the content served by them +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) WithContent(withContent string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) Fields(fields []string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) ExcludeFields(excludeFields []string) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) Execute() (*PaginatedArtifactDistributionResponseList, *http.Response, error) { + return r.ApiService.DistributionsCoreArtifactsListExecute(r) +} + +/* +DistributionsCoreArtifactsList List artifact distributions + +ViewSet for ArtifactDistribution. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest +*/ +func (a *DistributionsArtifactsAPIService) DistributionsCoreArtifactsList(ctx context.Context) DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest { + return DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedArtifactDistributionResponseList +func (a *DistributionsArtifactsAPIService) DistributionsCoreArtifactsListExecute(r DistributionsArtifactsAPIDistributionsCoreArtifactsListRequest) (*PaginatedArtifactDistributionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedArtifactDistributionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsArtifactsAPIService.DistributionsCoreArtifactsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/core/artifacts/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.basePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path", r.basePath, "") + } + if r.basePathContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__contains", r.basePathContains, "") + } + if r.basePathIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__icontains", r.basePathIcontains, "") + } + if r.basePathIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__in", r.basePathIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository__in", r.repositoryIn, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsArtifactsAPIDistributionsCoreArtifactsReadRequest struct { + ctx context.Context + ApiService *DistributionsArtifactsAPIService + artifactDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsReadRequest) Fields(fields []string) DistributionsArtifactsAPIDistributionsCoreArtifactsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsReadRequest) ExcludeFields(excludeFields []string) DistributionsArtifactsAPIDistributionsCoreArtifactsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsArtifactsAPIDistributionsCoreArtifactsReadRequest) Execute() (*ArtifactDistributionResponse, *http.Response, error) { + return r.ApiService.DistributionsCoreArtifactsReadExecute(r) +} + +/* +DistributionsCoreArtifactsRead Inspect an artifact distribution + +ViewSet for ArtifactDistribution. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param artifactDistributionHref + @return DistributionsArtifactsAPIDistributionsCoreArtifactsReadRequest +*/ +func (a *DistributionsArtifactsAPIService) DistributionsCoreArtifactsRead(ctx context.Context, artifactDistributionHref string) DistributionsArtifactsAPIDistributionsCoreArtifactsReadRequest { + return DistributionsArtifactsAPIDistributionsCoreArtifactsReadRequest{ + ApiService: a, + ctx: ctx, + artifactDistributionHref: artifactDistributionHref, + } +} + +// Execute executes the request +// @return ArtifactDistributionResponse +func (a *DistributionsArtifactsAPIService) DistributionsCoreArtifactsReadExecute(r DistributionsArtifactsAPIDistributionsCoreArtifactsReadRequest) (*ArtifactDistributionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ArtifactDistributionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsArtifactsAPIService.DistributionsCoreArtifactsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{artifact_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"artifact_distribution_href"+"}", parameterValueToString(r.artifactDistributionHref, "artifactDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_container.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_container.go new file mode 100644 index 0000000000..5df25635c9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_container.go @@ -0,0 +1,1444 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// DistributionsContainerAPIService DistributionsContainerAPI service +type DistributionsContainerAPIService service + +type DistributionsContainerAPIDistributionsContainerContainerAddRoleRequest struct { + ctx context.Context + ApiService *DistributionsContainerAPIService + containerContainerDistributionHref string + nestedRole *NestedRole +} + +func (r DistributionsContainerAPIDistributionsContainerContainerAddRoleRequest) NestedRole(nestedRole NestedRole) DistributionsContainerAPIDistributionsContainerContainerAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r DistributionsContainerAPIDistributionsContainerContainerAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.DistributionsContainerContainerAddRoleExecute(r) +} + +/* +DistributionsContainerContainerAddRole Method for DistributionsContainerContainerAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerDistributionHref + @return DistributionsContainerAPIDistributionsContainerContainerAddRoleRequest +*/ +func (a *DistributionsContainerAPIService) DistributionsContainerContainerAddRole(ctx context.Context, containerContainerDistributionHref string) DistributionsContainerAPIDistributionsContainerContainerAddRoleRequest { + return DistributionsContainerAPIDistributionsContainerContainerAddRoleRequest{ + ApiService: a, + ctx: ctx, + containerContainerDistributionHref: containerContainerDistributionHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *DistributionsContainerAPIService) DistributionsContainerContainerAddRoleExecute(r DistributionsContainerAPIDistributionsContainerContainerAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsContainerAPIService.DistributionsContainerContainerAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_distribution_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_distribution_href"+"}", parameterValueToString(r.containerContainerDistributionHref, "containerContainerDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsContainerAPIDistributionsContainerContainerCreateRequest struct { + ctx context.Context + ApiService *DistributionsContainerAPIService + containerContainerDistribution *ContainerContainerDistribution +} + +func (r DistributionsContainerAPIDistributionsContainerContainerCreateRequest) ContainerContainerDistribution(containerContainerDistribution ContainerContainerDistribution) DistributionsContainerAPIDistributionsContainerContainerCreateRequest { + r.containerContainerDistribution = &containerContainerDistribution + return r +} + +func (r DistributionsContainerAPIDistributionsContainerContainerCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsContainerContainerCreateExecute(r) +} + +/* +DistributionsContainerContainerCreate Create a container distribution + +Trigger an asynchronous create task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsContainerAPIDistributionsContainerContainerCreateRequest +*/ +func (a *DistributionsContainerAPIService) DistributionsContainerContainerCreate(ctx context.Context) DistributionsContainerAPIDistributionsContainerContainerCreateRequest { + return DistributionsContainerAPIDistributionsContainerContainerCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsContainerAPIService) DistributionsContainerContainerCreateExecute(r DistributionsContainerAPIDistributionsContainerContainerCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsContainerAPIService.DistributionsContainerContainerCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/container/container/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.containerContainerDistribution == nil { + return localVarReturnValue, nil, reportError("containerContainerDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.containerContainerDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsContainerAPIDistributionsContainerContainerDeleteRequest struct { + ctx context.Context + ApiService *DistributionsContainerAPIService + containerContainerDistributionHref string +} + +func (r DistributionsContainerAPIDistributionsContainerContainerDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsContainerContainerDeleteExecute(r) +} + +/* +DistributionsContainerContainerDelete Delete a container distribution + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerDistributionHref + @return DistributionsContainerAPIDistributionsContainerContainerDeleteRequest +*/ +func (a *DistributionsContainerAPIService) DistributionsContainerContainerDelete(ctx context.Context, containerContainerDistributionHref string) DistributionsContainerAPIDistributionsContainerContainerDeleteRequest { + return DistributionsContainerAPIDistributionsContainerContainerDeleteRequest{ + ApiService: a, + ctx: ctx, + containerContainerDistributionHref: containerContainerDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsContainerAPIService) DistributionsContainerContainerDeleteExecute(r DistributionsContainerAPIDistributionsContainerContainerDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsContainerAPIService.DistributionsContainerContainerDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_distribution_href"+"}", parameterValueToString(r.containerContainerDistributionHref, "containerContainerDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsContainerAPIDistributionsContainerContainerListRequest struct { + ctx context.Context + ApiService *DistributionsContainerAPIService + basePath *string + basePathContains *string + basePathIcontains *string + basePathIn *[]string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + namespaceName *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + repository *string + repositoryIn *[]string + withContent *string + fields *[]string + excludeFields *[]string +} + +// Filter results where base_path matches value +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) BasePath(basePath string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.basePath = &basePath + return r +} + +// Filter results where base_path contains value +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) BasePathContains(basePathContains string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.basePathContains = &basePathContains + return r +} + +// Filter results where base_path contains value +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) BasePathIcontains(basePathIcontains string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.basePathIcontains = &basePathIcontains + return r +} + +// Filter results where base_path is in a comma-separated list of values +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) BasePathIn(basePathIn []string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.basePathIn = &basePathIn + return r +} + +// Number of results to return per page. +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) Limit(limit int32) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) Name(name string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) NameContains(nameContains string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) NameIcontains(nameIcontains string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) NameIn(nameIn []string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) NameStartswith(nameStartswith string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.nameStartswith = &nameStartswith + return r +} + +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) NamespaceName(namespaceName string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.namespaceName = &namespaceName + return r +} + +// The initial index from which to return the results. +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) Offset(offset int32) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `private` - Private * `-private` - Private (descending) * `description` - Description * `-description` - Description (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) Ordering(ordering []string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) PulpHrefIn(pulpHrefIn []string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) PulpIdIn(pulpIdIn []string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) PulpLabelSelect(pulpLabelSelect string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where repository matches value +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) Repository(repository string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.repository = &repository + return r +} + +// Filter results where repository is in a comma-separated list of values +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) RepositoryIn(repositoryIn []string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.repositoryIn = &repositoryIn + return r +} + +// Filter distributions based on the content served by them +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) WithContent(withContent string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) Fields(fields []string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) ExcludeFields(excludeFields []string) DistributionsContainerAPIDistributionsContainerContainerListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsContainerAPIDistributionsContainerContainerListRequest) Execute() (*PaginatedcontainerContainerDistributionResponseList, *http.Response, error) { + return r.ApiService.DistributionsContainerContainerListExecute(r) +} + +/* +DistributionsContainerContainerList List container distributions + +The Container Distribution will serve the latest version of a Repository if +``repository`` is specified. The Container Distribution will serve a specific +repository version if ``repository_version``. Note that **either** +``repository`` or ``repository_version`` can be set on a Container +Distribution, but not both. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsContainerAPIDistributionsContainerContainerListRequest +*/ +func (a *DistributionsContainerAPIService) DistributionsContainerContainerList(ctx context.Context) DistributionsContainerAPIDistributionsContainerContainerListRequest { + return DistributionsContainerAPIDistributionsContainerContainerListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedcontainerContainerDistributionResponseList +func (a *DistributionsContainerAPIService) DistributionsContainerContainerListExecute(r DistributionsContainerAPIDistributionsContainerContainerListRequest) (*PaginatedcontainerContainerDistributionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedcontainerContainerDistributionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsContainerAPIService.DistributionsContainerContainerList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/container/container/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.basePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path", r.basePath, "") + } + if r.basePathContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__contains", r.basePathContains, "") + } + if r.basePathIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__icontains", r.basePathIcontains, "") + } + if r.basePathIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__in", r.basePathIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.namespaceName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace__name", r.namespaceName, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository__in", r.repositoryIn, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsContainerAPIDistributionsContainerContainerListRolesRequest struct { + ctx context.Context + ApiService *DistributionsContainerAPIService + containerContainerDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsContainerAPIDistributionsContainerContainerListRolesRequest) Fields(fields []string) DistributionsContainerAPIDistributionsContainerContainerListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsContainerAPIDistributionsContainerContainerListRolesRequest) ExcludeFields(excludeFields []string) DistributionsContainerAPIDistributionsContainerContainerListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsContainerAPIDistributionsContainerContainerListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.DistributionsContainerContainerListRolesExecute(r) +} + +/* +DistributionsContainerContainerListRoles Method for DistributionsContainerContainerListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerDistributionHref + @return DistributionsContainerAPIDistributionsContainerContainerListRolesRequest +*/ +func (a *DistributionsContainerAPIService) DistributionsContainerContainerListRoles(ctx context.Context, containerContainerDistributionHref string) DistributionsContainerAPIDistributionsContainerContainerListRolesRequest { + return DistributionsContainerAPIDistributionsContainerContainerListRolesRequest{ + ApiService: a, + ctx: ctx, + containerContainerDistributionHref: containerContainerDistributionHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *DistributionsContainerAPIService) DistributionsContainerContainerListRolesExecute(r DistributionsContainerAPIDistributionsContainerContainerListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsContainerAPIService.DistributionsContainerContainerListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_distribution_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_distribution_href"+"}", parameterValueToString(r.containerContainerDistributionHref, "containerContainerDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsContainerAPIDistributionsContainerContainerMyPermissionsRequest struct { + ctx context.Context + ApiService *DistributionsContainerAPIService + containerContainerDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsContainerAPIDistributionsContainerContainerMyPermissionsRequest) Fields(fields []string) DistributionsContainerAPIDistributionsContainerContainerMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsContainerAPIDistributionsContainerContainerMyPermissionsRequest) ExcludeFields(excludeFields []string) DistributionsContainerAPIDistributionsContainerContainerMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsContainerAPIDistributionsContainerContainerMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.DistributionsContainerContainerMyPermissionsExecute(r) +} + +/* +DistributionsContainerContainerMyPermissions Method for DistributionsContainerContainerMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerDistributionHref + @return DistributionsContainerAPIDistributionsContainerContainerMyPermissionsRequest +*/ +func (a *DistributionsContainerAPIService) DistributionsContainerContainerMyPermissions(ctx context.Context, containerContainerDistributionHref string) DistributionsContainerAPIDistributionsContainerContainerMyPermissionsRequest { + return DistributionsContainerAPIDistributionsContainerContainerMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + containerContainerDistributionHref: containerContainerDistributionHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *DistributionsContainerAPIService) DistributionsContainerContainerMyPermissionsExecute(r DistributionsContainerAPIDistributionsContainerContainerMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsContainerAPIService.DistributionsContainerContainerMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_distribution_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_distribution_href"+"}", parameterValueToString(r.containerContainerDistributionHref, "containerContainerDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsContainerAPIDistributionsContainerContainerPartialUpdateRequest struct { + ctx context.Context + ApiService *DistributionsContainerAPIService + containerContainerDistributionHref string + patchedcontainerContainerDistribution *PatchedcontainerContainerDistribution +} + +func (r DistributionsContainerAPIDistributionsContainerContainerPartialUpdateRequest) PatchedcontainerContainerDistribution(patchedcontainerContainerDistribution PatchedcontainerContainerDistribution) DistributionsContainerAPIDistributionsContainerContainerPartialUpdateRequest { + r.patchedcontainerContainerDistribution = &patchedcontainerContainerDistribution + return r +} + +func (r DistributionsContainerAPIDistributionsContainerContainerPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsContainerContainerPartialUpdateExecute(r) +} + +/* +DistributionsContainerContainerPartialUpdate Update a container distribution + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerDistributionHref + @return DistributionsContainerAPIDistributionsContainerContainerPartialUpdateRequest +*/ +func (a *DistributionsContainerAPIService) DistributionsContainerContainerPartialUpdate(ctx context.Context, containerContainerDistributionHref string) DistributionsContainerAPIDistributionsContainerContainerPartialUpdateRequest { + return DistributionsContainerAPIDistributionsContainerContainerPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + containerContainerDistributionHref: containerContainerDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsContainerAPIService) DistributionsContainerContainerPartialUpdateExecute(r DistributionsContainerAPIDistributionsContainerContainerPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsContainerAPIService.DistributionsContainerContainerPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_distribution_href"+"}", parameterValueToString(r.containerContainerDistributionHref, "containerContainerDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedcontainerContainerDistribution == nil { + return localVarReturnValue, nil, reportError("patchedcontainerContainerDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedcontainerContainerDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsContainerAPIDistributionsContainerContainerReadRequest struct { + ctx context.Context + ApiService *DistributionsContainerAPIService + containerContainerDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsContainerAPIDistributionsContainerContainerReadRequest) Fields(fields []string) DistributionsContainerAPIDistributionsContainerContainerReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsContainerAPIDistributionsContainerContainerReadRequest) ExcludeFields(excludeFields []string) DistributionsContainerAPIDistributionsContainerContainerReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsContainerAPIDistributionsContainerContainerReadRequest) Execute() (*ContainerContainerDistributionResponse, *http.Response, error) { + return r.ApiService.DistributionsContainerContainerReadExecute(r) +} + +/* +DistributionsContainerContainerRead Inspect a container distribution + +The Container Distribution will serve the latest version of a Repository if +``repository`` is specified. The Container Distribution will serve a specific +repository version if ``repository_version``. Note that **either** +``repository`` or ``repository_version`` can be set on a Container +Distribution, but not both. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerDistributionHref + @return DistributionsContainerAPIDistributionsContainerContainerReadRequest +*/ +func (a *DistributionsContainerAPIService) DistributionsContainerContainerRead(ctx context.Context, containerContainerDistributionHref string) DistributionsContainerAPIDistributionsContainerContainerReadRequest { + return DistributionsContainerAPIDistributionsContainerContainerReadRequest{ + ApiService: a, + ctx: ctx, + containerContainerDistributionHref: containerContainerDistributionHref, + } +} + +// Execute executes the request +// @return ContainerContainerDistributionResponse +func (a *DistributionsContainerAPIService) DistributionsContainerContainerReadExecute(r DistributionsContainerAPIDistributionsContainerContainerReadRequest) (*ContainerContainerDistributionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContainerContainerDistributionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsContainerAPIService.DistributionsContainerContainerRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_distribution_href"+"}", parameterValueToString(r.containerContainerDistributionHref, "containerContainerDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsContainerAPIDistributionsContainerContainerRemoveRoleRequest struct { + ctx context.Context + ApiService *DistributionsContainerAPIService + containerContainerDistributionHref string + nestedRole *NestedRole +} + +func (r DistributionsContainerAPIDistributionsContainerContainerRemoveRoleRequest) NestedRole(nestedRole NestedRole) DistributionsContainerAPIDistributionsContainerContainerRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r DistributionsContainerAPIDistributionsContainerContainerRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.DistributionsContainerContainerRemoveRoleExecute(r) +} + +/* +DistributionsContainerContainerRemoveRole Method for DistributionsContainerContainerRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerDistributionHref + @return DistributionsContainerAPIDistributionsContainerContainerRemoveRoleRequest +*/ +func (a *DistributionsContainerAPIService) DistributionsContainerContainerRemoveRole(ctx context.Context, containerContainerDistributionHref string) DistributionsContainerAPIDistributionsContainerContainerRemoveRoleRequest { + return DistributionsContainerAPIDistributionsContainerContainerRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + containerContainerDistributionHref: containerContainerDistributionHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *DistributionsContainerAPIService) DistributionsContainerContainerRemoveRoleExecute(r DistributionsContainerAPIDistributionsContainerContainerRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsContainerAPIService.DistributionsContainerContainerRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_distribution_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_distribution_href"+"}", parameterValueToString(r.containerContainerDistributionHref, "containerContainerDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsContainerAPIDistributionsContainerContainerUpdateRequest struct { + ctx context.Context + ApiService *DistributionsContainerAPIService + containerContainerDistributionHref string + containerContainerDistribution *ContainerContainerDistribution +} + +func (r DistributionsContainerAPIDistributionsContainerContainerUpdateRequest) ContainerContainerDistribution(containerContainerDistribution ContainerContainerDistribution) DistributionsContainerAPIDistributionsContainerContainerUpdateRequest { + r.containerContainerDistribution = &containerContainerDistribution + return r +} + +func (r DistributionsContainerAPIDistributionsContainerContainerUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsContainerContainerUpdateExecute(r) +} + +/* +DistributionsContainerContainerUpdate Update a container distribution + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerDistributionHref + @return DistributionsContainerAPIDistributionsContainerContainerUpdateRequest +*/ +func (a *DistributionsContainerAPIService) DistributionsContainerContainerUpdate(ctx context.Context, containerContainerDistributionHref string) DistributionsContainerAPIDistributionsContainerContainerUpdateRequest { + return DistributionsContainerAPIDistributionsContainerContainerUpdateRequest{ + ApiService: a, + ctx: ctx, + containerContainerDistributionHref: containerContainerDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsContainerAPIService) DistributionsContainerContainerUpdateExecute(r DistributionsContainerAPIDistributionsContainerContainerUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsContainerAPIService.DistributionsContainerContainerUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_distribution_href"+"}", parameterValueToString(r.containerContainerDistributionHref, "containerContainerDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.containerContainerDistribution == nil { + return localVarReturnValue, nil, reportError("containerContainerDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.containerContainerDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_file.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_file.go new file mode 100644 index 0000000000..c5fb620052 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_file.go @@ -0,0 +1,1437 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// DistributionsFileAPIService DistributionsFileAPI service +type DistributionsFileAPIService service + +type DistributionsFileAPIDistributionsFileFileAddRoleRequest struct { + ctx context.Context + ApiService *DistributionsFileAPIService + fileFileDistributionHref string + nestedRole *NestedRole +} + +func (r DistributionsFileAPIDistributionsFileFileAddRoleRequest) NestedRole(nestedRole NestedRole) DistributionsFileAPIDistributionsFileFileAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r DistributionsFileAPIDistributionsFileFileAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.DistributionsFileFileAddRoleExecute(r) +} + +/* +DistributionsFileFileAddRole Method for DistributionsFileFileAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileDistributionHref + @return DistributionsFileAPIDistributionsFileFileAddRoleRequest +*/ +func (a *DistributionsFileAPIService) DistributionsFileFileAddRole(ctx context.Context, fileFileDistributionHref string) DistributionsFileAPIDistributionsFileFileAddRoleRequest { + return DistributionsFileAPIDistributionsFileFileAddRoleRequest{ + ApiService: a, + ctx: ctx, + fileFileDistributionHref: fileFileDistributionHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *DistributionsFileAPIService) DistributionsFileFileAddRoleExecute(r DistributionsFileAPIDistributionsFileFileAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsFileAPIService.DistributionsFileFileAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_distribution_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_distribution_href"+"}", parameterValueToString(r.fileFileDistributionHref, "fileFileDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsFileAPIDistributionsFileFileCreateRequest struct { + ctx context.Context + ApiService *DistributionsFileAPIService + fileFileDistribution *FileFileDistribution +} + +func (r DistributionsFileAPIDistributionsFileFileCreateRequest) FileFileDistribution(fileFileDistribution FileFileDistribution) DistributionsFileAPIDistributionsFileFileCreateRequest { + r.fileFileDistribution = &fileFileDistribution + return r +} + +func (r DistributionsFileAPIDistributionsFileFileCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsFileFileCreateExecute(r) +} + +/* +DistributionsFileFileCreate Create a file distribution + +Trigger an asynchronous create task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsFileAPIDistributionsFileFileCreateRequest +*/ +func (a *DistributionsFileAPIService) DistributionsFileFileCreate(ctx context.Context) DistributionsFileAPIDistributionsFileFileCreateRequest { + return DistributionsFileAPIDistributionsFileFileCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsFileAPIService) DistributionsFileFileCreateExecute(r DistributionsFileAPIDistributionsFileFileCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsFileAPIService.DistributionsFileFileCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/file/file/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.fileFileDistribution == nil { + return localVarReturnValue, nil, reportError("fileFileDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.fileFileDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsFileAPIDistributionsFileFileDeleteRequest struct { + ctx context.Context + ApiService *DistributionsFileAPIService + fileFileDistributionHref string +} + +func (r DistributionsFileAPIDistributionsFileFileDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsFileFileDeleteExecute(r) +} + +/* +DistributionsFileFileDelete Delete a file distribution + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileDistributionHref + @return DistributionsFileAPIDistributionsFileFileDeleteRequest +*/ +func (a *DistributionsFileAPIService) DistributionsFileFileDelete(ctx context.Context, fileFileDistributionHref string) DistributionsFileAPIDistributionsFileFileDeleteRequest { + return DistributionsFileAPIDistributionsFileFileDeleteRequest{ + ApiService: a, + ctx: ctx, + fileFileDistributionHref: fileFileDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsFileAPIService) DistributionsFileFileDeleteExecute(r DistributionsFileAPIDistributionsFileFileDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsFileAPIService.DistributionsFileFileDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_distribution_href"+"}", parameterValueToString(r.fileFileDistributionHref, "fileFileDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsFileAPIDistributionsFileFileListRequest struct { + ctx context.Context + ApiService *DistributionsFileAPIService + basePath *string + basePathContains *string + basePathIcontains *string + basePathIn *[]string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + repository *string + repositoryIn *[]string + withContent *string + fields *[]string + excludeFields *[]string +} + +// Filter results where base_path matches value +func (r DistributionsFileAPIDistributionsFileFileListRequest) BasePath(basePath string) DistributionsFileAPIDistributionsFileFileListRequest { + r.basePath = &basePath + return r +} + +// Filter results where base_path contains value +func (r DistributionsFileAPIDistributionsFileFileListRequest) BasePathContains(basePathContains string) DistributionsFileAPIDistributionsFileFileListRequest { + r.basePathContains = &basePathContains + return r +} + +// Filter results where base_path contains value +func (r DistributionsFileAPIDistributionsFileFileListRequest) BasePathIcontains(basePathIcontains string) DistributionsFileAPIDistributionsFileFileListRequest { + r.basePathIcontains = &basePathIcontains + return r +} + +// Filter results where base_path is in a comma-separated list of values +func (r DistributionsFileAPIDistributionsFileFileListRequest) BasePathIn(basePathIn []string) DistributionsFileAPIDistributionsFileFileListRequest { + r.basePathIn = &basePathIn + return r +} + +// Number of results to return per page. +func (r DistributionsFileAPIDistributionsFileFileListRequest) Limit(limit int32) DistributionsFileAPIDistributionsFileFileListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r DistributionsFileAPIDistributionsFileFileListRequest) Name(name string) DistributionsFileAPIDistributionsFileFileListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r DistributionsFileAPIDistributionsFileFileListRequest) NameContains(nameContains string) DistributionsFileAPIDistributionsFileFileListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r DistributionsFileAPIDistributionsFileFileListRequest) NameIcontains(nameIcontains string) DistributionsFileAPIDistributionsFileFileListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r DistributionsFileAPIDistributionsFileFileListRequest) NameIn(nameIn []string) DistributionsFileAPIDistributionsFileFileListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r DistributionsFileAPIDistributionsFileFileListRequest) NameStartswith(nameStartswith string) DistributionsFileAPIDistributionsFileFileListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r DistributionsFileAPIDistributionsFileFileListRequest) Offset(offset int32) DistributionsFileAPIDistributionsFileFileListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r DistributionsFileAPIDistributionsFileFileListRequest) Ordering(ordering []string) DistributionsFileAPIDistributionsFileFileListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsFileAPIDistributionsFileFileListRequest) PulpHrefIn(pulpHrefIn []string) DistributionsFileAPIDistributionsFileFileListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsFileAPIDistributionsFileFileListRequest) PulpIdIn(pulpIdIn []string) DistributionsFileAPIDistributionsFileFileListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r DistributionsFileAPIDistributionsFileFileListRequest) PulpLabelSelect(pulpLabelSelect string) DistributionsFileAPIDistributionsFileFileListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where repository matches value +func (r DistributionsFileAPIDistributionsFileFileListRequest) Repository(repository string) DistributionsFileAPIDistributionsFileFileListRequest { + r.repository = &repository + return r +} + +// Filter results where repository is in a comma-separated list of values +func (r DistributionsFileAPIDistributionsFileFileListRequest) RepositoryIn(repositoryIn []string) DistributionsFileAPIDistributionsFileFileListRequest { + r.repositoryIn = &repositoryIn + return r +} + +// Filter distributions based on the content served by them +func (r DistributionsFileAPIDistributionsFileFileListRequest) WithContent(withContent string) DistributionsFileAPIDistributionsFileFileListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r DistributionsFileAPIDistributionsFileFileListRequest) Fields(fields []string) DistributionsFileAPIDistributionsFileFileListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsFileAPIDistributionsFileFileListRequest) ExcludeFields(excludeFields []string) DistributionsFileAPIDistributionsFileFileListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsFileAPIDistributionsFileFileListRequest) Execute() (*PaginatedfileFileDistributionResponseList, *http.Response, error) { + return r.ApiService.DistributionsFileFileListExecute(r) +} + +/* +DistributionsFileFileList List file distributions + + +FileDistributions host File +Publications which makes the metadata and the referenced File Content available to HTTP +clients. Additionally, a FileDistribution with an associated FilePublication can be the target +url of a File Remote , allowing +another instance of Pulp to sync the content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsFileAPIDistributionsFileFileListRequest +*/ +func (a *DistributionsFileAPIService) DistributionsFileFileList(ctx context.Context) DistributionsFileAPIDistributionsFileFileListRequest { + return DistributionsFileAPIDistributionsFileFileListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedfileFileDistributionResponseList +func (a *DistributionsFileAPIService) DistributionsFileFileListExecute(r DistributionsFileAPIDistributionsFileFileListRequest) (*PaginatedfileFileDistributionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedfileFileDistributionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsFileAPIService.DistributionsFileFileList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/file/file/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.basePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path", r.basePath, "") + } + if r.basePathContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__contains", r.basePathContains, "") + } + if r.basePathIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__icontains", r.basePathIcontains, "") + } + if r.basePathIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__in", r.basePathIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository__in", r.repositoryIn, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsFileAPIDistributionsFileFileListRolesRequest struct { + ctx context.Context + ApiService *DistributionsFileAPIService + fileFileDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsFileAPIDistributionsFileFileListRolesRequest) Fields(fields []string) DistributionsFileAPIDistributionsFileFileListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsFileAPIDistributionsFileFileListRolesRequest) ExcludeFields(excludeFields []string) DistributionsFileAPIDistributionsFileFileListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsFileAPIDistributionsFileFileListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.DistributionsFileFileListRolesExecute(r) +} + +/* +DistributionsFileFileListRoles Method for DistributionsFileFileListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileDistributionHref + @return DistributionsFileAPIDistributionsFileFileListRolesRequest +*/ +func (a *DistributionsFileAPIService) DistributionsFileFileListRoles(ctx context.Context, fileFileDistributionHref string) DistributionsFileAPIDistributionsFileFileListRolesRequest { + return DistributionsFileAPIDistributionsFileFileListRolesRequest{ + ApiService: a, + ctx: ctx, + fileFileDistributionHref: fileFileDistributionHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *DistributionsFileAPIService) DistributionsFileFileListRolesExecute(r DistributionsFileAPIDistributionsFileFileListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsFileAPIService.DistributionsFileFileListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_distribution_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_distribution_href"+"}", parameterValueToString(r.fileFileDistributionHref, "fileFileDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsFileAPIDistributionsFileFileMyPermissionsRequest struct { + ctx context.Context + ApiService *DistributionsFileAPIService + fileFileDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsFileAPIDistributionsFileFileMyPermissionsRequest) Fields(fields []string) DistributionsFileAPIDistributionsFileFileMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsFileAPIDistributionsFileFileMyPermissionsRequest) ExcludeFields(excludeFields []string) DistributionsFileAPIDistributionsFileFileMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsFileAPIDistributionsFileFileMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.DistributionsFileFileMyPermissionsExecute(r) +} + +/* +DistributionsFileFileMyPermissions Method for DistributionsFileFileMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileDistributionHref + @return DistributionsFileAPIDistributionsFileFileMyPermissionsRequest +*/ +func (a *DistributionsFileAPIService) DistributionsFileFileMyPermissions(ctx context.Context, fileFileDistributionHref string) DistributionsFileAPIDistributionsFileFileMyPermissionsRequest { + return DistributionsFileAPIDistributionsFileFileMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + fileFileDistributionHref: fileFileDistributionHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *DistributionsFileAPIService) DistributionsFileFileMyPermissionsExecute(r DistributionsFileAPIDistributionsFileFileMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsFileAPIService.DistributionsFileFileMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_distribution_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_distribution_href"+"}", parameterValueToString(r.fileFileDistributionHref, "fileFileDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsFileAPIDistributionsFileFilePartialUpdateRequest struct { + ctx context.Context + ApiService *DistributionsFileAPIService + fileFileDistributionHref string + patchedfileFileDistribution *PatchedfileFileDistribution +} + +func (r DistributionsFileAPIDistributionsFileFilePartialUpdateRequest) PatchedfileFileDistribution(patchedfileFileDistribution PatchedfileFileDistribution) DistributionsFileAPIDistributionsFileFilePartialUpdateRequest { + r.patchedfileFileDistribution = &patchedfileFileDistribution + return r +} + +func (r DistributionsFileAPIDistributionsFileFilePartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsFileFilePartialUpdateExecute(r) +} + +/* +DistributionsFileFilePartialUpdate Update a file distribution + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileDistributionHref + @return DistributionsFileAPIDistributionsFileFilePartialUpdateRequest +*/ +func (a *DistributionsFileAPIService) DistributionsFileFilePartialUpdate(ctx context.Context, fileFileDistributionHref string) DistributionsFileAPIDistributionsFileFilePartialUpdateRequest { + return DistributionsFileAPIDistributionsFileFilePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + fileFileDistributionHref: fileFileDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsFileAPIService) DistributionsFileFilePartialUpdateExecute(r DistributionsFileAPIDistributionsFileFilePartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsFileAPIService.DistributionsFileFilePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_distribution_href"+"}", parameterValueToString(r.fileFileDistributionHref, "fileFileDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedfileFileDistribution == nil { + return localVarReturnValue, nil, reportError("patchedfileFileDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedfileFileDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsFileAPIDistributionsFileFileReadRequest struct { + ctx context.Context + ApiService *DistributionsFileAPIService + fileFileDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsFileAPIDistributionsFileFileReadRequest) Fields(fields []string) DistributionsFileAPIDistributionsFileFileReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsFileAPIDistributionsFileFileReadRequest) ExcludeFields(excludeFields []string) DistributionsFileAPIDistributionsFileFileReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsFileAPIDistributionsFileFileReadRequest) Execute() (*FileFileDistributionResponse, *http.Response, error) { + return r.ApiService.DistributionsFileFileReadExecute(r) +} + +/* +DistributionsFileFileRead Inspect a file distribution + + +FileDistributions host File +Publications which makes the metadata and the referenced File Content available to HTTP +clients. Additionally, a FileDistribution with an associated FilePublication can be the target +url of a File Remote , allowing +another instance of Pulp to sync the content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileDistributionHref + @return DistributionsFileAPIDistributionsFileFileReadRequest +*/ +func (a *DistributionsFileAPIService) DistributionsFileFileRead(ctx context.Context, fileFileDistributionHref string) DistributionsFileAPIDistributionsFileFileReadRequest { + return DistributionsFileAPIDistributionsFileFileReadRequest{ + ApiService: a, + ctx: ctx, + fileFileDistributionHref: fileFileDistributionHref, + } +} + +// Execute executes the request +// @return FileFileDistributionResponse +func (a *DistributionsFileAPIService) DistributionsFileFileReadExecute(r DistributionsFileAPIDistributionsFileFileReadRequest) (*FileFileDistributionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FileFileDistributionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsFileAPIService.DistributionsFileFileRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_distribution_href"+"}", parameterValueToString(r.fileFileDistributionHref, "fileFileDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsFileAPIDistributionsFileFileRemoveRoleRequest struct { + ctx context.Context + ApiService *DistributionsFileAPIService + fileFileDistributionHref string + nestedRole *NestedRole +} + +func (r DistributionsFileAPIDistributionsFileFileRemoveRoleRequest) NestedRole(nestedRole NestedRole) DistributionsFileAPIDistributionsFileFileRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r DistributionsFileAPIDistributionsFileFileRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.DistributionsFileFileRemoveRoleExecute(r) +} + +/* +DistributionsFileFileRemoveRole Method for DistributionsFileFileRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileDistributionHref + @return DistributionsFileAPIDistributionsFileFileRemoveRoleRequest +*/ +func (a *DistributionsFileAPIService) DistributionsFileFileRemoveRole(ctx context.Context, fileFileDistributionHref string) DistributionsFileAPIDistributionsFileFileRemoveRoleRequest { + return DistributionsFileAPIDistributionsFileFileRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + fileFileDistributionHref: fileFileDistributionHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *DistributionsFileAPIService) DistributionsFileFileRemoveRoleExecute(r DistributionsFileAPIDistributionsFileFileRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsFileAPIService.DistributionsFileFileRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_distribution_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_distribution_href"+"}", parameterValueToString(r.fileFileDistributionHref, "fileFileDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsFileAPIDistributionsFileFileUpdateRequest struct { + ctx context.Context + ApiService *DistributionsFileAPIService + fileFileDistributionHref string + fileFileDistribution *FileFileDistribution +} + +func (r DistributionsFileAPIDistributionsFileFileUpdateRequest) FileFileDistribution(fileFileDistribution FileFileDistribution) DistributionsFileAPIDistributionsFileFileUpdateRequest { + r.fileFileDistribution = &fileFileDistribution + return r +} + +func (r DistributionsFileAPIDistributionsFileFileUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsFileFileUpdateExecute(r) +} + +/* +DistributionsFileFileUpdate Update a file distribution + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileDistributionHref + @return DistributionsFileAPIDistributionsFileFileUpdateRequest +*/ +func (a *DistributionsFileAPIService) DistributionsFileFileUpdate(ctx context.Context, fileFileDistributionHref string) DistributionsFileAPIDistributionsFileFileUpdateRequest { + return DistributionsFileAPIDistributionsFileFileUpdateRequest{ + ApiService: a, + ctx: ctx, + fileFileDistributionHref: fileFileDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsFileAPIService) DistributionsFileFileUpdateExecute(r DistributionsFileAPIDistributionsFileFileUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsFileAPIService.DistributionsFileFileUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_distribution_href"+"}", parameterValueToString(r.fileFileDistributionHref, "fileFileDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.fileFileDistribution == nil { + return localVarReturnValue, nil, reportError("fileFileDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.fileFileDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_gem.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_gem.go new file mode 100644 index 0000000000..aadf449de9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_gem.go @@ -0,0 +1,921 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// DistributionsGemAPIService DistributionsGemAPI service +type DistributionsGemAPIService service + +type DistributionsGemAPIDistributionsGemGemCreateRequest struct { + ctx context.Context + ApiService *DistributionsGemAPIService + gemGemDistribution *GemGemDistribution +} + +func (r DistributionsGemAPIDistributionsGemGemCreateRequest) GemGemDistribution(gemGemDistribution GemGemDistribution) DistributionsGemAPIDistributionsGemGemCreateRequest { + r.gemGemDistribution = &gemGemDistribution + return r +} + +func (r DistributionsGemAPIDistributionsGemGemCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsGemGemCreateExecute(r) +} + +/* +DistributionsGemGemCreate Create a gem distribution + +Trigger an asynchronous create task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsGemAPIDistributionsGemGemCreateRequest +*/ +func (a *DistributionsGemAPIService) DistributionsGemGemCreate(ctx context.Context) DistributionsGemAPIDistributionsGemGemCreateRequest { + return DistributionsGemAPIDistributionsGemGemCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsGemAPIService) DistributionsGemGemCreateExecute(r DistributionsGemAPIDistributionsGemGemCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsGemAPIService.DistributionsGemGemCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/gem/gem/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.gemGemDistribution == nil { + return localVarReturnValue, nil, reportError("gemGemDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.gemGemDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsGemAPIDistributionsGemGemDeleteRequest struct { + ctx context.Context + ApiService *DistributionsGemAPIService + gemGemDistributionHref string +} + +func (r DistributionsGemAPIDistributionsGemGemDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsGemGemDeleteExecute(r) +} + +/* +DistributionsGemGemDelete Delete a gem distribution + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemDistributionHref + @return DistributionsGemAPIDistributionsGemGemDeleteRequest +*/ +func (a *DistributionsGemAPIService) DistributionsGemGemDelete(ctx context.Context, gemGemDistributionHref string) DistributionsGemAPIDistributionsGemGemDeleteRequest { + return DistributionsGemAPIDistributionsGemGemDeleteRequest{ + ApiService: a, + ctx: ctx, + gemGemDistributionHref: gemGemDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsGemAPIService) DistributionsGemGemDeleteExecute(r DistributionsGemAPIDistributionsGemGemDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsGemAPIService.DistributionsGemGemDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_distribution_href"+"}", parameterValueToString(r.gemGemDistributionHref, "gemGemDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsGemAPIDistributionsGemGemListRequest struct { + ctx context.Context + ApiService *DistributionsGemAPIService + basePath *string + basePathContains *string + basePathIcontains *string + basePathIn *[]string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + repository *string + repositoryIn *[]string + withContent *string + fields *[]string + excludeFields *[]string +} + +// Filter results where base_path matches value +func (r DistributionsGemAPIDistributionsGemGemListRequest) BasePath(basePath string) DistributionsGemAPIDistributionsGemGemListRequest { + r.basePath = &basePath + return r +} + +// Filter results where base_path contains value +func (r DistributionsGemAPIDistributionsGemGemListRequest) BasePathContains(basePathContains string) DistributionsGemAPIDistributionsGemGemListRequest { + r.basePathContains = &basePathContains + return r +} + +// Filter results where base_path contains value +func (r DistributionsGemAPIDistributionsGemGemListRequest) BasePathIcontains(basePathIcontains string) DistributionsGemAPIDistributionsGemGemListRequest { + r.basePathIcontains = &basePathIcontains + return r +} + +// Filter results where base_path is in a comma-separated list of values +func (r DistributionsGemAPIDistributionsGemGemListRequest) BasePathIn(basePathIn []string) DistributionsGemAPIDistributionsGemGemListRequest { + r.basePathIn = &basePathIn + return r +} + +// Number of results to return per page. +func (r DistributionsGemAPIDistributionsGemGemListRequest) Limit(limit int32) DistributionsGemAPIDistributionsGemGemListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r DistributionsGemAPIDistributionsGemGemListRequest) Name(name string) DistributionsGemAPIDistributionsGemGemListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r DistributionsGemAPIDistributionsGemGemListRequest) NameContains(nameContains string) DistributionsGemAPIDistributionsGemGemListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r DistributionsGemAPIDistributionsGemGemListRequest) NameIcontains(nameIcontains string) DistributionsGemAPIDistributionsGemGemListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r DistributionsGemAPIDistributionsGemGemListRequest) NameIn(nameIn []string) DistributionsGemAPIDistributionsGemGemListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r DistributionsGemAPIDistributionsGemGemListRequest) NameStartswith(nameStartswith string) DistributionsGemAPIDistributionsGemGemListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r DistributionsGemAPIDistributionsGemGemListRequest) Offset(offset int32) DistributionsGemAPIDistributionsGemGemListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r DistributionsGemAPIDistributionsGemGemListRequest) Ordering(ordering []string) DistributionsGemAPIDistributionsGemGemListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsGemAPIDistributionsGemGemListRequest) PulpHrefIn(pulpHrefIn []string) DistributionsGemAPIDistributionsGemGemListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsGemAPIDistributionsGemGemListRequest) PulpIdIn(pulpIdIn []string) DistributionsGemAPIDistributionsGemGemListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r DistributionsGemAPIDistributionsGemGemListRequest) PulpLabelSelect(pulpLabelSelect string) DistributionsGemAPIDistributionsGemGemListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where repository matches value +func (r DistributionsGemAPIDistributionsGemGemListRequest) Repository(repository string) DistributionsGemAPIDistributionsGemGemListRequest { + r.repository = &repository + return r +} + +// Filter results where repository is in a comma-separated list of values +func (r DistributionsGemAPIDistributionsGemGemListRequest) RepositoryIn(repositoryIn []string) DistributionsGemAPIDistributionsGemGemListRequest { + r.repositoryIn = &repositoryIn + return r +} + +// Filter distributions based on the content served by them +func (r DistributionsGemAPIDistributionsGemGemListRequest) WithContent(withContent string) DistributionsGemAPIDistributionsGemGemListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r DistributionsGemAPIDistributionsGemGemListRequest) Fields(fields []string) DistributionsGemAPIDistributionsGemGemListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsGemAPIDistributionsGemGemListRequest) ExcludeFields(excludeFields []string) DistributionsGemAPIDistributionsGemGemListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsGemAPIDistributionsGemGemListRequest) Execute() (*PaginatedgemGemDistributionResponseList, *http.Response, error) { + return r.ApiService.DistributionsGemGemListExecute(r) +} + +/* +DistributionsGemGemList List gem distributions + +ViewSet for GemDistributions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsGemAPIDistributionsGemGemListRequest +*/ +func (a *DistributionsGemAPIService) DistributionsGemGemList(ctx context.Context) DistributionsGemAPIDistributionsGemGemListRequest { + return DistributionsGemAPIDistributionsGemGemListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedgemGemDistributionResponseList +func (a *DistributionsGemAPIService) DistributionsGemGemListExecute(r DistributionsGemAPIDistributionsGemGemListRequest) (*PaginatedgemGemDistributionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedgemGemDistributionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsGemAPIService.DistributionsGemGemList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/gem/gem/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.basePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path", r.basePath, "") + } + if r.basePathContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__contains", r.basePathContains, "") + } + if r.basePathIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__icontains", r.basePathIcontains, "") + } + if r.basePathIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__in", r.basePathIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository__in", r.repositoryIn, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsGemAPIDistributionsGemGemPartialUpdateRequest struct { + ctx context.Context + ApiService *DistributionsGemAPIService + gemGemDistributionHref string + patchedgemGemDistribution *PatchedgemGemDistribution +} + +func (r DistributionsGemAPIDistributionsGemGemPartialUpdateRequest) PatchedgemGemDistribution(patchedgemGemDistribution PatchedgemGemDistribution) DistributionsGemAPIDistributionsGemGemPartialUpdateRequest { + r.patchedgemGemDistribution = &patchedgemGemDistribution + return r +} + +func (r DistributionsGemAPIDistributionsGemGemPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsGemGemPartialUpdateExecute(r) +} + +/* +DistributionsGemGemPartialUpdate Update a gem distribution + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemDistributionHref + @return DistributionsGemAPIDistributionsGemGemPartialUpdateRequest +*/ +func (a *DistributionsGemAPIService) DistributionsGemGemPartialUpdate(ctx context.Context, gemGemDistributionHref string) DistributionsGemAPIDistributionsGemGemPartialUpdateRequest { + return DistributionsGemAPIDistributionsGemGemPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + gemGemDistributionHref: gemGemDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsGemAPIService) DistributionsGemGemPartialUpdateExecute(r DistributionsGemAPIDistributionsGemGemPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsGemAPIService.DistributionsGemGemPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_distribution_href"+"}", parameterValueToString(r.gemGemDistributionHref, "gemGemDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedgemGemDistribution == nil { + return localVarReturnValue, nil, reportError("patchedgemGemDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedgemGemDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsGemAPIDistributionsGemGemReadRequest struct { + ctx context.Context + ApiService *DistributionsGemAPIService + gemGemDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsGemAPIDistributionsGemGemReadRequest) Fields(fields []string) DistributionsGemAPIDistributionsGemGemReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsGemAPIDistributionsGemGemReadRequest) ExcludeFields(excludeFields []string) DistributionsGemAPIDistributionsGemGemReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsGemAPIDistributionsGemGemReadRequest) Execute() (*GemGemDistributionResponse, *http.Response, error) { + return r.ApiService.DistributionsGemGemReadExecute(r) +} + +/* +DistributionsGemGemRead Inspect a gem distribution + +ViewSet for GemDistributions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemDistributionHref + @return DistributionsGemAPIDistributionsGemGemReadRequest +*/ +func (a *DistributionsGemAPIService) DistributionsGemGemRead(ctx context.Context, gemGemDistributionHref string) DistributionsGemAPIDistributionsGemGemReadRequest { + return DistributionsGemAPIDistributionsGemGemReadRequest{ + ApiService: a, + ctx: ctx, + gemGemDistributionHref: gemGemDistributionHref, + } +} + +// Execute executes the request +// @return GemGemDistributionResponse +func (a *DistributionsGemAPIService) DistributionsGemGemReadExecute(r DistributionsGemAPIDistributionsGemGemReadRequest) (*GemGemDistributionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GemGemDistributionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsGemAPIService.DistributionsGemGemRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_distribution_href"+"}", parameterValueToString(r.gemGemDistributionHref, "gemGemDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsGemAPIDistributionsGemGemUpdateRequest struct { + ctx context.Context + ApiService *DistributionsGemAPIService + gemGemDistributionHref string + gemGemDistribution *GemGemDistribution +} + +func (r DistributionsGemAPIDistributionsGemGemUpdateRequest) GemGemDistribution(gemGemDistribution GemGemDistribution) DistributionsGemAPIDistributionsGemGemUpdateRequest { + r.gemGemDistribution = &gemGemDistribution + return r +} + +func (r DistributionsGemAPIDistributionsGemGemUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsGemGemUpdateExecute(r) +} + +/* +DistributionsGemGemUpdate Update a gem distribution + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemDistributionHref + @return DistributionsGemAPIDistributionsGemGemUpdateRequest +*/ +func (a *DistributionsGemAPIService) DistributionsGemGemUpdate(ctx context.Context, gemGemDistributionHref string) DistributionsGemAPIDistributionsGemGemUpdateRequest { + return DistributionsGemAPIDistributionsGemGemUpdateRequest{ + ApiService: a, + ctx: ctx, + gemGemDistributionHref: gemGemDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsGemAPIService) DistributionsGemGemUpdateExecute(r DistributionsGemAPIDistributionsGemGemUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsGemAPIService.DistributionsGemGemUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_distribution_href"+"}", parameterValueToString(r.gemGemDistributionHref, "gemGemDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.gemGemDistribution == nil { + return localVarReturnValue, nil, reportError("gemGemDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.gemGemDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_maven.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_maven.go new file mode 100644 index 0000000000..065895e5ba --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_maven.go @@ -0,0 +1,921 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// DistributionsMavenAPIService DistributionsMavenAPI service +type DistributionsMavenAPIService service + +type DistributionsMavenAPIDistributionsMavenMavenCreateRequest struct { + ctx context.Context + ApiService *DistributionsMavenAPIService + mavenMavenDistribution *MavenMavenDistribution +} + +func (r DistributionsMavenAPIDistributionsMavenMavenCreateRequest) MavenMavenDistribution(mavenMavenDistribution MavenMavenDistribution) DistributionsMavenAPIDistributionsMavenMavenCreateRequest { + r.mavenMavenDistribution = &mavenMavenDistribution + return r +} + +func (r DistributionsMavenAPIDistributionsMavenMavenCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsMavenMavenCreateExecute(r) +} + +/* +DistributionsMavenMavenCreate Create a maven distribution + +Trigger an asynchronous create task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsMavenAPIDistributionsMavenMavenCreateRequest +*/ +func (a *DistributionsMavenAPIService) DistributionsMavenMavenCreate(ctx context.Context) DistributionsMavenAPIDistributionsMavenMavenCreateRequest { + return DistributionsMavenAPIDistributionsMavenMavenCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsMavenAPIService) DistributionsMavenMavenCreateExecute(r DistributionsMavenAPIDistributionsMavenMavenCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsMavenAPIService.DistributionsMavenMavenCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/maven/maven/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.mavenMavenDistribution == nil { + return localVarReturnValue, nil, reportError("mavenMavenDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.mavenMavenDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsMavenAPIDistributionsMavenMavenDeleteRequest struct { + ctx context.Context + ApiService *DistributionsMavenAPIService + mavenMavenDistributionHref string +} + +func (r DistributionsMavenAPIDistributionsMavenMavenDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsMavenMavenDeleteExecute(r) +} + +/* +DistributionsMavenMavenDelete Delete a maven distribution + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenDistributionHref + @return DistributionsMavenAPIDistributionsMavenMavenDeleteRequest +*/ +func (a *DistributionsMavenAPIService) DistributionsMavenMavenDelete(ctx context.Context, mavenMavenDistributionHref string) DistributionsMavenAPIDistributionsMavenMavenDeleteRequest { + return DistributionsMavenAPIDistributionsMavenMavenDeleteRequest{ + ApiService: a, + ctx: ctx, + mavenMavenDistributionHref: mavenMavenDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsMavenAPIService) DistributionsMavenMavenDeleteExecute(r DistributionsMavenAPIDistributionsMavenMavenDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsMavenAPIService.DistributionsMavenMavenDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_distribution_href"+"}", parameterValueToString(r.mavenMavenDistributionHref, "mavenMavenDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsMavenAPIDistributionsMavenMavenListRequest struct { + ctx context.Context + ApiService *DistributionsMavenAPIService + basePath *string + basePathContains *string + basePathIcontains *string + basePathIn *[]string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + repository *string + repositoryIn *[]string + withContent *string + fields *[]string + excludeFields *[]string +} + +// Filter results where base_path matches value +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) BasePath(basePath string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.basePath = &basePath + return r +} + +// Filter results where base_path contains value +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) BasePathContains(basePathContains string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.basePathContains = &basePathContains + return r +} + +// Filter results where base_path contains value +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) BasePathIcontains(basePathIcontains string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.basePathIcontains = &basePathIcontains + return r +} + +// Filter results where base_path is in a comma-separated list of values +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) BasePathIn(basePathIn []string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.basePathIn = &basePathIn + return r +} + +// Number of results to return per page. +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) Limit(limit int32) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) Name(name string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) NameContains(nameContains string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) NameIcontains(nameIcontains string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) NameIn(nameIn []string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) NameStartswith(nameStartswith string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) Offset(offset int32) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) Ordering(ordering []string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) PulpHrefIn(pulpHrefIn []string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) PulpIdIn(pulpIdIn []string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) PulpLabelSelect(pulpLabelSelect string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where repository matches value +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) Repository(repository string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.repository = &repository + return r +} + +// Filter results where repository is in a comma-separated list of values +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) RepositoryIn(repositoryIn []string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.repositoryIn = &repositoryIn + return r +} + +// Filter distributions based on the content served by them +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) WithContent(withContent string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) Fields(fields []string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) ExcludeFields(excludeFields []string) DistributionsMavenAPIDistributionsMavenMavenListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsMavenAPIDistributionsMavenMavenListRequest) Execute() (*PaginatedmavenMavenDistributionResponseList, *http.Response, error) { + return r.ApiService.DistributionsMavenMavenListExecute(r) +} + +/* +DistributionsMavenMavenList List maven distributions + +ViewSet for Maven Distributions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsMavenAPIDistributionsMavenMavenListRequest +*/ +func (a *DistributionsMavenAPIService) DistributionsMavenMavenList(ctx context.Context) DistributionsMavenAPIDistributionsMavenMavenListRequest { + return DistributionsMavenAPIDistributionsMavenMavenListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedmavenMavenDistributionResponseList +func (a *DistributionsMavenAPIService) DistributionsMavenMavenListExecute(r DistributionsMavenAPIDistributionsMavenMavenListRequest) (*PaginatedmavenMavenDistributionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedmavenMavenDistributionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsMavenAPIService.DistributionsMavenMavenList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/maven/maven/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.basePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path", r.basePath, "") + } + if r.basePathContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__contains", r.basePathContains, "") + } + if r.basePathIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__icontains", r.basePathIcontains, "") + } + if r.basePathIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__in", r.basePathIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository__in", r.repositoryIn, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsMavenAPIDistributionsMavenMavenPartialUpdateRequest struct { + ctx context.Context + ApiService *DistributionsMavenAPIService + mavenMavenDistributionHref string + patchedmavenMavenDistribution *PatchedmavenMavenDistribution +} + +func (r DistributionsMavenAPIDistributionsMavenMavenPartialUpdateRequest) PatchedmavenMavenDistribution(patchedmavenMavenDistribution PatchedmavenMavenDistribution) DistributionsMavenAPIDistributionsMavenMavenPartialUpdateRequest { + r.patchedmavenMavenDistribution = &patchedmavenMavenDistribution + return r +} + +func (r DistributionsMavenAPIDistributionsMavenMavenPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsMavenMavenPartialUpdateExecute(r) +} + +/* +DistributionsMavenMavenPartialUpdate Update a maven distribution + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenDistributionHref + @return DistributionsMavenAPIDistributionsMavenMavenPartialUpdateRequest +*/ +func (a *DistributionsMavenAPIService) DistributionsMavenMavenPartialUpdate(ctx context.Context, mavenMavenDistributionHref string) DistributionsMavenAPIDistributionsMavenMavenPartialUpdateRequest { + return DistributionsMavenAPIDistributionsMavenMavenPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + mavenMavenDistributionHref: mavenMavenDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsMavenAPIService) DistributionsMavenMavenPartialUpdateExecute(r DistributionsMavenAPIDistributionsMavenMavenPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsMavenAPIService.DistributionsMavenMavenPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_distribution_href"+"}", parameterValueToString(r.mavenMavenDistributionHref, "mavenMavenDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedmavenMavenDistribution == nil { + return localVarReturnValue, nil, reportError("patchedmavenMavenDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedmavenMavenDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsMavenAPIDistributionsMavenMavenReadRequest struct { + ctx context.Context + ApiService *DistributionsMavenAPIService + mavenMavenDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsMavenAPIDistributionsMavenMavenReadRequest) Fields(fields []string) DistributionsMavenAPIDistributionsMavenMavenReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsMavenAPIDistributionsMavenMavenReadRequest) ExcludeFields(excludeFields []string) DistributionsMavenAPIDistributionsMavenMavenReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsMavenAPIDistributionsMavenMavenReadRequest) Execute() (*MavenMavenDistributionResponse, *http.Response, error) { + return r.ApiService.DistributionsMavenMavenReadExecute(r) +} + +/* +DistributionsMavenMavenRead Inspect a maven distribution + +ViewSet for Maven Distributions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenDistributionHref + @return DistributionsMavenAPIDistributionsMavenMavenReadRequest +*/ +func (a *DistributionsMavenAPIService) DistributionsMavenMavenRead(ctx context.Context, mavenMavenDistributionHref string) DistributionsMavenAPIDistributionsMavenMavenReadRequest { + return DistributionsMavenAPIDistributionsMavenMavenReadRequest{ + ApiService: a, + ctx: ctx, + mavenMavenDistributionHref: mavenMavenDistributionHref, + } +} + +// Execute executes the request +// @return MavenMavenDistributionResponse +func (a *DistributionsMavenAPIService) DistributionsMavenMavenReadExecute(r DistributionsMavenAPIDistributionsMavenMavenReadRequest) (*MavenMavenDistributionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MavenMavenDistributionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsMavenAPIService.DistributionsMavenMavenRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_distribution_href"+"}", parameterValueToString(r.mavenMavenDistributionHref, "mavenMavenDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsMavenAPIDistributionsMavenMavenUpdateRequest struct { + ctx context.Context + ApiService *DistributionsMavenAPIService + mavenMavenDistributionHref string + mavenMavenDistribution *MavenMavenDistribution +} + +func (r DistributionsMavenAPIDistributionsMavenMavenUpdateRequest) MavenMavenDistribution(mavenMavenDistribution MavenMavenDistribution) DistributionsMavenAPIDistributionsMavenMavenUpdateRequest { + r.mavenMavenDistribution = &mavenMavenDistribution + return r +} + +func (r DistributionsMavenAPIDistributionsMavenMavenUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsMavenMavenUpdateExecute(r) +} + +/* +DistributionsMavenMavenUpdate Update a maven distribution + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenDistributionHref + @return DistributionsMavenAPIDistributionsMavenMavenUpdateRequest +*/ +func (a *DistributionsMavenAPIService) DistributionsMavenMavenUpdate(ctx context.Context, mavenMavenDistributionHref string) DistributionsMavenAPIDistributionsMavenMavenUpdateRequest { + return DistributionsMavenAPIDistributionsMavenMavenUpdateRequest{ + ApiService: a, + ctx: ctx, + mavenMavenDistributionHref: mavenMavenDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsMavenAPIService) DistributionsMavenMavenUpdateExecute(r DistributionsMavenAPIDistributionsMavenMavenUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsMavenAPIService.DistributionsMavenMavenUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_distribution_href"+"}", parameterValueToString(r.mavenMavenDistributionHref, "mavenMavenDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.mavenMavenDistribution == nil { + return localVarReturnValue, nil, reportError("mavenMavenDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.mavenMavenDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_ostree.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_ostree.go new file mode 100644 index 0000000000..08ba954956 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_ostree.go @@ -0,0 +1,921 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// DistributionsOstreeAPIService DistributionsOstreeAPI service +type DistributionsOstreeAPIService service + +type DistributionsOstreeAPIDistributionsOstreeOstreeCreateRequest struct { + ctx context.Context + ApiService *DistributionsOstreeAPIService + ostreeOstreeDistribution *OstreeOstreeDistribution +} + +func (r DistributionsOstreeAPIDistributionsOstreeOstreeCreateRequest) OstreeOstreeDistribution(ostreeOstreeDistribution OstreeOstreeDistribution) DistributionsOstreeAPIDistributionsOstreeOstreeCreateRequest { + r.ostreeOstreeDistribution = &ostreeOstreeDistribution + return r +} + +func (r DistributionsOstreeAPIDistributionsOstreeOstreeCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsOstreeOstreeCreateExecute(r) +} + +/* +DistributionsOstreeOstreeCreate Create an ostree distribution + +Trigger an asynchronous create task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsOstreeAPIDistributionsOstreeOstreeCreateRequest +*/ +func (a *DistributionsOstreeAPIService) DistributionsOstreeOstreeCreate(ctx context.Context) DistributionsOstreeAPIDistributionsOstreeOstreeCreateRequest { + return DistributionsOstreeAPIDistributionsOstreeOstreeCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsOstreeAPIService) DistributionsOstreeOstreeCreateExecute(r DistributionsOstreeAPIDistributionsOstreeOstreeCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsOstreeAPIService.DistributionsOstreeOstreeCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/ostree/ostree/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ostreeOstreeDistribution == nil { + return localVarReturnValue, nil, reportError("ostreeOstreeDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ostreeOstreeDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsOstreeAPIDistributionsOstreeOstreeDeleteRequest struct { + ctx context.Context + ApiService *DistributionsOstreeAPIService + ostreeOstreeDistributionHref string +} + +func (r DistributionsOstreeAPIDistributionsOstreeOstreeDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsOstreeOstreeDeleteExecute(r) +} + +/* +DistributionsOstreeOstreeDelete Delete an ostree distribution + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeDistributionHref + @return DistributionsOstreeAPIDistributionsOstreeOstreeDeleteRequest +*/ +func (a *DistributionsOstreeAPIService) DistributionsOstreeOstreeDelete(ctx context.Context, ostreeOstreeDistributionHref string) DistributionsOstreeAPIDistributionsOstreeOstreeDeleteRequest { + return DistributionsOstreeAPIDistributionsOstreeOstreeDeleteRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeDistributionHref: ostreeOstreeDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsOstreeAPIService) DistributionsOstreeOstreeDeleteExecute(r DistributionsOstreeAPIDistributionsOstreeOstreeDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsOstreeAPIService.DistributionsOstreeOstreeDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_distribution_href"+"}", parameterValueToString(r.ostreeOstreeDistributionHref, "ostreeOstreeDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsOstreeAPIDistributionsOstreeOstreeListRequest struct { + ctx context.Context + ApiService *DistributionsOstreeAPIService + basePath *string + basePathContains *string + basePathIcontains *string + basePathIn *[]string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + repository *string + repositoryIn *[]string + withContent *string + fields *[]string + excludeFields *[]string +} + +// Filter results where base_path matches value +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) BasePath(basePath string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.basePath = &basePath + return r +} + +// Filter results where base_path contains value +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) BasePathContains(basePathContains string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.basePathContains = &basePathContains + return r +} + +// Filter results where base_path contains value +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) BasePathIcontains(basePathIcontains string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.basePathIcontains = &basePathIcontains + return r +} + +// Filter results where base_path is in a comma-separated list of values +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) BasePathIn(basePathIn []string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.basePathIn = &basePathIn + return r +} + +// Number of results to return per page. +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) Limit(limit int32) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) Name(name string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) NameContains(nameContains string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) NameIcontains(nameIcontains string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) NameIn(nameIn []string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) NameStartswith(nameStartswith string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) Offset(offset int32) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) Ordering(ordering []string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) PulpHrefIn(pulpHrefIn []string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) PulpIdIn(pulpIdIn []string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) PulpLabelSelect(pulpLabelSelect string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where repository matches value +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) Repository(repository string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.repository = &repository + return r +} + +// Filter results where repository is in a comma-separated list of values +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) RepositoryIn(repositoryIn []string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.repositoryIn = &repositoryIn + return r +} + +// Filter distributions based on the content served by them +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) WithContent(withContent string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) Fields(fields []string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) ExcludeFields(excludeFields []string) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) Execute() (*PaginatedostreeOstreeDistributionResponseList, *http.Response, error) { + return r.ApiService.DistributionsOstreeOstreeListExecute(r) +} + +/* +DistributionsOstreeOstreeList List ostree distributions + +A ViewSet class for OSTree distributions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsOstreeAPIDistributionsOstreeOstreeListRequest +*/ +func (a *DistributionsOstreeAPIService) DistributionsOstreeOstreeList(ctx context.Context) DistributionsOstreeAPIDistributionsOstreeOstreeListRequest { + return DistributionsOstreeAPIDistributionsOstreeOstreeListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedostreeOstreeDistributionResponseList +func (a *DistributionsOstreeAPIService) DistributionsOstreeOstreeListExecute(r DistributionsOstreeAPIDistributionsOstreeOstreeListRequest) (*PaginatedostreeOstreeDistributionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedostreeOstreeDistributionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsOstreeAPIService.DistributionsOstreeOstreeList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/ostree/ostree/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.basePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path", r.basePath, "") + } + if r.basePathContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__contains", r.basePathContains, "") + } + if r.basePathIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__icontains", r.basePathIcontains, "") + } + if r.basePathIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__in", r.basePathIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository__in", r.repositoryIn, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsOstreeAPIDistributionsOstreeOstreePartialUpdateRequest struct { + ctx context.Context + ApiService *DistributionsOstreeAPIService + ostreeOstreeDistributionHref string + patchedostreeOstreeDistribution *PatchedostreeOstreeDistribution +} + +func (r DistributionsOstreeAPIDistributionsOstreeOstreePartialUpdateRequest) PatchedostreeOstreeDistribution(patchedostreeOstreeDistribution PatchedostreeOstreeDistribution) DistributionsOstreeAPIDistributionsOstreeOstreePartialUpdateRequest { + r.patchedostreeOstreeDistribution = &patchedostreeOstreeDistribution + return r +} + +func (r DistributionsOstreeAPIDistributionsOstreeOstreePartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsOstreeOstreePartialUpdateExecute(r) +} + +/* +DistributionsOstreeOstreePartialUpdate Update an ostree distribution + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeDistributionHref + @return DistributionsOstreeAPIDistributionsOstreeOstreePartialUpdateRequest +*/ +func (a *DistributionsOstreeAPIService) DistributionsOstreeOstreePartialUpdate(ctx context.Context, ostreeOstreeDistributionHref string) DistributionsOstreeAPIDistributionsOstreeOstreePartialUpdateRequest { + return DistributionsOstreeAPIDistributionsOstreeOstreePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeDistributionHref: ostreeOstreeDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsOstreeAPIService) DistributionsOstreeOstreePartialUpdateExecute(r DistributionsOstreeAPIDistributionsOstreeOstreePartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsOstreeAPIService.DistributionsOstreeOstreePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_distribution_href"+"}", parameterValueToString(r.ostreeOstreeDistributionHref, "ostreeOstreeDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedostreeOstreeDistribution == nil { + return localVarReturnValue, nil, reportError("patchedostreeOstreeDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedostreeOstreeDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsOstreeAPIDistributionsOstreeOstreeReadRequest struct { + ctx context.Context + ApiService *DistributionsOstreeAPIService + ostreeOstreeDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsOstreeAPIDistributionsOstreeOstreeReadRequest) Fields(fields []string) DistributionsOstreeAPIDistributionsOstreeOstreeReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsOstreeAPIDistributionsOstreeOstreeReadRequest) ExcludeFields(excludeFields []string) DistributionsOstreeAPIDistributionsOstreeOstreeReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsOstreeAPIDistributionsOstreeOstreeReadRequest) Execute() (*OstreeOstreeDistributionResponse, *http.Response, error) { + return r.ApiService.DistributionsOstreeOstreeReadExecute(r) +} + +/* +DistributionsOstreeOstreeRead Inspect an ostree distribution + +A ViewSet class for OSTree distributions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeDistributionHref + @return DistributionsOstreeAPIDistributionsOstreeOstreeReadRequest +*/ +func (a *DistributionsOstreeAPIService) DistributionsOstreeOstreeRead(ctx context.Context, ostreeOstreeDistributionHref string) DistributionsOstreeAPIDistributionsOstreeOstreeReadRequest { + return DistributionsOstreeAPIDistributionsOstreeOstreeReadRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeDistributionHref: ostreeOstreeDistributionHref, + } +} + +// Execute executes the request +// @return OstreeOstreeDistributionResponse +func (a *DistributionsOstreeAPIService) DistributionsOstreeOstreeReadExecute(r DistributionsOstreeAPIDistributionsOstreeOstreeReadRequest) (*OstreeOstreeDistributionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OstreeOstreeDistributionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsOstreeAPIService.DistributionsOstreeOstreeRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_distribution_href"+"}", parameterValueToString(r.ostreeOstreeDistributionHref, "ostreeOstreeDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsOstreeAPIDistributionsOstreeOstreeUpdateRequest struct { + ctx context.Context + ApiService *DistributionsOstreeAPIService + ostreeOstreeDistributionHref string + ostreeOstreeDistribution *OstreeOstreeDistribution +} + +func (r DistributionsOstreeAPIDistributionsOstreeOstreeUpdateRequest) OstreeOstreeDistribution(ostreeOstreeDistribution OstreeOstreeDistribution) DistributionsOstreeAPIDistributionsOstreeOstreeUpdateRequest { + r.ostreeOstreeDistribution = &ostreeOstreeDistribution + return r +} + +func (r DistributionsOstreeAPIDistributionsOstreeOstreeUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsOstreeOstreeUpdateExecute(r) +} + +/* +DistributionsOstreeOstreeUpdate Update an ostree distribution + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeDistributionHref + @return DistributionsOstreeAPIDistributionsOstreeOstreeUpdateRequest +*/ +func (a *DistributionsOstreeAPIService) DistributionsOstreeOstreeUpdate(ctx context.Context, ostreeOstreeDistributionHref string) DistributionsOstreeAPIDistributionsOstreeOstreeUpdateRequest { + return DistributionsOstreeAPIDistributionsOstreeOstreeUpdateRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeDistributionHref: ostreeOstreeDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsOstreeAPIService) DistributionsOstreeOstreeUpdateExecute(r DistributionsOstreeAPIDistributionsOstreeOstreeUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsOstreeAPIService.DistributionsOstreeOstreeUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_distribution_href"+"}", parameterValueToString(r.ostreeOstreeDistributionHref, "ostreeOstreeDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ostreeOstreeDistribution == nil { + return localVarReturnValue, nil, reportError("ostreeOstreeDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ostreeOstreeDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_pypi.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_pypi.go new file mode 100644 index 0000000000..3541b737f4 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_pypi.go @@ -0,0 +1,931 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// DistributionsPypiAPIService DistributionsPypiAPI service +type DistributionsPypiAPIService service + +type DistributionsPypiAPIDistributionsPythonPypiCreateRequest struct { + ctx context.Context + ApiService *DistributionsPypiAPIService + pythonPythonDistribution *PythonPythonDistribution +} + +func (r DistributionsPypiAPIDistributionsPythonPypiCreateRequest) PythonPythonDistribution(pythonPythonDistribution PythonPythonDistribution) DistributionsPypiAPIDistributionsPythonPypiCreateRequest { + r.pythonPythonDistribution = &pythonPythonDistribution + return r +} + +func (r DistributionsPypiAPIDistributionsPythonPypiCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsPythonPypiCreateExecute(r) +} + +/* +DistributionsPythonPypiCreate Create a python distribution + +Trigger an asynchronous create task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsPypiAPIDistributionsPythonPypiCreateRequest +*/ +func (a *DistributionsPypiAPIService) DistributionsPythonPypiCreate(ctx context.Context) DistributionsPypiAPIDistributionsPythonPypiCreateRequest { + return DistributionsPypiAPIDistributionsPythonPypiCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsPypiAPIService) DistributionsPythonPypiCreateExecute(r DistributionsPypiAPIDistributionsPythonPypiCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsPypiAPIService.DistributionsPythonPypiCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/python/pypi/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pythonPythonDistribution == nil { + return localVarReturnValue, nil, reportError("pythonPythonDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pythonPythonDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsPypiAPIDistributionsPythonPypiDeleteRequest struct { + ctx context.Context + ApiService *DistributionsPypiAPIService + pythonPythonDistributionHref string +} + +func (r DistributionsPypiAPIDistributionsPythonPypiDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsPythonPypiDeleteExecute(r) +} + +/* +DistributionsPythonPypiDelete Delete a python distribution + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonDistributionHref + @return DistributionsPypiAPIDistributionsPythonPypiDeleteRequest +*/ +func (a *DistributionsPypiAPIService) DistributionsPythonPypiDelete(ctx context.Context, pythonPythonDistributionHref string) DistributionsPypiAPIDistributionsPythonPypiDeleteRequest { + return DistributionsPypiAPIDistributionsPythonPypiDeleteRequest{ + ApiService: a, + ctx: ctx, + pythonPythonDistributionHref: pythonPythonDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsPypiAPIService) DistributionsPythonPypiDeleteExecute(r DistributionsPypiAPIDistributionsPythonPypiDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsPypiAPIService.DistributionsPythonPypiDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_distribution_href"+"}", parameterValueToString(r.pythonPythonDistributionHref, "pythonPythonDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsPypiAPIDistributionsPythonPypiListRequest struct { + ctx context.Context + ApiService *DistributionsPypiAPIService + basePath *string + basePathContains *string + basePathIcontains *string + basePathIn *[]string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + repository *string + repositoryIn *[]string + withContent *string + fields *[]string + excludeFields *[]string +} + +// Filter results where base_path matches value +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) BasePath(basePath string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.basePath = &basePath + return r +} + +// Filter results where base_path contains value +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) BasePathContains(basePathContains string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.basePathContains = &basePathContains + return r +} + +// Filter results where base_path contains value +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) BasePathIcontains(basePathIcontains string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.basePathIcontains = &basePathIcontains + return r +} + +// Filter results where base_path is in a comma-separated list of values +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) BasePathIn(basePathIn []string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.basePathIn = &basePathIn + return r +} + +// Number of results to return per page. +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) Limit(limit int32) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) Name(name string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) NameContains(nameContains string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) NameIcontains(nameIcontains string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) NameIn(nameIn []string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) NameStartswith(nameStartswith string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) Offset(offset int32) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) Ordering(ordering []string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) PulpHrefIn(pulpHrefIn []string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) PulpIdIn(pulpIdIn []string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) PulpLabelSelect(pulpLabelSelect string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where repository matches value +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) Repository(repository string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.repository = &repository + return r +} + +// Filter results where repository is in a comma-separated list of values +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) RepositoryIn(repositoryIn []string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.repositoryIn = &repositoryIn + return r +} + +// Filter distributions based on the content served by them +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) WithContent(withContent string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) Fields(fields []string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) ExcludeFields(excludeFields []string) DistributionsPypiAPIDistributionsPythonPypiListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsPypiAPIDistributionsPythonPypiListRequest) Execute() (*PaginatedpythonPythonDistributionResponseList, *http.Response, error) { + return r.ApiService.DistributionsPythonPypiListExecute(r) +} + +/* +DistributionsPythonPypiList List python distributions + + +Pulp Python Distributions are used to distribute Python content from +Python Repositories or +Python Publications. Pulp Python +Distributions should not be confused with "Python Distribution" as defined by the Python +community. In Pulp usage, Python content is referred to as Python Package Content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsPypiAPIDistributionsPythonPypiListRequest +*/ +func (a *DistributionsPypiAPIService) DistributionsPythonPypiList(ctx context.Context) DistributionsPypiAPIDistributionsPythonPypiListRequest { + return DistributionsPypiAPIDistributionsPythonPypiListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedpythonPythonDistributionResponseList +func (a *DistributionsPypiAPIService) DistributionsPythonPypiListExecute(r DistributionsPypiAPIDistributionsPythonPypiListRequest) (*PaginatedpythonPythonDistributionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedpythonPythonDistributionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsPypiAPIService.DistributionsPythonPypiList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/python/pypi/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.basePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path", r.basePath, "") + } + if r.basePathContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__contains", r.basePathContains, "") + } + if r.basePathIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__icontains", r.basePathIcontains, "") + } + if r.basePathIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__in", r.basePathIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository__in", r.repositoryIn, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsPypiAPIDistributionsPythonPypiPartialUpdateRequest struct { + ctx context.Context + ApiService *DistributionsPypiAPIService + pythonPythonDistributionHref string + patchedpythonPythonDistribution *PatchedpythonPythonDistribution +} + +func (r DistributionsPypiAPIDistributionsPythonPypiPartialUpdateRequest) PatchedpythonPythonDistribution(patchedpythonPythonDistribution PatchedpythonPythonDistribution) DistributionsPypiAPIDistributionsPythonPypiPartialUpdateRequest { + r.patchedpythonPythonDistribution = &patchedpythonPythonDistribution + return r +} + +func (r DistributionsPypiAPIDistributionsPythonPypiPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsPythonPypiPartialUpdateExecute(r) +} + +/* +DistributionsPythonPypiPartialUpdate Update a python distribution + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonDistributionHref + @return DistributionsPypiAPIDistributionsPythonPypiPartialUpdateRequest +*/ +func (a *DistributionsPypiAPIService) DistributionsPythonPypiPartialUpdate(ctx context.Context, pythonPythonDistributionHref string) DistributionsPypiAPIDistributionsPythonPypiPartialUpdateRequest { + return DistributionsPypiAPIDistributionsPythonPypiPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + pythonPythonDistributionHref: pythonPythonDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsPypiAPIService) DistributionsPythonPypiPartialUpdateExecute(r DistributionsPypiAPIDistributionsPythonPypiPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsPypiAPIService.DistributionsPythonPypiPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_distribution_href"+"}", parameterValueToString(r.pythonPythonDistributionHref, "pythonPythonDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedpythonPythonDistribution == nil { + return localVarReturnValue, nil, reportError("patchedpythonPythonDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedpythonPythonDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsPypiAPIDistributionsPythonPypiReadRequest struct { + ctx context.Context + ApiService *DistributionsPypiAPIService + pythonPythonDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsPypiAPIDistributionsPythonPypiReadRequest) Fields(fields []string) DistributionsPypiAPIDistributionsPythonPypiReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsPypiAPIDistributionsPythonPypiReadRequest) ExcludeFields(excludeFields []string) DistributionsPypiAPIDistributionsPythonPypiReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsPypiAPIDistributionsPythonPypiReadRequest) Execute() (*PythonPythonDistributionResponse, *http.Response, error) { + return r.ApiService.DistributionsPythonPypiReadExecute(r) +} + +/* +DistributionsPythonPypiRead Inspect a python distribution + + +Pulp Python Distributions are used to distribute Python content from +Python Repositories or +Python Publications. Pulp Python +Distributions should not be confused with "Python Distribution" as defined by the Python +community. In Pulp usage, Python content is referred to as Python Package Content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonDistributionHref + @return DistributionsPypiAPIDistributionsPythonPypiReadRequest +*/ +func (a *DistributionsPypiAPIService) DistributionsPythonPypiRead(ctx context.Context, pythonPythonDistributionHref string) DistributionsPypiAPIDistributionsPythonPypiReadRequest { + return DistributionsPypiAPIDistributionsPythonPypiReadRequest{ + ApiService: a, + ctx: ctx, + pythonPythonDistributionHref: pythonPythonDistributionHref, + } +} + +// Execute executes the request +// @return PythonPythonDistributionResponse +func (a *DistributionsPypiAPIService) DistributionsPythonPypiReadExecute(r DistributionsPypiAPIDistributionsPythonPypiReadRequest) (*PythonPythonDistributionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PythonPythonDistributionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsPypiAPIService.DistributionsPythonPypiRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_distribution_href"+"}", parameterValueToString(r.pythonPythonDistributionHref, "pythonPythonDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsPypiAPIDistributionsPythonPypiUpdateRequest struct { + ctx context.Context + ApiService *DistributionsPypiAPIService + pythonPythonDistributionHref string + pythonPythonDistribution *PythonPythonDistribution +} + +func (r DistributionsPypiAPIDistributionsPythonPypiUpdateRequest) PythonPythonDistribution(pythonPythonDistribution PythonPythonDistribution) DistributionsPypiAPIDistributionsPythonPypiUpdateRequest { + r.pythonPythonDistribution = &pythonPythonDistribution + return r +} + +func (r DistributionsPypiAPIDistributionsPythonPypiUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsPythonPypiUpdateExecute(r) +} + +/* +DistributionsPythonPypiUpdate Update a python distribution + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonDistributionHref + @return DistributionsPypiAPIDistributionsPythonPypiUpdateRequest +*/ +func (a *DistributionsPypiAPIService) DistributionsPythonPypiUpdate(ctx context.Context, pythonPythonDistributionHref string) DistributionsPypiAPIDistributionsPythonPypiUpdateRequest { + return DistributionsPypiAPIDistributionsPythonPypiUpdateRequest{ + ApiService: a, + ctx: ctx, + pythonPythonDistributionHref: pythonPythonDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsPypiAPIService) DistributionsPythonPypiUpdateExecute(r DistributionsPypiAPIDistributionsPythonPypiUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsPypiAPIService.DistributionsPythonPypiUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_distribution_href"+"}", parameterValueToString(r.pythonPythonDistributionHref, "pythonPythonDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pythonPythonDistribution == nil { + return localVarReturnValue, nil, reportError("pythonPythonDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pythonPythonDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_rpm.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_rpm.go new file mode 100644 index 0000000000..9a3b881930 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_distributions_rpm.go @@ -0,0 +1,1427 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// DistributionsRpmAPIService DistributionsRpmAPI service +type DistributionsRpmAPIService service + +type DistributionsRpmAPIDistributionsRpmRpmAddRoleRequest struct { + ctx context.Context + ApiService *DistributionsRpmAPIService + rpmRpmDistributionHref string + nestedRole *NestedRole +} + +func (r DistributionsRpmAPIDistributionsRpmRpmAddRoleRequest) NestedRole(nestedRole NestedRole) DistributionsRpmAPIDistributionsRpmRpmAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r DistributionsRpmAPIDistributionsRpmRpmAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.DistributionsRpmRpmAddRoleExecute(r) +} + +/* +DistributionsRpmRpmAddRole Method for DistributionsRpmRpmAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmDistributionHref + @return DistributionsRpmAPIDistributionsRpmRpmAddRoleRequest +*/ +func (a *DistributionsRpmAPIService) DistributionsRpmRpmAddRole(ctx context.Context, rpmRpmDistributionHref string) DistributionsRpmAPIDistributionsRpmRpmAddRoleRequest { + return DistributionsRpmAPIDistributionsRpmRpmAddRoleRequest{ + ApiService: a, + ctx: ctx, + rpmRpmDistributionHref: rpmRpmDistributionHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *DistributionsRpmAPIService) DistributionsRpmRpmAddRoleExecute(r DistributionsRpmAPIDistributionsRpmRpmAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsRpmAPIService.DistributionsRpmRpmAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_distribution_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_distribution_href"+"}", parameterValueToString(r.rpmRpmDistributionHref, "rpmRpmDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsRpmAPIDistributionsRpmRpmCreateRequest struct { + ctx context.Context + ApiService *DistributionsRpmAPIService + rpmRpmDistribution *RpmRpmDistribution +} + +func (r DistributionsRpmAPIDistributionsRpmRpmCreateRequest) RpmRpmDistribution(rpmRpmDistribution RpmRpmDistribution) DistributionsRpmAPIDistributionsRpmRpmCreateRequest { + r.rpmRpmDistribution = &rpmRpmDistribution + return r +} + +func (r DistributionsRpmAPIDistributionsRpmRpmCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsRpmRpmCreateExecute(r) +} + +/* +DistributionsRpmRpmCreate Create a rpm distribution + +Trigger an asynchronous create task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsRpmAPIDistributionsRpmRpmCreateRequest +*/ +func (a *DistributionsRpmAPIService) DistributionsRpmRpmCreate(ctx context.Context) DistributionsRpmAPIDistributionsRpmRpmCreateRequest { + return DistributionsRpmAPIDistributionsRpmRpmCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsRpmAPIService) DistributionsRpmRpmCreateExecute(r DistributionsRpmAPIDistributionsRpmRpmCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsRpmAPIService.DistributionsRpmRpmCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/rpm/rpm/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmRpmDistribution == nil { + return localVarReturnValue, nil, reportError("rpmRpmDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmRpmDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsRpmAPIDistributionsRpmRpmDeleteRequest struct { + ctx context.Context + ApiService *DistributionsRpmAPIService + rpmRpmDistributionHref string +} + +func (r DistributionsRpmAPIDistributionsRpmRpmDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsRpmRpmDeleteExecute(r) +} + +/* +DistributionsRpmRpmDelete Delete a rpm distribution + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmDistributionHref + @return DistributionsRpmAPIDistributionsRpmRpmDeleteRequest +*/ +func (a *DistributionsRpmAPIService) DistributionsRpmRpmDelete(ctx context.Context, rpmRpmDistributionHref string) DistributionsRpmAPIDistributionsRpmRpmDeleteRequest { + return DistributionsRpmAPIDistributionsRpmRpmDeleteRequest{ + ApiService: a, + ctx: ctx, + rpmRpmDistributionHref: rpmRpmDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsRpmAPIService) DistributionsRpmRpmDeleteExecute(r DistributionsRpmAPIDistributionsRpmRpmDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsRpmAPIService.DistributionsRpmRpmDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_distribution_href"+"}", parameterValueToString(r.rpmRpmDistributionHref, "rpmRpmDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsRpmAPIDistributionsRpmRpmListRequest struct { + ctx context.Context + ApiService *DistributionsRpmAPIService + basePath *string + basePathContains *string + basePathIcontains *string + basePathIn *[]string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + repository *string + repositoryIn *[]string + withContent *string + fields *[]string + excludeFields *[]string +} + +// Filter results where base_path matches value +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) BasePath(basePath string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.basePath = &basePath + return r +} + +// Filter results where base_path contains value +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) BasePathContains(basePathContains string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.basePathContains = &basePathContains + return r +} + +// Filter results where base_path contains value +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) BasePathIcontains(basePathIcontains string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.basePathIcontains = &basePathIcontains + return r +} + +// Filter results where base_path is in a comma-separated list of values +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) BasePathIn(basePathIn []string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.basePathIn = &basePathIn + return r +} + +// Number of results to return per page. +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) Limit(limit int32) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) Name(name string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) NameContains(nameContains string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) NameIcontains(nameIcontains string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) NameIn(nameIn []string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) NameStartswith(nameStartswith string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) Offset(offset int32) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) Ordering(ordering []string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) PulpHrefIn(pulpHrefIn []string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) PulpIdIn(pulpIdIn []string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) PulpLabelSelect(pulpLabelSelect string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where repository matches value +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) Repository(repository string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.repository = &repository + return r +} + +// Filter results where repository is in a comma-separated list of values +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) RepositoryIn(repositoryIn []string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.repositoryIn = &repositoryIn + return r +} + +// Filter distributions based on the content served by them +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) WithContent(withContent string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) Fields(fields []string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) ExcludeFields(excludeFields []string) DistributionsRpmAPIDistributionsRpmRpmListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsRpmAPIDistributionsRpmRpmListRequest) Execute() (*PaginatedrpmRpmDistributionResponseList, *http.Response, error) { + return r.ApiService.DistributionsRpmRpmListExecute(r) +} + +/* +DistributionsRpmRpmList List rpm distributions + +ViewSet for RPM Distributions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DistributionsRpmAPIDistributionsRpmRpmListRequest +*/ +func (a *DistributionsRpmAPIService) DistributionsRpmRpmList(ctx context.Context) DistributionsRpmAPIDistributionsRpmRpmListRequest { + return DistributionsRpmAPIDistributionsRpmRpmListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmRpmDistributionResponseList +func (a *DistributionsRpmAPIService) DistributionsRpmRpmListExecute(r DistributionsRpmAPIDistributionsRpmRpmListRequest) (*PaginatedrpmRpmDistributionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmRpmDistributionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsRpmAPIService.DistributionsRpmRpmList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/distributions/rpm/rpm/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.basePath != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path", r.basePath, "") + } + if r.basePathContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__contains", r.basePathContains, "") + } + if r.basePathIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__icontains", r.basePathIcontains, "") + } + if r.basePathIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "base_path__in", r.basePathIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository__in", r.repositoryIn, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsRpmAPIDistributionsRpmRpmListRolesRequest struct { + ctx context.Context + ApiService *DistributionsRpmAPIService + rpmRpmDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsRpmAPIDistributionsRpmRpmListRolesRequest) Fields(fields []string) DistributionsRpmAPIDistributionsRpmRpmListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsRpmAPIDistributionsRpmRpmListRolesRequest) ExcludeFields(excludeFields []string) DistributionsRpmAPIDistributionsRpmRpmListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsRpmAPIDistributionsRpmRpmListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.DistributionsRpmRpmListRolesExecute(r) +} + +/* +DistributionsRpmRpmListRoles Method for DistributionsRpmRpmListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmDistributionHref + @return DistributionsRpmAPIDistributionsRpmRpmListRolesRequest +*/ +func (a *DistributionsRpmAPIService) DistributionsRpmRpmListRoles(ctx context.Context, rpmRpmDistributionHref string) DistributionsRpmAPIDistributionsRpmRpmListRolesRequest { + return DistributionsRpmAPIDistributionsRpmRpmListRolesRequest{ + ApiService: a, + ctx: ctx, + rpmRpmDistributionHref: rpmRpmDistributionHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *DistributionsRpmAPIService) DistributionsRpmRpmListRolesExecute(r DistributionsRpmAPIDistributionsRpmRpmListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsRpmAPIService.DistributionsRpmRpmListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_distribution_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_distribution_href"+"}", parameterValueToString(r.rpmRpmDistributionHref, "rpmRpmDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsRpmAPIDistributionsRpmRpmMyPermissionsRequest struct { + ctx context.Context + ApiService *DistributionsRpmAPIService + rpmRpmDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsRpmAPIDistributionsRpmRpmMyPermissionsRequest) Fields(fields []string) DistributionsRpmAPIDistributionsRpmRpmMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsRpmAPIDistributionsRpmRpmMyPermissionsRequest) ExcludeFields(excludeFields []string) DistributionsRpmAPIDistributionsRpmRpmMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsRpmAPIDistributionsRpmRpmMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.DistributionsRpmRpmMyPermissionsExecute(r) +} + +/* +DistributionsRpmRpmMyPermissions Method for DistributionsRpmRpmMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmDistributionHref + @return DistributionsRpmAPIDistributionsRpmRpmMyPermissionsRequest +*/ +func (a *DistributionsRpmAPIService) DistributionsRpmRpmMyPermissions(ctx context.Context, rpmRpmDistributionHref string) DistributionsRpmAPIDistributionsRpmRpmMyPermissionsRequest { + return DistributionsRpmAPIDistributionsRpmRpmMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + rpmRpmDistributionHref: rpmRpmDistributionHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *DistributionsRpmAPIService) DistributionsRpmRpmMyPermissionsExecute(r DistributionsRpmAPIDistributionsRpmRpmMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsRpmAPIService.DistributionsRpmRpmMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_distribution_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_distribution_href"+"}", parameterValueToString(r.rpmRpmDistributionHref, "rpmRpmDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsRpmAPIDistributionsRpmRpmPartialUpdateRequest struct { + ctx context.Context + ApiService *DistributionsRpmAPIService + rpmRpmDistributionHref string + patchedrpmRpmDistribution *PatchedrpmRpmDistribution +} + +func (r DistributionsRpmAPIDistributionsRpmRpmPartialUpdateRequest) PatchedrpmRpmDistribution(patchedrpmRpmDistribution PatchedrpmRpmDistribution) DistributionsRpmAPIDistributionsRpmRpmPartialUpdateRequest { + r.patchedrpmRpmDistribution = &patchedrpmRpmDistribution + return r +} + +func (r DistributionsRpmAPIDistributionsRpmRpmPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsRpmRpmPartialUpdateExecute(r) +} + +/* +DistributionsRpmRpmPartialUpdate Update a rpm distribution + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmDistributionHref + @return DistributionsRpmAPIDistributionsRpmRpmPartialUpdateRequest +*/ +func (a *DistributionsRpmAPIService) DistributionsRpmRpmPartialUpdate(ctx context.Context, rpmRpmDistributionHref string) DistributionsRpmAPIDistributionsRpmRpmPartialUpdateRequest { + return DistributionsRpmAPIDistributionsRpmRpmPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + rpmRpmDistributionHref: rpmRpmDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsRpmAPIService) DistributionsRpmRpmPartialUpdateExecute(r DistributionsRpmAPIDistributionsRpmRpmPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsRpmAPIService.DistributionsRpmRpmPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_distribution_href"+"}", parameterValueToString(r.rpmRpmDistributionHref, "rpmRpmDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedrpmRpmDistribution == nil { + return localVarReturnValue, nil, reportError("patchedrpmRpmDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedrpmRpmDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsRpmAPIDistributionsRpmRpmReadRequest struct { + ctx context.Context + ApiService *DistributionsRpmAPIService + rpmRpmDistributionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DistributionsRpmAPIDistributionsRpmRpmReadRequest) Fields(fields []string) DistributionsRpmAPIDistributionsRpmRpmReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DistributionsRpmAPIDistributionsRpmRpmReadRequest) ExcludeFields(excludeFields []string) DistributionsRpmAPIDistributionsRpmRpmReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DistributionsRpmAPIDistributionsRpmRpmReadRequest) Execute() (*RpmRpmDistributionResponse, *http.Response, error) { + return r.ApiService.DistributionsRpmRpmReadExecute(r) +} + +/* +DistributionsRpmRpmRead Inspect a rpm distribution + +ViewSet for RPM Distributions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmDistributionHref + @return DistributionsRpmAPIDistributionsRpmRpmReadRequest +*/ +func (a *DistributionsRpmAPIService) DistributionsRpmRpmRead(ctx context.Context, rpmRpmDistributionHref string) DistributionsRpmAPIDistributionsRpmRpmReadRequest { + return DistributionsRpmAPIDistributionsRpmRpmReadRequest{ + ApiService: a, + ctx: ctx, + rpmRpmDistributionHref: rpmRpmDistributionHref, + } +} + +// Execute executes the request +// @return RpmRpmDistributionResponse +func (a *DistributionsRpmAPIService) DistributionsRpmRpmReadExecute(r DistributionsRpmAPIDistributionsRpmRpmReadRequest) (*RpmRpmDistributionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmRpmDistributionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsRpmAPIService.DistributionsRpmRpmRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_distribution_href"+"}", parameterValueToString(r.rpmRpmDistributionHref, "rpmRpmDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsRpmAPIDistributionsRpmRpmRemoveRoleRequest struct { + ctx context.Context + ApiService *DistributionsRpmAPIService + rpmRpmDistributionHref string + nestedRole *NestedRole +} + +func (r DistributionsRpmAPIDistributionsRpmRpmRemoveRoleRequest) NestedRole(nestedRole NestedRole) DistributionsRpmAPIDistributionsRpmRpmRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r DistributionsRpmAPIDistributionsRpmRpmRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.DistributionsRpmRpmRemoveRoleExecute(r) +} + +/* +DistributionsRpmRpmRemoveRole Method for DistributionsRpmRpmRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmDistributionHref + @return DistributionsRpmAPIDistributionsRpmRpmRemoveRoleRequest +*/ +func (a *DistributionsRpmAPIService) DistributionsRpmRpmRemoveRole(ctx context.Context, rpmRpmDistributionHref string) DistributionsRpmAPIDistributionsRpmRpmRemoveRoleRequest { + return DistributionsRpmAPIDistributionsRpmRpmRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + rpmRpmDistributionHref: rpmRpmDistributionHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *DistributionsRpmAPIService) DistributionsRpmRpmRemoveRoleExecute(r DistributionsRpmAPIDistributionsRpmRpmRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsRpmAPIService.DistributionsRpmRpmRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_distribution_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_distribution_href"+"}", parameterValueToString(r.rpmRpmDistributionHref, "rpmRpmDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DistributionsRpmAPIDistributionsRpmRpmUpdateRequest struct { + ctx context.Context + ApiService *DistributionsRpmAPIService + rpmRpmDistributionHref string + rpmRpmDistribution *RpmRpmDistribution +} + +func (r DistributionsRpmAPIDistributionsRpmRpmUpdateRequest) RpmRpmDistribution(rpmRpmDistribution RpmRpmDistribution) DistributionsRpmAPIDistributionsRpmRpmUpdateRequest { + r.rpmRpmDistribution = &rpmRpmDistribution + return r +} + +func (r DistributionsRpmAPIDistributionsRpmRpmUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DistributionsRpmRpmUpdateExecute(r) +} + +/* +DistributionsRpmRpmUpdate Update a rpm distribution + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmDistributionHref + @return DistributionsRpmAPIDistributionsRpmRpmUpdateRequest +*/ +func (a *DistributionsRpmAPIService) DistributionsRpmRpmUpdate(ctx context.Context, rpmRpmDistributionHref string) DistributionsRpmAPIDistributionsRpmRpmUpdateRequest { + return DistributionsRpmAPIDistributionsRpmRpmUpdateRequest{ + ApiService: a, + ctx: ctx, + rpmRpmDistributionHref: rpmRpmDistributionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DistributionsRpmAPIService) DistributionsRpmRpmUpdateExecute(r DistributionsRpmAPIDistributionsRpmRpmUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DistributionsRpmAPIService.DistributionsRpmRpmUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_distribution_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_distribution_href"+"}", parameterValueToString(r.rpmRpmDistributionHref, "rpmRpmDistributionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmRpmDistribution == nil { + return localVarReturnValue, nil, reportError("rpmRpmDistribution is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmRpmDistribution + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_docs_api_json.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_docs_api_json.go new file mode 100644 index 0000000000..9d07768416 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_docs_api_json.go @@ -0,0 +1,172 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" +) + + +// DocsApiJsonAPIService DocsApiJsonAPI service +type DocsApiJsonAPIService service + +type DocsApiJsonAPIDocsApiJsonGetRequest struct { + ctx context.Context + ApiService *DocsApiJsonAPIService + lang *string + fields *[]string + excludeFields *[]string +} + +func (r DocsApiJsonAPIDocsApiJsonGetRequest) Lang(lang string) DocsApiJsonAPIDocsApiJsonGetRequest { + r.lang = &lang + return r +} + +// A list of fields to include in the response. +func (r DocsApiJsonAPIDocsApiJsonGetRequest) Fields(fields []string) DocsApiJsonAPIDocsApiJsonGetRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DocsApiJsonAPIDocsApiJsonGetRequest) ExcludeFields(excludeFields []string) DocsApiJsonAPIDocsApiJsonGetRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DocsApiJsonAPIDocsApiJsonGetRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.DocsApiJsonGetExecute(r) +} + +/* +DocsApiJsonGet Method for DocsApiJsonGet + +OpenApi3 schema for this API. Format can be selected via content negotiation. + +- YAML: application/vnd.oai.openapi +- JSON: application/vnd.oai.openapi+json + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DocsApiJsonAPIDocsApiJsonGetRequest +*/ +func (a *DocsApiJsonAPIService) DocsApiJsonGet(ctx context.Context) DocsApiJsonAPIDocsApiJsonGetRequest { + return DocsApiJsonAPIDocsApiJsonGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return map[string]interface{} +func (a *DocsApiJsonAPIService) DocsApiJsonGetExecute(r DocsApiJsonAPIDocsApiJsonGetRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DocsApiJsonAPIService.DocsApiJsonGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/docs/api.json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.lang != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "lang", r.lang, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/vnd.oai.openapi+json", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_docs_api_yaml.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_docs_api_yaml.go new file mode 100644 index 0000000000..3b1198c393 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_docs_api_yaml.go @@ -0,0 +1,172 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" +) + + +// DocsApiYamlAPIService DocsApiYamlAPI service +type DocsApiYamlAPIService service + +type DocsApiYamlAPIDocsApiYamlGetRequest struct { + ctx context.Context + ApiService *DocsApiYamlAPIService + lang *string + fields *[]string + excludeFields *[]string +} + +func (r DocsApiYamlAPIDocsApiYamlGetRequest) Lang(lang string) DocsApiYamlAPIDocsApiYamlGetRequest { + r.lang = &lang + return r +} + +// A list of fields to include in the response. +func (r DocsApiYamlAPIDocsApiYamlGetRequest) Fields(fields []string) DocsApiYamlAPIDocsApiYamlGetRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DocsApiYamlAPIDocsApiYamlGetRequest) ExcludeFields(excludeFields []string) DocsApiYamlAPIDocsApiYamlGetRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DocsApiYamlAPIDocsApiYamlGetRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.DocsApiYamlGetExecute(r) +} + +/* +DocsApiYamlGet Method for DocsApiYamlGet + +OpenApi3 schema for this API. Format can be selected via content negotiation. + +- YAML: application/vnd.oai.openapi +- JSON: application/vnd.oai.openapi+json + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DocsApiYamlAPIDocsApiYamlGetRequest +*/ +func (a *DocsApiYamlAPIService) DocsApiYamlGet(ctx context.Context) DocsApiYamlAPIDocsApiYamlGetRequest { + return DocsApiYamlAPIDocsApiYamlGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return map[string]interface{} +func (a *DocsApiYamlAPIService) DocsApiYamlGetExecute(r DocsApiYamlAPIDocsApiYamlGetRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DocsApiYamlAPIService.DocsApiYamlGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/docs/api.yaml" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.lang != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "lang", r.lang, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/vnd.oai.openapi", "application/yaml"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_domains.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_domains.go new file mode 100644 index 0000000000..8f3d091783 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_domains.go @@ -0,0 +1,847 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// DomainsAPIService DomainsAPI service +type DomainsAPIService service + +type DomainsAPIDomainsCreateRequest struct { + ctx context.Context + ApiService *DomainsAPIService + domain *Domain +} + +func (r DomainsAPIDomainsCreateRequest) Domain(domain Domain) DomainsAPIDomainsCreateRequest { + r.domain = &domain + return r +} + +func (r DomainsAPIDomainsCreateRequest) Execute() (*DomainResponse, *http.Response, error) { + return r.ApiService.DomainsCreateExecute(r) +} + +/* +DomainsCreate Create a domain + +ViewSet for Domain. + +NOTE: This API endpoint is in "tech preview" and subject to change + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DomainsAPIDomainsCreateRequest +*/ +func (a *DomainsAPIService) DomainsCreate(ctx context.Context) DomainsAPIDomainsCreateRequest { + return DomainsAPIDomainsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DomainResponse +func (a *DomainsAPIService) DomainsCreateExecute(r DomainsAPIDomainsCreateRequest) (*DomainResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainsAPIService.DomainsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/domains/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.domain == nil { + return localVarReturnValue, nil, reportError("domain is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.domain + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DomainsAPIDomainsDeleteRequest struct { + ctx context.Context + ApiService *DomainsAPIService + domainHref string +} + +func (r DomainsAPIDomainsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DomainsDeleteExecute(r) +} + +/* +DomainsDelete Delete a domain + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domainHref + @return DomainsAPIDomainsDeleteRequest +*/ +func (a *DomainsAPIService) DomainsDelete(ctx context.Context, domainHref string) DomainsAPIDomainsDeleteRequest { + return DomainsAPIDomainsDeleteRequest{ + ApiService: a, + ctx: ctx, + domainHref: domainHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DomainsAPIService) DomainsDeleteExecute(r DomainsAPIDomainsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainsAPIService.DomainsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{domain_href}" + localVarPath = strings.Replace(localVarPath, "{"+"domain_href"+"}", parameterValueToString(r.domainHref, "domainHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DomainsAPIDomainsListRequest struct { + ctx context.Context + ApiService *DomainsAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r DomainsAPIDomainsListRequest) Limit(limit int32) DomainsAPIDomainsListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r DomainsAPIDomainsListRequest) Name(name string) DomainsAPIDomainsListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r DomainsAPIDomainsListRequest) NameContains(nameContains string) DomainsAPIDomainsListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r DomainsAPIDomainsListRequest) NameIcontains(nameIcontains string) DomainsAPIDomainsListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r DomainsAPIDomainsListRequest) NameIn(nameIn []string) DomainsAPIDomainsListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r DomainsAPIDomainsListRequest) NameStartswith(nameStartswith string) DomainsAPIDomainsListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r DomainsAPIDomainsListRequest) Offset(offset int32) DomainsAPIDomainsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `storage_class` - Storage class * `-storage_class` - Storage class (descending) * `storage_settings` - Storage settings * `-storage_settings` - Storage settings (descending) * `redirect_to_object_storage` - Redirect to object storage * `-redirect_to_object_storage` - Redirect to object storage (descending) * `hide_guarded_distributions` - Hide guarded distributions * `-hide_guarded_distributions` - Hide guarded distributions (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r DomainsAPIDomainsListRequest) Ordering(ordering []string) DomainsAPIDomainsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r DomainsAPIDomainsListRequest) PulpHrefIn(pulpHrefIn []string) DomainsAPIDomainsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r DomainsAPIDomainsListRequest) PulpIdIn(pulpIdIn []string) DomainsAPIDomainsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r DomainsAPIDomainsListRequest) Fields(fields []string) DomainsAPIDomainsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DomainsAPIDomainsListRequest) ExcludeFields(excludeFields []string) DomainsAPIDomainsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DomainsAPIDomainsListRequest) Execute() (*PaginatedDomainResponseList, *http.Response, error) { + return r.ApiService.DomainsListExecute(r) +} + +/* +DomainsList List domains + +ViewSet for Domain. + +NOTE: This API endpoint is in "tech preview" and subject to change + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return DomainsAPIDomainsListRequest +*/ +func (a *DomainsAPIService) DomainsList(ctx context.Context) DomainsAPIDomainsListRequest { + return DomainsAPIDomainsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedDomainResponseList +func (a *DomainsAPIService) DomainsListExecute(r DomainsAPIDomainsListRequest) (*PaginatedDomainResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedDomainResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainsAPIService.DomainsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/domains/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DomainsAPIDomainsPartialUpdateRequest struct { + ctx context.Context + ApiService *DomainsAPIService + domainHref string + patchedDomain *PatchedDomain +} + +func (r DomainsAPIDomainsPartialUpdateRequest) PatchedDomain(patchedDomain PatchedDomain) DomainsAPIDomainsPartialUpdateRequest { + r.patchedDomain = &patchedDomain + return r +} + +func (r DomainsAPIDomainsPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DomainsPartialUpdateExecute(r) +} + +/* +DomainsPartialUpdate Update a domain + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domainHref + @return DomainsAPIDomainsPartialUpdateRequest +*/ +func (a *DomainsAPIService) DomainsPartialUpdate(ctx context.Context, domainHref string) DomainsAPIDomainsPartialUpdateRequest { + return DomainsAPIDomainsPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + domainHref: domainHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DomainsAPIService) DomainsPartialUpdateExecute(r DomainsAPIDomainsPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainsAPIService.DomainsPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{domain_href}" + localVarPath = strings.Replace(localVarPath, "{"+"domain_href"+"}", parameterValueToString(r.domainHref, "domainHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedDomain == nil { + return localVarReturnValue, nil, reportError("patchedDomain is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedDomain + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DomainsAPIDomainsReadRequest struct { + ctx context.Context + ApiService *DomainsAPIService + domainHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r DomainsAPIDomainsReadRequest) Fields(fields []string) DomainsAPIDomainsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r DomainsAPIDomainsReadRequest) ExcludeFields(excludeFields []string) DomainsAPIDomainsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r DomainsAPIDomainsReadRequest) Execute() (*DomainResponse, *http.Response, error) { + return r.ApiService.DomainsReadExecute(r) +} + +/* +DomainsRead Inspect a domain + +ViewSet for Domain. + +NOTE: This API endpoint is in "tech preview" and subject to change + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domainHref + @return DomainsAPIDomainsReadRequest +*/ +func (a *DomainsAPIService) DomainsRead(ctx context.Context, domainHref string) DomainsAPIDomainsReadRequest { + return DomainsAPIDomainsReadRequest{ + ApiService: a, + ctx: ctx, + domainHref: domainHref, + } +} + +// Execute executes the request +// @return DomainResponse +func (a *DomainsAPIService) DomainsReadExecute(r DomainsAPIDomainsReadRequest) (*DomainResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainsAPIService.DomainsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{domain_href}" + localVarPath = strings.Replace(localVarPath, "{"+"domain_href"+"}", parameterValueToString(r.domainHref, "domainHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type DomainsAPIDomainsUpdateRequest struct { + ctx context.Context + ApiService *DomainsAPIService + domainHref string + domain *Domain +} + +func (r DomainsAPIDomainsUpdateRequest) Domain(domain Domain) DomainsAPIDomainsUpdateRequest { + r.domain = &domain + return r +} + +func (r DomainsAPIDomainsUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.DomainsUpdateExecute(r) +} + +/* +DomainsUpdate Update a domain + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domainHref + @return DomainsAPIDomainsUpdateRequest +*/ +func (a *DomainsAPIService) DomainsUpdate(ctx context.Context, domainHref string) DomainsAPIDomainsUpdateRequest { + return DomainsAPIDomainsUpdateRequest{ + ApiService: a, + ctx: ctx, + domainHref: domainHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *DomainsAPIService) DomainsUpdateExecute(r DomainsAPIDomainsUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainsAPIService.DomainsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{domain_href}" + localVarPath = strings.Replace(localVarPath, "{"+"domain_href"+"}", parameterValueToString(r.domainHref, "domainHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.domain == nil { + return localVarReturnValue, nil, reportError("domain is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.domain + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_filesystem.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_filesystem.go new file mode 100644 index 0000000000..bffe501c34 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_filesystem.go @@ -0,0 +1,841 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ExportersFilesystemAPIService ExportersFilesystemAPI service +type ExportersFilesystemAPIService service + +type ExportersFilesystemAPIExportersCoreFilesystemCreateRequest struct { + ctx context.Context + ApiService *ExportersFilesystemAPIService + filesystemExporter *FilesystemExporter +} + +func (r ExportersFilesystemAPIExportersCoreFilesystemCreateRequest) FilesystemExporter(filesystemExporter FilesystemExporter) ExportersFilesystemAPIExportersCoreFilesystemCreateRequest { + r.filesystemExporter = &filesystemExporter + return r +} + +func (r ExportersFilesystemAPIExportersCoreFilesystemCreateRequest) Execute() (*FilesystemExporterResponse, *http.Response, error) { + return r.ApiService.ExportersCoreFilesystemCreateExecute(r) +} + +/* +ExportersCoreFilesystemCreate Create a filesystem exporter + +Endpoint for managing FilesystemExporters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ExportersFilesystemAPIExportersCoreFilesystemCreateRequest +*/ +func (a *ExportersFilesystemAPIService) ExportersCoreFilesystemCreate(ctx context.Context) ExportersFilesystemAPIExportersCoreFilesystemCreateRequest { + return ExportersFilesystemAPIExportersCoreFilesystemCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return FilesystemExporterResponse +func (a *ExportersFilesystemAPIService) ExportersCoreFilesystemCreateExecute(r ExportersFilesystemAPIExportersCoreFilesystemCreateRequest) (*FilesystemExporterResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FilesystemExporterResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersFilesystemAPIService.ExportersCoreFilesystemCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/exporters/core/filesystem/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.filesystemExporter == nil { + return localVarReturnValue, nil, reportError("filesystemExporter is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.filesystemExporter + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersFilesystemAPIExportersCoreFilesystemDeleteRequest struct { + ctx context.Context + ApiService *ExportersFilesystemAPIService + filesystemExporterHref string +} + +func (r ExportersFilesystemAPIExportersCoreFilesystemDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ExportersCoreFilesystemDeleteExecute(r) +} + +/* +ExportersCoreFilesystemDelete Delete a filesystem exporter + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param filesystemExporterHref + @return ExportersFilesystemAPIExportersCoreFilesystemDeleteRequest +*/ +func (a *ExportersFilesystemAPIService) ExportersCoreFilesystemDelete(ctx context.Context, filesystemExporterHref string) ExportersFilesystemAPIExportersCoreFilesystemDeleteRequest { + return ExportersFilesystemAPIExportersCoreFilesystemDeleteRequest{ + ApiService: a, + ctx: ctx, + filesystemExporterHref: filesystemExporterHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ExportersFilesystemAPIService) ExportersCoreFilesystemDeleteExecute(r ExportersFilesystemAPIExportersCoreFilesystemDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersFilesystemAPIService.ExportersCoreFilesystemDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{filesystem_exporter_href}" + localVarPath = strings.Replace(localVarPath, "{"+"filesystem_exporter_href"+"}", parameterValueToString(r.filesystemExporterHref, "filesystemExporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersFilesystemAPIExportersCoreFilesystemListRequest struct { + ctx context.Context + ApiService *ExportersFilesystemAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ExportersFilesystemAPIExportersCoreFilesystemListRequest) Limit(limit int32) ExportersFilesystemAPIExportersCoreFilesystemListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ExportersFilesystemAPIExportersCoreFilesystemListRequest) Name(name string) ExportersFilesystemAPIExportersCoreFilesystemListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ExportersFilesystemAPIExportersCoreFilesystemListRequest) NameContains(nameContains string) ExportersFilesystemAPIExportersCoreFilesystemListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r ExportersFilesystemAPIExportersCoreFilesystemListRequest) NameIcontains(nameIcontains string) ExportersFilesystemAPIExportersCoreFilesystemListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ExportersFilesystemAPIExportersCoreFilesystemListRequest) NameIn(nameIn []string) ExportersFilesystemAPIExportersCoreFilesystemListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r ExportersFilesystemAPIExportersCoreFilesystemListRequest) NameStartswith(nameStartswith string) ExportersFilesystemAPIExportersCoreFilesystemListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ExportersFilesystemAPIExportersCoreFilesystemListRequest) Offset(offset int32) ExportersFilesystemAPIExportersCoreFilesystemListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `path` - Path * `-path` - Path (descending) * `method` - Method * `-method` - Method (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ExportersFilesystemAPIExportersCoreFilesystemListRequest) Ordering(ordering []string) ExportersFilesystemAPIExportersCoreFilesystemListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ExportersFilesystemAPIExportersCoreFilesystemListRequest) PulpHrefIn(pulpHrefIn []string) ExportersFilesystemAPIExportersCoreFilesystemListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ExportersFilesystemAPIExportersCoreFilesystemListRequest) PulpIdIn(pulpIdIn []string) ExportersFilesystemAPIExportersCoreFilesystemListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r ExportersFilesystemAPIExportersCoreFilesystemListRequest) Fields(fields []string) ExportersFilesystemAPIExportersCoreFilesystemListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ExportersFilesystemAPIExportersCoreFilesystemListRequest) ExcludeFields(excludeFields []string) ExportersFilesystemAPIExportersCoreFilesystemListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ExportersFilesystemAPIExportersCoreFilesystemListRequest) Execute() (*PaginatedFilesystemExporterResponseList, *http.Response, error) { + return r.ApiService.ExportersCoreFilesystemListExecute(r) +} + +/* +ExportersCoreFilesystemList List filesystem exporters + +Endpoint for managing FilesystemExporters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ExportersFilesystemAPIExportersCoreFilesystemListRequest +*/ +func (a *ExportersFilesystemAPIService) ExportersCoreFilesystemList(ctx context.Context) ExportersFilesystemAPIExportersCoreFilesystemListRequest { + return ExportersFilesystemAPIExportersCoreFilesystemListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedFilesystemExporterResponseList +func (a *ExportersFilesystemAPIService) ExportersCoreFilesystemListExecute(r ExportersFilesystemAPIExportersCoreFilesystemListRequest) (*PaginatedFilesystemExporterResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedFilesystemExporterResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersFilesystemAPIService.ExportersCoreFilesystemList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/exporters/core/filesystem/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersFilesystemAPIExportersCoreFilesystemPartialUpdateRequest struct { + ctx context.Context + ApiService *ExportersFilesystemAPIService + filesystemExporterHref string + patchedFilesystemExporter *PatchedFilesystemExporter +} + +func (r ExportersFilesystemAPIExportersCoreFilesystemPartialUpdateRequest) PatchedFilesystemExporter(patchedFilesystemExporter PatchedFilesystemExporter) ExportersFilesystemAPIExportersCoreFilesystemPartialUpdateRequest { + r.patchedFilesystemExporter = &patchedFilesystemExporter + return r +} + +func (r ExportersFilesystemAPIExportersCoreFilesystemPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ExportersCoreFilesystemPartialUpdateExecute(r) +} + +/* +ExportersCoreFilesystemPartialUpdate Update a filesystem exporter + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param filesystemExporterHref + @return ExportersFilesystemAPIExportersCoreFilesystemPartialUpdateRequest +*/ +func (a *ExportersFilesystemAPIService) ExportersCoreFilesystemPartialUpdate(ctx context.Context, filesystemExporterHref string) ExportersFilesystemAPIExportersCoreFilesystemPartialUpdateRequest { + return ExportersFilesystemAPIExportersCoreFilesystemPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + filesystemExporterHref: filesystemExporterHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ExportersFilesystemAPIService) ExportersCoreFilesystemPartialUpdateExecute(r ExportersFilesystemAPIExportersCoreFilesystemPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersFilesystemAPIService.ExportersCoreFilesystemPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{filesystem_exporter_href}" + localVarPath = strings.Replace(localVarPath, "{"+"filesystem_exporter_href"+"}", parameterValueToString(r.filesystemExporterHref, "filesystemExporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedFilesystemExporter == nil { + return localVarReturnValue, nil, reportError("patchedFilesystemExporter is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedFilesystemExporter + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersFilesystemAPIExportersCoreFilesystemReadRequest struct { + ctx context.Context + ApiService *ExportersFilesystemAPIService + filesystemExporterHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ExportersFilesystemAPIExportersCoreFilesystemReadRequest) Fields(fields []string) ExportersFilesystemAPIExportersCoreFilesystemReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ExportersFilesystemAPIExportersCoreFilesystemReadRequest) ExcludeFields(excludeFields []string) ExportersFilesystemAPIExportersCoreFilesystemReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ExportersFilesystemAPIExportersCoreFilesystemReadRequest) Execute() (*FilesystemExporterResponse, *http.Response, error) { + return r.ApiService.ExportersCoreFilesystemReadExecute(r) +} + +/* +ExportersCoreFilesystemRead Inspect a filesystem exporter + +Endpoint for managing FilesystemExporters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param filesystemExporterHref + @return ExportersFilesystemAPIExportersCoreFilesystemReadRequest +*/ +func (a *ExportersFilesystemAPIService) ExportersCoreFilesystemRead(ctx context.Context, filesystemExporterHref string) ExportersFilesystemAPIExportersCoreFilesystemReadRequest { + return ExportersFilesystemAPIExportersCoreFilesystemReadRequest{ + ApiService: a, + ctx: ctx, + filesystemExporterHref: filesystemExporterHref, + } +} + +// Execute executes the request +// @return FilesystemExporterResponse +func (a *ExportersFilesystemAPIService) ExportersCoreFilesystemReadExecute(r ExportersFilesystemAPIExportersCoreFilesystemReadRequest) (*FilesystemExporterResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FilesystemExporterResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersFilesystemAPIService.ExportersCoreFilesystemRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{filesystem_exporter_href}" + localVarPath = strings.Replace(localVarPath, "{"+"filesystem_exporter_href"+"}", parameterValueToString(r.filesystemExporterHref, "filesystemExporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersFilesystemAPIExportersCoreFilesystemUpdateRequest struct { + ctx context.Context + ApiService *ExportersFilesystemAPIService + filesystemExporterHref string + filesystemExporter *FilesystemExporter +} + +func (r ExportersFilesystemAPIExportersCoreFilesystemUpdateRequest) FilesystemExporter(filesystemExporter FilesystemExporter) ExportersFilesystemAPIExportersCoreFilesystemUpdateRequest { + r.filesystemExporter = &filesystemExporter + return r +} + +func (r ExportersFilesystemAPIExportersCoreFilesystemUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ExportersCoreFilesystemUpdateExecute(r) +} + +/* +ExportersCoreFilesystemUpdate Update a filesystem exporter + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param filesystemExporterHref + @return ExportersFilesystemAPIExportersCoreFilesystemUpdateRequest +*/ +func (a *ExportersFilesystemAPIService) ExportersCoreFilesystemUpdate(ctx context.Context, filesystemExporterHref string) ExportersFilesystemAPIExportersCoreFilesystemUpdateRequest { + return ExportersFilesystemAPIExportersCoreFilesystemUpdateRequest{ + ApiService: a, + ctx: ctx, + filesystemExporterHref: filesystemExporterHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ExportersFilesystemAPIService) ExportersCoreFilesystemUpdateExecute(r ExportersFilesystemAPIExportersCoreFilesystemUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersFilesystemAPIService.ExportersCoreFilesystemUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{filesystem_exporter_href}" + localVarPath = strings.Replace(localVarPath, "{"+"filesystem_exporter_href"+"}", parameterValueToString(r.filesystemExporterHref, "filesystemExporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.filesystemExporter == nil { + return localVarReturnValue, nil, reportError("filesystemExporter is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.filesystemExporter + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_filesystem_exports.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_filesystem_exports.go new file mode 100644 index 0000000000..c2e97f5b46 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_filesystem_exports.go @@ -0,0 +1,530 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ExportersFilesystemExportsAPIService ExportersFilesystemExportsAPI service +type ExportersFilesystemExportsAPIService service + +type ExportersFilesystemExportsAPIExportersCoreFilesystemExportsCreateRequest struct { + ctx context.Context + ApiService *ExportersFilesystemExportsAPIService + filesystemExporterHref string + filesystemExport *FilesystemExport +} + +func (r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsCreateRequest) FilesystemExport(filesystemExport FilesystemExport) ExportersFilesystemExportsAPIExportersCoreFilesystemExportsCreateRequest { + r.filesystemExport = &filesystemExport + return r +} + +func (r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ExportersCoreFilesystemExportsCreateExecute(r) +} + +/* +ExportersCoreFilesystemExportsCreate Create a filesystem export + +Trigger an asynchronous task to export files to the filesystem + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param filesystemExporterHref + @return ExportersFilesystemExportsAPIExportersCoreFilesystemExportsCreateRequest +*/ +func (a *ExportersFilesystemExportsAPIService) ExportersCoreFilesystemExportsCreate(ctx context.Context, filesystemExporterHref string) ExportersFilesystemExportsAPIExportersCoreFilesystemExportsCreateRequest { + return ExportersFilesystemExportsAPIExportersCoreFilesystemExportsCreateRequest{ + ApiService: a, + ctx: ctx, + filesystemExporterHref: filesystemExporterHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ExportersFilesystemExportsAPIService) ExportersCoreFilesystemExportsCreateExecute(r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersFilesystemExportsAPIService.ExportersCoreFilesystemExportsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{filesystem_exporter_href}exports/" + localVarPath = strings.Replace(localVarPath, "{"+"filesystem_exporter_href"+"}", parameterValueToString(r.filesystemExporterHref, "filesystemExporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.filesystemExport == nil { + return localVarReturnValue, nil, reportError("filesystemExport is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.filesystemExport + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersFilesystemExportsAPIExportersCoreFilesystemExportsDeleteRequest struct { + ctx context.Context + ApiService *ExportersFilesystemExportsAPIService + filesystemFilesystemExportHref string +} + +func (r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ExportersCoreFilesystemExportsDeleteExecute(r) +} + +/* +ExportersCoreFilesystemExportsDelete Delete a filesystem export + +Endpoint for managing FilesystemExports. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param filesystemFilesystemExportHref + @return ExportersFilesystemExportsAPIExportersCoreFilesystemExportsDeleteRequest +*/ +func (a *ExportersFilesystemExportsAPIService) ExportersCoreFilesystemExportsDelete(ctx context.Context, filesystemFilesystemExportHref string) ExportersFilesystemExportsAPIExportersCoreFilesystemExportsDeleteRequest { + return ExportersFilesystemExportsAPIExportersCoreFilesystemExportsDeleteRequest{ + ApiService: a, + ctx: ctx, + filesystemFilesystemExportHref: filesystemFilesystemExportHref, + } +} + +// Execute executes the request +func (a *ExportersFilesystemExportsAPIService) ExportersCoreFilesystemExportsDeleteExecute(r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersFilesystemExportsAPIService.ExportersCoreFilesystemExportsDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{filesystem_filesystem_export_href}" + localVarPath = strings.Replace(localVarPath, "{"+"filesystem_filesystem_export_href"+"}", parameterValueToString(r.filesystemFilesystemExportHref, "filesystemFilesystemExportHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest struct { + ctx context.Context + ApiService *ExportersFilesystemExportsAPIService + filesystemExporterHref string + limit *int32 + offset *int32 + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest) Limit(limit int32) ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest) Offset(offset int32) ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest { + r.offset = &offset + return r +} + +// A list of fields to include in the response. +func (r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest) Fields(fields []string) ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest) ExcludeFields(excludeFields []string) ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest) Execute() (*PaginatedFilesystemExportResponseList, *http.Response, error) { + return r.ApiService.ExportersCoreFilesystemExportsListExecute(r) +} + +/* +ExportersCoreFilesystemExportsList List filesystem exports + +Endpoint for managing FilesystemExports. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param filesystemExporterHref + @return ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest +*/ +func (a *ExportersFilesystemExportsAPIService) ExportersCoreFilesystemExportsList(ctx context.Context, filesystemExporterHref string) ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest { + return ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest{ + ApiService: a, + ctx: ctx, + filesystemExporterHref: filesystemExporterHref, + } +} + +// Execute executes the request +// @return PaginatedFilesystemExportResponseList +func (a *ExportersFilesystemExportsAPIService) ExportersCoreFilesystemExportsListExecute(r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsListRequest) (*PaginatedFilesystemExportResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedFilesystemExportResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersFilesystemExportsAPIService.ExportersCoreFilesystemExportsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{filesystem_exporter_href}exports/" + localVarPath = strings.Replace(localVarPath, "{"+"filesystem_exporter_href"+"}", parameterValueToString(r.filesystemExporterHref, "filesystemExporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersFilesystemExportsAPIExportersCoreFilesystemExportsReadRequest struct { + ctx context.Context + ApiService *ExportersFilesystemExportsAPIService + filesystemFilesystemExportHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsReadRequest) Fields(fields []string) ExportersFilesystemExportsAPIExportersCoreFilesystemExportsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsReadRequest) ExcludeFields(excludeFields []string) ExportersFilesystemExportsAPIExportersCoreFilesystemExportsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsReadRequest) Execute() (*FilesystemExportResponse, *http.Response, error) { + return r.ApiService.ExportersCoreFilesystemExportsReadExecute(r) +} + +/* +ExportersCoreFilesystemExportsRead Inspect a filesystem export + +Endpoint for managing FilesystemExports. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param filesystemFilesystemExportHref + @return ExportersFilesystemExportsAPIExportersCoreFilesystemExportsReadRequest +*/ +func (a *ExportersFilesystemExportsAPIService) ExportersCoreFilesystemExportsRead(ctx context.Context, filesystemFilesystemExportHref string) ExportersFilesystemExportsAPIExportersCoreFilesystemExportsReadRequest { + return ExportersFilesystemExportsAPIExportersCoreFilesystemExportsReadRequest{ + ApiService: a, + ctx: ctx, + filesystemFilesystemExportHref: filesystemFilesystemExportHref, + } +} + +// Execute executes the request +// @return FilesystemExportResponse +func (a *ExportersFilesystemExportsAPIService) ExportersCoreFilesystemExportsReadExecute(r ExportersFilesystemExportsAPIExportersCoreFilesystemExportsReadRequest) (*FilesystemExportResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FilesystemExportResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersFilesystemExportsAPIService.ExportersCoreFilesystemExportsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{filesystem_filesystem_export_href}" + localVarPath = strings.Replace(localVarPath, "{"+"filesystem_filesystem_export_href"+"}", parameterValueToString(r.filesystemFilesystemExportHref, "filesystemFilesystemExportHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_pulp.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_pulp.go new file mode 100644 index 0000000000..c2cf7723ee --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_pulp.go @@ -0,0 +1,841 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ExportersPulpAPIService ExportersPulpAPI service +type ExportersPulpAPIService service + +type ExportersPulpAPIExportersCorePulpCreateRequest struct { + ctx context.Context + ApiService *ExportersPulpAPIService + pulpExporter *PulpExporter +} + +func (r ExportersPulpAPIExportersCorePulpCreateRequest) PulpExporter(pulpExporter PulpExporter) ExportersPulpAPIExportersCorePulpCreateRequest { + r.pulpExporter = &pulpExporter + return r +} + +func (r ExportersPulpAPIExportersCorePulpCreateRequest) Execute() (*PulpExporterResponse, *http.Response, error) { + return r.ApiService.ExportersCorePulpCreateExecute(r) +} + +/* +ExportersCorePulpCreate Create a pulp exporter + +ViewSet for viewing PulpExporters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ExportersPulpAPIExportersCorePulpCreateRequest +*/ +func (a *ExportersPulpAPIService) ExportersCorePulpCreate(ctx context.Context) ExportersPulpAPIExportersCorePulpCreateRequest { + return ExportersPulpAPIExportersCorePulpCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PulpExporterResponse +func (a *ExportersPulpAPIService) ExportersCorePulpCreateExecute(r ExportersPulpAPIExportersCorePulpCreateRequest) (*PulpExporterResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PulpExporterResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersPulpAPIService.ExportersCorePulpCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/exporters/core/pulp/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pulpExporter == nil { + return localVarReturnValue, nil, reportError("pulpExporter is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pulpExporter + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersPulpAPIExportersCorePulpDeleteRequest struct { + ctx context.Context + ApiService *ExportersPulpAPIService + pulpExporterHref string +} + +func (r ExportersPulpAPIExportersCorePulpDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ExportersCorePulpDeleteExecute(r) +} + +/* +ExportersCorePulpDelete Delete a pulp exporter + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpExporterHref + @return ExportersPulpAPIExportersCorePulpDeleteRequest +*/ +func (a *ExportersPulpAPIService) ExportersCorePulpDelete(ctx context.Context, pulpExporterHref string) ExportersPulpAPIExportersCorePulpDeleteRequest { + return ExportersPulpAPIExportersCorePulpDeleteRequest{ + ApiService: a, + ctx: ctx, + pulpExporterHref: pulpExporterHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ExportersPulpAPIService) ExportersCorePulpDeleteExecute(r ExportersPulpAPIExportersCorePulpDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersPulpAPIService.ExportersCorePulpDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_exporter_href}" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_exporter_href"+"}", parameterValueToString(r.pulpExporterHref, "pulpExporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersPulpAPIExportersCorePulpListRequest struct { + ctx context.Context + ApiService *ExportersPulpAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ExportersPulpAPIExportersCorePulpListRequest) Limit(limit int32) ExportersPulpAPIExportersCorePulpListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ExportersPulpAPIExportersCorePulpListRequest) Name(name string) ExportersPulpAPIExportersCorePulpListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ExportersPulpAPIExportersCorePulpListRequest) NameContains(nameContains string) ExportersPulpAPIExportersCorePulpListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r ExportersPulpAPIExportersCorePulpListRequest) NameIcontains(nameIcontains string) ExportersPulpAPIExportersCorePulpListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ExportersPulpAPIExportersCorePulpListRequest) NameIn(nameIn []string) ExportersPulpAPIExportersCorePulpListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r ExportersPulpAPIExportersCorePulpListRequest) NameStartswith(nameStartswith string) ExportersPulpAPIExportersCorePulpListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ExportersPulpAPIExportersCorePulpListRequest) Offset(offset int32) ExportersPulpAPIExportersCorePulpListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `path` - Path * `-path` - Path (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ExportersPulpAPIExportersCorePulpListRequest) Ordering(ordering []string) ExportersPulpAPIExportersCorePulpListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ExportersPulpAPIExportersCorePulpListRequest) PulpHrefIn(pulpHrefIn []string) ExportersPulpAPIExportersCorePulpListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ExportersPulpAPIExportersCorePulpListRequest) PulpIdIn(pulpIdIn []string) ExportersPulpAPIExportersCorePulpListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r ExportersPulpAPIExportersCorePulpListRequest) Fields(fields []string) ExportersPulpAPIExportersCorePulpListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ExportersPulpAPIExportersCorePulpListRequest) ExcludeFields(excludeFields []string) ExportersPulpAPIExportersCorePulpListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ExportersPulpAPIExportersCorePulpListRequest) Execute() (*PaginatedPulpExporterResponseList, *http.Response, error) { + return r.ApiService.ExportersCorePulpListExecute(r) +} + +/* +ExportersCorePulpList List pulp exporters + +ViewSet for viewing PulpExporters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ExportersPulpAPIExportersCorePulpListRequest +*/ +func (a *ExportersPulpAPIService) ExportersCorePulpList(ctx context.Context) ExportersPulpAPIExportersCorePulpListRequest { + return ExportersPulpAPIExportersCorePulpListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedPulpExporterResponseList +func (a *ExportersPulpAPIService) ExportersCorePulpListExecute(r ExportersPulpAPIExportersCorePulpListRequest) (*PaginatedPulpExporterResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedPulpExporterResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersPulpAPIService.ExportersCorePulpList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/exporters/core/pulp/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersPulpAPIExportersCorePulpPartialUpdateRequest struct { + ctx context.Context + ApiService *ExportersPulpAPIService + pulpExporterHref string + patchedPulpExporter *PatchedPulpExporter +} + +func (r ExportersPulpAPIExportersCorePulpPartialUpdateRequest) PatchedPulpExporter(patchedPulpExporter PatchedPulpExporter) ExportersPulpAPIExportersCorePulpPartialUpdateRequest { + r.patchedPulpExporter = &patchedPulpExporter + return r +} + +func (r ExportersPulpAPIExportersCorePulpPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ExportersCorePulpPartialUpdateExecute(r) +} + +/* +ExportersCorePulpPartialUpdate Update a pulp exporter + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpExporterHref + @return ExportersPulpAPIExportersCorePulpPartialUpdateRequest +*/ +func (a *ExportersPulpAPIService) ExportersCorePulpPartialUpdate(ctx context.Context, pulpExporterHref string) ExportersPulpAPIExportersCorePulpPartialUpdateRequest { + return ExportersPulpAPIExportersCorePulpPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + pulpExporterHref: pulpExporterHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ExportersPulpAPIService) ExportersCorePulpPartialUpdateExecute(r ExportersPulpAPIExportersCorePulpPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersPulpAPIService.ExportersCorePulpPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_exporter_href}" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_exporter_href"+"}", parameterValueToString(r.pulpExporterHref, "pulpExporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedPulpExporter == nil { + return localVarReturnValue, nil, reportError("patchedPulpExporter is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedPulpExporter + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersPulpAPIExportersCorePulpReadRequest struct { + ctx context.Context + ApiService *ExportersPulpAPIService + pulpExporterHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ExportersPulpAPIExportersCorePulpReadRequest) Fields(fields []string) ExportersPulpAPIExportersCorePulpReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ExportersPulpAPIExportersCorePulpReadRequest) ExcludeFields(excludeFields []string) ExportersPulpAPIExportersCorePulpReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ExportersPulpAPIExportersCorePulpReadRequest) Execute() (*PulpExporterResponse, *http.Response, error) { + return r.ApiService.ExportersCorePulpReadExecute(r) +} + +/* +ExportersCorePulpRead Inspect a pulp exporter + +ViewSet for viewing PulpExporters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpExporterHref + @return ExportersPulpAPIExportersCorePulpReadRequest +*/ +func (a *ExportersPulpAPIService) ExportersCorePulpRead(ctx context.Context, pulpExporterHref string) ExportersPulpAPIExportersCorePulpReadRequest { + return ExportersPulpAPIExportersCorePulpReadRequest{ + ApiService: a, + ctx: ctx, + pulpExporterHref: pulpExporterHref, + } +} + +// Execute executes the request +// @return PulpExporterResponse +func (a *ExportersPulpAPIService) ExportersCorePulpReadExecute(r ExportersPulpAPIExportersCorePulpReadRequest) (*PulpExporterResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PulpExporterResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersPulpAPIService.ExportersCorePulpRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_exporter_href}" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_exporter_href"+"}", parameterValueToString(r.pulpExporterHref, "pulpExporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersPulpAPIExportersCorePulpUpdateRequest struct { + ctx context.Context + ApiService *ExportersPulpAPIService + pulpExporterHref string + pulpExporter *PulpExporter +} + +func (r ExportersPulpAPIExportersCorePulpUpdateRequest) PulpExporter(pulpExporter PulpExporter) ExportersPulpAPIExportersCorePulpUpdateRequest { + r.pulpExporter = &pulpExporter + return r +} + +func (r ExportersPulpAPIExportersCorePulpUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ExportersCorePulpUpdateExecute(r) +} + +/* +ExportersCorePulpUpdate Update a pulp exporter + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpExporterHref + @return ExportersPulpAPIExportersCorePulpUpdateRequest +*/ +func (a *ExportersPulpAPIService) ExportersCorePulpUpdate(ctx context.Context, pulpExporterHref string) ExportersPulpAPIExportersCorePulpUpdateRequest { + return ExportersPulpAPIExportersCorePulpUpdateRequest{ + ApiService: a, + ctx: ctx, + pulpExporterHref: pulpExporterHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ExportersPulpAPIService) ExportersCorePulpUpdateExecute(r ExportersPulpAPIExportersCorePulpUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersPulpAPIService.ExportersCorePulpUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_exporter_href}" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_exporter_href"+"}", parameterValueToString(r.pulpExporterHref, "pulpExporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pulpExporter == nil { + return localVarReturnValue, nil, reportError("pulpExporter is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pulpExporter + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_pulp_exports.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_pulp_exports.go new file mode 100644 index 0000000000..30ff31f81b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_exporters_pulp_exports.go @@ -0,0 +1,530 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ExportersPulpExportsAPIService ExportersPulpExportsAPI service +type ExportersPulpExportsAPIService service + +type ExportersPulpExportsAPIExportersCorePulpExportsCreateRequest struct { + ctx context.Context + ApiService *ExportersPulpExportsAPIService + pulpExporterHref string + pulpExport *PulpExport +} + +func (r ExportersPulpExportsAPIExportersCorePulpExportsCreateRequest) PulpExport(pulpExport PulpExport) ExportersPulpExportsAPIExportersCorePulpExportsCreateRequest { + r.pulpExport = &pulpExport + return r +} + +func (r ExportersPulpExportsAPIExportersCorePulpExportsCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.ExportersCorePulpExportsCreateExecute(r) +} + +/* +ExportersCorePulpExportsCreate Create a pulp export + +Trigger an asynchronous task to export a set of repositories + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpExporterHref + @return ExportersPulpExportsAPIExportersCorePulpExportsCreateRequest +*/ +func (a *ExportersPulpExportsAPIService) ExportersCorePulpExportsCreate(ctx context.Context, pulpExporterHref string) ExportersPulpExportsAPIExportersCorePulpExportsCreateRequest { + return ExportersPulpExportsAPIExportersCorePulpExportsCreateRequest{ + ApiService: a, + ctx: ctx, + pulpExporterHref: pulpExporterHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *ExportersPulpExportsAPIService) ExportersCorePulpExportsCreateExecute(r ExportersPulpExportsAPIExportersCorePulpExportsCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersPulpExportsAPIService.ExportersCorePulpExportsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_exporter_href}exports/" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_exporter_href"+"}", parameterValueToString(r.pulpExporterHref, "pulpExporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pulpExport == nil { + return localVarReturnValue, nil, reportError("pulpExport is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pulpExport + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersPulpExportsAPIExportersCorePulpExportsDeleteRequest struct { + ctx context.Context + ApiService *ExportersPulpExportsAPIService + pulpPulpExportHref string +} + +func (r ExportersPulpExportsAPIExportersCorePulpExportsDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ExportersCorePulpExportsDeleteExecute(r) +} + +/* +ExportersCorePulpExportsDelete Delete a pulp export + +ViewSet for viewing exports from a PulpExporter. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpPulpExportHref + @return ExportersPulpExportsAPIExportersCorePulpExportsDeleteRequest +*/ +func (a *ExportersPulpExportsAPIService) ExportersCorePulpExportsDelete(ctx context.Context, pulpPulpExportHref string) ExportersPulpExportsAPIExportersCorePulpExportsDeleteRequest { + return ExportersPulpExportsAPIExportersCorePulpExportsDeleteRequest{ + ApiService: a, + ctx: ctx, + pulpPulpExportHref: pulpPulpExportHref, + } +} + +// Execute executes the request +func (a *ExportersPulpExportsAPIService) ExportersCorePulpExportsDeleteExecute(r ExportersPulpExportsAPIExportersCorePulpExportsDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersPulpExportsAPIService.ExportersCorePulpExportsDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_pulp_export_href}" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_pulp_export_href"+"}", parameterValueToString(r.pulpPulpExportHref, "pulpPulpExportHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ExportersPulpExportsAPIExportersCorePulpExportsListRequest struct { + ctx context.Context + ApiService *ExportersPulpExportsAPIService + pulpExporterHref string + limit *int32 + offset *int32 + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ExportersPulpExportsAPIExportersCorePulpExportsListRequest) Limit(limit int32) ExportersPulpExportsAPIExportersCorePulpExportsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ExportersPulpExportsAPIExportersCorePulpExportsListRequest) Offset(offset int32) ExportersPulpExportsAPIExportersCorePulpExportsListRequest { + r.offset = &offset + return r +} + +// A list of fields to include in the response. +func (r ExportersPulpExportsAPIExportersCorePulpExportsListRequest) Fields(fields []string) ExportersPulpExportsAPIExportersCorePulpExportsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ExportersPulpExportsAPIExportersCorePulpExportsListRequest) ExcludeFields(excludeFields []string) ExportersPulpExportsAPIExportersCorePulpExportsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ExportersPulpExportsAPIExportersCorePulpExportsListRequest) Execute() (*PaginatedPulpExportResponseList, *http.Response, error) { + return r.ApiService.ExportersCorePulpExportsListExecute(r) +} + +/* +ExportersCorePulpExportsList List pulp exports + +ViewSet for viewing exports from a PulpExporter. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpExporterHref + @return ExportersPulpExportsAPIExportersCorePulpExportsListRequest +*/ +func (a *ExportersPulpExportsAPIService) ExportersCorePulpExportsList(ctx context.Context, pulpExporterHref string) ExportersPulpExportsAPIExportersCorePulpExportsListRequest { + return ExportersPulpExportsAPIExportersCorePulpExportsListRequest{ + ApiService: a, + ctx: ctx, + pulpExporterHref: pulpExporterHref, + } +} + +// Execute executes the request +// @return PaginatedPulpExportResponseList +func (a *ExportersPulpExportsAPIService) ExportersCorePulpExportsListExecute(r ExportersPulpExportsAPIExportersCorePulpExportsListRequest) (*PaginatedPulpExportResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedPulpExportResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersPulpExportsAPIService.ExportersCorePulpExportsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_exporter_href}exports/" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_exporter_href"+"}", parameterValueToString(r.pulpExporterHref, "pulpExporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ExportersPulpExportsAPIExportersCorePulpExportsReadRequest struct { + ctx context.Context + ApiService *ExportersPulpExportsAPIService + pulpPulpExportHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ExportersPulpExportsAPIExportersCorePulpExportsReadRequest) Fields(fields []string) ExportersPulpExportsAPIExportersCorePulpExportsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ExportersPulpExportsAPIExportersCorePulpExportsReadRequest) ExcludeFields(excludeFields []string) ExportersPulpExportsAPIExportersCorePulpExportsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ExportersPulpExportsAPIExportersCorePulpExportsReadRequest) Execute() (*PulpExportResponse, *http.Response, error) { + return r.ApiService.ExportersCorePulpExportsReadExecute(r) +} + +/* +ExportersCorePulpExportsRead Inspect a pulp export + +ViewSet for viewing exports from a PulpExporter. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpPulpExportHref + @return ExportersPulpExportsAPIExportersCorePulpExportsReadRequest +*/ +func (a *ExportersPulpExportsAPIService) ExportersCorePulpExportsRead(ctx context.Context, pulpPulpExportHref string) ExportersPulpExportsAPIExportersCorePulpExportsReadRequest { + return ExportersPulpExportsAPIExportersCorePulpExportsReadRequest{ + ApiService: a, + ctx: ctx, + pulpPulpExportHref: pulpPulpExportHref, + } +} + +// Execute executes the request +// @return PulpExportResponse +func (a *ExportersPulpExportsAPIService) ExportersCorePulpExportsReadExecute(r ExportersPulpExportsAPIExportersCorePulpExportsReadRequest) (*PulpExportResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PulpExportResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ExportersPulpExportsAPIService.ExportersCorePulpExportsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_pulp_export_href}" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_pulp_export_href"+"}", parameterValueToString(r.pulpPulpExportHref, "pulpPulpExportHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_galaxy_detail.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_galaxy_detail.go new file mode 100644 index 0000000000..da97b7815e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_galaxy_detail.go @@ -0,0 +1,165 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// GalaxyDetailAPIService GalaxyDetailAPI service +type GalaxyDetailAPIService service + +type GalaxyDetailAPIGalaxyCollectionDetailGetRequest struct { + ctx context.Context + ApiService *GalaxyDetailAPIService + ansibleCollectionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r GalaxyDetailAPIGalaxyCollectionDetailGetRequest) Fields(fields []string) GalaxyDetailAPIGalaxyCollectionDetailGetRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r GalaxyDetailAPIGalaxyCollectionDetailGetRequest) ExcludeFields(excludeFields []string) GalaxyDetailAPIGalaxyCollectionDetailGetRequest { + r.excludeFields = &excludeFields + return r +} + +func (r GalaxyDetailAPIGalaxyCollectionDetailGetRequest) Execute() (*GalaxyCollectionResponse, *http.Response, error) { + return r.ApiService.GalaxyCollectionDetailGetExecute(r) +} + +/* +GalaxyCollectionDetailGet Method for GalaxyCollectionDetailGet + +Get the detail view of a Collection. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionHref + @return GalaxyDetailAPIGalaxyCollectionDetailGetRequest +*/ +func (a *GalaxyDetailAPIService) GalaxyCollectionDetailGet(ctx context.Context, ansibleCollectionHref string) GalaxyDetailAPIGalaxyCollectionDetailGetRequest { + return GalaxyDetailAPIGalaxyCollectionDetailGetRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionHref: ansibleCollectionHref, + } +} + +// Execute executes the request +// @return GalaxyCollectionResponse +func (a *GalaxyDetailAPIService) GalaxyCollectionDetailGetExecute(r GalaxyDetailAPIGalaxyCollectionDetailGetRequest) (*GalaxyCollectionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GalaxyCollectionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GalaxyDetailAPIService.GalaxyCollectionDetailGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_href"+"}", parameterValueToString(r.ansibleCollectionHref, "ansibleCollectionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_groups.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_groups.go new file mode 100644 index 0000000000..ac395d8fc4 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_groups.go @@ -0,0 +1,1356 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// GroupsAPIService GroupsAPI service +type GroupsAPIService service + +type GroupsAPIGroupsAddRoleRequest struct { + ctx context.Context + ApiService *GroupsAPIService + groupHref string + nestedRole *NestedRole +} + +func (r GroupsAPIGroupsAddRoleRequest) NestedRole(nestedRole NestedRole) GroupsAPIGroupsAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r GroupsAPIGroupsAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.GroupsAddRoleExecute(r) +} + +/* +GroupsAddRole Method for GroupsAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupHref + @return GroupsAPIGroupsAddRoleRequest +*/ +func (a *GroupsAPIService) GroupsAddRole(ctx context.Context, groupHref string) GroupsAPIGroupsAddRoleRequest { + return GroupsAPIGroupsAddRoleRequest{ + ApiService: a, + ctx: ctx, + groupHref: groupHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *GroupsAPIService) GroupsAddRoleExecute(r GroupsAPIGroupsAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsAPIService.GroupsAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{group_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"group_href"+"}", parameterValueToString(r.groupHref, "groupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GroupsAPIGroupsCreateRequest struct { + ctx context.Context + ApiService *GroupsAPIService + group *Group +} + +func (r GroupsAPIGroupsCreateRequest) Group(group Group) GroupsAPIGroupsCreateRequest { + r.group = &group + return r +} + +func (r GroupsAPIGroupsCreateRequest) Execute() (*GroupResponse, *http.Response, error) { + return r.ApiService.GroupsCreateExecute(r) +} + +/* +GroupsCreate Create a group + +ViewSet for Group. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return GroupsAPIGroupsCreateRequest +*/ +func (a *GroupsAPIService) GroupsCreate(ctx context.Context) GroupsAPIGroupsCreateRequest { + return GroupsAPIGroupsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GroupResponse +func (a *GroupsAPIService) GroupsCreateExecute(r GroupsAPIGroupsCreateRequest) (*GroupResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsAPIService.GroupsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/groups/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.group == nil { + return localVarReturnValue, nil, reportError("group is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.group + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GroupsAPIGroupsDeleteRequest struct { + ctx context.Context + ApiService *GroupsAPIService + groupHref string +} + +func (r GroupsAPIGroupsDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.GroupsDeleteExecute(r) +} + +/* +GroupsDelete Delete a group + +ViewSet for Group. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupHref + @return GroupsAPIGroupsDeleteRequest +*/ +func (a *GroupsAPIService) GroupsDelete(ctx context.Context, groupHref string) GroupsAPIGroupsDeleteRequest { + return GroupsAPIGroupsDeleteRequest{ + ApiService: a, + ctx: ctx, + groupHref: groupHref, + } +} + +// Execute executes the request +func (a *GroupsAPIService) GroupsDeleteExecute(r GroupsAPIGroupsDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsAPIService.GroupsDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{group_href}" + localVarPath = strings.Replace(localVarPath, "{"+"group_href"+"}", parameterValueToString(r.groupHref, "groupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type GroupsAPIGroupsListRequest struct { + ctx context.Context + ApiService *GroupsAPIService + id *int32 + idIn *[]int32 + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIexact *string + nameIn *[]string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Filter results where id matches value +func (r GroupsAPIGroupsListRequest) Id(id int32) GroupsAPIGroupsListRequest { + r.id = &id + return r +} + +// Filter results where id is in a comma-separated list of values +func (r GroupsAPIGroupsListRequest) IdIn(idIn []int32) GroupsAPIGroupsListRequest { + r.idIn = &idIn + return r +} + +// Number of results to return per page. +func (r GroupsAPIGroupsListRequest) Limit(limit int32) GroupsAPIGroupsListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r GroupsAPIGroupsListRequest) Name(name string) GroupsAPIGroupsListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r GroupsAPIGroupsListRequest) NameContains(nameContains string) GroupsAPIGroupsListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r GroupsAPIGroupsListRequest) NameIcontains(nameIcontains string) GroupsAPIGroupsListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name matches value +func (r GroupsAPIGroupsListRequest) NameIexact(nameIexact string) GroupsAPIGroupsListRequest { + r.nameIexact = &nameIexact + return r +} + +// Filter results where name is in a comma-separated list of values +func (r GroupsAPIGroupsListRequest) NameIn(nameIn []string) GroupsAPIGroupsListRequest { + r.nameIn = &nameIn + return r +} + +// The initial index from which to return the results. +func (r GroupsAPIGroupsListRequest) Offset(offset int32) GroupsAPIGroupsListRequest { + r.offset = &offset + return r +} + +// Ordering * `id` - Id * `-id` - Id (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r GroupsAPIGroupsListRequest) Ordering(ordering []string) GroupsAPIGroupsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r GroupsAPIGroupsListRequest) PulpHrefIn(pulpHrefIn []string) GroupsAPIGroupsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r GroupsAPIGroupsListRequest) PulpIdIn(pulpIdIn []string) GroupsAPIGroupsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r GroupsAPIGroupsListRequest) Fields(fields []string) GroupsAPIGroupsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r GroupsAPIGroupsListRequest) ExcludeFields(excludeFields []string) GroupsAPIGroupsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r GroupsAPIGroupsListRequest) Execute() (*PaginatedGroupResponseList, *http.Response, error) { + return r.ApiService.GroupsListExecute(r) +} + +/* +GroupsList List groups + +ViewSet for Group. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return GroupsAPIGroupsListRequest +*/ +func (a *GroupsAPIService) GroupsList(ctx context.Context) GroupsAPIGroupsListRequest { + return GroupsAPIGroupsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedGroupResponseList +func (a *GroupsAPIService) GroupsListExecute(r GroupsAPIGroupsListRequest) (*PaginatedGroupResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedGroupResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsAPIService.GroupsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/groups/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "") + } + if r.idIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id__in", r.idIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIexact != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__iexact", r.nameIexact, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GroupsAPIGroupsListRolesRequest struct { + ctx context.Context + ApiService *GroupsAPIService + groupHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r GroupsAPIGroupsListRolesRequest) Fields(fields []string) GroupsAPIGroupsListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r GroupsAPIGroupsListRolesRequest) ExcludeFields(excludeFields []string) GroupsAPIGroupsListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r GroupsAPIGroupsListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.GroupsListRolesExecute(r) +} + +/* +GroupsListRoles Method for GroupsListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupHref + @return GroupsAPIGroupsListRolesRequest +*/ +func (a *GroupsAPIService) GroupsListRoles(ctx context.Context, groupHref string) GroupsAPIGroupsListRolesRequest { + return GroupsAPIGroupsListRolesRequest{ + ApiService: a, + ctx: ctx, + groupHref: groupHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *GroupsAPIService) GroupsListRolesExecute(r GroupsAPIGroupsListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsAPIService.GroupsListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{group_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"group_href"+"}", parameterValueToString(r.groupHref, "groupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GroupsAPIGroupsMyPermissionsRequest struct { + ctx context.Context + ApiService *GroupsAPIService + groupHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r GroupsAPIGroupsMyPermissionsRequest) Fields(fields []string) GroupsAPIGroupsMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r GroupsAPIGroupsMyPermissionsRequest) ExcludeFields(excludeFields []string) GroupsAPIGroupsMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r GroupsAPIGroupsMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.GroupsMyPermissionsExecute(r) +} + +/* +GroupsMyPermissions Method for GroupsMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupHref + @return GroupsAPIGroupsMyPermissionsRequest +*/ +func (a *GroupsAPIService) GroupsMyPermissions(ctx context.Context, groupHref string) GroupsAPIGroupsMyPermissionsRequest { + return GroupsAPIGroupsMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + groupHref: groupHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *GroupsAPIService) GroupsMyPermissionsExecute(r GroupsAPIGroupsMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsAPIService.GroupsMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{group_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"group_href"+"}", parameterValueToString(r.groupHref, "groupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GroupsAPIGroupsPartialUpdateRequest struct { + ctx context.Context + ApiService *GroupsAPIService + groupHref string + patchedGroup *PatchedGroup +} + +func (r GroupsAPIGroupsPartialUpdateRequest) PatchedGroup(patchedGroup PatchedGroup) GroupsAPIGroupsPartialUpdateRequest { + r.patchedGroup = &patchedGroup + return r +} + +func (r GroupsAPIGroupsPartialUpdateRequest) Execute() (*GroupResponse, *http.Response, error) { + return r.ApiService.GroupsPartialUpdateExecute(r) +} + +/* +GroupsPartialUpdate Update a group + +ViewSet for Group. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupHref + @return GroupsAPIGroupsPartialUpdateRequest +*/ +func (a *GroupsAPIService) GroupsPartialUpdate(ctx context.Context, groupHref string) GroupsAPIGroupsPartialUpdateRequest { + return GroupsAPIGroupsPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + groupHref: groupHref, + } +} + +// Execute executes the request +// @return GroupResponse +func (a *GroupsAPIService) GroupsPartialUpdateExecute(r GroupsAPIGroupsPartialUpdateRequest) (*GroupResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsAPIService.GroupsPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{group_href}" + localVarPath = strings.Replace(localVarPath, "{"+"group_href"+"}", parameterValueToString(r.groupHref, "groupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedGroup == nil { + return localVarReturnValue, nil, reportError("patchedGroup is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedGroup + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GroupsAPIGroupsReadRequest struct { + ctx context.Context + ApiService *GroupsAPIService + groupHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r GroupsAPIGroupsReadRequest) Fields(fields []string) GroupsAPIGroupsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r GroupsAPIGroupsReadRequest) ExcludeFields(excludeFields []string) GroupsAPIGroupsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r GroupsAPIGroupsReadRequest) Execute() (*GroupResponse, *http.Response, error) { + return r.ApiService.GroupsReadExecute(r) +} + +/* +GroupsRead Inspect a group + +ViewSet for Group. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupHref + @return GroupsAPIGroupsReadRequest +*/ +func (a *GroupsAPIService) GroupsRead(ctx context.Context, groupHref string) GroupsAPIGroupsReadRequest { + return GroupsAPIGroupsReadRequest{ + ApiService: a, + ctx: ctx, + groupHref: groupHref, + } +} + +// Execute executes the request +// @return GroupResponse +func (a *GroupsAPIService) GroupsReadExecute(r GroupsAPIGroupsReadRequest) (*GroupResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsAPIService.GroupsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{group_href}" + localVarPath = strings.Replace(localVarPath, "{"+"group_href"+"}", parameterValueToString(r.groupHref, "groupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GroupsAPIGroupsRemoveRoleRequest struct { + ctx context.Context + ApiService *GroupsAPIService + groupHref string + nestedRole *NestedRole +} + +func (r GroupsAPIGroupsRemoveRoleRequest) NestedRole(nestedRole NestedRole) GroupsAPIGroupsRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r GroupsAPIGroupsRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.GroupsRemoveRoleExecute(r) +} + +/* +GroupsRemoveRole Method for GroupsRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupHref + @return GroupsAPIGroupsRemoveRoleRequest +*/ +func (a *GroupsAPIService) GroupsRemoveRole(ctx context.Context, groupHref string) GroupsAPIGroupsRemoveRoleRequest { + return GroupsAPIGroupsRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + groupHref: groupHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *GroupsAPIService) GroupsRemoveRoleExecute(r GroupsAPIGroupsRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsAPIService.GroupsRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{group_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"group_href"+"}", parameterValueToString(r.groupHref, "groupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GroupsAPIGroupsUpdateRequest struct { + ctx context.Context + ApiService *GroupsAPIService + groupHref string + group *Group +} + +func (r GroupsAPIGroupsUpdateRequest) Group(group Group) GroupsAPIGroupsUpdateRequest { + r.group = &group + return r +} + +func (r GroupsAPIGroupsUpdateRequest) Execute() (*GroupResponse, *http.Response, error) { + return r.ApiService.GroupsUpdateExecute(r) +} + +/* +GroupsUpdate Update a group + +ViewSet for Group. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupHref + @return GroupsAPIGroupsUpdateRequest +*/ +func (a *GroupsAPIService) GroupsUpdate(ctx context.Context, groupHref string) GroupsAPIGroupsUpdateRequest { + return GroupsAPIGroupsUpdateRequest{ + ApiService: a, + ctx: ctx, + groupHref: groupHref, + } +} + +// Execute executes the request +// @return GroupResponse +func (a *GroupsAPIService) GroupsUpdateExecute(r GroupsAPIGroupsUpdateRequest) (*GroupResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsAPIService.GroupsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{group_href}" + localVarPath = strings.Replace(localVarPath, "{"+"group_href"+"}", parameterValueToString(r.groupHref, "groupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.group == nil { + return localVarReturnValue, nil, reportError("group is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.group + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_groups_roles.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_groups_roles.go new file mode 100644 index 0000000000..ee58f75f4b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_groups_roles.go @@ -0,0 +1,626 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// GroupsRolesAPIService GroupsRolesAPI service +type GroupsRolesAPIService service + +type GroupsRolesAPIGroupsRolesCreateRequest struct { + ctx context.Context + ApiService *GroupsRolesAPIService + groupHref string + groupRole *GroupRole +} + +func (r GroupsRolesAPIGroupsRolesCreateRequest) GroupRole(groupRole GroupRole) GroupsRolesAPIGroupsRolesCreateRequest { + r.groupRole = &groupRole + return r +} + +func (r GroupsRolesAPIGroupsRolesCreateRequest) Execute() (*GroupRoleResponse, *http.Response, error) { + return r.ApiService.GroupsRolesCreateExecute(r) +} + +/* +GroupsRolesCreate Create a group role + +ViewSet for GroupRole. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupHref + @return GroupsRolesAPIGroupsRolesCreateRequest +*/ +func (a *GroupsRolesAPIService) GroupsRolesCreate(ctx context.Context, groupHref string) GroupsRolesAPIGroupsRolesCreateRequest { + return GroupsRolesAPIGroupsRolesCreateRequest{ + ApiService: a, + ctx: ctx, + groupHref: groupHref, + } +} + +// Execute executes the request +// @return GroupRoleResponse +func (a *GroupsRolesAPIService) GroupsRolesCreateExecute(r GroupsRolesAPIGroupsRolesCreateRequest) (*GroupRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroupRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsRolesAPIService.GroupsRolesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{group_href}roles/" + localVarPath = strings.Replace(localVarPath, "{"+"group_href"+"}", parameterValueToString(r.groupHref, "groupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.groupRole == nil { + return localVarReturnValue, nil, reportError("groupRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.groupRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GroupsRolesAPIGroupsRolesDeleteRequest struct { + ctx context.Context + ApiService *GroupsRolesAPIService + groupsGroupRoleHref string +} + +func (r GroupsRolesAPIGroupsRolesDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.GroupsRolesDeleteExecute(r) +} + +/* +GroupsRolesDelete Delete a group role + +ViewSet for GroupRole. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupsGroupRoleHref + @return GroupsRolesAPIGroupsRolesDeleteRequest +*/ +func (a *GroupsRolesAPIService) GroupsRolesDelete(ctx context.Context, groupsGroupRoleHref string) GroupsRolesAPIGroupsRolesDeleteRequest { + return GroupsRolesAPIGroupsRolesDeleteRequest{ + ApiService: a, + ctx: ctx, + groupsGroupRoleHref: groupsGroupRoleHref, + } +} + +// Execute executes the request +func (a *GroupsRolesAPIService) GroupsRolesDeleteExecute(r GroupsRolesAPIGroupsRolesDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsRolesAPIService.GroupsRolesDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{groups_group_role_href}" + localVarPath = strings.Replace(localVarPath, "{"+"groups_group_role_href"+"}", parameterValueToString(r.groupsGroupRoleHref, "groupsGroupRoleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type GroupsRolesAPIGroupsRolesListRequest struct { + ctx context.Context + ApiService *GroupsRolesAPIService + groupHref string + contentObject *string + domain *string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + role *string + roleContains *string + roleIcontains *string + roleIn *[]string + roleStartswith *string + fields *[]string + excludeFields *[]string +} + +// content_object +func (r GroupsRolesAPIGroupsRolesListRequest) ContentObject(contentObject string) GroupsRolesAPIGroupsRolesListRequest { + r.contentObject = &contentObject + return r +} + +// Foreign Key referenced by HREF +func (r GroupsRolesAPIGroupsRolesListRequest) Domain(domain string) GroupsRolesAPIGroupsRolesListRequest { + r.domain = &domain + return r +} + +// Number of results to return per page. +func (r GroupsRolesAPIGroupsRolesListRequest) Limit(limit int32) GroupsRolesAPIGroupsRolesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r GroupsRolesAPIGroupsRolesListRequest) Offset(offset int32) GroupsRolesAPIGroupsRolesListRequest { + r.offset = &offset + return r +} + +// Ordering * `role` - Role * `-role` - Role (descending) * `description` - Description * `-description` - Description (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r GroupsRolesAPIGroupsRolesListRequest) Ordering(ordering []string) GroupsRolesAPIGroupsRolesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r GroupsRolesAPIGroupsRolesListRequest) PulpHrefIn(pulpHrefIn []string) GroupsRolesAPIGroupsRolesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r GroupsRolesAPIGroupsRolesListRequest) PulpIdIn(pulpIdIn []string) GroupsRolesAPIGroupsRolesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +func (r GroupsRolesAPIGroupsRolesListRequest) Role(role string) GroupsRolesAPIGroupsRolesListRequest { + r.role = &role + return r +} + +func (r GroupsRolesAPIGroupsRolesListRequest) RoleContains(roleContains string) GroupsRolesAPIGroupsRolesListRequest { + r.roleContains = &roleContains + return r +} + +func (r GroupsRolesAPIGroupsRolesListRequest) RoleIcontains(roleIcontains string) GroupsRolesAPIGroupsRolesListRequest { + r.roleIcontains = &roleIcontains + return r +} + +// Multiple values may be separated by commas. +func (r GroupsRolesAPIGroupsRolesListRequest) RoleIn(roleIn []string) GroupsRolesAPIGroupsRolesListRequest { + r.roleIn = &roleIn + return r +} + +func (r GroupsRolesAPIGroupsRolesListRequest) RoleStartswith(roleStartswith string) GroupsRolesAPIGroupsRolesListRequest { + r.roleStartswith = &roleStartswith + return r +} + +// A list of fields to include in the response. +func (r GroupsRolesAPIGroupsRolesListRequest) Fields(fields []string) GroupsRolesAPIGroupsRolesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r GroupsRolesAPIGroupsRolesListRequest) ExcludeFields(excludeFields []string) GroupsRolesAPIGroupsRolesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r GroupsRolesAPIGroupsRolesListRequest) Execute() (*PaginatedGroupRoleResponseList, *http.Response, error) { + return r.ApiService.GroupsRolesListExecute(r) +} + +/* +GroupsRolesList List group roles + +ViewSet for GroupRole. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupHref + @return GroupsRolesAPIGroupsRolesListRequest +*/ +func (a *GroupsRolesAPIService) GroupsRolesList(ctx context.Context, groupHref string) GroupsRolesAPIGroupsRolesListRequest { + return GroupsRolesAPIGroupsRolesListRequest{ + ApiService: a, + ctx: ctx, + groupHref: groupHref, + } +} + +// Execute executes the request +// @return PaginatedGroupRoleResponseList +func (a *GroupsRolesAPIService) GroupsRolesListExecute(r GroupsRolesAPIGroupsRolesListRequest) (*PaginatedGroupRoleResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedGroupRoleResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsRolesAPIService.GroupsRolesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{group_href}roles/" + localVarPath = strings.Replace(localVarPath, "{"+"group_href"+"}", parameterValueToString(r.groupHref, "groupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.contentObject != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content_object", r.contentObject, "") + } + if r.domain != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "domain", r.domain, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.role != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "role", r.role, "") + } + if r.roleContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "role__contains", r.roleContains, "") + } + if r.roleIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "role__icontains", r.roleIcontains, "") + } + if r.roleIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "role__in", r.roleIn, "csv") + } + if r.roleStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "role__startswith", r.roleStartswith, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GroupsRolesAPIGroupsRolesReadRequest struct { + ctx context.Context + ApiService *GroupsRolesAPIService + groupsGroupRoleHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r GroupsRolesAPIGroupsRolesReadRequest) Fields(fields []string) GroupsRolesAPIGroupsRolesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r GroupsRolesAPIGroupsRolesReadRequest) ExcludeFields(excludeFields []string) GroupsRolesAPIGroupsRolesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r GroupsRolesAPIGroupsRolesReadRequest) Execute() (*GroupRoleResponse, *http.Response, error) { + return r.ApiService.GroupsRolesReadExecute(r) +} + +/* +GroupsRolesRead Inspect a group role + +ViewSet for GroupRole. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupsGroupRoleHref + @return GroupsRolesAPIGroupsRolesReadRequest +*/ +func (a *GroupsRolesAPIService) GroupsRolesRead(ctx context.Context, groupsGroupRoleHref string) GroupsRolesAPIGroupsRolesReadRequest { + return GroupsRolesAPIGroupsRolesReadRequest{ + ApiService: a, + ctx: ctx, + groupsGroupRoleHref: groupsGroupRoleHref, + } +} + +// Execute executes the request +// @return GroupRoleResponse +func (a *GroupsRolesAPIService) GroupsRolesReadExecute(r GroupsRolesAPIGroupsRolesReadRequest) (*GroupRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroupRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsRolesAPIService.GroupsRolesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{groups_group_role_href}" + localVarPath = strings.Replace(localVarPath, "{"+"groups_group_role_href"+"}", parameterValueToString(r.groupsGroupRoleHref, "groupsGroupRoleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_groups_users.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_groups_users.go new file mode 100644 index 0000000000..2245776e63 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_groups_users.go @@ -0,0 +1,391 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// GroupsUsersAPIService GroupsUsersAPI service +type GroupsUsersAPIService service + +type GroupsUsersAPIGroupsUsersCreateRequest struct { + ctx context.Context + ApiService *GroupsUsersAPIService + groupHref string + groupUser *GroupUser +} + +func (r GroupsUsersAPIGroupsUsersCreateRequest) GroupUser(groupUser GroupUser) GroupsUsersAPIGroupsUsersCreateRequest { + r.groupUser = &groupUser + return r +} + +func (r GroupsUsersAPIGroupsUsersCreateRequest) Execute() (*GroupUserResponse, *http.Response, error) { + return r.ApiService.GroupsUsersCreateExecute(r) +} + +/* +GroupsUsersCreate Create an user + +Add a user to a group. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupHref + @return GroupsUsersAPIGroupsUsersCreateRequest +*/ +func (a *GroupsUsersAPIService) GroupsUsersCreate(ctx context.Context, groupHref string) GroupsUsersAPIGroupsUsersCreateRequest { + return GroupsUsersAPIGroupsUsersCreateRequest{ + ApiService: a, + ctx: ctx, + groupHref: groupHref, + } +} + +// Execute executes the request +// @return GroupUserResponse +func (a *GroupsUsersAPIService) GroupsUsersCreateExecute(r GroupsUsersAPIGroupsUsersCreateRequest) (*GroupUserResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GroupUserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsUsersAPIService.GroupsUsersCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{group_href}users/" + localVarPath = strings.Replace(localVarPath, "{"+"group_href"+"}", parameterValueToString(r.groupHref, "groupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.groupUser == nil { + return localVarReturnValue, nil, reportError("groupUser is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.groupUser + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type GroupsUsersAPIGroupsUsersDeleteRequest struct { + ctx context.Context + ApiService *GroupsUsersAPIService + groupsUserHref string +} + +func (r GroupsUsersAPIGroupsUsersDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.GroupsUsersDeleteExecute(r) +} + +/* +GroupsUsersDelete Delete an user + +Remove a user from a group. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupsUserHref + @return GroupsUsersAPIGroupsUsersDeleteRequest +*/ +func (a *GroupsUsersAPIService) GroupsUsersDelete(ctx context.Context, groupsUserHref string) GroupsUsersAPIGroupsUsersDeleteRequest { + return GroupsUsersAPIGroupsUsersDeleteRequest{ + ApiService: a, + ctx: ctx, + groupsUserHref: groupsUserHref, + } +} + +// Execute executes the request +func (a *GroupsUsersAPIService) GroupsUsersDeleteExecute(r GroupsUsersAPIGroupsUsersDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsUsersAPIService.GroupsUsersDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{groups_user_href}" + localVarPath = strings.Replace(localVarPath, "{"+"groups_user_href"+"}", parameterValueToString(r.groupsUserHref, "groupsUserHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type GroupsUsersAPIGroupsUsersListRequest struct { + ctx context.Context + ApiService *GroupsUsersAPIService + groupHref string + limit *int32 + offset *int32 + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r GroupsUsersAPIGroupsUsersListRequest) Limit(limit int32) GroupsUsersAPIGroupsUsersListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r GroupsUsersAPIGroupsUsersListRequest) Offset(offset int32) GroupsUsersAPIGroupsUsersListRequest { + r.offset = &offset + return r +} + +// A list of fields to include in the response. +func (r GroupsUsersAPIGroupsUsersListRequest) Fields(fields []string) GroupsUsersAPIGroupsUsersListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r GroupsUsersAPIGroupsUsersListRequest) ExcludeFields(excludeFields []string) GroupsUsersAPIGroupsUsersListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r GroupsUsersAPIGroupsUsersListRequest) Execute() (*PaginatedGroupUserResponseList, *http.Response, error) { + return r.ApiService.GroupsUsersListExecute(r) +} + +/* +GroupsUsersList List users + +List group users. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupHref + @return GroupsUsersAPIGroupsUsersListRequest +*/ +func (a *GroupsUsersAPIService) GroupsUsersList(ctx context.Context, groupHref string) GroupsUsersAPIGroupsUsersListRequest { + return GroupsUsersAPIGroupsUsersListRequest{ + ApiService: a, + ctx: ctx, + groupHref: groupHref, + } +} + +// Execute executes the request +// @return PaginatedGroupUserResponseList +func (a *GroupsUsersAPIService) GroupsUsersListExecute(r GroupsUsersAPIGroupsUsersListRequest) (*PaginatedGroupUserResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedGroupUserResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsUsersAPIService.GroupsUsersList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{group_href}users/" + localVarPath = strings.Replace(localVarPath, "{"+"group_href"+"}", parameterValueToString(r.groupHref, "groupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_importers_pulp.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_importers_pulp.go new file mode 100644 index 0000000000..1766918deb --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_importers_pulp.go @@ -0,0 +1,830 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ImportersPulpAPIService ImportersPulpAPI service +type ImportersPulpAPIService service + +type ImportersPulpAPIImportersCorePulpCreateRequest struct { + ctx context.Context + ApiService *ImportersPulpAPIService + pulpImporter *PulpImporter +} + +func (r ImportersPulpAPIImportersCorePulpCreateRequest) PulpImporter(pulpImporter PulpImporter) ImportersPulpAPIImportersCorePulpCreateRequest { + r.pulpImporter = &pulpImporter + return r +} + +func (r ImportersPulpAPIImportersCorePulpCreateRequest) Execute() (*PulpImporterResponse, *http.Response, error) { + return r.ApiService.ImportersCorePulpCreateExecute(r) +} + +/* +ImportersCorePulpCreate Create a pulp importer + +ViewSet for PulpImporters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ImportersPulpAPIImportersCorePulpCreateRequest +*/ +func (a *ImportersPulpAPIService) ImportersCorePulpCreate(ctx context.Context) ImportersPulpAPIImportersCorePulpCreateRequest { + return ImportersPulpAPIImportersCorePulpCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PulpImporterResponse +func (a *ImportersPulpAPIService) ImportersCorePulpCreateExecute(r ImportersPulpAPIImportersCorePulpCreateRequest) (*PulpImporterResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PulpImporterResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportersPulpAPIService.ImportersCorePulpCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/importers/core/pulp/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pulpImporter == nil { + return localVarReturnValue, nil, reportError("pulpImporter is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pulpImporter + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ImportersPulpAPIImportersCorePulpDeleteRequest struct { + ctx context.Context + ApiService *ImportersPulpAPIService + pulpImporterHref string +} + +func (r ImportersPulpAPIImportersCorePulpDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ImportersCorePulpDeleteExecute(r) +} + +/* +ImportersCorePulpDelete Delete a pulp importer + +ViewSet for PulpImporters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpImporterHref + @return ImportersPulpAPIImportersCorePulpDeleteRequest +*/ +func (a *ImportersPulpAPIService) ImportersCorePulpDelete(ctx context.Context, pulpImporterHref string) ImportersPulpAPIImportersCorePulpDeleteRequest { + return ImportersPulpAPIImportersCorePulpDeleteRequest{ + ApiService: a, + ctx: ctx, + pulpImporterHref: pulpImporterHref, + } +} + +// Execute executes the request +func (a *ImportersPulpAPIService) ImportersCorePulpDeleteExecute(r ImportersPulpAPIImportersCorePulpDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportersPulpAPIService.ImportersCorePulpDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_importer_href}" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_importer_href"+"}", parameterValueToString(r.pulpImporterHref, "pulpImporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ImportersPulpAPIImportersCorePulpListRequest struct { + ctx context.Context + ApiService *ImportersPulpAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ImportersPulpAPIImportersCorePulpListRequest) Limit(limit int32) ImportersPulpAPIImportersCorePulpListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r ImportersPulpAPIImportersCorePulpListRequest) Name(name string) ImportersPulpAPIImportersCorePulpListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r ImportersPulpAPIImportersCorePulpListRequest) NameContains(nameContains string) ImportersPulpAPIImportersCorePulpListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r ImportersPulpAPIImportersCorePulpListRequest) NameIcontains(nameIcontains string) ImportersPulpAPIImportersCorePulpListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r ImportersPulpAPIImportersCorePulpListRequest) NameIn(nameIn []string) ImportersPulpAPIImportersCorePulpListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r ImportersPulpAPIImportersCorePulpListRequest) NameStartswith(nameStartswith string) ImportersPulpAPIImportersCorePulpListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r ImportersPulpAPIImportersCorePulpListRequest) Offset(offset int32) ImportersPulpAPIImportersCorePulpListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r ImportersPulpAPIImportersCorePulpListRequest) Ordering(ordering []string) ImportersPulpAPIImportersCorePulpListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r ImportersPulpAPIImportersCorePulpListRequest) PulpHrefIn(pulpHrefIn []string) ImportersPulpAPIImportersCorePulpListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r ImportersPulpAPIImportersCorePulpListRequest) PulpIdIn(pulpIdIn []string) ImportersPulpAPIImportersCorePulpListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r ImportersPulpAPIImportersCorePulpListRequest) Fields(fields []string) ImportersPulpAPIImportersCorePulpListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ImportersPulpAPIImportersCorePulpListRequest) ExcludeFields(excludeFields []string) ImportersPulpAPIImportersCorePulpListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ImportersPulpAPIImportersCorePulpListRequest) Execute() (*PaginatedPulpImporterResponseList, *http.Response, error) { + return r.ApiService.ImportersCorePulpListExecute(r) +} + +/* +ImportersCorePulpList List pulp importers + +ViewSet for PulpImporters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ImportersPulpAPIImportersCorePulpListRequest +*/ +func (a *ImportersPulpAPIService) ImportersCorePulpList(ctx context.Context) ImportersPulpAPIImportersCorePulpListRequest { + return ImportersPulpAPIImportersCorePulpListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedPulpImporterResponseList +func (a *ImportersPulpAPIService) ImportersCorePulpListExecute(r ImportersPulpAPIImportersCorePulpListRequest) (*PaginatedPulpImporterResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedPulpImporterResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportersPulpAPIService.ImportersCorePulpList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/importers/core/pulp/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ImportersPulpAPIImportersCorePulpPartialUpdateRequest struct { + ctx context.Context + ApiService *ImportersPulpAPIService + pulpImporterHref string + patchedPulpImporter *PatchedPulpImporter +} + +func (r ImportersPulpAPIImportersCorePulpPartialUpdateRequest) PatchedPulpImporter(patchedPulpImporter PatchedPulpImporter) ImportersPulpAPIImportersCorePulpPartialUpdateRequest { + r.patchedPulpImporter = &patchedPulpImporter + return r +} + +func (r ImportersPulpAPIImportersCorePulpPartialUpdateRequest) Execute() (*PulpImporterResponse, *http.Response, error) { + return r.ApiService.ImportersCorePulpPartialUpdateExecute(r) +} + +/* +ImportersCorePulpPartialUpdate Update a pulp importer + +ViewSet for PulpImporters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpImporterHref + @return ImportersPulpAPIImportersCorePulpPartialUpdateRequest +*/ +func (a *ImportersPulpAPIService) ImportersCorePulpPartialUpdate(ctx context.Context, pulpImporterHref string) ImportersPulpAPIImportersCorePulpPartialUpdateRequest { + return ImportersPulpAPIImportersCorePulpPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + pulpImporterHref: pulpImporterHref, + } +} + +// Execute executes the request +// @return PulpImporterResponse +func (a *ImportersPulpAPIService) ImportersCorePulpPartialUpdateExecute(r ImportersPulpAPIImportersCorePulpPartialUpdateRequest) (*PulpImporterResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PulpImporterResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportersPulpAPIService.ImportersCorePulpPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_importer_href}" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_importer_href"+"}", parameterValueToString(r.pulpImporterHref, "pulpImporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedPulpImporter == nil { + return localVarReturnValue, nil, reportError("patchedPulpImporter is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedPulpImporter + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ImportersPulpAPIImportersCorePulpReadRequest struct { + ctx context.Context + ApiService *ImportersPulpAPIService + pulpImporterHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ImportersPulpAPIImportersCorePulpReadRequest) Fields(fields []string) ImportersPulpAPIImportersCorePulpReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ImportersPulpAPIImportersCorePulpReadRequest) ExcludeFields(excludeFields []string) ImportersPulpAPIImportersCorePulpReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ImportersPulpAPIImportersCorePulpReadRequest) Execute() (*PulpImporterResponse, *http.Response, error) { + return r.ApiService.ImportersCorePulpReadExecute(r) +} + +/* +ImportersCorePulpRead Inspect a pulp importer + +ViewSet for PulpImporters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpImporterHref + @return ImportersPulpAPIImportersCorePulpReadRequest +*/ +func (a *ImportersPulpAPIService) ImportersCorePulpRead(ctx context.Context, pulpImporterHref string) ImportersPulpAPIImportersCorePulpReadRequest { + return ImportersPulpAPIImportersCorePulpReadRequest{ + ApiService: a, + ctx: ctx, + pulpImporterHref: pulpImporterHref, + } +} + +// Execute executes the request +// @return PulpImporterResponse +func (a *ImportersPulpAPIService) ImportersCorePulpReadExecute(r ImportersPulpAPIImportersCorePulpReadRequest) (*PulpImporterResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PulpImporterResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportersPulpAPIService.ImportersCorePulpRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_importer_href}" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_importer_href"+"}", parameterValueToString(r.pulpImporterHref, "pulpImporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ImportersPulpAPIImportersCorePulpUpdateRequest struct { + ctx context.Context + ApiService *ImportersPulpAPIService + pulpImporterHref string + pulpImporter *PulpImporter +} + +func (r ImportersPulpAPIImportersCorePulpUpdateRequest) PulpImporter(pulpImporter PulpImporter) ImportersPulpAPIImportersCorePulpUpdateRequest { + r.pulpImporter = &pulpImporter + return r +} + +func (r ImportersPulpAPIImportersCorePulpUpdateRequest) Execute() (*PulpImporterResponse, *http.Response, error) { + return r.ApiService.ImportersCorePulpUpdateExecute(r) +} + +/* +ImportersCorePulpUpdate Update a pulp importer + +ViewSet for PulpImporters. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpImporterHref + @return ImportersPulpAPIImportersCorePulpUpdateRequest +*/ +func (a *ImportersPulpAPIService) ImportersCorePulpUpdate(ctx context.Context, pulpImporterHref string) ImportersPulpAPIImportersCorePulpUpdateRequest { + return ImportersPulpAPIImportersCorePulpUpdateRequest{ + ApiService: a, + ctx: ctx, + pulpImporterHref: pulpImporterHref, + } +} + +// Execute executes the request +// @return PulpImporterResponse +func (a *ImportersPulpAPIService) ImportersCorePulpUpdateExecute(r ImportersPulpAPIImportersCorePulpUpdateRequest) (*PulpImporterResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PulpImporterResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportersPulpAPIService.ImportersCorePulpUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_importer_href}" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_importer_href"+"}", parameterValueToString(r.pulpImporterHref, "pulpImporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pulpImporter == nil { + return localVarReturnValue, nil, reportError("pulpImporter is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pulpImporter + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_importers_pulp_import_check.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_importers_pulp_import_check.go new file mode 100644 index 0000000000..4d0ef190e4 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_importers_pulp_import_check.go @@ -0,0 +1,140 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// ImportersPulpImportCheckAPIService ImportersPulpImportCheckAPI service +type ImportersPulpImportCheckAPIService service + +type ImportersPulpImportCheckAPIPulpImportCheckPostRequest struct { + ctx context.Context + ApiService *ImportersPulpImportCheckAPIService + pulpImportCheck *PulpImportCheck +} + +func (r ImportersPulpImportCheckAPIPulpImportCheckPostRequest) PulpImportCheck(pulpImportCheck PulpImportCheck) ImportersPulpImportCheckAPIPulpImportCheckPostRequest { + r.pulpImportCheck = &pulpImportCheck + return r +} + +func (r ImportersPulpImportCheckAPIPulpImportCheckPostRequest) Execute() (*PulpImportCheckResponse, *http.Response, error) { + return r.ApiService.PulpImportCheckPostExecute(r) +} + +/* +PulpImportCheckPost Validate the parameters to be used for a PulpImport call + +Evaluates validity of proposed PulpImport parameters 'toc', 'path', and 'repo_mapping'. + +* Checks that toc, path are in ALLOWED_IMPORT_PATHS +* if ALLOWED: + * Checks that toc, path exist and are readable + * If toc specified, checks that containing dir is writeable +* Checks that repo_mapping is valid JSON + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ImportersPulpImportCheckAPIPulpImportCheckPostRequest +*/ +func (a *ImportersPulpImportCheckAPIService) PulpImportCheckPost(ctx context.Context) ImportersPulpImportCheckAPIPulpImportCheckPostRequest { + return ImportersPulpImportCheckAPIPulpImportCheckPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PulpImportCheckResponse +func (a *ImportersPulpImportCheckAPIService) PulpImportCheckPostExecute(r ImportersPulpImportCheckAPIPulpImportCheckPostRequest) (*PulpImportCheckResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PulpImportCheckResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportersPulpImportCheckAPIService.PulpImportCheckPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/importers/core/pulp/import-check/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pulpImportCheck == nil { + return localVarReturnValue, nil, reportError("pulpImportCheck is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pulpImportCheck + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_importers_pulp_imports.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_importers_pulp_imports.go new file mode 100644 index 0000000000..c2573908ba --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_importers_pulp_imports.go @@ -0,0 +1,530 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// ImportersPulpImportsAPIService ImportersPulpImportsAPI service +type ImportersPulpImportsAPIService service + +type ImportersPulpImportsAPIImportersCorePulpImportsCreateRequest struct { + ctx context.Context + ApiService *ImportersPulpImportsAPIService + pulpImporterHref string + pulpImport *PulpImport +} + +func (r ImportersPulpImportsAPIImportersCorePulpImportsCreateRequest) PulpImport(pulpImport PulpImport) ImportersPulpImportsAPIImportersCorePulpImportsCreateRequest { + r.pulpImport = &pulpImport + return r +} + +func (r ImportersPulpImportsAPIImportersCorePulpImportsCreateRequest) Execute() (*TaskGroupOperationResponse, *http.Response, error) { + return r.ApiService.ImportersCorePulpImportsCreateExecute(r) +} + +/* +ImportersCorePulpImportsCreate Create a pulp import + +Trigger an asynchronous task to import a Pulp export. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpImporterHref + @return ImportersPulpImportsAPIImportersCorePulpImportsCreateRequest +*/ +func (a *ImportersPulpImportsAPIService) ImportersCorePulpImportsCreate(ctx context.Context, pulpImporterHref string) ImportersPulpImportsAPIImportersCorePulpImportsCreateRequest { + return ImportersPulpImportsAPIImportersCorePulpImportsCreateRequest{ + ApiService: a, + ctx: ctx, + pulpImporterHref: pulpImporterHref, + } +} + +// Execute executes the request +// @return TaskGroupOperationResponse +func (a *ImportersPulpImportsAPIService) ImportersCorePulpImportsCreateExecute(r ImportersPulpImportsAPIImportersCorePulpImportsCreateRequest) (*TaskGroupOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TaskGroupOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportersPulpImportsAPIService.ImportersCorePulpImportsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_importer_href}imports/" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_importer_href"+"}", parameterValueToString(r.pulpImporterHref, "pulpImporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pulpImport == nil { + return localVarReturnValue, nil, reportError("pulpImport is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pulpImport + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ImportersPulpImportsAPIImportersCorePulpImportsDeleteRequest struct { + ctx context.Context + ApiService *ImportersPulpImportsAPIService + pulpPulpImportHref string +} + +func (r ImportersPulpImportsAPIImportersCorePulpImportsDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.ImportersCorePulpImportsDeleteExecute(r) +} + +/* +ImportersCorePulpImportsDelete Delete a pulp import + +ViewSet for PulpImports. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpPulpImportHref + @return ImportersPulpImportsAPIImportersCorePulpImportsDeleteRequest +*/ +func (a *ImportersPulpImportsAPIService) ImportersCorePulpImportsDelete(ctx context.Context, pulpPulpImportHref string) ImportersPulpImportsAPIImportersCorePulpImportsDeleteRequest { + return ImportersPulpImportsAPIImportersCorePulpImportsDeleteRequest{ + ApiService: a, + ctx: ctx, + pulpPulpImportHref: pulpPulpImportHref, + } +} + +// Execute executes the request +func (a *ImportersPulpImportsAPIService) ImportersCorePulpImportsDeleteExecute(r ImportersPulpImportsAPIImportersCorePulpImportsDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportersPulpImportsAPIService.ImportersCorePulpImportsDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_pulp_import_href}" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_pulp_import_href"+"}", parameterValueToString(r.pulpPulpImportHref, "pulpPulpImportHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ImportersPulpImportsAPIImportersCorePulpImportsListRequest struct { + ctx context.Context + ApiService *ImportersPulpImportsAPIService + pulpImporterHref string + limit *int32 + offset *int32 + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r ImportersPulpImportsAPIImportersCorePulpImportsListRequest) Limit(limit int32) ImportersPulpImportsAPIImportersCorePulpImportsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r ImportersPulpImportsAPIImportersCorePulpImportsListRequest) Offset(offset int32) ImportersPulpImportsAPIImportersCorePulpImportsListRequest { + r.offset = &offset + return r +} + +// A list of fields to include in the response. +func (r ImportersPulpImportsAPIImportersCorePulpImportsListRequest) Fields(fields []string) ImportersPulpImportsAPIImportersCorePulpImportsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ImportersPulpImportsAPIImportersCorePulpImportsListRequest) ExcludeFields(excludeFields []string) ImportersPulpImportsAPIImportersCorePulpImportsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ImportersPulpImportsAPIImportersCorePulpImportsListRequest) Execute() (*PaginatedImportResponseList, *http.Response, error) { + return r.ApiService.ImportersCorePulpImportsListExecute(r) +} + +/* +ImportersCorePulpImportsList List pulp imports + +ViewSet for PulpImports. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpImporterHref + @return ImportersPulpImportsAPIImportersCorePulpImportsListRequest +*/ +func (a *ImportersPulpImportsAPIService) ImportersCorePulpImportsList(ctx context.Context, pulpImporterHref string) ImportersPulpImportsAPIImportersCorePulpImportsListRequest { + return ImportersPulpImportsAPIImportersCorePulpImportsListRequest{ + ApiService: a, + ctx: ctx, + pulpImporterHref: pulpImporterHref, + } +} + +// Execute executes the request +// @return PaginatedImportResponseList +func (a *ImportersPulpImportsAPIService) ImportersCorePulpImportsListExecute(r ImportersPulpImportsAPIImportersCorePulpImportsListRequest) (*PaginatedImportResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedImportResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportersPulpImportsAPIService.ImportersCorePulpImportsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_importer_href}imports/" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_importer_href"+"}", parameterValueToString(r.pulpImporterHref, "pulpImporterHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ImportersPulpImportsAPIImportersCorePulpImportsReadRequest struct { + ctx context.Context + ApiService *ImportersPulpImportsAPIService + pulpPulpImportHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r ImportersPulpImportsAPIImportersCorePulpImportsReadRequest) Fields(fields []string) ImportersPulpImportsAPIImportersCorePulpImportsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r ImportersPulpImportsAPIImportersCorePulpImportsReadRequest) ExcludeFields(excludeFields []string) ImportersPulpImportsAPIImportersCorePulpImportsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r ImportersPulpImportsAPIImportersCorePulpImportsReadRequest) Execute() (*ImportResponse, *http.Response, error) { + return r.ApiService.ImportersCorePulpImportsReadExecute(r) +} + +/* +ImportersCorePulpImportsRead Inspect a pulp import + +ViewSet for PulpImports. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pulpPulpImportHref + @return ImportersPulpImportsAPIImportersCorePulpImportsReadRequest +*/ +func (a *ImportersPulpImportsAPIService) ImportersCorePulpImportsRead(ctx context.Context, pulpPulpImportHref string) ImportersPulpImportsAPIImportersCorePulpImportsReadRequest { + return ImportersPulpImportsAPIImportersCorePulpImportsReadRequest{ + ApiService: a, + ctx: ctx, + pulpPulpImportHref: pulpPulpImportHref, + } +} + +// Execute executes the request +// @return ImportResponse +func (a *ImportersPulpImportsAPIService) ImportersCorePulpImportsReadExecute(r ImportersPulpImportsAPIImportersCorePulpImportsReadRequest) (*ImportResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ImportResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ImportersPulpImportsAPIService.ImportersCorePulpImportsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{pulp_pulp_import_href}" + localVarPath = strings.Replace(localVarPath, "{"+"pulp_pulp_import_href"+"}", parameterValueToString(r.pulpPulpImportHref, "pulpPulpImportHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_orphans.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_orphans.go new file mode 100644 index 0000000000..66e6c3d710 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_orphans.go @@ -0,0 +1,123 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// OrphansAPIService OrphansAPI service +type OrphansAPIService service + +type OrphansAPIOrphansDeleteRequest struct { + ctx context.Context + ApiService *OrphansAPIService +} + +func (r OrphansAPIOrphansDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.OrphansDeleteExecute(r) +} + +/* +OrphansDelete Delete orphans + +DEPRECATED! Trigger an asynchronous task that deletes all orphaned content and artifacts. Use the `POST /pulp/api/v3/orphans/cleanup/` call instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OrphansAPIOrphansDeleteRequest +*/ +func (a *OrphansAPIService) OrphansDelete(ctx context.Context) OrphansAPIOrphansDeleteRequest { + return OrphansAPIOrphansDeleteRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *OrphansAPIService) OrphansDeleteExecute(r OrphansAPIOrphansDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrphansAPIService.OrphansDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/orphans/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_orphans_cleanup.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_orphans_cleanup.go new file mode 100644 index 0000000000..d3e812912c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_orphans_cleanup.go @@ -0,0 +1,134 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// OrphansCleanupAPIService OrphansCleanupAPI service +type OrphansCleanupAPIService service + +type OrphansCleanupAPIOrphansCleanupCleanupRequest struct { + ctx context.Context + ApiService *OrphansCleanupAPIService + orphansCleanup *OrphansCleanup +} + +func (r OrphansCleanupAPIOrphansCleanupCleanupRequest) OrphansCleanup(orphansCleanup OrphansCleanup) OrphansCleanupAPIOrphansCleanupCleanupRequest { + r.orphansCleanup = &orphansCleanup + return r +} + +func (r OrphansCleanupAPIOrphansCleanupCleanupRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.OrphansCleanupCleanupExecute(r) +} + +/* +OrphansCleanupCleanup Method for OrphansCleanupCleanup + +Trigger an asynchronous orphan cleanup operation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OrphansCleanupAPIOrphansCleanupCleanupRequest +*/ +func (a *OrphansCleanupAPIService) OrphansCleanupCleanup(ctx context.Context) OrphansCleanupAPIOrphansCleanupCleanupRequest { + return OrphansCleanupAPIOrphansCleanupCleanupRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *OrphansCleanupAPIService) OrphansCleanupCleanupExecute(r OrphansCleanupAPIOrphansCleanupCleanupRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrphansCleanupAPIService.OrphansCleanupCleanup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/orphans/cleanup/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.orphansCleanup == nil { + return localVarReturnValue, nil, reportError("orphansCleanup is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.orphansCleanup + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications.go new file mode 100644 index 0000000000..0b1e8d3393 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications.go @@ -0,0 +1,321 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "time" + "reflect" +) + + +// PublicationsAPIService PublicationsAPI service +type PublicationsAPIService service + +type PublicationsAPIPublicationsListRequest struct { + ctx context.Context + ApiService *PublicationsAPIService + content *string + contentIn *string + limit *int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + pulpIdIn *[]string + pulpTypeIn *[]string + repository *string + repositoryVersion *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r PublicationsAPIPublicationsListRequest) Content(content string) PublicationsAPIPublicationsListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r PublicationsAPIPublicationsListRequest) ContentIn(contentIn string) PublicationsAPIPublicationsListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r PublicationsAPIPublicationsListRequest) Limit(limit int32) PublicationsAPIPublicationsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r PublicationsAPIPublicationsListRequest) Offset(offset int32) PublicationsAPIPublicationsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PublicationsAPIPublicationsListRequest) Ordering(ordering []string) PublicationsAPIPublicationsListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r PublicationsAPIPublicationsListRequest) PulpCreated(pulpCreated time.Time) PublicationsAPIPublicationsListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r PublicationsAPIPublicationsListRequest) PulpCreatedGt(pulpCreatedGt time.Time) PublicationsAPIPublicationsListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r PublicationsAPIPublicationsListRequest) PulpCreatedGte(pulpCreatedGte time.Time) PublicationsAPIPublicationsListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r PublicationsAPIPublicationsListRequest) PulpCreatedLt(pulpCreatedLt time.Time) PublicationsAPIPublicationsListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r PublicationsAPIPublicationsListRequest) PulpCreatedLte(pulpCreatedLte time.Time) PublicationsAPIPublicationsListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r PublicationsAPIPublicationsListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) PublicationsAPIPublicationsListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsAPIPublicationsListRequest) PulpHrefIn(pulpHrefIn []string) PublicationsAPIPublicationsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsAPIPublicationsListRequest) PulpIdIn(pulpIdIn []string) PublicationsAPIPublicationsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Pulp type is in * `deb.verbatim-publication` - deb.verbatim-publication * `deb.apt-publication` - deb.apt-publication * `file.file` - file.file * `gem.gem` - gem.gem * `python.python` - python.python * `rpm.rpm` - rpm.rpm +func (r PublicationsAPIPublicationsListRequest) PulpTypeIn(pulpTypeIn []string) PublicationsAPIPublicationsListRequest { + r.pulpTypeIn = &pulpTypeIn + return r +} + +// Repository referenced by HREF +func (r PublicationsAPIPublicationsListRequest) Repository(repository string) PublicationsAPIPublicationsListRequest { + r.repository = &repository + return r +} + +// Repository Version referenced by HREF +func (r PublicationsAPIPublicationsListRequest) RepositoryVersion(repositoryVersion string) PublicationsAPIPublicationsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// A list of fields to include in the response. +func (r PublicationsAPIPublicationsListRequest) Fields(fields []string) PublicationsAPIPublicationsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsAPIPublicationsListRequest) ExcludeFields(excludeFields []string) PublicationsAPIPublicationsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsAPIPublicationsListRequest) Execute() (*PaginatedPublicationResponseList, *http.Response, error) { + return r.ApiService.PublicationsListExecute(r) +} + +/* +PublicationsList List publications + +A base class for any publication viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PublicationsAPIPublicationsListRequest +*/ +func (a *PublicationsAPIService) PublicationsList(ctx context.Context) PublicationsAPIPublicationsListRequest { + return PublicationsAPIPublicationsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedPublicationResponseList +func (a *PublicationsAPIService) PublicationsListExecute(r PublicationsAPIPublicationsListRequest) (*PaginatedPublicationResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedPublicationResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsAPIService.PublicationsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/publications/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpTypeIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_type__in", r.pulpTypeIn, "csv") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_apt.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_apt.go new file mode 100644 index 0000000000..c572e8b9bc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_apt.go @@ -0,0 +1,671 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// PublicationsAptAPIService PublicationsAptAPI service +type PublicationsAptAPIService service + +type PublicationsAptAPIPublicationsDebAptCreateRequest struct { + ctx context.Context + ApiService *PublicationsAptAPIService + debAptPublication *DebAptPublication +} + +func (r PublicationsAptAPIPublicationsDebAptCreateRequest) DebAptPublication(debAptPublication DebAptPublication) PublicationsAptAPIPublicationsDebAptCreateRequest { + r.debAptPublication = &debAptPublication + return r +} + +func (r PublicationsAptAPIPublicationsDebAptCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PublicationsDebAptCreateExecute(r) +} + +/* +PublicationsDebAptCreate Create an apt publication + +Trigger an asynchronous task to publish content + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PublicationsAptAPIPublicationsDebAptCreateRequest +*/ +func (a *PublicationsAptAPIService) PublicationsDebAptCreate(ctx context.Context) PublicationsAptAPIPublicationsDebAptCreateRequest { + return PublicationsAptAPIPublicationsDebAptCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PublicationsAptAPIService) PublicationsDebAptCreateExecute(r PublicationsAptAPIPublicationsDebAptCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsAptAPIService.PublicationsDebAptCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/publications/deb/apt/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debAptPublication == nil { + return localVarReturnValue, nil, reportError("debAptPublication is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debAptPublication + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsAptAPIPublicationsDebAptDeleteRequest struct { + ctx context.Context + ApiService *PublicationsAptAPIService + debAptPublicationHref string +} + +func (r PublicationsAptAPIPublicationsDebAptDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.PublicationsDebAptDeleteExecute(r) +} + +/* +PublicationsDebAptDelete Delete an apt publication + +An AptPublication is the ready to serve Pulp-internal representation of an AptRepositoryVersion. + +When creating an APT publication, users must use simple or structured mode (or both). If the +publication should include '.deb' packages that were manually uploaded to the relevant +AptRepository, users must use 'simple=true'. Conversely, 'structured=true' is only useful for +publishing content obtained via synchronization. Once a Pulp publication has been created, it +can be served by creating a Pulp distribution (in a near atomic action). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptPublicationHref + @return PublicationsAptAPIPublicationsDebAptDeleteRequest +*/ +func (a *PublicationsAptAPIService) PublicationsDebAptDelete(ctx context.Context, debAptPublicationHref string) PublicationsAptAPIPublicationsDebAptDeleteRequest { + return PublicationsAptAPIPublicationsDebAptDeleteRequest{ + ApiService: a, + ctx: ctx, + debAptPublicationHref: debAptPublicationHref, + } +} + +// Execute executes the request +func (a *PublicationsAptAPIService) PublicationsDebAptDeleteExecute(r PublicationsAptAPIPublicationsDebAptDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsAptAPIService.PublicationsDebAptDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_publication_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_publication_href"+"}", parameterValueToString(r.debAptPublicationHref, "debAptPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type PublicationsAptAPIPublicationsDebAptListRequest struct { + ctx context.Context + ApiService *PublicationsAptAPIService + content *string + contentIn *string + limit *int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + pulpIdIn *[]string + repository *string + repositoryVersion *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r PublicationsAptAPIPublicationsDebAptListRequest) Content(content string) PublicationsAptAPIPublicationsDebAptListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r PublicationsAptAPIPublicationsDebAptListRequest) ContentIn(contentIn string) PublicationsAptAPIPublicationsDebAptListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r PublicationsAptAPIPublicationsDebAptListRequest) Limit(limit int32) PublicationsAptAPIPublicationsDebAptListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r PublicationsAptAPIPublicationsDebAptListRequest) Offset(offset int32) PublicationsAptAPIPublicationsDebAptListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PublicationsAptAPIPublicationsDebAptListRequest) Ordering(ordering []string) PublicationsAptAPIPublicationsDebAptListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r PublicationsAptAPIPublicationsDebAptListRequest) PulpCreated(pulpCreated time.Time) PublicationsAptAPIPublicationsDebAptListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r PublicationsAptAPIPublicationsDebAptListRequest) PulpCreatedGt(pulpCreatedGt time.Time) PublicationsAptAPIPublicationsDebAptListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r PublicationsAptAPIPublicationsDebAptListRequest) PulpCreatedGte(pulpCreatedGte time.Time) PublicationsAptAPIPublicationsDebAptListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r PublicationsAptAPIPublicationsDebAptListRequest) PulpCreatedLt(pulpCreatedLt time.Time) PublicationsAptAPIPublicationsDebAptListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r PublicationsAptAPIPublicationsDebAptListRequest) PulpCreatedLte(pulpCreatedLte time.Time) PublicationsAptAPIPublicationsDebAptListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r PublicationsAptAPIPublicationsDebAptListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) PublicationsAptAPIPublicationsDebAptListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsAptAPIPublicationsDebAptListRequest) PulpHrefIn(pulpHrefIn []string) PublicationsAptAPIPublicationsDebAptListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsAptAPIPublicationsDebAptListRequest) PulpIdIn(pulpIdIn []string) PublicationsAptAPIPublicationsDebAptListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository referenced by HREF +func (r PublicationsAptAPIPublicationsDebAptListRequest) Repository(repository string) PublicationsAptAPIPublicationsDebAptListRequest { + r.repository = &repository + return r +} + +// Repository Version referenced by HREF +func (r PublicationsAptAPIPublicationsDebAptListRequest) RepositoryVersion(repositoryVersion string) PublicationsAptAPIPublicationsDebAptListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// A list of fields to include in the response. +func (r PublicationsAptAPIPublicationsDebAptListRequest) Fields(fields []string) PublicationsAptAPIPublicationsDebAptListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsAptAPIPublicationsDebAptListRequest) ExcludeFields(excludeFields []string) PublicationsAptAPIPublicationsDebAptListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsAptAPIPublicationsDebAptListRequest) Execute() (*PaginateddebAptPublicationResponseList, *http.Response, error) { + return r.ApiService.PublicationsDebAptListExecute(r) +} + +/* +PublicationsDebAptList List apt publications + +An AptPublication is the ready to serve Pulp-internal representation of an AptRepositoryVersion. + +When creating an APT publication, users must use simple or structured mode (or both). If the +publication should include '.deb' packages that were manually uploaded to the relevant +AptRepository, users must use 'simple=true'. Conversely, 'structured=true' is only useful for +publishing content obtained via synchronization. Once a Pulp publication has been created, it +can be served by creating a Pulp distribution (in a near atomic action). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PublicationsAptAPIPublicationsDebAptListRequest +*/ +func (a *PublicationsAptAPIService) PublicationsDebAptList(ctx context.Context) PublicationsAptAPIPublicationsDebAptListRequest { + return PublicationsAptAPIPublicationsDebAptListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebAptPublicationResponseList +func (a *PublicationsAptAPIService) PublicationsDebAptListExecute(r PublicationsAptAPIPublicationsDebAptListRequest) (*PaginateddebAptPublicationResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebAptPublicationResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsAptAPIService.PublicationsDebAptList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/publications/deb/apt/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsAptAPIPublicationsDebAptReadRequest struct { + ctx context.Context + ApiService *PublicationsAptAPIService + debAptPublicationHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PublicationsAptAPIPublicationsDebAptReadRequest) Fields(fields []string) PublicationsAptAPIPublicationsDebAptReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsAptAPIPublicationsDebAptReadRequest) ExcludeFields(excludeFields []string) PublicationsAptAPIPublicationsDebAptReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsAptAPIPublicationsDebAptReadRequest) Execute() (*DebAptPublicationResponse, *http.Response, error) { + return r.ApiService.PublicationsDebAptReadExecute(r) +} + +/* +PublicationsDebAptRead Inspect an apt publication + +An AptPublication is the ready to serve Pulp-internal representation of an AptRepositoryVersion. + +When creating an APT publication, users must use simple or structured mode (or both). If the +publication should include '.deb' packages that were manually uploaded to the relevant +AptRepository, users must use 'simple=true'. Conversely, 'structured=true' is only useful for +publishing content obtained via synchronization. Once a Pulp publication has been created, it +can be served by creating a Pulp distribution (in a near atomic action). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptPublicationHref + @return PublicationsAptAPIPublicationsDebAptReadRequest +*/ +func (a *PublicationsAptAPIService) PublicationsDebAptRead(ctx context.Context, debAptPublicationHref string) PublicationsAptAPIPublicationsDebAptReadRequest { + return PublicationsAptAPIPublicationsDebAptReadRequest{ + ApiService: a, + ctx: ctx, + debAptPublicationHref: debAptPublicationHref, + } +} + +// Execute executes the request +// @return DebAptPublicationResponse +func (a *PublicationsAptAPIService) PublicationsDebAptReadExecute(r PublicationsAptAPIPublicationsDebAptReadRequest) (*DebAptPublicationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebAptPublicationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsAptAPIService.PublicationsDebAptRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_publication_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_publication_href"+"}", parameterValueToString(r.debAptPublicationHref, "debAptPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_file.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_file.go new file mode 100644 index 0000000000..bcc0916bd0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_file.go @@ -0,0 +1,1168 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// PublicationsFileAPIService PublicationsFileAPI service +type PublicationsFileAPIService service + +type PublicationsFileAPIPublicationsFileFileAddRoleRequest struct { + ctx context.Context + ApiService *PublicationsFileAPIService + fileFilePublicationHref string + nestedRole *NestedRole +} + +func (r PublicationsFileAPIPublicationsFileFileAddRoleRequest) NestedRole(nestedRole NestedRole) PublicationsFileAPIPublicationsFileFileAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r PublicationsFileAPIPublicationsFileFileAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.PublicationsFileFileAddRoleExecute(r) +} + +/* +PublicationsFileFileAddRole Method for PublicationsFileFileAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFilePublicationHref + @return PublicationsFileAPIPublicationsFileFileAddRoleRequest +*/ +func (a *PublicationsFileAPIService) PublicationsFileFileAddRole(ctx context.Context, fileFilePublicationHref string) PublicationsFileAPIPublicationsFileFileAddRoleRequest { + return PublicationsFileAPIPublicationsFileFileAddRoleRequest{ + ApiService: a, + ctx: ctx, + fileFilePublicationHref: fileFilePublicationHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *PublicationsFileAPIService) PublicationsFileFileAddRoleExecute(r PublicationsFileAPIPublicationsFileFileAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsFileAPIService.PublicationsFileFileAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_publication_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_publication_href"+"}", parameterValueToString(r.fileFilePublicationHref, "fileFilePublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsFileAPIPublicationsFileFileCreateRequest struct { + ctx context.Context + ApiService *PublicationsFileAPIService + fileFilePublication *FileFilePublication +} + +func (r PublicationsFileAPIPublicationsFileFileCreateRequest) FileFilePublication(fileFilePublication FileFilePublication) PublicationsFileAPIPublicationsFileFileCreateRequest { + r.fileFilePublication = &fileFilePublication + return r +} + +func (r PublicationsFileAPIPublicationsFileFileCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PublicationsFileFileCreateExecute(r) +} + +/* +PublicationsFileFileCreate Create a file publication + +Trigger an asynchronous task to publish file content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PublicationsFileAPIPublicationsFileFileCreateRequest +*/ +func (a *PublicationsFileAPIService) PublicationsFileFileCreate(ctx context.Context) PublicationsFileAPIPublicationsFileFileCreateRequest { + return PublicationsFileAPIPublicationsFileFileCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PublicationsFileAPIService) PublicationsFileFileCreateExecute(r PublicationsFileAPIPublicationsFileFileCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsFileAPIService.PublicationsFileFileCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/publications/file/file/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.fileFilePublication == nil { + return localVarReturnValue, nil, reportError("fileFilePublication is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.fileFilePublication + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsFileAPIPublicationsFileFileDeleteRequest struct { + ctx context.Context + ApiService *PublicationsFileAPIService + fileFilePublicationHref string +} + +func (r PublicationsFileAPIPublicationsFileFileDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.PublicationsFileFileDeleteExecute(r) +} + +/* +PublicationsFileFileDelete Delete a file publication + + +A FilePublication contains metadata about all the File Content in a particular File Repository Version. +Once a FilePublication has been created, it can be hosted using the +File Distribution API. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFilePublicationHref + @return PublicationsFileAPIPublicationsFileFileDeleteRequest +*/ +func (a *PublicationsFileAPIService) PublicationsFileFileDelete(ctx context.Context, fileFilePublicationHref string) PublicationsFileAPIPublicationsFileFileDeleteRequest { + return PublicationsFileAPIPublicationsFileFileDeleteRequest{ + ApiService: a, + ctx: ctx, + fileFilePublicationHref: fileFilePublicationHref, + } +} + +// Execute executes the request +func (a *PublicationsFileAPIService) PublicationsFileFileDeleteExecute(r PublicationsFileAPIPublicationsFileFileDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsFileAPIService.PublicationsFileFileDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_publication_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_publication_href"+"}", parameterValueToString(r.fileFilePublicationHref, "fileFilePublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type PublicationsFileAPIPublicationsFileFileListRequest struct { + ctx context.Context + ApiService *PublicationsFileAPIService + content *string + contentIn *string + limit *int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + pulpIdIn *[]string + repository *string + repositoryVersion *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r PublicationsFileAPIPublicationsFileFileListRequest) Content(content string) PublicationsFileAPIPublicationsFileFileListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r PublicationsFileAPIPublicationsFileFileListRequest) ContentIn(contentIn string) PublicationsFileAPIPublicationsFileFileListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r PublicationsFileAPIPublicationsFileFileListRequest) Limit(limit int32) PublicationsFileAPIPublicationsFileFileListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r PublicationsFileAPIPublicationsFileFileListRequest) Offset(offset int32) PublicationsFileAPIPublicationsFileFileListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PublicationsFileAPIPublicationsFileFileListRequest) Ordering(ordering []string) PublicationsFileAPIPublicationsFileFileListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r PublicationsFileAPIPublicationsFileFileListRequest) PulpCreated(pulpCreated time.Time) PublicationsFileAPIPublicationsFileFileListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r PublicationsFileAPIPublicationsFileFileListRequest) PulpCreatedGt(pulpCreatedGt time.Time) PublicationsFileAPIPublicationsFileFileListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r PublicationsFileAPIPublicationsFileFileListRequest) PulpCreatedGte(pulpCreatedGte time.Time) PublicationsFileAPIPublicationsFileFileListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r PublicationsFileAPIPublicationsFileFileListRequest) PulpCreatedLt(pulpCreatedLt time.Time) PublicationsFileAPIPublicationsFileFileListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r PublicationsFileAPIPublicationsFileFileListRequest) PulpCreatedLte(pulpCreatedLte time.Time) PublicationsFileAPIPublicationsFileFileListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r PublicationsFileAPIPublicationsFileFileListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) PublicationsFileAPIPublicationsFileFileListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsFileAPIPublicationsFileFileListRequest) PulpHrefIn(pulpHrefIn []string) PublicationsFileAPIPublicationsFileFileListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsFileAPIPublicationsFileFileListRequest) PulpIdIn(pulpIdIn []string) PublicationsFileAPIPublicationsFileFileListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository referenced by HREF +func (r PublicationsFileAPIPublicationsFileFileListRequest) Repository(repository string) PublicationsFileAPIPublicationsFileFileListRequest { + r.repository = &repository + return r +} + +// Repository Version referenced by HREF +func (r PublicationsFileAPIPublicationsFileFileListRequest) RepositoryVersion(repositoryVersion string) PublicationsFileAPIPublicationsFileFileListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// A list of fields to include in the response. +func (r PublicationsFileAPIPublicationsFileFileListRequest) Fields(fields []string) PublicationsFileAPIPublicationsFileFileListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsFileAPIPublicationsFileFileListRequest) ExcludeFields(excludeFields []string) PublicationsFileAPIPublicationsFileFileListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsFileAPIPublicationsFileFileListRequest) Execute() (*PaginatedfileFilePublicationResponseList, *http.Response, error) { + return r.ApiService.PublicationsFileFileListExecute(r) +} + +/* +PublicationsFileFileList List file publications + + +A FilePublication contains metadata about all the File Content in a particular File Repository Version. +Once a FilePublication has been created, it can be hosted using the +File Distribution API. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PublicationsFileAPIPublicationsFileFileListRequest +*/ +func (a *PublicationsFileAPIService) PublicationsFileFileList(ctx context.Context) PublicationsFileAPIPublicationsFileFileListRequest { + return PublicationsFileAPIPublicationsFileFileListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedfileFilePublicationResponseList +func (a *PublicationsFileAPIService) PublicationsFileFileListExecute(r PublicationsFileAPIPublicationsFileFileListRequest) (*PaginatedfileFilePublicationResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedfileFilePublicationResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsFileAPIService.PublicationsFileFileList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/publications/file/file/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsFileAPIPublicationsFileFileListRolesRequest struct { + ctx context.Context + ApiService *PublicationsFileAPIService + fileFilePublicationHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PublicationsFileAPIPublicationsFileFileListRolesRequest) Fields(fields []string) PublicationsFileAPIPublicationsFileFileListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsFileAPIPublicationsFileFileListRolesRequest) ExcludeFields(excludeFields []string) PublicationsFileAPIPublicationsFileFileListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsFileAPIPublicationsFileFileListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.PublicationsFileFileListRolesExecute(r) +} + +/* +PublicationsFileFileListRoles Method for PublicationsFileFileListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFilePublicationHref + @return PublicationsFileAPIPublicationsFileFileListRolesRequest +*/ +func (a *PublicationsFileAPIService) PublicationsFileFileListRoles(ctx context.Context, fileFilePublicationHref string) PublicationsFileAPIPublicationsFileFileListRolesRequest { + return PublicationsFileAPIPublicationsFileFileListRolesRequest{ + ApiService: a, + ctx: ctx, + fileFilePublicationHref: fileFilePublicationHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *PublicationsFileAPIService) PublicationsFileFileListRolesExecute(r PublicationsFileAPIPublicationsFileFileListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsFileAPIService.PublicationsFileFileListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_publication_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_publication_href"+"}", parameterValueToString(r.fileFilePublicationHref, "fileFilePublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsFileAPIPublicationsFileFileMyPermissionsRequest struct { + ctx context.Context + ApiService *PublicationsFileAPIService + fileFilePublicationHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PublicationsFileAPIPublicationsFileFileMyPermissionsRequest) Fields(fields []string) PublicationsFileAPIPublicationsFileFileMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsFileAPIPublicationsFileFileMyPermissionsRequest) ExcludeFields(excludeFields []string) PublicationsFileAPIPublicationsFileFileMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsFileAPIPublicationsFileFileMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.PublicationsFileFileMyPermissionsExecute(r) +} + +/* +PublicationsFileFileMyPermissions Method for PublicationsFileFileMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFilePublicationHref + @return PublicationsFileAPIPublicationsFileFileMyPermissionsRequest +*/ +func (a *PublicationsFileAPIService) PublicationsFileFileMyPermissions(ctx context.Context, fileFilePublicationHref string) PublicationsFileAPIPublicationsFileFileMyPermissionsRequest { + return PublicationsFileAPIPublicationsFileFileMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + fileFilePublicationHref: fileFilePublicationHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *PublicationsFileAPIService) PublicationsFileFileMyPermissionsExecute(r PublicationsFileAPIPublicationsFileFileMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsFileAPIService.PublicationsFileFileMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_publication_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_publication_href"+"}", parameterValueToString(r.fileFilePublicationHref, "fileFilePublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsFileAPIPublicationsFileFileReadRequest struct { + ctx context.Context + ApiService *PublicationsFileAPIService + fileFilePublicationHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PublicationsFileAPIPublicationsFileFileReadRequest) Fields(fields []string) PublicationsFileAPIPublicationsFileFileReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsFileAPIPublicationsFileFileReadRequest) ExcludeFields(excludeFields []string) PublicationsFileAPIPublicationsFileFileReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsFileAPIPublicationsFileFileReadRequest) Execute() (*FileFilePublicationResponse, *http.Response, error) { + return r.ApiService.PublicationsFileFileReadExecute(r) +} + +/* +PublicationsFileFileRead Inspect a file publication + + +A FilePublication contains metadata about all the File Content in a particular File Repository Version. +Once a FilePublication has been created, it can be hosted using the +File Distribution API. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFilePublicationHref + @return PublicationsFileAPIPublicationsFileFileReadRequest +*/ +func (a *PublicationsFileAPIService) PublicationsFileFileRead(ctx context.Context, fileFilePublicationHref string) PublicationsFileAPIPublicationsFileFileReadRequest { + return PublicationsFileAPIPublicationsFileFileReadRequest{ + ApiService: a, + ctx: ctx, + fileFilePublicationHref: fileFilePublicationHref, + } +} + +// Execute executes the request +// @return FileFilePublicationResponse +func (a *PublicationsFileAPIService) PublicationsFileFileReadExecute(r PublicationsFileAPIPublicationsFileFileReadRequest) (*FileFilePublicationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FileFilePublicationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsFileAPIService.PublicationsFileFileRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_publication_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_publication_href"+"}", parameterValueToString(r.fileFilePublicationHref, "fileFilePublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsFileAPIPublicationsFileFileRemoveRoleRequest struct { + ctx context.Context + ApiService *PublicationsFileAPIService + fileFilePublicationHref string + nestedRole *NestedRole +} + +func (r PublicationsFileAPIPublicationsFileFileRemoveRoleRequest) NestedRole(nestedRole NestedRole) PublicationsFileAPIPublicationsFileFileRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r PublicationsFileAPIPublicationsFileFileRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.PublicationsFileFileRemoveRoleExecute(r) +} + +/* +PublicationsFileFileRemoveRole Method for PublicationsFileFileRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFilePublicationHref + @return PublicationsFileAPIPublicationsFileFileRemoveRoleRequest +*/ +func (a *PublicationsFileAPIService) PublicationsFileFileRemoveRole(ctx context.Context, fileFilePublicationHref string) PublicationsFileAPIPublicationsFileFileRemoveRoleRequest { + return PublicationsFileAPIPublicationsFileFileRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + fileFilePublicationHref: fileFilePublicationHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *PublicationsFileAPIService) PublicationsFileFileRemoveRoleExecute(r PublicationsFileAPIPublicationsFileFileRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsFileAPIService.PublicationsFileFileRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_publication_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_publication_href"+"}", parameterValueToString(r.fileFilePublicationHref, "fileFilePublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_gem.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_gem.go new file mode 100644 index 0000000000..1842aa3700 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_gem.go @@ -0,0 +1,653 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// PublicationsGemAPIService PublicationsGemAPI service +type PublicationsGemAPIService service + +type PublicationsGemAPIPublicationsGemGemCreateRequest struct { + ctx context.Context + ApiService *PublicationsGemAPIService + gemGemPublication *GemGemPublication +} + +func (r PublicationsGemAPIPublicationsGemGemCreateRequest) GemGemPublication(gemGemPublication GemGemPublication) PublicationsGemAPIPublicationsGemGemCreateRequest { + r.gemGemPublication = &gemGemPublication + return r +} + +func (r PublicationsGemAPIPublicationsGemGemCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PublicationsGemGemCreateExecute(r) +} + +/* +PublicationsGemGemCreate Create a gem publication + +Trigger an asynchronous task to publish gem content + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PublicationsGemAPIPublicationsGemGemCreateRequest +*/ +func (a *PublicationsGemAPIService) PublicationsGemGemCreate(ctx context.Context) PublicationsGemAPIPublicationsGemGemCreateRequest { + return PublicationsGemAPIPublicationsGemGemCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PublicationsGemAPIService) PublicationsGemGemCreateExecute(r PublicationsGemAPIPublicationsGemGemCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsGemAPIService.PublicationsGemGemCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/publications/gem/gem/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.gemGemPublication == nil { + return localVarReturnValue, nil, reportError("gemGemPublication is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.gemGemPublication + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsGemAPIPublicationsGemGemDeleteRequest struct { + ctx context.Context + ApiService *PublicationsGemAPIService + gemGemPublicationHref string +} + +func (r PublicationsGemAPIPublicationsGemGemDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.PublicationsGemGemDeleteExecute(r) +} + +/* +PublicationsGemGemDelete Delete a gem publication + +A ViewSet for GemPublication. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemPublicationHref + @return PublicationsGemAPIPublicationsGemGemDeleteRequest +*/ +func (a *PublicationsGemAPIService) PublicationsGemGemDelete(ctx context.Context, gemGemPublicationHref string) PublicationsGemAPIPublicationsGemGemDeleteRequest { + return PublicationsGemAPIPublicationsGemGemDeleteRequest{ + ApiService: a, + ctx: ctx, + gemGemPublicationHref: gemGemPublicationHref, + } +} + +// Execute executes the request +func (a *PublicationsGemAPIService) PublicationsGemGemDeleteExecute(r PublicationsGemAPIPublicationsGemGemDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsGemAPIService.PublicationsGemGemDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_publication_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_publication_href"+"}", parameterValueToString(r.gemGemPublicationHref, "gemGemPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type PublicationsGemAPIPublicationsGemGemListRequest struct { + ctx context.Context + ApiService *PublicationsGemAPIService + content *string + contentIn *string + limit *int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + pulpIdIn *[]string + repository *string + repositoryVersion *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r PublicationsGemAPIPublicationsGemGemListRequest) Content(content string) PublicationsGemAPIPublicationsGemGemListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r PublicationsGemAPIPublicationsGemGemListRequest) ContentIn(contentIn string) PublicationsGemAPIPublicationsGemGemListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r PublicationsGemAPIPublicationsGemGemListRequest) Limit(limit int32) PublicationsGemAPIPublicationsGemGemListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r PublicationsGemAPIPublicationsGemGemListRequest) Offset(offset int32) PublicationsGemAPIPublicationsGemGemListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PublicationsGemAPIPublicationsGemGemListRequest) Ordering(ordering []string) PublicationsGemAPIPublicationsGemGemListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r PublicationsGemAPIPublicationsGemGemListRequest) PulpCreated(pulpCreated time.Time) PublicationsGemAPIPublicationsGemGemListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r PublicationsGemAPIPublicationsGemGemListRequest) PulpCreatedGt(pulpCreatedGt time.Time) PublicationsGemAPIPublicationsGemGemListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r PublicationsGemAPIPublicationsGemGemListRequest) PulpCreatedGte(pulpCreatedGte time.Time) PublicationsGemAPIPublicationsGemGemListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r PublicationsGemAPIPublicationsGemGemListRequest) PulpCreatedLt(pulpCreatedLt time.Time) PublicationsGemAPIPublicationsGemGemListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r PublicationsGemAPIPublicationsGemGemListRequest) PulpCreatedLte(pulpCreatedLte time.Time) PublicationsGemAPIPublicationsGemGemListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r PublicationsGemAPIPublicationsGemGemListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) PublicationsGemAPIPublicationsGemGemListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsGemAPIPublicationsGemGemListRequest) PulpHrefIn(pulpHrefIn []string) PublicationsGemAPIPublicationsGemGemListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsGemAPIPublicationsGemGemListRequest) PulpIdIn(pulpIdIn []string) PublicationsGemAPIPublicationsGemGemListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository referenced by HREF +func (r PublicationsGemAPIPublicationsGemGemListRequest) Repository(repository string) PublicationsGemAPIPublicationsGemGemListRequest { + r.repository = &repository + return r +} + +// Repository Version referenced by HREF +func (r PublicationsGemAPIPublicationsGemGemListRequest) RepositoryVersion(repositoryVersion string) PublicationsGemAPIPublicationsGemGemListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// A list of fields to include in the response. +func (r PublicationsGemAPIPublicationsGemGemListRequest) Fields(fields []string) PublicationsGemAPIPublicationsGemGemListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsGemAPIPublicationsGemGemListRequest) ExcludeFields(excludeFields []string) PublicationsGemAPIPublicationsGemGemListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsGemAPIPublicationsGemGemListRequest) Execute() (*PaginatedgemGemPublicationResponseList, *http.Response, error) { + return r.ApiService.PublicationsGemGemListExecute(r) +} + +/* +PublicationsGemGemList List gem publications + +A ViewSet for GemPublication. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PublicationsGemAPIPublicationsGemGemListRequest +*/ +func (a *PublicationsGemAPIService) PublicationsGemGemList(ctx context.Context) PublicationsGemAPIPublicationsGemGemListRequest { + return PublicationsGemAPIPublicationsGemGemListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedgemGemPublicationResponseList +func (a *PublicationsGemAPIService) PublicationsGemGemListExecute(r PublicationsGemAPIPublicationsGemGemListRequest) (*PaginatedgemGemPublicationResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedgemGemPublicationResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsGemAPIService.PublicationsGemGemList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/publications/gem/gem/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsGemAPIPublicationsGemGemReadRequest struct { + ctx context.Context + ApiService *PublicationsGemAPIService + gemGemPublicationHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PublicationsGemAPIPublicationsGemGemReadRequest) Fields(fields []string) PublicationsGemAPIPublicationsGemGemReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsGemAPIPublicationsGemGemReadRequest) ExcludeFields(excludeFields []string) PublicationsGemAPIPublicationsGemGemReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsGemAPIPublicationsGemGemReadRequest) Execute() (*GemGemPublicationResponse, *http.Response, error) { + return r.ApiService.PublicationsGemGemReadExecute(r) +} + +/* +PublicationsGemGemRead Inspect a gem publication + +A ViewSet for GemPublication. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemPublicationHref + @return PublicationsGemAPIPublicationsGemGemReadRequest +*/ +func (a *PublicationsGemAPIService) PublicationsGemGemRead(ctx context.Context, gemGemPublicationHref string) PublicationsGemAPIPublicationsGemGemReadRequest { + return PublicationsGemAPIPublicationsGemGemReadRequest{ + ApiService: a, + ctx: ctx, + gemGemPublicationHref: gemGemPublicationHref, + } +} + +// Execute executes the request +// @return GemGemPublicationResponse +func (a *PublicationsGemAPIService) PublicationsGemGemReadExecute(r PublicationsGemAPIPublicationsGemGemReadRequest) (*GemGemPublicationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GemGemPublicationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsGemAPIService.PublicationsGemGemRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_publication_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_publication_href"+"}", parameterValueToString(r.gemGemPublicationHref, "gemGemPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_pypi.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_pypi.go new file mode 100644 index 0000000000..096f181411 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_pypi.go @@ -0,0 +1,660 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// PublicationsPypiAPIService PublicationsPypiAPI service +type PublicationsPypiAPIService service + +type PublicationsPypiAPIPublicationsPythonPypiCreateRequest struct { + ctx context.Context + ApiService *PublicationsPypiAPIService + pythonPythonPublication *PythonPythonPublication +} + +func (r PublicationsPypiAPIPublicationsPythonPypiCreateRequest) PythonPythonPublication(pythonPythonPublication PythonPythonPublication) PublicationsPypiAPIPublicationsPythonPypiCreateRequest { + r.pythonPythonPublication = &pythonPythonPublication + return r +} + +func (r PublicationsPypiAPIPublicationsPythonPypiCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PublicationsPythonPypiCreateExecute(r) +} + +/* +PublicationsPythonPypiCreate Create a python publication + + +Dispatches a publish task, which generates metadata that will be used by pip. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PublicationsPypiAPIPublicationsPythonPypiCreateRequest +*/ +func (a *PublicationsPypiAPIService) PublicationsPythonPypiCreate(ctx context.Context) PublicationsPypiAPIPublicationsPythonPypiCreateRequest { + return PublicationsPypiAPIPublicationsPythonPypiCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PublicationsPypiAPIService) PublicationsPythonPypiCreateExecute(r PublicationsPypiAPIPublicationsPythonPypiCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsPypiAPIService.PublicationsPythonPypiCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/publications/python/pypi/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pythonPythonPublication == nil { + return localVarReturnValue, nil, reportError("pythonPythonPublication is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pythonPythonPublication + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsPypiAPIPublicationsPythonPypiDeleteRequest struct { + ctx context.Context + ApiService *PublicationsPypiAPIService + pythonPythonPublicationHref string +} + +func (r PublicationsPypiAPIPublicationsPythonPypiDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.PublicationsPythonPypiDeleteExecute(r) +} + +/* +PublicationsPythonPypiDelete Delete a python publication + + +Python Publications refer to the Python Package content in a repository version, and include +metadata about that content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonPublicationHref + @return PublicationsPypiAPIPublicationsPythonPypiDeleteRequest +*/ +func (a *PublicationsPypiAPIService) PublicationsPythonPypiDelete(ctx context.Context, pythonPythonPublicationHref string) PublicationsPypiAPIPublicationsPythonPypiDeleteRequest { + return PublicationsPypiAPIPublicationsPythonPypiDeleteRequest{ + ApiService: a, + ctx: ctx, + pythonPythonPublicationHref: pythonPythonPublicationHref, + } +} + +// Execute executes the request +func (a *PublicationsPypiAPIService) PublicationsPythonPypiDeleteExecute(r PublicationsPypiAPIPublicationsPythonPypiDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsPypiAPIService.PublicationsPythonPypiDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_publication_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_publication_href"+"}", parameterValueToString(r.pythonPythonPublicationHref, "pythonPythonPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type PublicationsPypiAPIPublicationsPythonPypiListRequest struct { + ctx context.Context + ApiService *PublicationsPypiAPIService + content *string + contentIn *string + limit *int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + pulpIdIn *[]string + repository *string + repositoryVersion *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) Content(content string) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) ContentIn(contentIn string) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) Limit(limit int32) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) Offset(offset int32) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) Ordering(ordering []string) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) PulpCreated(pulpCreated time.Time) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) PulpCreatedGt(pulpCreatedGt time.Time) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) PulpCreatedGte(pulpCreatedGte time.Time) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) PulpCreatedLt(pulpCreatedLt time.Time) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) PulpCreatedLte(pulpCreatedLte time.Time) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) PulpHrefIn(pulpHrefIn []string) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) PulpIdIn(pulpIdIn []string) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository referenced by HREF +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) Repository(repository string) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.repository = &repository + return r +} + +// Repository Version referenced by HREF +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) RepositoryVersion(repositoryVersion string) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// A list of fields to include in the response. +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) Fields(fields []string) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) ExcludeFields(excludeFields []string) PublicationsPypiAPIPublicationsPythonPypiListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsPypiAPIPublicationsPythonPypiListRequest) Execute() (*PaginatedpythonPythonPublicationResponseList, *http.Response, error) { + return r.ApiService.PublicationsPythonPypiListExecute(r) +} + +/* +PublicationsPythonPypiList List python publications + + +Python Publications refer to the Python Package content in a repository version, and include +metadata about that content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PublicationsPypiAPIPublicationsPythonPypiListRequest +*/ +func (a *PublicationsPypiAPIService) PublicationsPythonPypiList(ctx context.Context) PublicationsPypiAPIPublicationsPythonPypiListRequest { + return PublicationsPypiAPIPublicationsPythonPypiListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedpythonPythonPublicationResponseList +func (a *PublicationsPypiAPIService) PublicationsPythonPypiListExecute(r PublicationsPypiAPIPublicationsPythonPypiListRequest) (*PaginatedpythonPythonPublicationResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedpythonPythonPublicationResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsPypiAPIService.PublicationsPythonPypiList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/publications/python/pypi/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsPypiAPIPublicationsPythonPypiReadRequest struct { + ctx context.Context + ApiService *PublicationsPypiAPIService + pythonPythonPublicationHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PublicationsPypiAPIPublicationsPythonPypiReadRequest) Fields(fields []string) PublicationsPypiAPIPublicationsPythonPypiReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsPypiAPIPublicationsPythonPypiReadRequest) ExcludeFields(excludeFields []string) PublicationsPypiAPIPublicationsPythonPypiReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsPypiAPIPublicationsPythonPypiReadRequest) Execute() (*PythonPythonPublicationResponse, *http.Response, error) { + return r.ApiService.PublicationsPythonPypiReadExecute(r) +} + +/* +PublicationsPythonPypiRead Inspect a python publication + + +Python Publications refer to the Python Package content in a repository version, and include +metadata about that content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonPublicationHref + @return PublicationsPypiAPIPublicationsPythonPypiReadRequest +*/ +func (a *PublicationsPypiAPIService) PublicationsPythonPypiRead(ctx context.Context, pythonPythonPublicationHref string) PublicationsPypiAPIPublicationsPythonPypiReadRequest { + return PublicationsPypiAPIPublicationsPythonPypiReadRequest{ + ApiService: a, + ctx: ctx, + pythonPythonPublicationHref: pythonPythonPublicationHref, + } +} + +// Execute executes the request +// @return PythonPythonPublicationResponse +func (a *PublicationsPypiAPIService) PublicationsPythonPypiReadExecute(r PublicationsPypiAPIPublicationsPythonPypiReadRequest) (*PythonPythonPublicationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PythonPythonPublicationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsPypiAPIService.PublicationsPythonPypiRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_publication_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_publication_href"+"}", parameterValueToString(r.pythonPythonPublicationHref, "pythonPythonPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_rpm.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_rpm.go new file mode 100644 index 0000000000..6f5e1e60c1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_rpm.go @@ -0,0 +1,1159 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// PublicationsRpmAPIService PublicationsRpmAPI service +type PublicationsRpmAPIService service + +type PublicationsRpmAPIPublicationsRpmRpmAddRoleRequest struct { + ctx context.Context + ApiService *PublicationsRpmAPIService + rpmRpmPublicationHref string + nestedRole *NestedRole +} + +func (r PublicationsRpmAPIPublicationsRpmRpmAddRoleRequest) NestedRole(nestedRole NestedRole) PublicationsRpmAPIPublicationsRpmRpmAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r PublicationsRpmAPIPublicationsRpmRpmAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.PublicationsRpmRpmAddRoleExecute(r) +} + +/* +PublicationsRpmRpmAddRole Method for PublicationsRpmRpmAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmPublicationHref + @return PublicationsRpmAPIPublicationsRpmRpmAddRoleRequest +*/ +func (a *PublicationsRpmAPIService) PublicationsRpmRpmAddRole(ctx context.Context, rpmRpmPublicationHref string) PublicationsRpmAPIPublicationsRpmRpmAddRoleRequest { + return PublicationsRpmAPIPublicationsRpmRpmAddRoleRequest{ + ApiService: a, + ctx: ctx, + rpmRpmPublicationHref: rpmRpmPublicationHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *PublicationsRpmAPIService) PublicationsRpmRpmAddRoleExecute(r PublicationsRpmAPIPublicationsRpmRpmAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsRpmAPIService.PublicationsRpmRpmAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_publication_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_publication_href"+"}", parameterValueToString(r.rpmRpmPublicationHref, "rpmRpmPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsRpmAPIPublicationsRpmRpmCreateRequest struct { + ctx context.Context + ApiService *PublicationsRpmAPIService + rpmRpmPublication *RpmRpmPublication +} + +func (r PublicationsRpmAPIPublicationsRpmRpmCreateRequest) RpmRpmPublication(rpmRpmPublication RpmRpmPublication) PublicationsRpmAPIPublicationsRpmRpmCreateRequest { + r.rpmRpmPublication = &rpmRpmPublication + return r +} + +func (r PublicationsRpmAPIPublicationsRpmRpmCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PublicationsRpmRpmCreateExecute(r) +} + +/* +PublicationsRpmRpmCreate Create a rpm publication + +Trigger an asynchronous task to create a new RPM content publication. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PublicationsRpmAPIPublicationsRpmRpmCreateRequest +*/ +func (a *PublicationsRpmAPIService) PublicationsRpmRpmCreate(ctx context.Context) PublicationsRpmAPIPublicationsRpmRpmCreateRequest { + return PublicationsRpmAPIPublicationsRpmRpmCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PublicationsRpmAPIService) PublicationsRpmRpmCreateExecute(r PublicationsRpmAPIPublicationsRpmRpmCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsRpmAPIService.PublicationsRpmRpmCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/publications/rpm/rpm/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmRpmPublication == nil { + return localVarReturnValue, nil, reportError("rpmRpmPublication is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmRpmPublication + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsRpmAPIPublicationsRpmRpmDeleteRequest struct { + ctx context.Context + ApiService *PublicationsRpmAPIService + rpmRpmPublicationHref string +} + +func (r PublicationsRpmAPIPublicationsRpmRpmDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.PublicationsRpmRpmDeleteExecute(r) +} + +/* +PublicationsRpmRpmDelete Delete a rpm publication + +ViewSet for Rpm Publications. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmPublicationHref + @return PublicationsRpmAPIPublicationsRpmRpmDeleteRequest +*/ +func (a *PublicationsRpmAPIService) PublicationsRpmRpmDelete(ctx context.Context, rpmRpmPublicationHref string) PublicationsRpmAPIPublicationsRpmRpmDeleteRequest { + return PublicationsRpmAPIPublicationsRpmRpmDeleteRequest{ + ApiService: a, + ctx: ctx, + rpmRpmPublicationHref: rpmRpmPublicationHref, + } +} + +// Execute executes the request +func (a *PublicationsRpmAPIService) PublicationsRpmRpmDeleteExecute(r PublicationsRpmAPIPublicationsRpmRpmDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsRpmAPIService.PublicationsRpmRpmDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_publication_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_publication_href"+"}", parameterValueToString(r.rpmRpmPublicationHref, "rpmRpmPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type PublicationsRpmAPIPublicationsRpmRpmListRequest struct { + ctx context.Context + ApiService *PublicationsRpmAPIService + content *string + contentIn *string + limit *int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + pulpIdIn *[]string + repository *string + repositoryVersion *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) Content(content string) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) ContentIn(contentIn string) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) Limit(limit int32) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) Offset(offset int32) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) Ordering(ordering []string) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) PulpCreated(pulpCreated time.Time) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) PulpCreatedGt(pulpCreatedGt time.Time) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) PulpCreatedGte(pulpCreatedGte time.Time) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) PulpCreatedLt(pulpCreatedLt time.Time) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) PulpCreatedLte(pulpCreatedLte time.Time) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) PulpHrefIn(pulpHrefIn []string) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) PulpIdIn(pulpIdIn []string) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository referenced by HREF +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) Repository(repository string) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.repository = &repository + return r +} + +// Repository Version referenced by HREF +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) RepositoryVersion(repositoryVersion string) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// A list of fields to include in the response. +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) Fields(fields []string) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) ExcludeFields(excludeFields []string) PublicationsRpmAPIPublicationsRpmRpmListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsRpmAPIPublicationsRpmRpmListRequest) Execute() (*PaginatedrpmRpmPublicationResponseList, *http.Response, error) { + return r.ApiService.PublicationsRpmRpmListExecute(r) +} + +/* +PublicationsRpmRpmList List rpm publications + +ViewSet for Rpm Publications. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PublicationsRpmAPIPublicationsRpmRpmListRequest +*/ +func (a *PublicationsRpmAPIService) PublicationsRpmRpmList(ctx context.Context) PublicationsRpmAPIPublicationsRpmRpmListRequest { + return PublicationsRpmAPIPublicationsRpmRpmListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmRpmPublicationResponseList +func (a *PublicationsRpmAPIService) PublicationsRpmRpmListExecute(r PublicationsRpmAPIPublicationsRpmRpmListRequest) (*PaginatedrpmRpmPublicationResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmRpmPublicationResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsRpmAPIService.PublicationsRpmRpmList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/publications/rpm/rpm/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsRpmAPIPublicationsRpmRpmListRolesRequest struct { + ctx context.Context + ApiService *PublicationsRpmAPIService + rpmRpmPublicationHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PublicationsRpmAPIPublicationsRpmRpmListRolesRequest) Fields(fields []string) PublicationsRpmAPIPublicationsRpmRpmListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsRpmAPIPublicationsRpmRpmListRolesRequest) ExcludeFields(excludeFields []string) PublicationsRpmAPIPublicationsRpmRpmListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsRpmAPIPublicationsRpmRpmListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.PublicationsRpmRpmListRolesExecute(r) +} + +/* +PublicationsRpmRpmListRoles Method for PublicationsRpmRpmListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmPublicationHref + @return PublicationsRpmAPIPublicationsRpmRpmListRolesRequest +*/ +func (a *PublicationsRpmAPIService) PublicationsRpmRpmListRoles(ctx context.Context, rpmRpmPublicationHref string) PublicationsRpmAPIPublicationsRpmRpmListRolesRequest { + return PublicationsRpmAPIPublicationsRpmRpmListRolesRequest{ + ApiService: a, + ctx: ctx, + rpmRpmPublicationHref: rpmRpmPublicationHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *PublicationsRpmAPIService) PublicationsRpmRpmListRolesExecute(r PublicationsRpmAPIPublicationsRpmRpmListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsRpmAPIService.PublicationsRpmRpmListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_publication_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_publication_href"+"}", parameterValueToString(r.rpmRpmPublicationHref, "rpmRpmPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsRpmAPIPublicationsRpmRpmMyPermissionsRequest struct { + ctx context.Context + ApiService *PublicationsRpmAPIService + rpmRpmPublicationHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PublicationsRpmAPIPublicationsRpmRpmMyPermissionsRequest) Fields(fields []string) PublicationsRpmAPIPublicationsRpmRpmMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsRpmAPIPublicationsRpmRpmMyPermissionsRequest) ExcludeFields(excludeFields []string) PublicationsRpmAPIPublicationsRpmRpmMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsRpmAPIPublicationsRpmRpmMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.PublicationsRpmRpmMyPermissionsExecute(r) +} + +/* +PublicationsRpmRpmMyPermissions Method for PublicationsRpmRpmMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmPublicationHref + @return PublicationsRpmAPIPublicationsRpmRpmMyPermissionsRequest +*/ +func (a *PublicationsRpmAPIService) PublicationsRpmRpmMyPermissions(ctx context.Context, rpmRpmPublicationHref string) PublicationsRpmAPIPublicationsRpmRpmMyPermissionsRequest { + return PublicationsRpmAPIPublicationsRpmRpmMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + rpmRpmPublicationHref: rpmRpmPublicationHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *PublicationsRpmAPIService) PublicationsRpmRpmMyPermissionsExecute(r PublicationsRpmAPIPublicationsRpmRpmMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsRpmAPIService.PublicationsRpmRpmMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_publication_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_publication_href"+"}", parameterValueToString(r.rpmRpmPublicationHref, "rpmRpmPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsRpmAPIPublicationsRpmRpmReadRequest struct { + ctx context.Context + ApiService *PublicationsRpmAPIService + rpmRpmPublicationHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PublicationsRpmAPIPublicationsRpmRpmReadRequest) Fields(fields []string) PublicationsRpmAPIPublicationsRpmRpmReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsRpmAPIPublicationsRpmRpmReadRequest) ExcludeFields(excludeFields []string) PublicationsRpmAPIPublicationsRpmRpmReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsRpmAPIPublicationsRpmRpmReadRequest) Execute() (*RpmRpmPublicationResponse, *http.Response, error) { + return r.ApiService.PublicationsRpmRpmReadExecute(r) +} + +/* +PublicationsRpmRpmRead Inspect a rpm publication + +ViewSet for Rpm Publications. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmPublicationHref + @return PublicationsRpmAPIPublicationsRpmRpmReadRequest +*/ +func (a *PublicationsRpmAPIService) PublicationsRpmRpmRead(ctx context.Context, rpmRpmPublicationHref string) PublicationsRpmAPIPublicationsRpmRpmReadRequest { + return PublicationsRpmAPIPublicationsRpmRpmReadRequest{ + ApiService: a, + ctx: ctx, + rpmRpmPublicationHref: rpmRpmPublicationHref, + } +} + +// Execute executes the request +// @return RpmRpmPublicationResponse +func (a *PublicationsRpmAPIService) PublicationsRpmRpmReadExecute(r PublicationsRpmAPIPublicationsRpmRpmReadRequest) (*RpmRpmPublicationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmRpmPublicationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsRpmAPIService.PublicationsRpmRpmRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_publication_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_publication_href"+"}", parameterValueToString(r.rpmRpmPublicationHref, "rpmRpmPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsRpmAPIPublicationsRpmRpmRemoveRoleRequest struct { + ctx context.Context + ApiService *PublicationsRpmAPIService + rpmRpmPublicationHref string + nestedRole *NestedRole +} + +func (r PublicationsRpmAPIPublicationsRpmRpmRemoveRoleRequest) NestedRole(nestedRole NestedRole) PublicationsRpmAPIPublicationsRpmRpmRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r PublicationsRpmAPIPublicationsRpmRpmRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.PublicationsRpmRpmRemoveRoleExecute(r) +} + +/* +PublicationsRpmRpmRemoveRole Method for PublicationsRpmRpmRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmPublicationHref + @return PublicationsRpmAPIPublicationsRpmRpmRemoveRoleRequest +*/ +func (a *PublicationsRpmAPIService) PublicationsRpmRpmRemoveRole(ctx context.Context, rpmRpmPublicationHref string) PublicationsRpmAPIPublicationsRpmRpmRemoveRoleRequest { + return PublicationsRpmAPIPublicationsRpmRpmRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + rpmRpmPublicationHref: rpmRpmPublicationHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *PublicationsRpmAPIService) PublicationsRpmRpmRemoveRoleExecute(r PublicationsRpmAPIPublicationsRpmRpmRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsRpmAPIService.PublicationsRpmRpmRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_publication_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_publication_href"+"}", parameterValueToString(r.rpmRpmPublicationHref, "rpmRpmPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_verbatim.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_verbatim.go new file mode 100644 index 0000000000..d15699f647 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_publications_verbatim.go @@ -0,0 +1,668 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// PublicationsVerbatimAPIService PublicationsVerbatimAPI service +type PublicationsVerbatimAPIService service + +type PublicationsVerbatimAPIPublicationsDebVerbatimCreateRequest struct { + ctx context.Context + ApiService *PublicationsVerbatimAPIService + debVerbatimPublication *DebVerbatimPublication +} + +func (r PublicationsVerbatimAPIPublicationsDebVerbatimCreateRequest) DebVerbatimPublication(debVerbatimPublication DebVerbatimPublication) PublicationsVerbatimAPIPublicationsDebVerbatimCreateRequest { + r.debVerbatimPublication = &debVerbatimPublication + return r +} + +func (r PublicationsVerbatimAPIPublicationsDebVerbatimCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PublicationsDebVerbatimCreateExecute(r) +} + +/* +PublicationsDebVerbatimCreate Create a verbatim publication + +Trigger an asynchronous task to publish content + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PublicationsVerbatimAPIPublicationsDebVerbatimCreateRequest +*/ +func (a *PublicationsVerbatimAPIService) PublicationsDebVerbatimCreate(ctx context.Context) PublicationsVerbatimAPIPublicationsDebVerbatimCreateRequest { + return PublicationsVerbatimAPIPublicationsDebVerbatimCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PublicationsVerbatimAPIService) PublicationsDebVerbatimCreateExecute(r PublicationsVerbatimAPIPublicationsDebVerbatimCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsVerbatimAPIService.PublicationsDebVerbatimCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/publications/deb/verbatim/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debVerbatimPublication == nil { + return localVarReturnValue, nil, reportError("debVerbatimPublication is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debVerbatimPublication + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsVerbatimAPIPublicationsDebVerbatimDeleteRequest struct { + ctx context.Context + ApiService *PublicationsVerbatimAPIService + debVerbatimPublicationHref string +} + +func (r PublicationsVerbatimAPIPublicationsDebVerbatimDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.PublicationsDebVerbatimDeleteExecute(r) +} + +/* +PublicationsDebVerbatimDelete Delete a verbatim publication + +An VerbatimPublication is the Pulp-internal representation of a "mirrored" AptRepositoryVersion. + +In other words, the verbatim publisher will recreate the synced subset of some a APT +repository using the exact same metadata files and signatures as used by the upstream original. +Once a Pulp publication has been created, it can be served by creating a Pulp distribution (in +a near atomic action). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debVerbatimPublicationHref + @return PublicationsVerbatimAPIPublicationsDebVerbatimDeleteRequest +*/ +func (a *PublicationsVerbatimAPIService) PublicationsDebVerbatimDelete(ctx context.Context, debVerbatimPublicationHref string) PublicationsVerbatimAPIPublicationsDebVerbatimDeleteRequest { + return PublicationsVerbatimAPIPublicationsDebVerbatimDeleteRequest{ + ApiService: a, + ctx: ctx, + debVerbatimPublicationHref: debVerbatimPublicationHref, + } +} + +// Execute executes the request +func (a *PublicationsVerbatimAPIService) PublicationsDebVerbatimDeleteExecute(r PublicationsVerbatimAPIPublicationsDebVerbatimDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsVerbatimAPIService.PublicationsDebVerbatimDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_verbatim_publication_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_verbatim_publication_href"+"}", parameterValueToString(r.debVerbatimPublicationHref, "debVerbatimPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type PublicationsVerbatimAPIPublicationsDebVerbatimListRequest struct { + ctx context.Context + ApiService *PublicationsVerbatimAPIService + content *string + contentIn *string + limit *int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + pulpIdIn *[]string + repository *string + repositoryVersion *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) Content(content string) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) ContentIn(contentIn string) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) Limit(limit int32) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) Offset(offset int32) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) Ordering(ordering []string) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) PulpCreated(pulpCreated time.Time) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) PulpCreatedGt(pulpCreatedGt time.Time) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) PulpCreatedGte(pulpCreatedGte time.Time) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) PulpCreatedLt(pulpCreatedLt time.Time) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) PulpCreatedLte(pulpCreatedLte time.Time) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) PulpHrefIn(pulpHrefIn []string) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) PulpIdIn(pulpIdIn []string) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Repository referenced by HREF +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) Repository(repository string) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.repository = &repository + return r +} + +// Repository Version referenced by HREF +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) RepositoryVersion(repositoryVersion string) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// A list of fields to include in the response. +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) Fields(fields []string) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) ExcludeFields(excludeFields []string) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) Execute() (*PaginateddebVerbatimPublicationResponseList, *http.Response, error) { + return r.ApiService.PublicationsDebVerbatimListExecute(r) +} + +/* +PublicationsDebVerbatimList List verbatim publications + +An VerbatimPublication is the Pulp-internal representation of a "mirrored" AptRepositoryVersion. + +In other words, the verbatim publisher will recreate the synced subset of some a APT +repository using the exact same metadata files and signatures as used by the upstream original. +Once a Pulp publication has been created, it can be served by creating a Pulp distribution (in +a near atomic action). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PublicationsVerbatimAPIPublicationsDebVerbatimListRequest +*/ +func (a *PublicationsVerbatimAPIService) PublicationsDebVerbatimList(ctx context.Context) PublicationsVerbatimAPIPublicationsDebVerbatimListRequest { + return PublicationsVerbatimAPIPublicationsDebVerbatimListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebVerbatimPublicationResponseList +func (a *PublicationsVerbatimAPIService) PublicationsDebVerbatimListExecute(r PublicationsVerbatimAPIPublicationsDebVerbatimListRequest) (*PaginateddebVerbatimPublicationResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebVerbatimPublicationResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsVerbatimAPIService.PublicationsDebVerbatimList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/publications/deb/verbatim/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PublicationsVerbatimAPIPublicationsDebVerbatimReadRequest struct { + ctx context.Context + ApiService *PublicationsVerbatimAPIService + debVerbatimPublicationHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PublicationsVerbatimAPIPublicationsDebVerbatimReadRequest) Fields(fields []string) PublicationsVerbatimAPIPublicationsDebVerbatimReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PublicationsVerbatimAPIPublicationsDebVerbatimReadRequest) ExcludeFields(excludeFields []string) PublicationsVerbatimAPIPublicationsDebVerbatimReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PublicationsVerbatimAPIPublicationsDebVerbatimReadRequest) Execute() (*DebVerbatimPublicationResponse, *http.Response, error) { + return r.ApiService.PublicationsDebVerbatimReadExecute(r) +} + +/* +PublicationsDebVerbatimRead Inspect a verbatim publication + +An VerbatimPublication is the Pulp-internal representation of a "mirrored" AptRepositoryVersion. + +In other words, the verbatim publisher will recreate the synced subset of some a APT +repository using the exact same metadata files and signatures as used by the upstream original. +Once a Pulp publication has been created, it can be served by creating a Pulp distribution (in +a near atomic action). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debVerbatimPublicationHref + @return PublicationsVerbatimAPIPublicationsDebVerbatimReadRequest +*/ +func (a *PublicationsVerbatimAPIService) PublicationsDebVerbatimRead(ctx context.Context, debVerbatimPublicationHref string) PublicationsVerbatimAPIPublicationsDebVerbatimReadRequest { + return PublicationsVerbatimAPIPublicationsDebVerbatimReadRequest{ + ApiService: a, + ctx: ctx, + debVerbatimPublicationHref: debVerbatimPublicationHref, + } +} + +// Execute executes the request +// @return DebVerbatimPublicationResponse +func (a *PublicationsVerbatimAPIService) PublicationsDebVerbatimReadExecute(r PublicationsVerbatimAPIPublicationsDebVerbatimReadRequest) (*DebVerbatimPublicationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebVerbatimPublicationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicationsVerbatimAPIService.PublicationsDebVerbatimRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_verbatim_publication_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_verbatim_publication_href"+"}", parameterValueToString(r.debVerbatimPublicationHref, "debVerbatimPublicationHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api.go new file mode 100644 index 0000000000..39e936aef6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api.go @@ -0,0 +1,154 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiAPIService PulpAnsibleApiAPI service +type PulpAnsibleApiAPIService service + +type PulpAnsibleApiAPIPulpAnsibleGalaxyApiGetRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiAPIService + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiAPIPulpAnsibleGalaxyApiGetRequest) Fields(fields []string) PulpAnsibleApiAPIPulpAnsibleGalaxyApiGetRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiAPIPulpAnsibleGalaxyApiGetRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiAPIPulpAnsibleGalaxyApiGetRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiAPIPulpAnsibleGalaxyApiGetRequest) Execute() (*http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiGetExecute(r) +} + +/* +PulpAnsibleGalaxyApiGet Method for PulpAnsibleGalaxyApiGet + +Return a response to the "GET" action. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PulpAnsibleApiAPIPulpAnsibleGalaxyApiGetRequest +*/ +func (a *PulpAnsibleApiAPIService) PulpAnsibleGalaxyApiGet(ctx context.Context, path string) PulpAnsibleApiAPIPulpAnsibleGalaxyApiGetRequest { + return PulpAnsibleApiAPIPulpAnsibleGalaxyApiGetRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +func (a *PulpAnsibleApiAPIService) PulpAnsibleGalaxyApiGetExecute(r PulpAnsibleApiAPIPulpAnsibleGalaxyApiGetRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiAPIService.PulpAnsibleGalaxyApiGet") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v2_collections_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v2_collections_versions.go new file mode 100644 index 0000000000..5fcf0fa1a6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v2_collections_versions.go @@ -0,0 +1,166 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV2CollectionsVersionsAPIService PulpAnsibleApiV2CollectionsVersionsAPI service +type PulpAnsibleApiV2CollectionsVersionsAPIService service + +type PulpAnsibleApiV2CollectionsVersionsAPIPulpAnsibleGalaxyApiV2CollectionsVersionsGetRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV2CollectionsVersionsAPIService + name string + namespace string + path string + version string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV2CollectionsVersionsAPIPulpAnsibleGalaxyApiV2CollectionsVersionsGetRequest) Fields(fields []string) PulpAnsibleApiV2CollectionsVersionsAPIPulpAnsibleGalaxyApiV2CollectionsVersionsGetRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV2CollectionsVersionsAPIPulpAnsibleGalaxyApiV2CollectionsVersionsGetRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV2CollectionsVersionsAPIPulpAnsibleGalaxyApiV2CollectionsVersionsGetRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV2CollectionsVersionsAPIPulpAnsibleGalaxyApiV2CollectionsVersionsGetRequest) Execute() (*http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV2CollectionsVersionsGetExecute(r) +} + +/* +PulpAnsibleGalaxyApiV2CollectionsVersionsGet Method for PulpAnsibleGalaxyApiV2CollectionsVersionsGet + +Return a response to the "GET" action. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @param path + @param version + @return PulpAnsibleApiV2CollectionsVersionsAPIPulpAnsibleGalaxyApiV2CollectionsVersionsGetRequest +*/ +func (a *PulpAnsibleApiV2CollectionsVersionsAPIService) PulpAnsibleGalaxyApiV2CollectionsVersionsGet(ctx context.Context, name string, namespace string, path string, version string) PulpAnsibleApiV2CollectionsVersionsAPIPulpAnsibleGalaxyApiV2CollectionsVersionsGetRequest { + return PulpAnsibleApiV2CollectionsVersionsAPIPulpAnsibleGalaxyApiV2CollectionsVersionsGetRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + path: path, + version: version, + } +} + +// Execute executes the request +func (a *PulpAnsibleApiV2CollectionsVersionsAPIService) PulpAnsibleGalaxyApiV2CollectionsVersionsGetExecute(r PulpAnsibleApiV2CollectionsVersionsAPIPulpAnsibleGalaxyApiV2CollectionsVersionsGetRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV2CollectionsVersionsAPIService.PulpAnsibleGalaxyApiV2CollectionsVersionsGet") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v2/collections/{namespace}/{name}/versions/{version}/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", parameterValueToString(r.version, "version"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3.go new file mode 100644 index 0000000000..314d5a66d8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3.go @@ -0,0 +1,168 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3APIService PulpAnsibleApiV3API service +type PulpAnsibleApiV3APIService service + +type PulpAnsibleApiV3APIPulpAnsibleGalaxyApiV3ReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3APIService + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3APIPulpAnsibleGalaxyApiV3ReadRequest) Fields(fields []string) PulpAnsibleApiV3APIPulpAnsibleGalaxyApiV3ReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3APIPulpAnsibleGalaxyApiV3ReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3APIPulpAnsibleGalaxyApiV3ReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3APIPulpAnsibleGalaxyApiV3ReadRequest) Execute() (*RepoMetadataResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3ReadExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3Read Method for PulpAnsibleGalaxyApiV3Read + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PulpAnsibleApiV3APIPulpAnsibleGalaxyApiV3ReadRequest + +Deprecated +*/ +func (a *PulpAnsibleApiV3APIService) PulpAnsibleGalaxyApiV3Read(ctx context.Context, path string) PulpAnsibleApiV3APIPulpAnsibleGalaxyApiV3ReadRequest { + return PulpAnsibleApiV3APIPulpAnsibleGalaxyApiV3ReadRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +// @return RepoMetadataResponse +// Deprecated +func (a *PulpAnsibleApiV3APIService) PulpAnsibleGalaxyApiV3ReadExecute(r PulpAnsibleApiV3APIPulpAnsibleGalaxyApiV3ReadRequest) (*RepoMetadataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepoMetadataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3APIService.PulpAnsibleGalaxyApiV3Read") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_artifacts_collections.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_artifacts_collections.go new file mode 100644 index 0000000000..c09c72d43a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_artifacts_collections.go @@ -0,0 +1,158 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3ArtifactsCollectionsAPIService PulpAnsibleApiV3ArtifactsCollectionsAPI service +type PulpAnsibleApiV3ArtifactsCollectionsAPIService service + +type PulpAnsibleApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyApiV3ArtifactsCollectionsGetRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3ArtifactsCollectionsAPIService + filename string + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyApiV3ArtifactsCollectionsGetRequest) Fields(fields []string) PulpAnsibleApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyApiV3ArtifactsCollectionsGetRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyApiV3ArtifactsCollectionsGetRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyApiV3ArtifactsCollectionsGetRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyApiV3ArtifactsCollectionsGetRequest) Execute() (*http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3ArtifactsCollectionsGetExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3ArtifactsCollectionsGet Method for PulpAnsibleGalaxyApiV3ArtifactsCollectionsGet + +Download collection. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param filename + @param path + @return PulpAnsibleApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyApiV3ArtifactsCollectionsGetRequest +*/ +func (a *PulpAnsibleApiV3ArtifactsCollectionsAPIService) PulpAnsibleGalaxyApiV3ArtifactsCollectionsGet(ctx context.Context, filename string, path string) PulpAnsibleApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyApiV3ArtifactsCollectionsGetRequest { + return PulpAnsibleApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyApiV3ArtifactsCollectionsGetRequest{ + ApiService: a, + ctx: ctx, + filename: filename, + path: path, + } +} + +// Execute executes the request +func (a *PulpAnsibleApiV3ArtifactsCollectionsAPIService) PulpAnsibleGalaxyApiV3ArtifactsCollectionsGetExecute(r PulpAnsibleApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyApiV3ArtifactsCollectionsGetRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3ArtifactsCollectionsAPIService.PulpAnsibleGalaxyApiV3ArtifactsCollectionsGet") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/artifacts/collections/{path}/{filename}" + localVarPath = strings.Replace(localVarPath, "{"+"filename"+"}", parameterValueToString(r.filename, "filename"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collection_versions_all.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collection_versions_all.go new file mode 100644 index 0000000000..bebdb441d7 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collection_versions_all.go @@ -0,0 +1,168 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3CollectionVersionsAllAPIService PulpAnsibleApiV3CollectionVersionsAllAPI service +type PulpAnsibleApiV3CollectionVersionsAllAPIService service + +type PulpAnsibleApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyApiV3CollectionVersionsAllListRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3CollectionVersionsAllAPIService + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyApiV3CollectionVersionsAllListRequest) Fields(fields []string) PulpAnsibleApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyApiV3CollectionVersionsAllListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyApiV3CollectionVersionsAllListRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyApiV3CollectionVersionsAllListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyApiV3CollectionVersionsAllListRequest) Execute() ([]UnpaginatedCollectionVersionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3CollectionVersionsAllListExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3CollectionVersionsAllList Method for PulpAnsibleGalaxyApiV3CollectionVersionsAllList + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PulpAnsibleApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyApiV3CollectionVersionsAllListRequest + +Deprecated +*/ +func (a *PulpAnsibleApiV3CollectionVersionsAllAPIService) PulpAnsibleGalaxyApiV3CollectionVersionsAllList(ctx context.Context, path string) PulpAnsibleApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyApiV3CollectionVersionsAllListRequest { + return PulpAnsibleApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyApiV3CollectionVersionsAllListRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +// @return []UnpaginatedCollectionVersionResponse +// Deprecated +func (a *PulpAnsibleApiV3CollectionVersionsAllAPIService) PulpAnsibleGalaxyApiV3CollectionVersionsAllListExecute(r PulpAnsibleApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyApiV3CollectionVersionsAllListRequest) ([]UnpaginatedCollectionVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []UnpaginatedCollectionVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3CollectionVersionsAllAPIService.PulpAnsibleGalaxyApiV3CollectionVersionsAllList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/collection_versions/all/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections.go new file mode 100644 index 0000000000..4d710a8c81 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections.go @@ -0,0 +1,634 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3CollectionsAPIService PulpAnsibleApiV3CollectionsAPI service +type PulpAnsibleApiV3CollectionsAPIService service + +type PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsDeleteRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3CollectionsAPIService + name string + namespace string + path string +} + +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3CollectionsDeleteExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3CollectionsDelete Method for PulpAnsibleGalaxyApiV3CollectionsDelete + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @param path + @return PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsDeleteRequest + +Deprecated +*/ +func (a *PulpAnsibleApiV3CollectionsAPIService) PulpAnsibleGalaxyApiV3CollectionsDelete(ctx context.Context, name string, namespace string, path string) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsDeleteRequest { + return PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsDeleteRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + path: path, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +// Deprecated +func (a *PulpAnsibleApiV3CollectionsAPIService) PulpAnsibleGalaxyApiV3CollectionsDeleteExecute(r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3CollectionsAPIService.PulpAnsibleGalaxyApiV3CollectionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3CollectionsAPIService + path string + deprecated *bool + limit *int32 + name *string + namespace *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest) Deprecated(deprecated bool) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest { + r.deprecated = &deprecated + return r +} + +// Number of results to return per page. +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest) Limit(limit int32) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest { + r.limit = &limit + return r +} + +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest) Name(name string) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest { + r.name = &name + return r +} + +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest) Namespace(namespace string) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest { + r.namespace = &namespace + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest) Offset(offset int32) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest) Ordering(ordering []string) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest) Fields(fields []string) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest) Execute() (*PaginatedCollectionResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3CollectionsListExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3CollectionsList Method for PulpAnsibleGalaxyApiV3CollectionsList + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest + +Deprecated +*/ +func (a *PulpAnsibleApiV3CollectionsAPIService) PulpAnsibleGalaxyApiV3CollectionsList(ctx context.Context, path string) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest { + return PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +// @return PaginatedCollectionResponseList +// Deprecated +func (a *PulpAnsibleApiV3CollectionsAPIService) PulpAnsibleGalaxyApiV3CollectionsListExecute(r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsListRequest) (*PaginatedCollectionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCollectionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3CollectionsAPIService.PulpAnsibleGalaxyApiV3CollectionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/collections/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.deprecated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "deprecated", r.deprecated, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3CollectionsAPIService + name string + namespace string + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsReadRequest) Fields(fields []string) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsReadRequest) Execute() (*CollectionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3CollectionsReadExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3CollectionsRead Method for PulpAnsibleGalaxyApiV3CollectionsRead + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @param path + @return PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsReadRequest + +Deprecated +*/ +func (a *PulpAnsibleApiV3CollectionsAPIService) PulpAnsibleGalaxyApiV3CollectionsRead(ctx context.Context, name string, namespace string, path string) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsReadRequest { + return PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsReadRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + path: path, + } +} + +// Execute executes the request +// @return CollectionResponse +// Deprecated +func (a *PulpAnsibleApiV3CollectionsAPIService) PulpAnsibleGalaxyApiV3CollectionsReadExecute(r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsReadRequest) (*CollectionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3CollectionsAPIService.PulpAnsibleGalaxyApiV3CollectionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsUpdateRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3CollectionsAPIService + name string + namespace string + path string + patchedCollection *PatchedCollection +} + +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsUpdateRequest) PatchedCollection(patchedCollection PatchedCollection) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsUpdateRequest { + r.patchedCollection = &patchedCollection + return r +} + +func (r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3CollectionsUpdateExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3CollectionsUpdate Method for PulpAnsibleGalaxyApiV3CollectionsUpdate + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @param path + @return PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsUpdateRequest + +Deprecated +*/ +func (a *PulpAnsibleApiV3CollectionsAPIService) PulpAnsibleGalaxyApiV3CollectionsUpdate(ctx context.Context, name string, namespace string, path string) PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsUpdateRequest { + return PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsUpdateRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + path: path, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +// Deprecated +func (a *PulpAnsibleApiV3CollectionsAPIService) PulpAnsibleGalaxyApiV3CollectionsUpdateExecute(r PulpAnsibleApiV3CollectionsAPIPulpAnsibleGalaxyApiV3CollectionsUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3CollectionsAPIService.PulpAnsibleGalaxyApiV3CollectionsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedCollection == nil { + return localVarReturnValue, nil, reportError("patchedCollection is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedCollection + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections_all.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections_all.go new file mode 100644 index 0000000000..222314c851 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections_all.go @@ -0,0 +1,225 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3CollectionsAllAPIService PulpAnsibleApiV3CollectionsAllAPI service +type PulpAnsibleApiV3CollectionsAllAPIService service + +type PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3CollectionsAllAPIService + path string + deprecated *bool + name *string + namespace *string + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest) Deprecated(deprecated bool) PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest { + r.deprecated = &deprecated + return r +} + +func (r PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest) Name(name string) PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest { + r.name = &name + return r +} + +func (r PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest) Namespace(namespace string) PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest { + r.namespace = &namespace + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest) Ordering(ordering []string) PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest) Fields(fields []string) PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest) Execute() ([]CollectionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3CollectionsAllListExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3CollectionsAllList Method for PulpAnsibleGalaxyApiV3CollectionsAllList + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest + +Deprecated +*/ +func (a *PulpAnsibleApiV3CollectionsAllAPIService) PulpAnsibleGalaxyApiV3CollectionsAllList(ctx context.Context, path string) PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest { + return PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +// @return []CollectionResponse +// Deprecated +func (a *PulpAnsibleApiV3CollectionsAllAPIService) PulpAnsibleGalaxyApiV3CollectionsAllListExecute(r PulpAnsibleApiV3CollectionsAllAPIPulpAnsibleGalaxyApiV3CollectionsAllListRequest) ([]CollectionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []CollectionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3CollectionsAllAPIService.PulpAnsibleGalaxyApiV3CollectionsAllList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/collections/all/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.deprecated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "deprecated", r.deprecated, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections_versions.go new file mode 100644 index 0000000000..32a34964ab --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections_versions.go @@ -0,0 +1,584 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3CollectionsVersionsAPIService PulpAnsibleApiV3CollectionsVersionsAPI service +type PulpAnsibleApiV3CollectionsVersionsAPIService service + +type PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDeleteRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3CollectionsVersionsAPIService + name string + namespace string + path string + version string +} + +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3CollectionsVersionsDeleteExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3CollectionsVersionsDelete Method for PulpAnsibleGalaxyApiV3CollectionsVersionsDelete + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @param path + @param version + @return PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDeleteRequest + +Deprecated +*/ +func (a *PulpAnsibleApiV3CollectionsVersionsAPIService) PulpAnsibleGalaxyApiV3CollectionsVersionsDelete(ctx context.Context, name string, namespace string, path string, version string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDeleteRequest { + return PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + path: path, + version: version, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +// Deprecated +func (a *PulpAnsibleApiV3CollectionsVersionsAPIService) PulpAnsibleGalaxyApiV3CollectionsVersionsDeleteExecute(r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3CollectionsVersionsAPIService.PulpAnsibleGalaxyApiV3CollectionsVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/versions/{version}/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", parameterValueToString(r.version, "version"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3CollectionsVersionsAPIService + name string + namespace string + path string + isHighest *bool + limit *int32 + name2 *string + namespace2 *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + q *string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + tags *string + version *string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) IsHighest(isHighest bool) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.isHighest = &isHighest + return r +} + +// Number of results to return per page. +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) Limit(limit int32) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.limit = &limit + return r +} + +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) Name2(name2 string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.name2 = &name2 + return r +} + +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) Namespace2(namespace2 string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.namespace2 = &namespace2 + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) Offset(offset int32) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `authors` - Authors * `-authors` - Authors (descending) * `contents` - Contents * `-contents` - Contents (descending) * `dependencies` - Dependencies * `-dependencies` - Dependencies (descending) * `description` - Description * `-description` - Description (descending) * `docs_blob` - Docs blob * `-docs_blob` - Docs blob (descending) * `manifest` - Manifest * `-manifest` - Manifest (descending) * `files` - Files * `-files` - Files (descending) * `documentation` - Documentation * `-documentation` - Documentation (descending) * `homepage` - Homepage * `-homepage` - Homepage (descending) * `issues` - Issues * `-issues` - Issues (descending) * `license` - License * `-license` - License (descending) * `name` - Name * `-name` - Name (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `repository` - Repository * `-repository` - Repository (descending) * `requires_ansible` - Requires ansible * `-requires_ansible` - Requires ansible (descending) * `version` - Version * `-version` - Version (descending) * `version_major` - Version major * `-version_major` - Version major (descending) * `version_minor` - Version minor * `-version_minor` - Version minor (descending) * `version_patch` - Version patch * `-version_patch` - Version patch (descending) * `version_prerelease` - Version prerelease * `-version_prerelease` - Version prerelease (descending) * `is_highest` - Is highest * `-is_highest` - Is highest (descending) * `search_vector` - Search vector * `-search_vector` - Search vector (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) Ordering(ordering []string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) Q(q string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.q = &q + return r +} + +// Repository Version referenced by HREF +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) RepositoryVersion(repositoryVersion string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter by comma separate list of tags that must all be matched +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) Tags(tags string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.tags = &tags + return r +} + +// Filter results where version matches value +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) Version(version string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.version = &version + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) Fields(fields []string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) Execute() (*PaginatedCollectionVersionListResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3CollectionsVersionsListExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3CollectionsVersionsList Method for PulpAnsibleGalaxyApiV3CollectionsVersionsList + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @param path + @return PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest + +Deprecated +*/ +func (a *PulpAnsibleApiV3CollectionsVersionsAPIService) PulpAnsibleGalaxyApiV3CollectionsVersionsList(ctx context.Context, name string, namespace string, path string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest { + return PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + path: path, + } +} + +// Execute executes the request +// @return PaginatedCollectionVersionListResponseList +// Deprecated +func (a *PulpAnsibleApiV3CollectionsVersionsAPIService) PulpAnsibleGalaxyApiV3CollectionsVersionsListExecute(r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsListRequest) (*PaginatedCollectionVersionListResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCollectionVersionListResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3CollectionsVersionsAPIService.PulpAnsibleGalaxyApiV3CollectionsVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/versions/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.isHighest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "is_highest", r.isHighest, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name2 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name2, "") + } + if r.namespace2 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace2, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.q != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "q", r.q, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.tags != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "tags", r.tags, "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3CollectionsVersionsAPIService + name string + namespace string + path string + version string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsReadRequest) Fields(fields []string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsReadRequest) Execute() (*CollectionVersionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3CollectionsVersionsReadExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3CollectionsVersionsRead Method for PulpAnsibleGalaxyApiV3CollectionsVersionsRead + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @param path + @param version + @return PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsReadRequest + +Deprecated +*/ +func (a *PulpAnsibleApiV3CollectionsVersionsAPIService) PulpAnsibleGalaxyApiV3CollectionsVersionsRead(ctx context.Context, name string, namespace string, path string, version string) PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsReadRequest { + return PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsReadRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + path: path, + version: version, + } +} + +// Execute executes the request +// @return CollectionVersionResponse +// Deprecated +func (a *PulpAnsibleApiV3CollectionsVersionsAPIService) PulpAnsibleGalaxyApiV3CollectionsVersionsReadExecute(r PulpAnsibleApiV3CollectionsVersionsAPIPulpAnsibleGalaxyApiV3CollectionsVersionsReadRequest) (*CollectionVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3CollectionsVersionsAPIService.PulpAnsibleGalaxyApiV3CollectionsVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/versions/{version}/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", parameterValueToString(r.version, "version"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections_versions_docs_blob.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections_versions_docs_blob.go new file mode 100644 index 0000000000..d3f0174a14 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_collections_versions_docs_blob.go @@ -0,0 +1,180 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIService PulpAnsibleApiV3CollectionsVersionsDocsBlobAPI service +type PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIService service + +type PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIService + name string + namespace string + path string + version string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobReadRequest) Fields(fields []string) PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobReadRequest) Execute() (*CollectionVersionDocsResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobReadExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobRead Method for PulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobRead + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @param path + @param version + @return PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobReadRequest + +Deprecated +*/ +func (a *PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIService) PulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobRead(ctx context.Context, name string, namespace string, path string, version string) PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobReadRequest { + return PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobReadRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + path: path, + version: version, + } +} + +// Execute executes the request +// @return CollectionVersionDocsResponse +// Deprecated +func (a *PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIService) PulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobReadExecute(r PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobReadRequest) (*CollectionVersionDocsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionVersionDocsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIService.PulpAnsibleGalaxyApiV3CollectionsVersionsDocsBlobRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/versions/{version}/docs-blob/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", parameterValueToString(r.version, "version"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_namespaces.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_namespaces.go new file mode 100644 index 0000000000..442a51ee88 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_namespaces.go @@ -0,0 +1,484 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3NamespacesAPIService PulpAnsibleApiV3NamespacesAPI service +type PulpAnsibleApiV3NamespacesAPIService service + +type PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3NamespacesAPIService + path string + company *string + companyContains *string + companyIcontains *string + companyIn *[]string + companyStartswith *string + limit *int32 + metadataSha256 *string + metadataSha256In *[]string + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Filter results where company matches value +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) Company(company string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.company = &company + return r +} + +// Filter results where company contains value +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) CompanyContains(companyContains string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.companyContains = &companyContains + return r +} + +// Filter results where company contains value +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) CompanyIcontains(companyIcontains string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.companyIcontains = &companyIcontains + return r +} + +// Filter results where company is in a comma-separated list of values +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) CompanyIn(companyIn []string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.companyIn = &companyIn + return r +} + +// Filter results where company starts with value +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) CompanyStartswith(companyStartswith string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.companyStartswith = &companyStartswith + return r +} + +// Number of results to return per page. +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) Limit(limit int32) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.limit = &limit + return r +} + +// Filter results where metadata_sha256 matches value +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) MetadataSha256(metadataSha256 string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.metadataSha256 = &metadataSha256 + return r +} + +// Filter results where metadata_sha256 is in a comma-separated list of values +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) MetadataSha256In(metadataSha256In []string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.metadataSha256In = &metadataSha256In + return r +} + +// Filter results where name matches value +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) Name(name string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) NameContains(nameContains string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) NameIcontains(nameIcontains string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) NameIn(nameIn []string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) NameStartswith(nameStartswith string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) Offset(offset int32) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `company` - Company * `-company` - Company (descending) * `email` - Email * `-email` - Email (descending) * `description` - Description * `-description` - Description (descending) * `resources` - Resources * `-resources` - Resources (descending) * `links` - Links * `-links` - Links (descending) * `avatar_sha256` - Avatar sha256 * `-avatar_sha256` - Avatar sha256 (descending) * `metadata_sha256` - Metadata sha256 * `-metadata_sha256` - Metadata sha256 (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) Ordering(ordering []string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) Fields(fields []string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) Execute() (*PaginatedansibleAnsibleNamespaceMetadataResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3NamespacesListExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3NamespacesList Method for PulpAnsibleGalaxyApiV3NamespacesList + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest + +Deprecated +*/ +func (a *PulpAnsibleApiV3NamespacesAPIService) PulpAnsibleGalaxyApiV3NamespacesList(ctx context.Context, path string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest { + return PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +// @return PaginatedansibleAnsibleNamespaceMetadataResponseList +// Deprecated +func (a *PulpAnsibleApiV3NamespacesAPIService) PulpAnsibleGalaxyApiV3NamespacesListExecute(r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesListRequest) (*PaginatedansibleAnsibleNamespaceMetadataResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleAnsibleNamespaceMetadataResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3NamespacesAPIService.PulpAnsibleGalaxyApiV3NamespacesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/namespaces/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.company != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company", r.company, "") + } + if r.companyContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__contains", r.companyContains, "") + } + if r.companyIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__icontains", r.companyIcontains, "") + } + if r.companyIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__in", r.companyIn, "csv") + } + if r.companyStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__startswith", r.companyStartswith, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.metadataSha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "metadata_sha256", r.metadataSha256, "") + } + if r.metadataSha256In != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "metadata_sha256__in", r.metadataSha256In, "csv") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3NamespacesAPIService + name string + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesReadRequest) Fields(fields []string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesReadRequest) Execute() (*AnsibleAnsibleNamespaceMetadataResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3NamespacesReadExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3NamespacesRead Method for PulpAnsibleGalaxyApiV3NamespacesRead + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param path + @return PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesReadRequest + +Deprecated +*/ +func (a *PulpAnsibleApiV3NamespacesAPIService) PulpAnsibleGalaxyApiV3NamespacesRead(ctx context.Context, name string, path string) PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesReadRequest { + return PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesReadRequest{ + ApiService: a, + ctx: ctx, + name: name, + path: path, + } +} + +// Execute executes the request +// @return AnsibleAnsibleNamespaceMetadataResponse +// Deprecated +func (a *PulpAnsibleApiV3NamespacesAPIService) PulpAnsibleGalaxyApiV3NamespacesReadExecute(r PulpAnsibleApiV3NamespacesAPIPulpAnsibleGalaxyApiV3NamespacesReadRequest) (*AnsibleAnsibleNamespaceMetadataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleAnsibleNamespaceMetadataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3NamespacesAPIService.PulpAnsibleGalaxyApiV3NamespacesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/namespaces/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_client_configuration.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_client_configuration.go new file mode 100644 index 0000000000..e7e3df8890 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_client_configuration.go @@ -0,0 +1,165 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIService PulpAnsibleApiV3PluginAnsibleClientConfigurationAPI service +type PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIService service + +type PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIService + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationReadRequest) Fields(fields []string) PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationReadRequest) Execute() (*ClientConfigurationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationReadExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationRead Method for PulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationRead + +Return configurations for the ansible-galaxy client. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationReadRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationRead(ctx context.Context, path string) PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationReadRequest { + return PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationReadRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +// @return ClientConfigurationResponse +func (a *PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationReadExecute(r PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationReadRequest) (*ClientConfigurationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ClientConfigurationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleClientConfigurationRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/client-configuration/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections.go new file mode 100644 index 0000000000..72230a6e0d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections.go @@ -0,0 +1,169 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIService PulpAnsibleApiV3PluginAnsibleContentCollectionsAPI service +type PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIService service + +type PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIService + distroBasePath string + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsReadRequest) Fields(fields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsReadRequest) Execute() (*RepoMetadataResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsReadExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsRead Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsRead + +ViewSet for Repository Metadata. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param path + @return PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsReadRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsRead(ctx context.Context, distroBasePath string, path string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsReadRequest { + return PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsReadRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + path: path, + } +} + +// Execute executes the request +// @return RepoMetadataResponse +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsReadExecute(r PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsReadRequest) (*RepoMetadataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepoMetadataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_all_collections.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_all_collections.go new file mode 100644 index 0000000000..c1ae3fe0d6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_all_collections.go @@ -0,0 +1,226 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPI service +type PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService service + +type PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService + distroBasePath string + path string + deprecated *bool + name *string + namespace *string + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) Deprecated(deprecated bool) PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.deprecated = &deprecated + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) Name(name string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.name = &name + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) Namespace(namespace string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.namespace = &namespace + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) Ordering(ordering []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) Fields(fields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) Execute() ([]CollectionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsList Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsList + +Unpaginated ViewSet for Collections. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param path + @return PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsList(ctx context.Context, distroBasePath string, path string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + return PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + path: path, + } +} + +// Execute executes the request +// @return []CollectionResponse +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListExecute(r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) ([]CollectionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []CollectionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllCollectionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/all-collections/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.deprecated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "deprecated", r.deprecated, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_all_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_all_versions.go new file mode 100644 index 0000000000..b420401a58 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_all_versions.go @@ -0,0 +1,169 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIService PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPI service +type PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIService service + +type PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsListRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIService + distroBasePath string + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsListRequest) Fields(fields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsListRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsListRequest) Execute() ([]UnpaginatedCollectionVersionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsListExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsList Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsList + +Returns paginated CollectionVersions list. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param path + @return PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsListRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsList(ctx context.Context, distroBasePath string, path string) PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsListRequest { + return PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsListRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + path: path, + } +} + +// Execute executes the request +// @return []UnpaginatedCollectionVersionResponse +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsListExecute(r PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsListRequest) ([]UnpaginatedCollectionVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []UnpaginatedCollectionVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsAllVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/all-versions/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_artifacts.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_artifacts.go new file mode 100644 index 0000000000..bc8294ad3c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_artifacts.go @@ -0,0 +1,162 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIService PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPI service +type PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIService service + +type PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIService + distroBasePath string + filename string + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest) Fields(fields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest) Execute() (*http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownloadExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownload Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownload + +Collection download endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param filename + @param path + @return PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownload(ctx context.Context, distroBasePath string, filename string, path string) PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest { + return PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + filename: filename, + path: path, + } +} + +// Execute executes the request +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownloadExecute(r PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsDownload") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/artifacts/{filename}" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"filename"+"}", parameterValueToString(r.filename, "filename"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_index.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_index.go new file mode 100644 index 0000000000..59ff85e31f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_index.go @@ -0,0 +1,638 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPI service +type PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService service + +type PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexDeleteRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService + distroBasePath string + name string + namespace string + path string +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexDeleteExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexDelete Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexDelete + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @param path + @return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexDeleteRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexDelete(ctx context.Context, distroBasePath string, name string, namespace string, path string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexDeleteRequest { + return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexDeleteRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + path: path, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexDeleteExecute(r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService + distroBasePath string + path string + deprecated *bool + limit *int32 + name *string + namespace *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest) Deprecated(deprecated bool) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.deprecated = &deprecated + return r +} + +// Number of results to return per page. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest) Limit(limit int32) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.limit = &limit + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest) Name(name string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.name = &name + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest) Namespace(namespace string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.namespace = &namespace + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest) Offset(offset int32) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest) Ordering(ordering []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest) Fields(fields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest) Execute() (*PaginatedCollectionResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexList Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexList + +ViewSet for Collections. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param path + @return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexList(ctx context.Context, distroBasePath string, path string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest { + return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + path: path, + } +} + +// Execute executes the request +// @return PaginatedCollectionResponseList +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListExecute(r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexListRequest) (*PaginatedCollectionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCollectionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.deprecated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "deprecated", r.deprecated, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService + distroBasePath string + name string + namespace string + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexReadRequest) Fields(fields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexReadRequest) Execute() (*CollectionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexReadExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexRead Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexRead + +ViewSet for Collections. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @param path + @return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexReadRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexRead(ctx context.Context, distroBasePath string, name string, namespace string, path string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexReadRequest { + return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexReadRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + path: path, + } +} + +// Execute executes the request +// @return CollectionResponse +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexReadExecute(r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexReadRequest) (*CollectionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdateRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService + distroBasePath string + name string + namespace string + path string + patchedCollection *PatchedCollection +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdateRequest) PatchedCollection(patchedCollection PatchedCollection) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdateRequest { + r.patchedCollection = &patchedCollection + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdateExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdate Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdate + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @param path + @return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdateRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdate(ctx context.Context, distroBasePath string, name string, namespace string, path string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdateRequest { + return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdateRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + path: path, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdateExecute(r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedCollection == nil { + return localVarReturnValue, nil, reportError("patchedCollection is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedCollection + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions.go new file mode 100644 index 0000000000..1a943c13f1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions.go @@ -0,0 +1,587 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPI service +type PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService service + +type PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService + distroBasePath string + name string + namespace string + path string + version string +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDelete Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDelete + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @param path + @param version + @return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDelete(ctx context.Context, distroBasePath string, name string, namespace string, path string, version string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteRequest { + return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + path: path, + version: version, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteExecute(r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/{version}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", parameterValueToString(r.version, "version"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService + distroBasePath string + name string + namespace string + path string + isHighest *bool + limit *int32 + name2 *string + namespace2 *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + q *string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + tags *string + version *string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) IsHighest(isHighest bool) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.isHighest = &isHighest + return r +} + +// Number of results to return per page. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Limit(limit int32) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.limit = &limit + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Name2(name2 string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.name2 = &name2 + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Namespace2(namespace2 string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.namespace2 = &namespace2 + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Offset(offset int32) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `authors` - Authors * `-authors` - Authors (descending) * `contents` - Contents * `-contents` - Contents (descending) * `dependencies` - Dependencies * `-dependencies` - Dependencies (descending) * `description` - Description * `-description` - Description (descending) * `docs_blob` - Docs blob * `-docs_blob` - Docs blob (descending) * `manifest` - Manifest * `-manifest` - Manifest (descending) * `files` - Files * `-files` - Files (descending) * `documentation` - Documentation * `-documentation` - Documentation (descending) * `homepage` - Homepage * `-homepage` - Homepage (descending) * `issues` - Issues * `-issues` - Issues (descending) * `license` - License * `-license` - License (descending) * `name` - Name * `-name` - Name (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `repository` - Repository * `-repository` - Repository (descending) * `requires_ansible` - Requires ansible * `-requires_ansible` - Requires ansible (descending) * `version` - Version * `-version` - Version (descending) * `version_major` - Version major * `-version_major` - Version major (descending) * `version_minor` - Version minor * `-version_minor` - Version minor (descending) * `version_patch` - Version patch * `-version_patch` - Version patch (descending) * `version_prerelease` - Version prerelease * `-version_prerelease` - Version prerelease (descending) * `is_highest` - Is highest * `-is_highest` - Is highest (descending) * `search_vector` - Search vector * `-search_vector` - Search vector (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Ordering(ordering []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Q(q string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.q = &q + return r +} + +// Repository Version referenced by HREF +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) RepositoryVersion(repositoryVersion string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter by comma separate list of tags that must all be matched +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Tags(tags string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.tags = &tags + return r +} + +// Filter results where version matches value +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Version(version string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.version = &version + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Fields(fields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Execute() (*PaginatedCollectionVersionListResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsList Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsList + +Returns paginated CollectionVersions list. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @param path + @return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsList(ctx context.Context, distroBasePath string, name string, namespace string, path string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + path: path, + } +} + +// Execute executes the request +// @return PaginatedCollectionVersionListResponseList +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListExecute(r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) (*PaginatedCollectionVersionListResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCollectionVersionListResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.isHighest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "is_highest", r.isHighest, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name2 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name2, "") + } + if r.namespace2 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace2, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.q != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "q", r.q, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.tags != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "tags", r.tags, "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService + distroBasePath string + name string + namespace string + path string + version string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest) Fields(fields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest) Execute() (*CollectionVersionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsReadExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsRead Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsRead + +Returns a CollectionVersion object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @param path + @param version + @return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsRead(ctx context.Context, distroBasePath string, name string, namespace string, path string, version string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest { + return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + path: path, + version: version, + } +} + +// Execute executes the request +// @return CollectionVersionResponse +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsReadExecute(r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest) (*CollectionVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/{version}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", parameterValueToString(r.version, "version"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions_docs_blob.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions_docs_blob.go new file mode 100644 index 0000000000..e989b1eb7f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions_docs_blob.go @@ -0,0 +1,181 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPI service +type PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService service + +type PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService + distroBasePath string + name string + namespace string + path string + version string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest) Fields(fields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest) Execute() (*CollectionVersionDocsResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobRead Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobRead + +Returns a CollectionVersion object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @param path + @param version + @return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobRead(ctx context.Context, distroBasePath string, name string, namespace string, path string, version string) PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest { + return PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + path: path, + version: version, + } +} + +// Execute executes the request +// @return CollectionVersionDocsResponse +func (a *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadExecute(r PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest) (*CollectionVersionDocsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionVersionDocsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/{version}/docs-blob/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", parameterValueToString(r.version, "version"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_namespaces.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_namespaces.go new file mode 100644 index 0000000000..98091f5818 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_content_namespaces.go @@ -0,0 +1,991 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "reflect" +) + + +// PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService PulpAnsibleApiV3PluginAnsibleContentNamespacesAPI service +type PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService service + +type PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService + distroBasePath string + path string + name *string + company *string + email *string + description *string + resources *string + links *[]NamespaceLink + avatar *os.File +} + +// Required named, only accepts lowercase, numbers and underscores. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest) Name(name string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest { + r.name = &name + return r +} + +// Optional namespace company owner. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest) Company(company string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest { + r.company = &company + return r +} + +// Optional namespace contact email. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest) Email(email string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest { + r.email = &email + return r +} + +// Optional short description. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest) Description(description string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest { + r.description = &description + return r +} + +// Optional resource page in markdown format. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest) Resources(resources string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest { + r.resources = &resources + return r +} + +// Labeled related links. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest) Links(links []NamespaceLink) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest { + r.links = &links + return r +} + +// Optional avatar image for Namespace +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest) Avatar(avatar *os.File) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest { + r.avatar = avatar + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreate Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreate + +Custom exception handler mixin class. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param path + @return PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreate(ctx context.Context, distroBasePath string, path string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest { + return PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + path: path, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateExecute(r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.name == nil { + return localVarReturnValue, nil, reportError("name is required and must be specified") + } + if strlen(*r.name) < 3 { + return localVarReturnValue, nil, reportError("name must have at least 3 elements") + } + if strlen(*r.name) > 64 { + return localVarReturnValue, nil, reportError("name must have less than 64 elements") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarFormParams, "name", r.name, "") + if r.company != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "company", r.company, "") + } + if r.email != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "email", r.email, "") + } + if r.description != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "description", r.description, "") + } + if r.resources != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "resources", r.resources, "") + } + if r.links != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "links", r.links, "csv") + } + var avatarLocalVarFormFileName string + var avatarLocalVarFileName string + var avatarLocalVarFileBytes []byte + + avatarLocalVarFormFileName = "avatar" + + + avatarLocalVarFile := r.avatar + + if avatarLocalVarFile != nil { + fbs, _ := io.ReadAll(avatarLocalVarFile) + + avatarLocalVarFileBytes = fbs + avatarLocalVarFileName = avatarLocalVarFile.Name() + avatarLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: avatarLocalVarFileBytes, fileName: avatarLocalVarFileName, formFileName: avatarLocalVarFormFileName}) + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesDeleteRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService + distroBasePath string + name string + path string +} + +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesDeleteExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesDelete Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesDelete + +Try to remove the Namespace if no Collections under Namespace are present. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param path + @return PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesDeleteRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesDelete(ctx context.Context, distroBasePath string, name string, path string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesDeleteRequest { + return PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesDeleteRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + path: path, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesDeleteExecute(r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService + distroBasePath string + path string + company *string + companyContains *string + companyIcontains *string + companyIn *[]string + companyStartswith *string + limit *int32 + metadataSha256 *string + metadataSha256In *[]string + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Filter results where company matches value +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) Company(company string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.company = &company + return r +} + +// Filter results where company contains value +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) CompanyContains(companyContains string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.companyContains = &companyContains + return r +} + +// Filter results where company contains value +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) CompanyIcontains(companyIcontains string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.companyIcontains = &companyIcontains + return r +} + +// Filter results where company is in a comma-separated list of values +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) CompanyIn(companyIn []string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.companyIn = &companyIn + return r +} + +// Filter results where company starts with value +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) CompanyStartswith(companyStartswith string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.companyStartswith = &companyStartswith + return r +} + +// Number of results to return per page. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) Limit(limit int32) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.limit = &limit + return r +} + +// Filter results where metadata_sha256 matches value +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) MetadataSha256(metadataSha256 string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.metadataSha256 = &metadataSha256 + return r +} + +// Filter results where metadata_sha256 is in a comma-separated list of values +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) MetadataSha256In(metadataSha256In []string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.metadataSha256In = &metadataSha256In + return r +} + +// Filter results where name matches value +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) Name(name string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) NameContains(nameContains string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) NameIcontains(nameIcontains string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) NameIn(nameIn []string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) NameStartswith(nameStartswith string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) Offset(offset int32) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `company` - Company * `-company` - Company (descending) * `email` - Email * `-email` - Email (descending) * `description` - Description * `-description` - Description (descending) * `resources` - Resources * `-resources` - Resources (descending) * `links` - Links * `-links` - Links (descending) * `avatar_sha256` - Avatar sha256 * `-avatar_sha256` - Avatar sha256 (descending) * `metadata_sha256` - Metadata sha256 * `-metadata_sha256` - Metadata sha256 (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) Ordering(ordering []string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) Fields(fields []string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) Execute() (*PaginatedansibleAnsibleNamespaceMetadataResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesList Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesList + +Custom exception handler mixin class. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param path + @return PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesList(ctx context.Context, distroBasePath string, path string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest { + return PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + path: path, + } +} + +// Execute executes the request +// @return PaginatedansibleAnsibleNamespaceMetadataResponseList +func (a *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListExecute(r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesListRequest) (*PaginatedansibleAnsibleNamespaceMetadataResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleAnsibleNamespaceMetadataResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.company != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company", r.company, "") + } + if r.companyContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__contains", r.companyContains, "") + } + if r.companyIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__icontains", r.companyIcontains, "") + } + if r.companyIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__in", r.companyIn, "csv") + } + if r.companyStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__startswith", r.companyStartswith, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.metadataSha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "metadata_sha256", r.metadataSha256, "") + } + if r.metadataSha256In != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "metadata_sha256__in", r.metadataSha256In, "csv") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService + distroBasePath string + name string + path string + name2 *string + company *string + email *string + description *string + resources *string + links *[]NamespaceLink + avatar *os.File +} + +// Required named, only accepts lowercase, numbers and underscores. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Name2(name2 string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.name2 = &name2 + return r +} + +// Optional namespace company owner. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Company(company string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.company = &company + return r +} + +// Optional namespace contact email. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Email(email string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.email = &email + return r +} + +// Optional short description. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Description(description string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.description = &description + return r +} + +// Optional resource page in markdown format. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Resources(resources string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.resources = &resources + return r +} + +// Labeled related links. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Links(links []NamespaceLink) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.links = &links + return r +} + +// Optional avatar image for Namespace +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Avatar(avatar *os.File) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.avatar = avatar + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdate Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdate + +Custom exception handler mixin class. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param path + @return PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdate(ctx context.Context, distroBasePath string, name string, path string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + return PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + path: path, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateExecute(r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.name2 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "name", r.name2, "") + } + if r.company != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "company", r.company, "") + } + if r.email != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "email", r.email, "") + } + if r.description != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "description", r.description, "") + } + if r.resources != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "resources", r.resources, "") + } + if r.links != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "links", r.links, "csv") + } + var avatarLocalVarFormFileName string + var avatarLocalVarFileName string + var avatarLocalVarFileBytes []byte + + avatarLocalVarFormFileName = "avatar" + + + avatarLocalVarFile := r.avatar + + if avatarLocalVarFile != nil { + fbs, _ := io.ReadAll(avatarLocalVarFile) + + avatarLocalVarFileBytes = fbs + avatarLocalVarFileName = avatarLocalVarFile.Name() + avatarLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: avatarLocalVarFileBytes, fileName: avatarLocalVarFileName, formFileName: avatarLocalVarFormFileName}) + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService + distroBasePath string + name string + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesReadRequest) Fields(fields []string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesReadRequest) Execute() (*AnsibleAnsibleNamespaceMetadataResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesReadExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesRead Method for PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesRead + +Custom exception handler mixin class. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param path + @return PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesReadRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesRead(ctx context.Context, distroBasePath string, name string, path string) PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesReadRequest { + return PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesReadRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + path: path, + } +} + +// Execute executes the request +// @return AnsibleAnsibleNamespaceMetadataResponse +func (a *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesReadExecute(r PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesReadRequest) (*AnsibleAnsibleNamespaceMetadataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleAnsibleNamespaceMetadataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentNamespacesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_search_collection_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_search_collection_versions.go new file mode 100644 index 0000000000..551daab53d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_api_v3_plugin_ansible_search_collection_versions.go @@ -0,0 +1,527 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIService PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPI service +type PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIService service + +type PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIService + path string + dependency *string + deprecated *bool + distribution *[]string + distributionBasePath *[]string + highest *bool + isDeprecated *bool + isHighest *bool + isSigned *bool + keywords *string + limit *int32 + name *string + namespace *string + offset *int32 + orderBy *[]string + q *string + repository *[]string + repositoryLabel *string + repositoryName *[]string + repositoryVersion *string + signed *bool + tags *string + version *string + versionRange *string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Dependency(dependency string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.dependency = &dependency + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Deprecated(deprecated bool) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.deprecated = &deprecated + return r +} + +// Filter collectionversions that are in these distrubtion ids. +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Distribution(distribution []string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.distribution = &distribution + return r +} + +// Filter collectionversions that are in these base paths. +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) DistributionBasePath(distributionBasePath []string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.distributionBasePath = &distributionBasePath + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Highest(highest bool) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.highest = &highest + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) IsDeprecated(isDeprecated bool) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.isDeprecated = &isDeprecated + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) IsHighest(isHighest bool) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.isHighest = &isHighest + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) IsSigned(isSigned bool) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.isSigned = &isSigned + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Keywords(keywords string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.keywords = &keywords + return r +} + +// Number of results to return per page. +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Limit(limit int32) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.limit = &limit + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Name(name string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.name = &name + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Namespace(namespace string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.namespace = &namespace + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Offset(offset int32) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_created` - by CV created * `-pulp_created` - by CV created (descending) * `namespace` - by CV namespace * `-namespace` - by CV namespace (descending) * `name` - by CV name * `-name` - by CV name (descending) * `version` - by CV version * `-version` - by CV version (descending) +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) OrderBy(orderBy []string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.orderBy = &orderBy + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Q(q string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.q = &q + return r +} + +// Filter collectionversions that are in these repository ids. +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Repository(repository []string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.repository = &repository + return r +} + +// Filter labels by search string +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) RepositoryLabel(repositoryLabel string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.repositoryLabel = &repositoryLabel + return r +} + +// Filter collectionversions that are in these repositories. +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) RepositoryName(repositoryName []string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.repositoryName = &repositoryName + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) RepositoryVersion(repositoryVersion string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Signed(signed bool) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.signed = &signed + return r +} + +// Filter by comma separate list of tags that must all be matched +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Tags(tags string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.tags = &tags + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Version(version string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.version = &version + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) VersionRange(versionRange string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.versionRange = &versionRange + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Fields(fields []string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) ExcludeFields(excludeFields []string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) Execute() (*PaginatedCollectionVersionSearchListResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsList Method for PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsList + +A viewset for cross-repo searches. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsList(ctx context.Context, path string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest { + return PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +// @return PaginatedCollectionVersionSearchListResponseList +func (a *PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListExecute(r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsListRequest) (*PaginatedCollectionVersionSearchListResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCollectionVersionSearchListResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/search/collection-versions/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.dependency != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "dependency", r.dependency, "") + } + if r.deprecated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "deprecated", r.deprecated, "") + } + if r.distribution != nil { + t := *r.distribution + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "distribution", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "distribution", t, "multi") + } + } + if r.distributionBasePath != nil { + t := *r.distributionBasePath + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "distribution_base_path", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "distribution_base_path", t, "multi") + } + } + if r.highest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "highest", r.highest, "") + } + if r.isDeprecated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "is_deprecated", r.isDeprecated, "") + } + if r.isHighest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "is_highest", r.isHighest, "") + } + if r.isSigned != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "is_signed", r.isSigned, "") + } + if r.keywords != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "keywords", r.keywords, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.orderBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order_by", r.orderBy, "csv") + } + if r.q != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "q", r.q, "") + } + if r.repository != nil { + t := *r.repository + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", t, "multi") + } + } + if r.repositoryLabel != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_label", r.repositoryLabel, "") + } + if r.repositoryName != nil { + t := *r.repositoryName + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_name", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_name", t, "multi") + } + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.signed != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "signed", r.signed, "") + } + if r.tags != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "tags", r.tags, "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.versionRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version_range", r.versionRange, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest struct { + ctx context.Context + ApiService *PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIService + path string + collectionVersionSearchList *CollectionVersionSearchList +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest) CollectionVersionSearchList(collectionVersionSearchList CollectionVersionSearchList) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest { + r.collectionVersionSearchList = &collectionVersionSearchList + return r +} + +func (r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest) Execute() (*CollectionVersionSearchListResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuildExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuild Method for PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuild + +A viewset for cross-repo searches. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest +*/ +func (a *PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuild(ctx context.Context, path string) PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest { + return PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +// @return CollectionVersionSearchListResponse +func (a *PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIService) PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuildExecute(r PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest) (*CollectionVersionSearchListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionVersionSearchListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIService.PulpAnsibleGalaxyApiV3PluginAnsibleSearchCollectionVersionsRebuild") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/search/collection-versions/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.collectionVersionSearchList == nil { + return localVarReturnValue, nil, reportError("collectionVersionSearchList is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.collectionVersionSearchList + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_artifacts_collections_v3.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_artifacts_collections_v3.go new file mode 100644 index 0000000000..1f70d19685 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_artifacts_collections_v3.go @@ -0,0 +1,712 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" +) + + +// PulpAnsibleArtifactsCollectionsV3APIService PulpAnsibleArtifactsCollectionsV3API service +type PulpAnsibleArtifactsCollectionsV3APIService service + +type PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest struct { + ctx context.Context + ApiService *PulpAnsibleArtifactsCollectionsV3APIService + path string + file *os.File + sha256 *string + expectedNamespace *string + expectedName *string + expectedVersion *string +} + +// The Collection tarball. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest) File(file *os.File) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest { + r.file = file + return r +} + +// An optional sha256 checksum of the uploaded file. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest) Sha256(sha256 string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest { + r.sha256 = &sha256 + return r +} + +// The expected 'namespace' of the Collection to be verified against the metadata during import. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest) ExpectedNamespace(expectedNamespace string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest { + r.expectedNamespace = &expectedNamespace + return r +} + +// The expected 'name' of the Collection to be verified against the metadata during import. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest) ExpectedName(expectedName string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest { + r.expectedName = &expectedName + return r +} + +// The expected version of the Collection to be verified against the metadata during import. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest) ExpectedVersion(expectedVersion string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest { + r.expectedVersion = &expectedVersion + return r +} + +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3ArtifactsCollectionsCreate Upload a collection + +Create an artifact and trigger an asynchronous task to create Collection content from it. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest + +Deprecated +*/ +func (a *PulpAnsibleArtifactsCollectionsV3APIService) PulpAnsibleGalaxyApiV3ArtifactsCollectionsCreate(ctx context.Context, path string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest { + return PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +// Deprecated +func (a *PulpAnsibleArtifactsCollectionsV3APIService) PulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateExecute(r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3ArtifactsCollectionsCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleArtifactsCollectionsV3APIService.PulpAnsibleGalaxyApiV3ArtifactsCollectionsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/artifacts/collections/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.file == nil { + return localVarReturnValue, nil, reportError("file is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha256", r.sha256, "") + } + if r.expectedNamespace != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_namespace", r.expectedNamespace, "") + } + if r.expectedName != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_name", r.expectedName, "") + } + if r.expectedVersion != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_version", r.expectedVersion, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest struct { + ctx context.Context + ApiService *PulpAnsibleArtifactsCollectionsV3APIService + distroBasePath string + path string + file *os.File + sha256 *string + expectedNamespace *string + expectedName *string + expectedVersion *string +} + +// The Collection tarball. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) File(file *os.File) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest { + r.file = file + return r +} + +// An optional sha256 checksum of the uploaded file. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) Sha256(sha256 string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest { + r.sha256 = &sha256 + return r +} + +// The expected 'namespace' of the Collection to be verified against the metadata during import. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) ExpectedNamespace(expectedNamespace string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest { + r.expectedNamespace = &expectedNamespace + return r +} + +// The expected 'name' of the Collection to be verified against the metadata during import. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) ExpectedName(expectedName string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest { + r.expectedName = &expectedName + return r +} + +// The expected version of the Collection to be verified against the metadata during import. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) ExpectedVersion(expectedVersion string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest { + r.expectedVersion = &expectedVersion + return r +} + +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateExecute(r) +} + +/* +PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreate Upload a collection + +Create an artifact and trigger an asynchronous task to create Collection content from it. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param path + @return PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest +*/ +func (a *PulpAnsibleArtifactsCollectionsV3APIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreate(ctx context.Context, distroBasePath string, path string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest { + return PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + path: path, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleArtifactsCollectionsV3APIService) PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateExecute(r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleArtifactsCollectionsV3APIService.PulpAnsibleGalaxyApiV3PluginAnsibleContentCollectionsArtifactsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/{path}/api/v3/plugin/ansible/content/{distro_base_path}/collections/artifacts/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.file == nil { + return localVarReturnValue, nil, reportError("file is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha256", r.sha256, "") + } + if r.expectedNamespace != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_namespace", r.expectedNamespace, "") + } + if r.expectedName != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_name", r.expectedName, "") + } + if r.expectedVersion != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_version", r.expectedVersion, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest struct { + ctx context.Context + ApiService *PulpAnsibleArtifactsCollectionsV3APIService + file *os.File + sha256 *string + expectedNamespace *string + expectedName *string + expectedVersion *string +} + +// The Collection tarball. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest) File(file *os.File) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest { + r.file = file + return r +} + +// An optional sha256 checksum of the uploaded file. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest) Sha256(sha256 string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest { + r.sha256 = &sha256 + return r +} + +// The expected 'namespace' of the Collection to be verified against the metadata during import. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest) ExpectedNamespace(expectedNamespace string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest { + r.expectedNamespace = &expectedNamespace + return r +} + +// The expected 'name' of the Collection to be verified against the metadata during import. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest) ExpectedName(expectedName string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest { + r.expectedName = &expectedName + return r +} + +// The expected version of the Collection to be verified against the metadata during import. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest) ExpectedVersion(expectedVersion string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest { + r.expectedVersion = &expectedVersion + return r +} + +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreate Upload a collection + +Create an artifact and trigger an asynchronous task to create Collection content from it. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest + +Deprecated +*/ +func (a *PulpAnsibleArtifactsCollectionsV3APIService) PulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreate(ctx context.Context) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest { + return PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +// Deprecated +func (a *PulpAnsibleArtifactsCollectionsV3APIService) PulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateExecute(r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleArtifactsCollectionsV3APIService.PulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/artifacts/collections/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.file == nil { + return localVarReturnValue, nil, reportError("file is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha256", r.sha256, "") + } + if r.expectedNamespace != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_namespace", r.expectedNamespace, "") + } + if r.expectedName != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_name", r.expectedName, "") + } + if r.expectedVersion != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_version", r.expectedVersion, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest struct { + ctx context.Context + ApiService *PulpAnsibleArtifactsCollectionsV3APIService + distroBasePath string + file *os.File + sha256 *string + expectedNamespace *string + expectedName *string + expectedVersion *string +} + +// The Collection tarball. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) File(file *os.File) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest { + r.file = file + return r +} + +// An optional sha256 checksum of the uploaded file. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) Sha256(sha256 string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest { + r.sha256 = &sha256 + return r +} + +// The expected 'namespace' of the Collection to be verified against the metadata during import. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) ExpectedNamespace(expectedNamespace string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest { + r.expectedNamespace = &expectedNamespace + return r +} + +// The expected 'name' of the Collection to be verified against the metadata during import. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) ExpectedName(expectedName string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest { + r.expectedName = &expectedName + return r +} + +// The expected version of the Collection to be verified against the metadata during import. +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) ExpectedVersion(expectedVersion string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest { + r.expectedVersion = &expectedVersion + return r +} + +func (r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreate Upload a collection + +Create an artifact and trigger an asynchronous task to create Collection content from it. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @return PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest +*/ +func (a *PulpAnsibleArtifactsCollectionsV3APIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreate(ctx context.Context, distroBasePath string) PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest { + return PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleArtifactsCollectionsV3APIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateExecute(r PulpAnsibleArtifactsCollectionsV3APIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleArtifactsCollectionsV3APIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/artifacts/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.file == nil { + return localVarReturnValue, nil, reportError("file is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha256", r.sha256, "") + } + if r.expectedNamespace != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_namespace", r.expectedNamespace, "") + } + if r.expectedName != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_name", r.expectedName, "") + } + if r.expectedVersion != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "expected_version", r.expectedVersion, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api.go new file mode 100644 index 0000000000..4b2040b7e9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api.go @@ -0,0 +1,112 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// PulpAnsibleDefaultApiAPIService PulpAnsibleDefaultApiAPI service +type PulpAnsibleDefaultApiAPIService service + +type PulpAnsibleDefaultApiAPIPulpAnsibleGalaxyDefaultApiGetRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiAPIService +} + +func (r PulpAnsibleDefaultApiAPIPulpAnsibleGalaxyDefaultApiGetRequest) Execute() (*http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiGetExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiGet Method for PulpAnsibleGalaxyDefaultApiGet + +Return a response to the "GET" action. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PulpAnsibleDefaultApiAPIPulpAnsibleGalaxyDefaultApiGetRequest +*/ +func (a *PulpAnsibleDefaultApiAPIService) PulpAnsibleGalaxyDefaultApiGet(ctx context.Context) PulpAnsibleDefaultApiAPIPulpAnsibleGalaxyDefaultApiGetRequest { + return PulpAnsibleDefaultApiAPIPulpAnsibleGalaxyDefaultApiGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *PulpAnsibleDefaultApiAPIService) PulpAnsibleGalaxyDefaultApiGetExecute(r PulpAnsibleDefaultApiAPIPulpAnsibleGalaxyDefaultApiGetRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiAPIService.PulpAnsibleGalaxyDefaultApiGet") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3.go new file mode 100644 index 0000000000..3bb1cd87b4 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3.go @@ -0,0 +1,126 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// PulpAnsibleDefaultApiV3APIService PulpAnsibleDefaultApiV3API service +type PulpAnsibleDefaultApiV3APIService service + +type PulpAnsibleDefaultApiV3APIPulpAnsibleGalaxyDefaultApiV3ReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3APIService +} + +func (r PulpAnsibleDefaultApiV3APIPulpAnsibleGalaxyDefaultApiV3ReadRequest) Execute() (*RepoMetadataResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3ReadExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3Read Method for PulpAnsibleGalaxyDefaultApiV3Read + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PulpAnsibleDefaultApiV3APIPulpAnsibleGalaxyDefaultApiV3ReadRequest + +Deprecated +*/ +func (a *PulpAnsibleDefaultApiV3APIService) PulpAnsibleGalaxyDefaultApiV3Read(ctx context.Context) PulpAnsibleDefaultApiV3APIPulpAnsibleGalaxyDefaultApiV3ReadRequest { + return PulpAnsibleDefaultApiV3APIPulpAnsibleGalaxyDefaultApiV3ReadRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return RepoMetadataResponse +// Deprecated +func (a *PulpAnsibleDefaultApiV3APIService) PulpAnsibleGalaxyDefaultApiV3ReadExecute(r PulpAnsibleDefaultApiV3APIPulpAnsibleGalaxyDefaultApiV3ReadRequest) (*RepoMetadataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepoMetadataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3APIService.PulpAnsibleGalaxyDefaultApiV3Read") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_artifacts_collections.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_artifacts_collections.go new file mode 100644 index 0000000000..436684af5e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_artifacts_collections.go @@ -0,0 +1,158 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIService PulpAnsibleDefaultApiV3ArtifactsCollectionsAPI service +type PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIService service + +type PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGetRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIService + filename string + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGetRequest) Fields(fields []string) PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGetRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGetRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGetRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGetRequest) Execute() (*http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGetExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGet Method for PulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGet + +Download collection. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param filename + @param path + @return PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGetRequest +*/ +func (a *PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGet(ctx context.Context, filename string, path string) PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGetRequest { + return PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGetRequest{ + ApiService: a, + ctx: ctx, + filename: filename, + path: path, + } +} + +// Execute executes the request +func (a *PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGetExecute(r PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIPulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGetRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIService.PulpAnsibleGalaxyDefaultApiV3ArtifactsCollectionsGet") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/artifacts/collections/{path}/{filename}" + localVarPath = strings.Replace(localVarPath, "{"+"filename"+"}", parameterValueToString(r.filename, "filename"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collection_versions_all.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collection_versions_all.go new file mode 100644 index 0000000000..0f5d7b6874 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collection_versions_all.go @@ -0,0 +1,126 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// PulpAnsibleDefaultApiV3CollectionVersionsAllAPIService PulpAnsibleDefaultApiV3CollectionVersionsAllAPI service +type PulpAnsibleDefaultApiV3CollectionVersionsAllAPIService service + +type PulpAnsibleDefaultApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionVersionsAllListRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3CollectionVersionsAllAPIService +} + +func (r PulpAnsibleDefaultApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionVersionsAllListRequest) Execute() ([]UnpaginatedCollectionVersionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3CollectionVersionsAllListExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3CollectionVersionsAllList Method for PulpAnsibleGalaxyDefaultApiV3CollectionVersionsAllList + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PulpAnsibleDefaultApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionVersionsAllListRequest + +Deprecated +*/ +func (a *PulpAnsibleDefaultApiV3CollectionVersionsAllAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionVersionsAllList(ctx context.Context) PulpAnsibleDefaultApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionVersionsAllListRequest { + return PulpAnsibleDefaultApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionVersionsAllListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []UnpaginatedCollectionVersionResponse +// Deprecated +func (a *PulpAnsibleDefaultApiV3CollectionVersionsAllAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionVersionsAllListExecute(r PulpAnsibleDefaultApiV3CollectionVersionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionVersionsAllListRequest) ([]UnpaginatedCollectionVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []UnpaginatedCollectionVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3CollectionVersionsAllAPIService.PulpAnsibleGalaxyDefaultApiV3CollectionVersionsAllList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/collection_versions/all/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections.go new file mode 100644 index 0000000000..3a6face071 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections.go @@ -0,0 +1,618 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleDefaultApiV3CollectionsAPIService PulpAnsibleDefaultApiV3CollectionsAPI service +type PulpAnsibleDefaultApiV3CollectionsAPIService service + +type PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsDeleteRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3CollectionsAPIService + name string + namespace string +} + +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3CollectionsDeleteExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3CollectionsDelete Method for PulpAnsibleGalaxyDefaultApiV3CollectionsDelete + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @return PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsDeleteRequest + +Deprecated +*/ +func (a *PulpAnsibleDefaultApiV3CollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsDelete(ctx context.Context, name string, namespace string) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsDeleteRequest { + return PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsDeleteRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +// Deprecated +func (a *PulpAnsibleDefaultApiV3CollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsDeleteExecute(r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3CollectionsAPIService.PulpAnsibleGalaxyDefaultApiV3CollectionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3CollectionsAPIService + deprecated *bool + limit *int32 + name *string + namespace *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest) Deprecated(deprecated bool) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest { + r.deprecated = &deprecated + return r +} + +// Number of results to return per page. +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest) Limit(limit int32) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest { + r.limit = &limit + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest) Name(name string) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest { + r.name = &name + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest) Namespace(namespace string) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest { + r.namespace = &namespace + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest) Offset(offset int32) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest) Ordering(ordering []string) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest) Fields(fields []string) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest) Execute() (*PaginatedCollectionResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3CollectionsListExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3CollectionsList Method for PulpAnsibleGalaxyDefaultApiV3CollectionsList + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest + +Deprecated +*/ +func (a *PulpAnsibleDefaultApiV3CollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsList(ctx context.Context) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest { + return PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedCollectionResponseList +// Deprecated +func (a *PulpAnsibleDefaultApiV3CollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsListExecute(r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsListRequest) (*PaginatedCollectionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCollectionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3CollectionsAPIService.PulpAnsibleGalaxyDefaultApiV3CollectionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/collections/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.deprecated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "deprecated", r.deprecated, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3CollectionsAPIService + name string + namespace string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsReadRequest) Fields(fields []string) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsReadRequest) Execute() (*CollectionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3CollectionsReadExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3CollectionsRead Method for PulpAnsibleGalaxyDefaultApiV3CollectionsRead + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @return PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsReadRequest + +Deprecated +*/ +func (a *PulpAnsibleDefaultApiV3CollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsRead(ctx context.Context, name string, namespace string) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsReadRequest { + return PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsReadRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + } +} + +// Execute executes the request +// @return CollectionResponse +// Deprecated +func (a *PulpAnsibleDefaultApiV3CollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsReadExecute(r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsReadRequest) (*CollectionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3CollectionsAPIService.PulpAnsibleGalaxyDefaultApiV3CollectionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsUpdateRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3CollectionsAPIService + name string + namespace string + patchedCollection *PatchedCollection +} + +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsUpdateRequest) PatchedCollection(patchedCollection PatchedCollection) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsUpdateRequest { + r.patchedCollection = &patchedCollection + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3CollectionsUpdateExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3CollectionsUpdate Method for PulpAnsibleGalaxyDefaultApiV3CollectionsUpdate + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @return PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsUpdateRequest + +Deprecated +*/ +func (a *PulpAnsibleDefaultApiV3CollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsUpdate(ctx context.Context, name string, namespace string) PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsUpdateRequest { + return PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsUpdateRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +// Deprecated +func (a *PulpAnsibleDefaultApiV3CollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsUpdateExecute(r PulpAnsibleDefaultApiV3CollectionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3CollectionsAPIService.PulpAnsibleGalaxyDefaultApiV3CollectionsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedCollection == nil { + return localVarReturnValue, nil, reportError("patchedCollection is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedCollection + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections_all.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections_all.go new file mode 100644 index 0000000000..efd5dd39c8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections_all.go @@ -0,0 +1,220 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" +) + + +// PulpAnsibleDefaultApiV3CollectionsAllAPIService PulpAnsibleDefaultApiV3CollectionsAllAPI service +type PulpAnsibleDefaultApiV3CollectionsAllAPIService service + +type PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3CollectionsAllAPIService + deprecated *bool + name *string + namespace *string + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest) Deprecated(deprecated bool) PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest { + r.deprecated = &deprecated + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest) Name(name string) PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest { + r.name = &name + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest) Namespace(namespace string) PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest { + r.namespace = &namespace + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest) Ordering(ordering []string) PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest) Fields(fields []string) PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest) Execute() ([]CollectionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3CollectionsAllListExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3CollectionsAllList Method for PulpAnsibleGalaxyDefaultApiV3CollectionsAllList + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest + +Deprecated +*/ +func (a *PulpAnsibleDefaultApiV3CollectionsAllAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsAllList(ctx context.Context) PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest { + return PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []CollectionResponse +// Deprecated +func (a *PulpAnsibleDefaultApiV3CollectionsAllAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsAllListExecute(r PulpAnsibleDefaultApiV3CollectionsAllAPIPulpAnsibleGalaxyDefaultApiV3CollectionsAllListRequest) ([]CollectionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []CollectionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3CollectionsAllAPIService.PulpAnsibleGalaxyDefaultApiV3CollectionsAllList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/collections/all/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.deprecated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "deprecated", r.deprecated, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections_versions.go new file mode 100644 index 0000000000..47dae7ad9e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections_versions.go @@ -0,0 +1,572 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleDefaultApiV3CollectionsVersionsAPIService PulpAnsibleDefaultApiV3CollectionsVersionsAPI service +type PulpAnsibleDefaultApiV3CollectionsVersionsAPIService service + +type PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDeleteRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3CollectionsVersionsAPIService + name string + namespace string + version string +} + +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDeleteExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDelete Method for PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDelete + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @param version + @return PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDeleteRequest + +Deprecated +*/ +func (a *PulpAnsibleDefaultApiV3CollectionsVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDelete(ctx context.Context, name string, namespace string, version string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDeleteRequest { + return PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + version: version, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +// Deprecated +func (a *PulpAnsibleDefaultApiV3CollectionsVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDeleteExecute(r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3CollectionsVersionsAPIService.PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/versions/{version}/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", parameterValueToString(r.version, "version"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3CollectionsVersionsAPIService + name string + namespace string + isHighest *bool + limit *int32 + name2 *string + namespace2 *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + q *string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + tags *string + version *string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) IsHighest(isHighest bool) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.isHighest = &isHighest + return r +} + +// Number of results to return per page. +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) Limit(limit int32) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.limit = &limit + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) Name2(name2 string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.name2 = &name2 + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) Namespace2(namespace2 string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.namespace2 = &namespace2 + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) Offset(offset int32) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `authors` - Authors * `-authors` - Authors (descending) * `contents` - Contents * `-contents` - Contents (descending) * `dependencies` - Dependencies * `-dependencies` - Dependencies (descending) * `description` - Description * `-description` - Description (descending) * `docs_blob` - Docs blob * `-docs_blob` - Docs blob (descending) * `manifest` - Manifest * `-manifest` - Manifest (descending) * `files` - Files * `-files` - Files (descending) * `documentation` - Documentation * `-documentation` - Documentation (descending) * `homepage` - Homepage * `-homepage` - Homepage (descending) * `issues` - Issues * `-issues` - Issues (descending) * `license` - License * `-license` - License (descending) * `name` - Name * `-name` - Name (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `repository` - Repository * `-repository` - Repository (descending) * `requires_ansible` - Requires ansible * `-requires_ansible` - Requires ansible (descending) * `version` - Version * `-version` - Version (descending) * `version_major` - Version major * `-version_major` - Version major (descending) * `version_minor` - Version minor * `-version_minor` - Version minor (descending) * `version_patch` - Version patch * `-version_patch` - Version patch (descending) * `version_prerelease` - Version prerelease * `-version_prerelease` - Version prerelease (descending) * `is_highest` - Is highest * `-is_highest` - Is highest (descending) * `search_vector` - Search vector * `-search_vector` - Search vector (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) Ordering(ordering []string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) Q(q string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.q = &q + return r +} + +// Repository Version referenced by HREF +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) RepositoryVersion(repositoryVersion string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter by comma separate list of tags that must all be matched +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) Tags(tags string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.tags = &tags + return r +} + +// Filter results where version matches value +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) Version(version string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.version = &version + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) Fields(fields []string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) Execute() (*PaginatedCollectionVersionListResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsList Method for PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsList + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @return PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest + +Deprecated +*/ +func (a *PulpAnsibleDefaultApiV3CollectionsVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsList(ctx context.Context, name string, namespace string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest { + return PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + } +} + +// Execute executes the request +// @return PaginatedCollectionVersionListResponseList +// Deprecated +func (a *PulpAnsibleDefaultApiV3CollectionsVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListExecute(r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsListRequest) (*PaginatedCollectionVersionListResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCollectionVersionListResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3CollectionsVersionsAPIService.PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/versions/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.isHighest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "is_highest", r.isHighest, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name2 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name2, "") + } + if r.namespace2 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace2, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.q != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "q", r.q, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.tags != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "tags", r.tags, "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3CollectionsVersionsAPIService + name string + namespace string + version string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsReadRequest) Fields(fields []string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsReadRequest) Execute() (*CollectionVersionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsReadExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsRead Method for PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsRead + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @param version + @return PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsReadRequest + +Deprecated +*/ +func (a *PulpAnsibleDefaultApiV3CollectionsVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsRead(ctx context.Context, name string, namespace string, version string) PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsReadRequest { + return PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsReadRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + version: version, + } +} + +// Execute executes the request +// @return CollectionVersionResponse +// Deprecated +func (a *PulpAnsibleDefaultApiV3CollectionsVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsReadExecute(r PulpAnsibleDefaultApiV3CollectionsVersionsAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsReadRequest) (*CollectionVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3CollectionsVersionsAPIService.PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/versions/{version}/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", parameterValueToString(r.version, "version"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections_versions_docs_blob.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections_versions_docs_blob.go new file mode 100644 index 0000000000..bff542f399 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_collections_versions_docs_blob.go @@ -0,0 +1,176 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIService PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPI service +type PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIService service + +type PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIService + name string + namespace string + version string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobReadRequest) Fields(fields []string) PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobReadRequest) Execute() (*CollectionVersionDocsResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobReadExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobRead Method for PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobRead + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param namespace + @param version + @return PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobReadRequest + +Deprecated +*/ +func (a *PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobRead(ctx context.Context, name string, namespace string, version string) PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobReadRequest { + return PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobReadRequest{ + ApiService: a, + ctx: ctx, + name: name, + namespace: namespace, + version: version, + } +} + +// Execute executes the request +// @return CollectionVersionDocsResponse +// Deprecated +func (a *PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIService) PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobReadExecute(r PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobReadRequest) (*CollectionVersionDocsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionVersionDocsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIService.PulpAnsibleGalaxyDefaultApiV3CollectionsVersionsDocsBlobRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/collections/{namespace}/{name}/versions/{version}/docs-blob/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", parameterValueToString(r.version, "version"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_namespaces.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_namespaces.go new file mode 100644 index 0000000000..15b1984bfd --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_namespaces.go @@ -0,0 +1,476 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleDefaultApiV3NamespacesAPIService PulpAnsibleDefaultApiV3NamespacesAPI service +type PulpAnsibleDefaultApiV3NamespacesAPIService service + +type PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3NamespacesAPIService + company *string + companyContains *string + companyIcontains *string + companyIn *[]string + companyStartswith *string + limit *int32 + metadataSha256 *string + metadataSha256In *[]string + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Filter results where company matches value +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) Company(company string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.company = &company + return r +} + +// Filter results where company contains value +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) CompanyContains(companyContains string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.companyContains = &companyContains + return r +} + +// Filter results where company contains value +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) CompanyIcontains(companyIcontains string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.companyIcontains = &companyIcontains + return r +} + +// Filter results where company is in a comma-separated list of values +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) CompanyIn(companyIn []string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.companyIn = &companyIn + return r +} + +// Filter results where company starts with value +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) CompanyStartswith(companyStartswith string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.companyStartswith = &companyStartswith + return r +} + +// Number of results to return per page. +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) Limit(limit int32) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.limit = &limit + return r +} + +// Filter results where metadata_sha256 matches value +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) MetadataSha256(metadataSha256 string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.metadataSha256 = &metadataSha256 + return r +} + +// Filter results where metadata_sha256 is in a comma-separated list of values +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) MetadataSha256In(metadataSha256In []string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.metadataSha256In = &metadataSha256In + return r +} + +// Filter results where name matches value +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) Name(name string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) NameContains(nameContains string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) NameIcontains(nameIcontains string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) NameIn(nameIn []string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) NameStartswith(nameStartswith string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) Offset(offset int32) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `company` - Company * `-company` - Company (descending) * `email` - Email * `-email` - Email (descending) * `description` - Description * `-description` - Description (descending) * `resources` - Resources * `-resources` - Resources (descending) * `links` - Links * `-links` - Links (descending) * `avatar_sha256` - Avatar sha256 * `-avatar_sha256` - Avatar sha256 (descending) * `metadata_sha256` - Metadata sha256 * `-metadata_sha256` - Metadata sha256 (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) Ordering(ordering []string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) Fields(fields []string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) Execute() (*PaginatedansibleAnsibleNamespaceMetadataResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3NamespacesListExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3NamespacesList Method for PulpAnsibleGalaxyDefaultApiV3NamespacesList + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest + +Deprecated +*/ +func (a *PulpAnsibleDefaultApiV3NamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3NamespacesList(ctx context.Context) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest { + return PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedansibleAnsibleNamespaceMetadataResponseList +// Deprecated +func (a *PulpAnsibleDefaultApiV3NamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3NamespacesListExecute(r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesListRequest) (*PaginatedansibleAnsibleNamespaceMetadataResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleAnsibleNamespaceMetadataResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3NamespacesAPIService.PulpAnsibleGalaxyDefaultApiV3NamespacesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/namespaces/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.company != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company", r.company, "") + } + if r.companyContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__contains", r.companyContains, "") + } + if r.companyIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__icontains", r.companyIcontains, "") + } + if r.companyIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__in", r.companyIn, "csv") + } + if r.companyStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__startswith", r.companyStartswith, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.metadataSha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "metadata_sha256", r.metadataSha256, "") + } + if r.metadataSha256In != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "metadata_sha256__in", r.metadataSha256In, "csv") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3NamespacesAPIService + name string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesReadRequest) Fields(fields []string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesReadRequest) Execute() (*AnsibleAnsibleNamespaceMetadataResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3NamespacesReadExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3NamespacesRead Method for PulpAnsibleGalaxyDefaultApiV3NamespacesRead + +Legacy v3 endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @return PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesReadRequest + +Deprecated +*/ +func (a *PulpAnsibleDefaultApiV3NamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3NamespacesRead(ctx context.Context, name string) PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesReadRequest { + return PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesReadRequest{ + ApiService: a, + ctx: ctx, + name: name, + } +} + +// Execute executes the request +// @return AnsibleAnsibleNamespaceMetadataResponse +// Deprecated +func (a *PulpAnsibleDefaultApiV3NamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3NamespacesReadExecute(r PulpAnsibleDefaultApiV3NamespacesAPIPulpAnsibleGalaxyDefaultApiV3NamespacesReadRequest) (*AnsibleAnsibleNamespaceMetadataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleAnsibleNamespaceMetadataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3NamespacesAPIService.PulpAnsibleGalaxyDefaultApiV3NamespacesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/namespaces/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_client_configuration.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_client_configuration.go new file mode 100644 index 0000000000..8f23b32c7c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_client_configuration.go @@ -0,0 +1,123 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIService PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPI service +type PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIService service + +type PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleClientConfigurationReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIService +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleClientConfigurationReadRequest) Execute() (*ClientConfigurationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleClientConfigurationReadExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleClientConfigurationRead Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleClientConfigurationRead + +Return configurations for the ansible-galaxy client. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleClientConfigurationReadRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleClientConfigurationRead(ctx context.Context) PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleClientConfigurationReadRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleClientConfigurationReadRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ClientConfigurationResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleClientConfigurationReadExecute(r PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleClientConfigurationReadRequest) (*ClientConfigurationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ClientConfigurationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleClientConfigurationRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/client-configuration/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections.go new file mode 100644 index 0000000000..bee6e4c986 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections.go @@ -0,0 +1,165 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIService PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPI service +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIService service + +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIService + distroBasePath string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsReadRequest) Fields(fields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsReadRequest) Execute() (*RepoMetadataResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsReadExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsRead Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsRead + +ViewSet for Repository Metadata. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsReadRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsRead(ctx context.Context, distroBasePath string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsReadRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsReadRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + } +} + +// Execute executes the request +// @return RepoMetadataResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsReadExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsReadRequest) (*RepoMetadataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepoMetadataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_collections.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_collections.go new file mode 100644 index 0000000000..6abf072173 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_collections.go @@ -0,0 +1,222 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPI service +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService service + +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService + distroBasePath string + deprecated *bool + name *string + namespace *string + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) Deprecated(deprecated bool) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.deprecated = &deprecated + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) Name(name string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.name = &name + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) Namespace(namespace string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.namespace = &namespace + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) Ordering(ordering []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) Fields(fields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) Execute() ([]CollectionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsList Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsList + +Unpaginated ViewSet for Collections. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsList(ctx context.Context, distroBasePath string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + } +} + +// Execute executes the request +// @return []CollectionResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsListRequest) ([]CollectionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []CollectionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/all-collections/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.deprecated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "deprecated", r.deprecated, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_versions.go new file mode 100644 index 0000000000..e3f7c2a82c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_versions.go @@ -0,0 +1,165 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIService PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPI service +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIService service + +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsListRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIService + distroBasePath string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsListRequest) Fields(fields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsListRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsListRequest) Execute() ([]UnpaginatedCollectionVersionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsListExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsList Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsList + +Returns paginated CollectionVersions list. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsListRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsList(ctx context.Context, distroBasePath string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsListRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsListRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + } +} + +// Execute executes the request +// @return []UnpaginatedCollectionVersionResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsListExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsListRequest) ([]UnpaginatedCollectionVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []UnpaginatedCollectionVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsAllVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/all-versions/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_artifacts.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_artifacts.go new file mode 100644 index 0000000000..840f473b5e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_artifacts.go @@ -0,0 +1,158 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIService PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPI service +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIService service + +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIService + distroBasePath string + filename string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest) Fields(fields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest) Execute() (*http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownloadExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownload Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownload + +Collection download endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param filename + @return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownload(ctx context.Context, distroBasePath string, filename string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + filename: filename, + } +} + +// Execute executes the request +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownloadExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownloadRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsArtifactsDownload") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/artifacts/{filename}" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"filename"+"}", parameterValueToString(r.filename, "filename"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_index.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_index.go new file mode 100644 index 0000000000..a1fdb99205 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_index.go @@ -0,0 +1,622 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPI service +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService service + +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexDeleteRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService + distroBasePath string + name string + namespace string +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexDeleteExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexDelete Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexDelete + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexDeleteRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexDelete(ctx context.Context, distroBasePath string, name string, namespace string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexDeleteRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexDeleteRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexDeleteExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService + distroBasePath string + deprecated *bool + limit *int32 + name *string + namespace *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest) Deprecated(deprecated bool) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.deprecated = &deprecated + return r +} + +// Number of results to return per page. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest) Limit(limit int32) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.limit = &limit + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest) Name(name string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.name = &name + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest) Namespace(namespace string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.namespace = &namespace + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest) Offset(offset int32) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest) Ordering(ordering []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest) Fields(fields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest) Execute() (*PaginatedCollectionResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexList Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexList + +ViewSet for Collections. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexList(ctx context.Context, distroBasePath string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + } +} + +// Execute executes the request +// @return PaginatedCollectionResponseList +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexListRequest) (*PaginatedCollectionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCollectionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.deprecated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "deprecated", r.deprecated, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService + distroBasePath string + name string + namespace string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexReadRequest) Fields(fields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexReadRequest) Execute() (*CollectionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexReadExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexRead Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexRead + +ViewSet for Collections. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexReadRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexRead(ctx context.Context, distroBasePath string, name string, namespace string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexReadRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexReadRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + } +} + +// Execute executes the request +// @return CollectionResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexReadExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexReadRequest) (*CollectionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdateRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService + distroBasePath string + name string + namespace string + patchedCollection *PatchedCollection +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdateRequest) PatchedCollection(patchedCollection PatchedCollection) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdateRequest { + r.patchedCollection = &patchedCollection + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdateExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdate Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdate + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdateRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdate(ctx context.Context, distroBasePath string, name string, namespace string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdateRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdateRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdateExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedCollection == nil { + return localVarReturnValue, nil, reportError("patchedCollection is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedCollection + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions.go new file mode 100644 index 0000000000..d086b495b5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions.go @@ -0,0 +1,575 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPI service +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService service + +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService + distroBasePath string + name string + namespace string + version string +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDelete Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDelete + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @param version + @return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDelete(ctx context.Context, distroBasePath string, name string, namespace string, version string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + version: version, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/{version}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", parameterValueToString(r.version, "version"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService + distroBasePath string + name string + namespace string + isHighest *bool + limit *int32 + name2 *string + namespace2 *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + q *string + repositoryVersion *string + repositoryVersionAdded *string + repositoryVersionRemoved *string + tags *string + version *string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) IsHighest(isHighest bool) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.isHighest = &isHighest + return r +} + +// Number of results to return per page. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Limit(limit int32) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.limit = &limit + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Name2(name2 string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.name2 = &name2 + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Namespace2(namespace2 string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.namespace2 = &namespace2 + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Offset(offset int32) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `authors` - Authors * `-authors` - Authors (descending) * `contents` - Contents * `-contents` - Contents (descending) * `dependencies` - Dependencies * `-dependencies` - Dependencies (descending) * `description` - Description * `-description` - Description (descending) * `docs_blob` - Docs blob * `-docs_blob` - Docs blob (descending) * `manifest` - Manifest * `-manifest` - Manifest (descending) * `files` - Files * `-files` - Files (descending) * `documentation` - Documentation * `-documentation` - Documentation (descending) * `homepage` - Homepage * `-homepage` - Homepage (descending) * `issues` - Issues * `-issues` - Issues (descending) * `license` - License * `-license` - License (descending) * `name` - Name * `-name` - Name (descending) * `namespace` - Namespace * `-namespace` - Namespace (descending) * `repository` - Repository * `-repository` - Repository (descending) * `requires_ansible` - Requires ansible * `-requires_ansible` - Requires ansible (descending) * `version` - Version * `-version` - Version (descending) * `version_major` - Version major * `-version_major` - Version major (descending) * `version_minor` - Version minor * `-version_minor` - Version minor (descending) * `version_patch` - Version patch * `-version_patch` - Version patch (descending) * `version_prerelease` - Version prerelease * `-version_prerelease` - Version prerelease (descending) * `is_highest` - Is highest * `-is_highest` - Is highest (descending) * `search_vector` - Search vector * `-search_vector` - Search vector (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Ordering(ordering []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Q(q string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.q = &q + return r +} + +// Repository Version referenced by HREF +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) RepositoryVersion(repositoryVersion string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +// Repository Version referenced by HREF +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) RepositoryVersionAdded(repositoryVersionAdded string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.repositoryVersionAdded = &repositoryVersionAdded + return r +} + +// Repository Version referenced by HREF +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) RepositoryVersionRemoved(repositoryVersionRemoved string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.repositoryVersionRemoved = &repositoryVersionRemoved + return r +} + +// Filter by comma separate list of tags that must all be matched +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Tags(tags string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.tags = &tags + return r +} + +// Filter results where version matches value +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Version(version string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.version = &version + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Fields(fields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) Execute() (*PaginatedCollectionVersionListResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsList Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsList + +Returns paginated CollectionVersions list. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsList(ctx context.Context, distroBasePath string, name string, namespace string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + } +} + +// Execute executes the request +// @return PaginatedCollectionVersionListResponseList +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsListRequest) (*PaginatedCollectionVersionListResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCollectionVersionListResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.isHighest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "is_highest", r.isHighest, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name2 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name2, "") + } + if r.namespace2 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace2, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.q != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "q", r.q, "") + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.repositoryVersionAdded != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_added", r.repositoryVersionAdded, "") + } + if r.repositoryVersionRemoved != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version_removed", r.repositoryVersionRemoved, "") + } + if r.tags != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "tags", r.tags, "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService + distroBasePath string + name string + namespace string + version string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest) Fields(fields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest) Execute() (*CollectionVersionResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsReadExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsRead Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsRead + +Returns a CollectionVersion object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @param version + @return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsRead(ctx context.Context, distroBasePath string, name string, namespace string, version string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + version: version, + } +} + +// Execute executes the request +// @return CollectionVersionResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsReadExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsReadRequest) (*CollectionVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/{version}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", parameterValueToString(r.version, "version"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions_docs_blob.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions_docs_blob.go new file mode 100644 index 0000000000..ad4b61efad --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions_docs_blob.go @@ -0,0 +1,177 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPI service +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService service + +type PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService + distroBasePath string + name string + namespace string + version string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest) Fields(fields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest) Execute() (*CollectionVersionDocsResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobRead Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobRead + +Returns a CollectionVersion object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @param namespace + @param version + @return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobRead(ctx context.Context, distroBasePath string, name string, namespace string, version string) PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + namespace: namespace, + version: version, + } +} + +// Execute executes the request +// @return CollectionVersionDocsResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobReadRequest) (*CollectionVersionDocsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionVersionDocsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/versions/{version}/docs-blob/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", parameterValueToString(r.namespace, "namespace"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", parameterValueToString(r.version, "version"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_namespaces.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_namespaces.go new file mode 100644 index 0000000000..4292913551 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_content_namespaces.go @@ -0,0 +1,971 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "reflect" +) + + +// PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPI service +type PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService service + +type PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService + distroBasePath string + name *string + company *string + email *string + description *string + resources *string + links *[]NamespaceLink + avatar *os.File +} + +// Required named, only accepts lowercase, numbers and underscores. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest) Name(name string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest { + r.name = &name + return r +} + +// Optional namespace company owner. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest) Company(company string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest { + r.company = &company + return r +} + +// Optional namespace contact email. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest) Email(email string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest { + r.email = &email + return r +} + +// Optional short description. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest) Description(description string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest { + r.description = &description + return r +} + +// Optional resource page in markdown format. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest) Resources(resources string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest { + r.resources = &resources + return r +} + +// Labeled related links. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest) Links(links []NamespaceLink) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest { + r.links = &links + return r +} + +// Optional avatar image for Namespace +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest) Avatar(avatar *os.File) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest { + r.avatar = avatar + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreate Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreate + +Custom exception handler mixin class. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @return PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreate(ctx context.Context, distroBasePath string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.name == nil { + return localVarReturnValue, nil, reportError("name is required and must be specified") + } + if strlen(*r.name) < 3 { + return localVarReturnValue, nil, reportError("name must have at least 3 elements") + } + if strlen(*r.name) > 64 { + return localVarReturnValue, nil, reportError("name must have less than 64 elements") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarFormParams, "name", r.name, "") + if r.company != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "company", r.company, "") + } + if r.email != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "email", r.email, "") + } + if r.description != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "description", r.description, "") + } + if r.resources != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "resources", r.resources, "") + } + if r.links != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "links", r.links, "csv") + } + var avatarLocalVarFormFileName string + var avatarLocalVarFileName string + var avatarLocalVarFileBytes []byte + + avatarLocalVarFormFileName = "avatar" + + + avatarLocalVarFile := r.avatar + + if avatarLocalVarFile != nil { + fbs, _ := io.ReadAll(avatarLocalVarFile) + + avatarLocalVarFileBytes = fbs + avatarLocalVarFileName = avatarLocalVarFile.Name() + avatarLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: avatarLocalVarFileBytes, fileName: avatarLocalVarFileName, formFileName: avatarLocalVarFormFileName}) + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesDeleteRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService + distroBasePath string + name string +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesDeleteExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesDelete Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesDelete + +Try to remove the Namespace if no Collections under Namespace are present. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @return PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesDeleteRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesDelete(ctx context.Context, distroBasePath string, name string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesDeleteRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesDeleteRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesDeleteExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService + distroBasePath string + company *string + companyContains *string + companyIcontains *string + companyIn *[]string + companyStartswith *string + limit *int32 + metadataSha256 *string + metadataSha256In *[]string + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Filter results where company matches value +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) Company(company string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.company = &company + return r +} + +// Filter results where company contains value +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) CompanyContains(companyContains string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.companyContains = &companyContains + return r +} + +// Filter results where company contains value +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) CompanyIcontains(companyIcontains string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.companyIcontains = &companyIcontains + return r +} + +// Filter results where company is in a comma-separated list of values +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) CompanyIn(companyIn []string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.companyIn = &companyIn + return r +} + +// Filter results where company starts with value +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) CompanyStartswith(companyStartswith string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.companyStartswith = &companyStartswith + return r +} + +// Number of results to return per page. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) Limit(limit int32) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.limit = &limit + return r +} + +// Filter results where metadata_sha256 matches value +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) MetadataSha256(metadataSha256 string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.metadataSha256 = &metadataSha256 + return r +} + +// Filter results where metadata_sha256 is in a comma-separated list of values +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) MetadataSha256In(metadataSha256In []string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.metadataSha256In = &metadataSha256In + return r +} + +// Filter results where name matches value +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) Name(name string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) NameContains(nameContains string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) NameIcontains(nameIcontains string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) NameIn(nameIn []string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) NameStartswith(nameStartswith string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) Offset(offset int32) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `company` - Company * `-company` - Company (descending) * `email` - Email * `-email` - Email (descending) * `description` - Description * `-description` - Description (descending) * `resources` - Resources * `-resources` - Resources (descending) * `links` - Links * `-links` - Links (descending) * `avatar_sha256` - Avatar sha256 * `-avatar_sha256` - Avatar sha256 (descending) * `metadata_sha256` - Metadata sha256 * `-metadata_sha256` - Metadata sha256 (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) Ordering(ordering []string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) PulpHrefIn(pulpHrefIn []string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) PulpIdIn(pulpIdIn []string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) Fields(fields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) Execute() (*PaginatedansibleAnsibleNamespaceMetadataResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesList Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesList + +Custom exception handler mixin class. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @return PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesList(ctx context.Context, distroBasePath string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + } +} + +// Execute executes the request +// @return PaginatedansibleAnsibleNamespaceMetadataResponseList +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesListRequest) (*PaginatedansibleAnsibleNamespaceMetadataResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleAnsibleNamespaceMetadataResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.company != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company", r.company, "") + } + if r.companyContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__contains", r.companyContains, "") + } + if r.companyIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__icontains", r.companyIcontains, "") + } + if r.companyIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__in", r.companyIn, "csv") + } + if r.companyStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "company__startswith", r.companyStartswith, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.metadataSha256 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "metadata_sha256", r.metadataSha256, "") + } + if r.metadataSha256In != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "metadata_sha256__in", r.metadataSha256In, "csv") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService + distroBasePath string + name string + name2 *string + company *string + email *string + description *string + resources *string + links *[]NamespaceLink + avatar *os.File +} + +// Required named, only accepts lowercase, numbers and underscores. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Name2(name2 string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.name2 = &name2 + return r +} + +// Optional namespace company owner. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Company(company string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.company = &company + return r +} + +// Optional namespace contact email. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Email(email string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.email = &email + return r +} + +// Optional short description. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Description(description string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.description = &description + return r +} + +// Optional resource page in markdown format. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Resources(resources string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.resources = &resources + return r +} + +// Labeled related links. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Links(links []NamespaceLink) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.links = &links + return r +} + +// Optional avatar image for Namespace +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Avatar(avatar *os.File) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + r.avatar = avatar + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdate Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdate + +Custom exception handler mixin class. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @return PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdate(ctx context.Context, distroBasePath string, name string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.name2 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "name", r.name2, "") + } + if r.company != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "company", r.company, "") + } + if r.email != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "email", r.email, "") + } + if r.description != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "description", r.description, "") + } + if r.resources != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "resources", r.resources, "") + } + if r.links != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "links", r.links, "csv") + } + var avatarLocalVarFormFileName string + var avatarLocalVarFileName string + var avatarLocalVarFileBytes []byte + + avatarLocalVarFormFileName = "avatar" + + + avatarLocalVarFile := r.avatar + + if avatarLocalVarFile != nil { + fbs, _ := io.ReadAll(avatarLocalVarFile) + + avatarLocalVarFileBytes = fbs + avatarLocalVarFileName = avatarLocalVarFile.Name() + avatarLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: avatarLocalVarFileBytes, fileName: avatarLocalVarFileName, formFileName: avatarLocalVarFormFileName}) + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesReadRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService + distroBasePath string + name string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesReadRequest) Fields(fields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesReadRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesReadRequest) Execute() (*AnsibleAnsibleNamespaceMetadataResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesReadExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesRead Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesRead + +Custom exception handler mixin class. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param distroBasePath + @param name + @return PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesReadRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesRead(ctx context.Context, distroBasePath string, name string) PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesReadRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesReadRequest{ + ApiService: a, + ctx: ctx, + distroBasePath: distroBasePath, + name: name, + } +} + +// Execute executes the request +// @return AnsibleAnsibleNamespaceMetadataResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesReadExecute(r PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesReadRequest) (*AnsibleAnsibleNamespaceMetadataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleAnsibleNamespaceMetadataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleContentNamespacesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/namespaces/{name}/" + localVarPath = strings.Replace(localVarPath, "{"+"distro_base_path"+"}", parameterValueToString(r.distroBasePath, "distroBasePath"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions.go new file mode 100644 index 0000000000..3be13d76b5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions.go @@ -0,0 +1,518 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" +) + + +// PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIService PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPI service +type PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIService service + +type PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIService + dependency *string + deprecated *bool + distribution *[]string + distributionBasePath *[]string + highest *bool + isDeprecated *bool + isHighest *bool + isSigned *bool + keywords *string + limit *int32 + name *string + namespace *string + offset *int32 + orderBy *[]string + q *string + repository *[]string + repositoryLabel *string + repositoryName *[]string + repositoryVersion *string + signed *bool + tags *string + version *string + versionRange *string + fields *[]string + excludeFields *[]string +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Dependency(dependency string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.dependency = &dependency + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Deprecated(deprecated bool) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.deprecated = &deprecated + return r +} + +// Filter collectionversions that are in these distrubtion ids. +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Distribution(distribution []string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.distribution = &distribution + return r +} + +// Filter collectionversions that are in these base paths. +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) DistributionBasePath(distributionBasePath []string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.distributionBasePath = &distributionBasePath + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Highest(highest bool) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.highest = &highest + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) IsDeprecated(isDeprecated bool) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.isDeprecated = &isDeprecated + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) IsHighest(isHighest bool) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.isHighest = &isHighest + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) IsSigned(isSigned bool) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.isSigned = &isSigned + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Keywords(keywords string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.keywords = &keywords + return r +} + +// Number of results to return per page. +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Limit(limit int32) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.limit = &limit + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Name(name string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.name = &name + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Namespace(namespace string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.namespace = &namespace + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Offset(offset int32) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_created` - by CV created * `-pulp_created` - by CV created (descending) * `namespace` - by CV namespace * `-namespace` - by CV namespace (descending) * `name` - by CV name * `-name` - by CV name (descending) * `version` - by CV version * `-version` - by CV version (descending) +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) OrderBy(orderBy []string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.orderBy = &orderBy + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Q(q string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.q = &q + return r +} + +// Filter collectionversions that are in these repository ids. +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Repository(repository []string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.repository = &repository + return r +} + +// Filter labels by search string +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) RepositoryLabel(repositoryLabel string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.repositoryLabel = &repositoryLabel + return r +} + +// Filter collectionversions that are in these repositories. +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) RepositoryName(repositoryName []string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.repositoryName = &repositoryName + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) RepositoryVersion(repositoryVersion string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.repositoryVersion = &repositoryVersion + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Signed(signed bool) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.signed = &signed + return r +} + +// Filter by comma separate list of tags that must all be matched +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Tags(tags string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.tags = &tags + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Version(version string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.version = &version + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) VersionRange(versionRange string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.versionRange = &versionRange + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Fields(fields []string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) ExcludeFields(excludeFields []string) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) Execute() (*PaginatedCollectionVersionSearchListResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsList Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsList + +A viewset for cross-repo searches. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsList(ctx context.Context) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedCollectionVersionSearchListResponseList +func (a *PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListExecute(r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsListRequest) (*PaginatedCollectionVersionSearchListResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCollectionVersionSearchListResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/search/collection-versions/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.dependency != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "dependency", r.dependency, "") + } + if r.deprecated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "deprecated", r.deprecated, "") + } + if r.distribution != nil { + t := *r.distribution + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "distribution", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "distribution", t, "multi") + } + } + if r.distributionBasePath != nil { + t := *r.distributionBasePath + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "distribution_base_path", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "distribution_base_path", t, "multi") + } + } + if r.highest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "highest", r.highest, "") + } + if r.isDeprecated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "is_deprecated", r.isDeprecated, "") + } + if r.isHighest != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "is_highest", r.isHighest, "") + } + if r.isSigned != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "is_signed", r.isSigned, "") + } + if r.keywords != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "keywords", r.keywords, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.orderBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order_by", r.orderBy, "csv") + } + if r.q != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "q", r.q, "") + } + if r.repository != nil { + t := *r.repository + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", t, "multi") + } + } + if r.repositoryLabel != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_label", r.repositoryLabel, "") + } + if r.repositoryName != nil { + t := *r.repositoryName + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_name", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_name", t, "multi") + } + } + if r.repositoryVersion != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository_version", r.repositoryVersion, "") + } + if r.signed != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "signed", r.signed, "") + } + if r.tags != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "tags", r.tags, "") + } + if r.version != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version", r.version, "") + } + if r.versionRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "version_range", r.versionRange, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest struct { + ctx context.Context + ApiService *PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIService + collectionVersionSearchList *CollectionVersionSearchList +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest) CollectionVersionSearchList(collectionVersionSearchList CollectionVersionSearchList) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest { + r.collectionVersionSearchList = &collectionVersionSearchList + return r +} + +func (r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest) Execute() (*CollectionVersionSearchListResponse, *http.Response, error) { + return r.ApiService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuildExecute(r) +} + +/* +PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuild Method for PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuild + +A viewset for cross-repo searches. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest +*/ +func (a *PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuild(ctx context.Context) PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest { + return PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CollectionVersionSearchListResponse +func (a *PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIService) PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuildExecute(r PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIPulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuildRequest) (*CollectionVersionSearchListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CollectionVersionSearchListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIService.PulpAnsibleGalaxyDefaultApiV3PluginAnsibleSearchCollectionVersionsRebuild") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp_ansible/galaxy/default/api/v3/plugin/ansible/search/collection-versions/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.collectionVersionSearchList == nil { + return localVarReturnValue, nil, reportError("collectionVersionSearchList is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.collectionVersionSearchList + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_tags.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_tags.go new file mode 100644 index 0000000000..a56f43dbf2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_ansible_tags.go @@ -0,0 +1,180 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" +) + + +// PulpAnsibleTagsAPIService PulpAnsibleTagsAPI service +type PulpAnsibleTagsAPIService service + +type PulpAnsibleTagsAPIPulpAnsibleTagsListRequest struct { + ctx context.Context + ApiService *PulpAnsibleTagsAPIService + limit *int32 + offset *int32 + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r PulpAnsibleTagsAPIPulpAnsibleTagsListRequest) Limit(limit int32) PulpAnsibleTagsAPIPulpAnsibleTagsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r PulpAnsibleTagsAPIPulpAnsibleTagsListRequest) Offset(offset int32) PulpAnsibleTagsAPIPulpAnsibleTagsListRequest { + r.offset = &offset + return r +} + +// A list of fields to include in the response. +func (r PulpAnsibleTagsAPIPulpAnsibleTagsListRequest) Fields(fields []string) PulpAnsibleTagsAPIPulpAnsibleTagsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpAnsibleTagsAPIPulpAnsibleTagsListRequest) ExcludeFields(excludeFields []string) PulpAnsibleTagsAPIPulpAnsibleTagsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpAnsibleTagsAPIPulpAnsibleTagsListRequest) Execute() (*PaginatedTagResponseList, *http.Response, error) { + return r.ApiService.PulpAnsibleTagsListExecute(r) +} + +/* +PulpAnsibleTagsList List tags + +ViewSet for Tag models. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PulpAnsibleTagsAPIPulpAnsibleTagsListRequest +*/ +func (a *PulpAnsibleTagsAPIService) PulpAnsibleTagsList(ctx context.Context) PulpAnsibleTagsAPIPulpAnsibleTagsListRequest { + return PulpAnsibleTagsAPIPulpAnsibleTagsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedTagResponseList +func (a *PulpAnsibleTagsAPIService) PulpAnsibleTagsListExecute(r PulpAnsibleTagsAPIPulpAnsibleTagsListRequest) (*PaginatedTagResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedTagResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpAnsibleTagsAPIService.PulpAnsibleTagsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/pulp_ansible/tags/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_container_namespaces.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_container_namespaces.go new file mode 100644 index 0000000000..de5e0e1e47 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_container_namespaces.go @@ -0,0 +1,1119 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpContainerNamespacesAPIService PulpContainerNamespacesAPI service +type PulpContainerNamespacesAPIService service + +type PulpContainerNamespacesAPIPulpContainerNamespacesAddRoleRequest struct { + ctx context.Context + ApiService *PulpContainerNamespacesAPIService + containerContainerNamespaceHref string + nestedRole *NestedRole +} + +func (r PulpContainerNamespacesAPIPulpContainerNamespacesAddRoleRequest) NestedRole(nestedRole NestedRole) PulpContainerNamespacesAPIPulpContainerNamespacesAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r PulpContainerNamespacesAPIPulpContainerNamespacesAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.PulpContainerNamespacesAddRoleExecute(r) +} + +/* +PulpContainerNamespacesAddRole Method for PulpContainerNamespacesAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerNamespaceHref + @return PulpContainerNamespacesAPIPulpContainerNamespacesAddRoleRequest +*/ +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesAddRole(ctx context.Context, containerContainerNamespaceHref string) PulpContainerNamespacesAPIPulpContainerNamespacesAddRoleRequest { + return PulpContainerNamespacesAPIPulpContainerNamespacesAddRoleRequest{ + ApiService: a, + ctx: ctx, + containerContainerNamespaceHref: containerContainerNamespaceHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesAddRoleExecute(r PulpContainerNamespacesAPIPulpContainerNamespacesAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpContainerNamespacesAPIService.PulpContainerNamespacesAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_namespace_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_namespace_href"+"}", parameterValueToString(r.containerContainerNamespaceHref, "containerContainerNamespaceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpContainerNamespacesAPIPulpContainerNamespacesCreateRequest struct { + ctx context.Context + ApiService *PulpContainerNamespacesAPIService + containerContainerNamespace *ContainerContainerNamespace +} + +func (r PulpContainerNamespacesAPIPulpContainerNamespacesCreateRequest) ContainerContainerNamespace(containerContainerNamespace ContainerContainerNamespace) PulpContainerNamespacesAPIPulpContainerNamespacesCreateRequest { + r.containerContainerNamespace = &containerContainerNamespace + return r +} + +func (r PulpContainerNamespacesAPIPulpContainerNamespacesCreateRequest) Execute() (*ContainerContainerNamespaceResponse, *http.Response, error) { + return r.ApiService.PulpContainerNamespacesCreateExecute(r) +} + +/* +PulpContainerNamespacesCreate Create a container namespace + +ViewSet for ContainerNamespaces. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PulpContainerNamespacesAPIPulpContainerNamespacesCreateRequest +*/ +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesCreate(ctx context.Context) PulpContainerNamespacesAPIPulpContainerNamespacesCreateRequest { + return PulpContainerNamespacesAPIPulpContainerNamespacesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ContainerContainerNamespaceResponse +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesCreateExecute(r PulpContainerNamespacesAPIPulpContainerNamespacesCreateRequest) (*ContainerContainerNamespaceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContainerContainerNamespaceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpContainerNamespacesAPIService.PulpContainerNamespacesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/pulp_container/namespaces/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.containerContainerNamespace == nil { + return localVarReturnValue, nil, reportError("containerContainerNamespace is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.containerContainerNamespace + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpContainerNamespacesAPIPulpContainerNamespacesDeleteRequest struct { + ctx context.Context + ApiService *PulpContainerNamespacesAPIService + containerContainerNamespaceHref string +} + +func (r PulpContainerNamespacesAPIPulpContainerNamespacesDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.PulpContainerNamespacesDeleteExecute(r) +} + +/* +PulpContainerNamespacesDelete Delete a container namespace + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerNamespaceHref + @return PulpContainerNamespacesAPIPulpContainerNamespacesDeleteRequest +*/ +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesDelete(ctx context.Context, containerContainerNamespaceHref string) PulpContainerNamespacesAPIPulpContainerNamespacesDeleteRequest { + return PulpContainerNamespacesAPIPulpContainerNamespacesDeleteRequest{ + ApiService: a, + ctx: ctx, + containerContainerNamespaceHref: containerContainerNamespaceHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesDeleteExecute(r PulpContainerNamespacesAPIPulpContainerNamespacesDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpContainerNamespacesAPIService.PulpContainerNamespacesDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_namespace_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_namespace_href"+"}", parameterValueToString(r.containerContainerNamespaceHref, "containerContainerNamespaceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpContainerNamespacesAPIPulpContainerNamespacesListRequest struct { + ctx context.Context + ApiService *PulpContainerNamespacesAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) Limit(limit int32) PulpContainerNamespacesAPIPulpContainerNamespacesListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) Name(name string) PulpContainerNamespacesAPIPulpContainerNamespacesListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) NameContains(nameContains string) PulpContainerNamespacesAPIPulpContainerNamespacesListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) NameIcontains(nameIcontains string) PulpContainerNamespacesAPIPulpContainerNamespacesListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) NameIn(nameIn []string) PulpContainerNamespacesAPIPulpContainerNamespacesListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) NameStartswith(nameStartswith string) PulpContainerNamespacesAPIPulpContainerNamespacesListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) Offset(offset int32) PulpContainerNamespacesAPIPulpContainerNamespacesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `name` - Name * `-name` - Name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) Ordering(ordering []string) PulpContainerNamespacesAPIPulpContainerNamespacesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) PulpHrefIn(pulpHrefIn []string) PulpContainerNamespacesAPIPulpContainerNamespacesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) PulpIdIn(pulpIdIn []string) PulpContainerNamespacesAPIPulpContainerNamespacesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) Fields(fields []string) PulpContainerNamespacesAPIPulpContainerNamespacesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) ExcludeFields(excludeFields []string) PulpContainerNamespacesAPIPulpContainerNamespacesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) Execute() (*PaginatedcontainerContainerNamespaceResponseList, *http.Response, error) { + return r.ApiService.PulpContainerNamespacesListExecute(r) +} + +/* +PulpContainerNamespacesList List container namespaces + +ViewSet for ContainerNamespaces. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return PulpContainerNamespacesAPIPulpContainerNamespacesListRequest +*/ +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesList(ctx context.Context) PulpContainerNamespacesAPIPulpContainerNamespacesListRequest { + return PulpContainerNamespacesAPIPulpContainerNamespacesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedcontainerContainerNamespaceResponseList +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesListExecute(r PulpContainerNamespacesAPIPulpContainerNamespacesListRequest) (*PaginatedcontainerContainerNamespaceResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedcontainerContainerNamespaceResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpContainerNamespacesAPIService.PulpContainerNamespacesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/pulp_container/namespaces/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpContainerNamespacesAPIPulpContainerNamespacesListRolesRequest struct { + ctx context.Context + ApiService *PulpContainerNamespacesAPIService + containerContainerNamespaceHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRolesRequest) Fields(fields []string) PulpContainerNamespacesAPIPulpContainerNamespacesListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRolesRequest) ExcludeFields(excludeFields []string) PulpContainerNamespacesAPIPulpContainerNamespacesListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpContainerNamespacesAPIPulpContainerNamespacesListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.PulpContainerNamespacesListRolesExecute(r) +} + +/* +PulpContainerNamespacesListRoles Method for PulpContainerNamespacesListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerNamespaceHref + @return PulpContainerNamespacesAPIPulpContainerNamespacesListRolesRequest +*/ +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesListRoles(ctx context.Context, containerContainerNamespaceHref string) PulpContainerNamespacesAPIPulpContainerNamespacesListRolesRequest { + return PulpContainerNamespacesAPIPulpContainerNamespacesListRolesRequest{ + ApiService: a, + ctx: ctx, + containerContainerNamespaceHref: containerContainerNamespaceHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesListRolesExecute(r PulpContainerNamespacesAPIPulpContainerNamespacesListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpContainerNamespacesAPIService.PulpContainerNamespacesListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_namespace_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_namespace_href"+"}", parameterValueToString(r.containerContainerNamespaceHref, "containerContainerNamespaceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpContainerNamespacesAPIPulpContainerNamespacesMyPermissionsRequest struct { + ctx context.Context + ApiService *PulpContainerNamespacesAPIService + containerContainerNamespaceHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpContainerNamespacesAPIPulpContainerNamespacesMyPermissionsRequest) Fields(fields []string) PulpContainerNamespacesAPIPulpContainerNamespacesMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpContainerNamespacesAPIPulpContainerNamespacesMyPermissionsRequest) ExcludeFields(excludeFields []string) PulpContainerNamespacesAPIPulpContainerNamespacesMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpContainerNamespacesAPIPulpContainerNamespacesMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.PulpContainerNamespacesMyPermissionsExecute(r) +} + +/* +PulpContainerNamespacesMyPermissions Method for PulpContainerNamespacesMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerNamespaceHref + @return PulpContainerNamespacesAPIPulpContainerNamespacesMyPermissionsRequest +*/ +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesMyPermissions(ctx context.Context, containerContainerNamespaceHref string) PulpContainerNamespacesAPIPulpContainerNamespacesMyPermissionsRequest { + return PulpContainerNamespacesAPIPulpContainerNamespacesMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + containerContainerNamespaceHref: containerContainerNamespaceHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesMyPermissionsExecute(r PulpContainerNamespacesAPIPulpContainerNamespacesMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpContainerNamespacesAPIService.PulpContainerNamespacesMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_namespace_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_namespace_href"+"}", parameterValueToString(r.containerContainerNamespaceHref, "containerContainerNamespaceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpContainerNamespacesAPIPulpContainerNamespacesReadRequest struct { + ctx context.Context + ApiService *PulpContainerNamespacesAPIService + containerContainerNamespaceHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpContainerNamespacesAPIPulpContainerNamespacesReadRequest) Fields(fields []string) PulpContainerNamespacesAPIPulpContainerNamespacesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpContainerNamespacesAPIPulpContainerNamespacesReadRequest) ExcludeFields(excludeFields []string) PulpContainerNamespacesAPIPulpContainerNamespacesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpContainerNamespacesAPIPulpContainerNamespacesReadRequest) Execute() (*ContainerContainerNamespaceResponse, *http.Response, error) { + return r.ApiService.PulpContainerNamespacesReadExecute(r) +} + +/* +PulpContainerNamespacesRead Inspect a container namespace + +ViewSet for ContainerNamespaces. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerNamespaceHref + @return PulpContainerNamespacesAPIPulpContainerNamespacesReadRequest +*/ +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesRead(ctx context.Context, containerContainerNamespaceHref string) PulpContainerNamespacesAPIPulpContainerNamespacesReadRequest { + return PulpContainerNamespacesAPIPulpContainerNamespacesReadRequest{ + ApiService: a, + ctx: ctx, + containerContainerNamespaceHref: containerContainerNamespaceHref, + } +} + +// Execute executes the request +// @return ContainerContainerNamespaceResponse +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesReadExecute(r PulpContainerNamespacesAPIPulpContainerNamespacesReadRequest) (*ContainerContainerNamespaceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContainerContainerNamespaceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpContainerNamespacesAPIService.PulpContainerNamespacesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_namespace_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_namespace_href"+"}", parameterValueToString(r.containerContainerNamespaceHref, "containerContainerNamespaceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PulpContainerNamespacesAPIPulpContainerNamespacesRemoveRoleRequest struct { + ctx context.Context + ApiService *PulpContainerNamespacesAPIService + containerContainerNamespaceHref string + nestedRole *NestedRole +} + +func (r PulpContainerNamespacesAPIPulpContainerNamespacesRemoveRoleRequest) NestedRole(nestedRole NestedRole) PulpContainerNamespacesAPIPulpContainerNamespacesRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r PulpContainerNamespacesAPIPulpContainerNamespacesRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.PulpContainerNamespacesRemoveRoleExecute(r) +} + +/* +PulpContainerNamespacesRemoveRole Method for PulpContainerNamespacesRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerNamespaceHref + @return PulpContainerNamespacesAPIPulpContainerNamespacesRemoveRoleRequest +*/ +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesRemoveRole(ctx context.Context, containerContainerNamespaceHref string) PulpContainerNamespacesAPIPulpContainerNamespacesRemoveRoleRequest { + return PulpContainerNamespacesAPIPulpContainerNamespacesRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + containerContainerNamespaceHref: containerContainerNamespaceHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *PulpContainerNamespacesAPIService) PulpContainerNamespacesRemoveRoleExecute(r PulpContainerNamespacesAPIPulpContainerNamespacesRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpContainerNamespacesAPIService.PulpContainerNamespacesRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_namespace_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_namespace_href"+"}", parameterValueToString(r.containerContainerNamespaceHref, "containerContainerNamespaceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_maven.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_maven.go new file mode 100644 index 0000000000..b2ef0df1ee --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pulp_maven.go @@ -0,0 +1,254 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PulpMavenAPIService PulpMavenAPI service +type PulpMavenAPIService service + +type PulpMavenAPIPulpMavenGetRequest struct { + ctx context.Context + ApiService *PulpMavenAPIService + name string + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PulpMavenAPIPulpMavenGetRequest) Fields(fields []string) PulpMavenAPIPulpMavenGetRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PulpMavenAPIPulpMavenGetRequest) ExcludeFields(excludeFields []string) PulpMavenAPIPulpMavenGetRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PulpMavenAPIPulpMavenGetRequest) Execute() (*http.Response, error) { + return r.ApiService.PulpMavenGetExecute(r) +} + +/* +PulpMavenGet Method for PulpMavenGet + +Responds to GET requests about manifests by reference + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param path + @return PulpMavenAPIPulpMavenGetRequest +*/ +func (a *PulpMavenAPIService) PulpMavenGet(ctx context.Context, name string, path string) PulpMavenAPIPulpMavenGetRequest { + return PulpMavenAPIPulpMavenGetRequest{ + ApiService: a, + ctx: ctx, + name: name, + path: path, + } +} + +// Execute executes the request +func (a *PulpMavenAPIService) PulpMavenGetExecute(r PulpMavenAPIPulpMavenGetRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpMavenAPIService.PulpMavenGet") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/maven/{name}/{path}" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type PulpMavenAPIPulpMavenPutRequest struct { + ctx context.Context + ApiService *PulpMavenAPIService + name string + path string +} + +func (r PulpMavenAPIPulpMavenPutRequest) Execute() (*http.Response, error) { + return r.ApiService.PulpMavenPutExecute(r) +} + +/* +PulpMavenPut Method for PulpMavenPut + +ViewSet for interacting with maven deploy API + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name + @param path + @return PulpMavenAPIPulpMavenPutRequest +*/ +func (a *PulpMavenAPIService) PulpMavenPut(ctx context.Context, name string, path string) PulpMavenAPIPulpMavenPutRequest { + return PulpMavenAPIPulpMavenPutRequest{ + ApiService: a, + ctx: ctx, + name: name, + path: path, + } +} + +// Execute executes the request +func (a *PulpMavenAPIService) PulpMavenPutExecute(r PulpMavenAPIPulpMavenPutRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PulpMavenAPIService.PulpMavenPut") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/maven/{name}/{path}" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", parameterValueToString(r.name, "name"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi.go new file mode 100644 index 0000000000..972129822d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi.go @@ -0,0 +1,165 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PypiAPIService PypiAPI service +type PypiAPIService service + +type PypiAPIPypiReadRequest struct { + ctx context.Context + ApiService *PypiAPIService + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PypiAPIPypiReadRequest) Fields(fields []string) PypiAPIPypiReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PypiAPIPypiReadRequest) ExcludeFields(excludeFields []string) PypiAPIPypiReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PypiAPIPypiReadRequest) Execute() (*SummaryResponse, *http.Response, error) { + return r.ApiService.PypiReadExecute(r) +} + +/* +PypiRead Get index summary + +Gets package summary stats of index. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PypiAPIPypiReadRequest +*/ +func (a *PypiAPIService) PypiRead(ctx context.Context, path string) PypiAPIPypiReadRequest { + return PypiAPIPypiReadRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +// @return SummaryResponse +func (a *PypiAPIService) PypiReadExecute(r PypiAPIPypiReadRequest) (*SummaryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SummaryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PypiAPIService.PypiRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pypi/{path}/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi_legacy.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi_legacy.go new file mode 100644 index 0000000000..d7fb9f94be --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi_legacy.go @@ -0,0 +1,185 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" +) + + +// PypiLegacyAPIService PypiLegacyAPI service +type PypiLegacyAPIService service + +type PypiLegacyAPIPypiLegacyCreateRequest struct { + ctx context.Context + ApiService *PypiLegacyAPIService + path string + content *os.File + sha256Digest *string + action *string +} + +// A Python package release file to upload to the index. +func (r PypiLegacyAPIPypiLegacyCreateRequest) Content(content *os.File) PypiLegacyAPIPypiLegacyCreateRequest { + r.content = content + return r +} + +// SHA256 of package to validate upload integrity. +func (r PypiLegacyAPIPypiLegacyCreateRequest) Sha256Digest(sha256Digest string) PypiLegacyAPIPypiLegacyCreateRequest { + r.sha256Digest = &sha256Digest + return r +} + +// Defaults to `file_upload`, don't change it or request will fail! +func (r PypiLegacyAPIPypiLegacyCreateRequest) Action(action string) PypiLegacyAPIPypiLegacyCreateRequest { + r.action = &action + return r +} + +func (r PypiLegacyAPIPypiLegacyCreateRequest) Execute() (*PackageUploadTaskResponse, *http.Response, error) { + return r.ApiService.PypiLegacyCreateExecute(r) +} + +/* +PypiLegacyCreate Upload a package + +Upload package to the index. + +This is the endpoint that tools like Twine and Poetry use for their upload commands. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PypiLegacyAPIPypiLegacyCreateRequest +*/ +func (a *PypiLegacyAPIService) PypiLegacyCreate(ctx context.Context, path string) PypiLegacyAPIPypiLegacyCreateRequest { + return PypiLegacyAPIPypiLegacyCreateRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +// @return PackageUploadTaskResponse +func (a *PypiLegacyAPIService) PypiLegacyCreateExecute(r PypiLegacyAPIPypiLegacyCreateRequest) (*PackageUploadTaskResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PackageUploadTaskResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PypiLegacyAPIService.PypiLegacyCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pypi/{path}/legacy/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.content == nil { + return localVarReturnValue, nil, reportError("content is required and must be specified") + } + if r.sha256Digest == nil { + return localVarReturnValue, nil, reportError("sha256Digest is required and must be specified") + } + if strlen(*r.sha256Digest) < 64 { + return localVarReturnValue, nil, reportError("sha256Digest must have at least 64 elements") + } + if strlen(*r.sha256Digest) > 64 { + return localVarReturnValue, nil, reportError("sha256Digest must have less than 64 elements") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var contentLocalVarFormFileName string + var contentLocalVarFileName string + var contentLocalVarFileBytes []byte + + contentLocalVarFormFileName = "content" + + + contentLocalVarFile := r.content + + if contentLocalVarFile != nil { + fbs, _ := io.ReadAll(contentLocalVarFile) + + contentLocalVarFileBytes = fbs + contentLocalVarFileName = contentLocalVarFile.Name() + contentLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: contentLocalVarFileBytes, fileName: contentLocalVarFileName, formFileName: contentLocalVarFormFileName}) + } + if r.action != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "action", r.action, "") + } + parameterAddToHeaderOrQuery(localVarFormParams, "sha256_digest", r.sha256Digest, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi_metadata.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi_metadata.go new file mode 100644 index 0000000000..b8783e8e32 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi_metadata.go @@ -0,0 +1,171 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// PypiMetadataAPIService PypiMetadataAPI service +type PypiMetadataAPIService service + +type PypiMetadataAPIPypiPypiReadRequest struct { + ctx context.Context + ApiService *PypiMetadataAPIService + meta string + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PypiMetadataAPIPypiPypiReadRequest) Fields(fields []string) PypiMetadataAPIPypiPypiReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PypiMetadataAPIPypiPypiReadRequest) ExcludeFields(excludeFields []string) PypiMetadataAPIPypiPypiReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PypiMetadataAPIPypiPypiReadRequest) Execute() (*PackageMetadataResponse, *http.Response, error) { + return r.ApiService.PypiPypiReadExecute(r) +} + +/* +PypiPypiRead Get package metadata + +Retrieves the package's core-metadata specified by +https://packaging.python.org/specifications/core-metadata/. +`meta` must be a path in form of `{package}/json/` or `{package}/{version}/json/` + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param meta + @param path + @return PypiMetadataAPIPypiPypiReadRequest +*/ +func (a *PypiMetadataAPIService) PypiPypiRead(ctx context.Context, meta string, path string) PypiMetadataAPIPypiPypiReadRequest { + return PypiMetadataAPIPypiPypiReadRequest{ + ApiService: a, + ctx: ctx, + meta: meta, + path: path, + } +} + +// Execute executes the request +// @return PackageMetadataResponse +func (a *PypiMetadataAPIService) PypiPypiReadExecute(r PypiMetadataAPIPypiPypiReadRequest) (*PackageMetadataResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PackageMetadataResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PypiMetadataAPIService.PypiPypiRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pypi/{path}/pypi/{meta}/" + localVarPath = strings.Replace(localVarPath, "{"+"meta"+"}", parameterValueToString(r.meta, "meta"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi_simple.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi_simple.go new file mode 100644 index 0000000000..7d5fc77a59 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_pypi_simple.go @@ -0,0 +1,447 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "reflect" +) + + +// PypiSimpleAPIService PypiSimpleAPI service +type PypiSimpleAPIService service + +type PypiSimpleAPIPypiSimpleCreateRequest struct { + ctx context.Context + ApiService *PypiSimpleAPIService + path string + content *os.File + sha256Digest *string + action *string +} + +// A Python package release file to upload to the index. +func (r PypiSimpleAPIPypiSimpleCreateRequest) Content(content *os.File) PypiSimpleAPIPypiSimpleCreateRequest { + r.content = content + return r +} + +// SHA256 of package to validate upload integrity. +func (r PypiSimpleAPIPypiSimpleCreateRequest) Sha256Digest(sha256Digest string) PypiSimpleAPIPypiSimpleCreateRequest { + r.sha256Digest = &sha256Digest + return r +} + +// Defaults to `file_upload`, don't change it or request will fail! +func (r PypiSimpleAPIPypiSimpleCreateRequest) Action(action string) PypiSimpleAPIPypiSimpleCreateRequest { + r.action = &action + return r +} + +func (r PypiSimpleAPIPypiSimpleCreateRequest) Execute() (*PackageUploadTaskResponse, *http.Response, error) { + return r.ApiService.PypiSimpleCreateExecute(r) +} + +/* +PypiSimpleCreate Upload a package + +Upload package to the index. +This endpoint has the same functionality as the upload endpoint at the `/legacy` url of the +index. This is provided for convenience for users who want a single index url for all their +Python tools. (pip, twine, poetry, pipenv, ...) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PypiSimpleAPIPypiSimpleCreateRequest +*/ +func (a *PypiSimpleAPIService) PypiSimpleCreate(ctx context.Context, path string) PypiSimpleAPIPypiSimpleCreateRequest { + return PypiSimpleAPIPypiSimpleCreateRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +// @return PackageUploadTaskResponse +func (a *PypiSimpleAPIService) PypiSimpleCreateExecute(r PypiSimpleAPIPypiSimpleCreateRequest) (*PackageUploadTaskResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PackageUploadTaskResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PypiSimpleAPIService.PypiSimpleCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pypi/{path}/simple/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.content == nil { + return localVarReturnValue, nil, reportError("content is required and must be specified") + } + if r.sha256Digest == nil { + return localVarReturnValue, nil, reportError("sha256Digest is required and must be specified") + } + if strlen(*r.sha256Digest) < 64 { + return localVarReturnValue, nil, reportError("sha256Digest must have at least 64 elements") + } + if strlen(*r.sha256Digest) > 64 { + return localVarReturnValue, nil, reportError("sha256Digest must have less than 64 elements") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var contentLocalVarFormFileName string + var contentLocalVarFileName string + var contentLocalVarFileBytes []byte + + contentLocalVarFormFileName = "content" + + + contentLocalVarFile := r.content + + if contentLocalVarFile != nil { + fbs, _ := io.ReadAll(contentLocalVarFile) + + contentLocalVarFileBytes = fbs + contentLocalVarFileName = contentLocalVarFile.Name() + contentLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: contentLocalVarFileBytes, fileName: contentLocalVarFileName, formFileName: contentLocalVarFormFileName}) + } + if r.action != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "action", r.action, "") + } + parameterAddToHeaderOrQuery(localVarFormParams, "sha256_digest", r.sha256Digest, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type PypiSimpleAPIPypiSimplePackageReadRequest struct { + ctx context.Context + ApiService *PypiSimpleAPIService + package_ string + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PypiSimpleAPIPypiSimplePackageReadRequest) Fields(fields []string) PypiSimpleAPIPypiSimplePackageReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PypiSimpleAPIPypiSimplePackageReadRequest) ExcludeFields(excludeFields []string) PypiSimpleAPIPypiSimplePackageReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PypiSimpleAPIPypiSimplePackageReadRequest) Execute() (*http.Response, error) { + return r.ApiService.PypiSimplePackageReadExecute(r) +} + +/* +PypiSimplePackageRead Get package simple page + +Retrieves the simple api html page for a package. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param package_ + @param path + @return PypiSimpleAPIPypiSimplePackageReadRequest +*/ +func (a *PypiSimpleAPIService) PypiSimplePackageRead(ctx context.Context, package_ string, path string) PypiSimpleAPIPypiSimplePackageReadRequest { + return PypiSimpleAPIPypiSimplePackageReadRequest{ + ApiService: a, + ctx: ctx, + package_: package_, + path: path, + } +} + +// Execute executes the request +func (a *PypiSimpleAPIService) PypiSimplePackageReadExecute(r PypiSimpleAPIPypiSimplePackageReadRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PypiSimpleAPIService.PypiSimplePackageRead") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pypi/{path}/simple/{package}/" + localVarPath = strings.Replace(localVarPath, "{"+"package"+"}", parameterValueToString(r.package_, "package_"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type PypiSimpleAPIPypiSimpleReadRequest struct { + ctx context.Context + ApiService *PypiSimpleAPIService + path string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r PypiSimpleAPIPypiSimpleReadRequest) Fields(fields []string) PypiSimpleAPIPypiSimpleReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r PypiSimpleAPIPypiSimpleReadRequest) ExcludeFields(excludeFields []string) PypiSimpleAPIPypiSimpleReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r PypiSimpleAPIPypiSimpleReadRequest) Execute() (*http.Response, error) { + return r.ApiService.PypiSimpleReadExecute(r) +} + +/* +PypiSimpleRead Get index simple page + +Gets the simple api html page for the index. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param path + @return PypiSimpleAPIPypiSimpleReadRequest +*/ +func (a *PypiSimpleAPIService) PypiSimpleRead(ctx context.Context, path string) PypiSimpleAPIPypiSimpleReadRequest { + return PypiSimpleAPIPypiSimpleReadRequest{ + ApiService: a, + ctx: ctx, + path: path, + } +} + +// Execute executes the request +func (a *PypiSimpleAPIService) PypiSimpleReadExecute(r PypiSimpleAPIPypiSimpleReadRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PypiSimpleAPIService.PypiSimpleRead") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pypi/{path}/simple/" + localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", parameterValueToString(r.path, "path"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes.go new file mode 100644 index 0000000000..82c566dec0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes.go @@ -0,0 +1,358 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "time" + "reflect" +) + + +// RemotesAPIService RemotesAPI service +type RemotesAPIService service + +type RemotesAPIRemotesListRequest struct { + ctx context.Context + ApiService *RemotesAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpLastUpdated *time.Time + pulpLastUpdatedGt *time.Time + pulpLastUpdatedGte *time.Time + pulpLastUpdatedLt *time.Time + pulpLastUpdatedLte *time.Time + pulpLastUpdatedRange *[]time.Time + pulpTypeIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r RemotesAPIRemotesListRequest) Limit(limit int32) RemotesAPIRemotesListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RemotesAPIRemotesListRequest) Name(name string) RemotesAPIRemotesListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RemotesAPIRemotesListRequest) NameContains(nameContains string) RemotesAPIRemotesListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RemotesAPIRemotesListRequest) NameIcontains(nameIcontains string) RemotesAPIRemotesListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RemotesAPIRemotesListRequest) NameIn(nameIn []string) RemotesAPIRemotesListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RemotesAPIRemotesListRequest) NameStartswith(nameStartswith string) RemotesAPIRemotesListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RemotesAPIRemotesListRequest) Offset(offset int32) RemotesAPIRemotesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RemotesAPIRemotesListRequest) Ordering(ordering []string) RemotesAPIRemotesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RemotesAPIRemotesListRequest) PulpHrefIn(pulpHrefIn []string) RemotesAPIRemotesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RemotesAPIRemotesListRequest) PulpIdIn(pulpIdIn []string) RemotesAPIRemotesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RemotesAPIRemotesListRequest) PulpLabelSelect(pulpLabelSelect string) RemotesAPIRemotesListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where pulp_last_updated matches value +func (r RemotesAPIRemotesListRequest) PulpLastUpdated(pulpLastUpdated time.Time) RemotesAPIRemotesListRequest { + r.pulpLastUpdated = &pulpLastUpdated + return r +} + +// Filter results where pulp_last_updated is greater than value +func (r RemotesAPIRemotesListRequest) PulpLastUpdatedGt(pulpLastUpdatedGt time.Time) RemotesAPIRemotesListRequest { + r.pulpLastUpdatedGt = &pulpLastUpdatedGt + return r +} + +// Filter results where pulp_last_updated is greater than or equal to value +func (r RemotesAPIRemotesListRequest) PulpLastUpdatedGte(pulpLastUpdatedGte time.Time) RemotesAPIRemotesListRequest { + r.pulpLastUpdatedGte = &pulpLastUpdatedGte + return r +} + +// Filter results where pulp_last_updated is less than value +func (r RemotesAPIRemotesListRequest) PulpLastUpdatedLt(pulpLastUpdatedLt time.Time) RemotesAPIRemotesListRequest { + r.pulpLastUpdatedLt = &pulpLastUpdatedLt + return r +} + +// Filter results where pulp_last_updated is less than or equal to value +func (r RemotesAPIRemotesListRequest) PulpLastUpdatedLte(pulpLastUpdatedLte time.Time) RemotesAPIRemotesListRequest { + r.pulpLastUpdatedLte = &pulpLastUpdatedLte + return r +} + +// Filter results where pulp_last_updated is between two comma separated values +func (r RemotesAPIRemotesListRequest) PulpLastUpdatedRange(pulpLastUpdatedRange []time.Time) RemotesAPIRemotesListRequest { + r.pulpLastUpdatedRange = &pulpLastUpdatedRange + return r +} + +// Pulp type is in * `ansible.role` - ansible.role * `ansible.collection` - ansible.collection * `ansible.git` - ansible.git * `container.container` - container.container * `deb.apt-remote` - deb.apt-remote * `file.file` - file.file * `gem.gem` - gem.gem * `maven.maven` - maven.maven * `ostree.ostree` - ostree.ostree * `python.python` - python.python * `rpm.rpm` - rpm.rpm * `rpm.uln` - rpm.uln +func (r RemotesAPIRemotesListRequest) PulpTypeIn(pulpTypeIn []string) RemotesAPIRemotesListRequest { + r.pulpTypeIn = &pulpTypeIn + return r +} + +// A list of fields to include in the response. +func (r RemotesAPIRemotesListRequest) Fields(fields []string) RemotesAPIRemotesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesAPIRemotesListRequest) ExcludeFields(excludeFields []string) RemotesAPIRemotesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesAPIRemotesListRequest) Execute() (*PaginatedRemoteResponseList, *http.Response, error) { + return r.ApiService.RemotesListExecute(r) +} + +/* +RemotesList List remotes + +A customized named ModelViewSet that knows how to register itself with the Pulp API router. + +This viewset is discoverable by its name. +"Normal" Django Models and Master/Detail models are supported by the ``register_with`` method. + +Attributes: + lookup_field (str): The name of the field by which an object should be looked up, in + addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' + endpoint_name (str): The name of the final path segment that should identify the ViewSet's + collection endpoint. + nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must + correspond to the "parent_prefix" of a router with rest_framework_nested.NestedMixin. + None indicates this ViewSet should not be nested. + parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs + to django model filter expressions that can be used with the corresponding value from + self.kwargs, used only by a nested ViewSet to filter based on the parent object's + identity. + schema (DefaultSchema): The schema class to use by default in a viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesAPIRemotesListRequest +*/ +func (a *RemotesAPIService) RemotesList(ctx context.Context) RemotesAPIRemotesListRequest { + return RemotesAPIRemotesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedRemoteResponseList +func (a *RemotesAPIService) RemotesListExecute(r RemotesAPIRemotesListRequest) (*PaginatedRemoteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRemoteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesAPIService.RemotesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpLastUpdated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated", r.pulpLastUpdated, "") + } + if r.pulpLastUpdatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gt", r.pulpLastUpdatedGt, "") + } + if r.pulpLastUpdatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gte", r.pulpLastUpdatedGte, "") + } + if r.pulpLastUpdatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lt", r.pulpLastUpdatedLt, "") + } + if r.pulpLastUpdatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lte", r.pulpLastUpdatedLte, "") + } + if r.pulpLastUpdatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__range", r.pulpLastUpdatedRange, "csv") + } + if r.pulpTypeIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_type__in", r.pulpTypeIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_apt.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_apt.go new file mode 100644 index 0000000000..a350c1c83b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_apt.go @@ -0,0 +1,921 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RemotesAptAPIService RemotesAptAPI service +type RemotesAptAPIService service + +type RemotesAptAPIRemotesDebAptCreateRequest struct { + ctx context.Context + ApiService *RemotesAptAPIService + debAptRemote *DebAptRemote +} + +func (r RemotesAptAPIRemotesDebAptCreateRequest) DebAptRemote(debAptRemote DebAptRemote) RemotesAptAPIRemotesDebAptCreateRequest { + r.debAptRemote = &debAptRemote + return r +} + +func (r RemotesAptAPIRemotesDebAptCreateRequest) Execute() (*DebAptRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesDebAptCreateExecute(r) +} + +/* +RemotesDebAptCreate Create an apt remote + +An AptRemote represents an external APT repository content source. + +It contains the location of the upstream APT repository, as well as the user options that are +applied when using the remote to synchronize the upstream repository to Pulp. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesAptAPIRemotesDebAptCreateRequest +*/ +func (a *RemotesAptAPIService) RemotesDebAptCreate(ctx context.Context) RemotesAptAPIRemotesDebAptCreateRequest { + return RemotesAptAPIRemotesDebAptCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DebAptRemoteResponse +func (a *RemotesAptAPIService) RemotesDebAptCreateExecute(r RemotesAptAPIRemotesDebAptCreateRequest) (*DebAptRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebAptRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesAptAPIService.RemotesDebAptCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/deb/apt/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debAptRemote == nil { + return localVarReturnValue, nil, reportError("debAptRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debAptRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesAptAPIRemotesDebAptDeleteRequest struct { + ctx context.Context + ApiService *RemotesAptAPIService + debAptRemoteHref string +} + +func (r RemotesAptAPIRemotesDebAptDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesDebAptDeleteExecute(r) +} + +/* +RemotesDebAptDelete Delete an apt remote + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRemoteHref + @return RemotesAptAPIRemotesDebAptDeleteRequest +*/ +func (a *RemotesAptAPIService) RemotesDebAptDelete(ctx context.Context, debAptRemoteHref string) RemotesAptAPIRemotesDebAptDeleteRequest { + return RemotesAptAPIRemotesDebAptDeleteRequest{ + ApiService: a, + ctx: ctx, + debAptRemoteHref: debAptRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesAptAPIService) RemotesDebAptDeleteExecute(r RemotesAptAPIRemotesDebAptDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesAptAPIService.RemotesDebAptDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_remote_href"+"}", parameterValueToString(r.debAptRemoteHref, "debAptRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesAptAPIRemotesDebAptListRequest struct { + ctx context.Context + ApiService *RemotesAptAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpLastUpdated *time.Time + pulpLastUpdatedGt *time.Time + pulpLastUpdatedGte *time.Time + pulpLastUpdatedLt *time.Time + pulpLastUpdatedLte *time.Time + pulpLastUpdatedRange *[]time.Time + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r RemotesAptAPIRemotesDebAptListRequest) Limit(limit int32) RemotesAptAPIRemotesDebAptListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RemotesAptAPIRemotesDebAptListRequest) Name(name string) RemotesAptAPIRemotesDebAptListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RemotesAptAPIRemotesDebAptListRequest) NameContains(nameContains string) RemotesAptAPIRemotesDebAptListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RemotesAptAPIRemotesDebAptListRequest) NameIcontains(nameIcontains string) RemotesAptAPIRemotesDebAptListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RemotesAptAPIRemotesDebAptListRequest) NameIn(nameIn []string) RemotesAptAPIRemotesDebAptListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RemotesAptAPIRemotesDebAptListRequest) NameStartswith(nameStartswith string) RemotesAptAPIRemotesDebAptListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RemotesAptAPIRemotesDebAptListRequest) Offset(offset int32) RemotesAptAPIRemotesDebAptListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RemotesAptAPIRemotesDebAptListRequest) Ordering(ordering []string) RemotesAptAPIRemotesDebAptListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RemotesAptAPIRemotesDebAptListRequest) PulpHrefIn(pulpHrefIn []string) RemotesAptAPIRemotesDebAptListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RemotesAptAPIRemotesDebAptListRequest) PulpIdIn(pulpIdIn []string) RemotesAptAPIRemotesDebAptListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RemotesAptAPIRemotesDebAptListRequest) PulpLabelSelect(pulpLabelSelect string) RemotesAptAPIRemotesDebAptListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where pulp_last_updated matches value +func (r RemotesAptAPIRemotesDebAptListRequest) PulpLastUpdated(pulpLastUpdated time.Time) RemotesAptAPIRemotesDebAptListRequest { + r.pulpLastUpdated = &pulpLastUpdated + return r +} + +// Filter results where pulp_last_updated is greater than value +func (r RemotesAptAPIRemotesDebAptListRequest) PulpLastUpdatedGt(pulpLastUpdatedGt time.Time) RemotesAptAPIRemotesDebAptListRequest { + r.pulpLastUpdatedGt = &pulpLastUpdatedGt + return r +} + +// Filter results where pulp_last_updated is greater than or equal to value +func (r RemotesAptAPIRemotesDebAptListRequest) PulpLastUpdatedGte(pulpLastUpdatedGte time.Time) RemotesAptAPIRemotesDebAptListRequest { + r.pulpLastUpdatedGte = &pulpLastUpdatedGte + return r +} + +// Filter results where pulp_last_updated is less than value +func (r RemotesAptAPIRemotesDebAptListRequest) PulpLastUpdatedLt(pulpLastUpdatedLt time.Time) RemotesAptAPIRemotesDebAptListRequest { + r.pulpLastUpdatedLt = &pulpLastUpdatedLt + return r +} + +// Filter results where pulp_last_updated is less than or equal to value +func (r RemotesAptAPIRemotesDebAptListRequest) PulpLastUpdatedLte(pulpLastUpdatedLte time.Time) RemotesAptAPIRemotesDebAptListRequest { + r.pulpLastUpdatedLte = &pulpLastUpdatedLte + return r +} + +// Filter results where pulp_last_updated is between two comma separated values +func (r RemotesAptAPIRemotesDebAptListRequest) PulpLastUpdatedRange(pulpLastUpdatedRange []time.Time) RemotesAptAPIRemotesDebAptListRequest { + r.pulpLastUpdatedRange = &pulpLastUpdatedRange + return r +} + +// A list of fields to include in the response. +func (r RemotesAptAPIRemotesDebAptListRequest) Fields(fields []string) RemotesAptAPIRemotesDebAptListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesAptAPIRemotesDebAptListRequest) ExcludeFields(excludeFields []string) RemotesAptAPIRemotesDebAptListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesAptAPIRemotesDebAptListRequest) Execute() (*PaginateddebAptRemoteResponseList, *http.Response, error) { + return r.ApiService.RemotesDebAptListExecute(r) +} + +/* +RemotesDebAptList List apt remotes + +An AptRemote represents an external APT repository content source. + +It contains the location of the upstream APT repository, as well as the user options that are +applied when using the remote to synchronize the upstream repository to Pulp. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesAptAPIRemotesDebAptListRequest +*/ +func (a *RemotesAptAPIService) RemotesDebAptList(ctx context.Context) RemotesAptAPIRemotesDebAptListRequest { + return RemotesAptAPIRemotesDebAptListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebAptRemoteResponseList +func (a *RemotesAptAPIService) RemotesDebAptListExecute(r RemotesAptAPIRemotesDebAptListRequest) (*PaginateddebAptRemoteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebAptRemoteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesAptAPIService.RemotesDebAptList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/deb/apt/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpLastUpdated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated", r.pulpLastUpdated, "") + } + if r.pulpLastUpdatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gt", r.pulpLastUpdatedGt, "") + } + if r.pulpLastUpdatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gte", r.pulpLastUpdatedGte, "") + } + if r.pulpLastUpdatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lt", r.pulpLastUpdatedLt, "") + } + if r.pulpLastUpdatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lte", r.pulpLastUpdatedLte, "") + } + if r.pulpLastUpdatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__range", r.pulpLastUpdatedRange, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesAptAPIRemotesDebAptPartialUpdateRequest struct { + ctx context.Context + ApiService *RemotesAptAPIService + debAptRemoteHref string + patcheddebAptRemote *PatcheddebAptRemote +} + +func (r RemotesAptAPIRemotesDebAptPartialUpdateRequest) PatcheddebAptRemote(patcheddebAptRemote PatcheddebAptRemote) RemotesAptAPIRemotesDebAptPartialUpdateRequest { + r.patcheddebAptRemote = &patcheddebAptRemote + return r +} + +func (r RemotesAptAPIRemotesDebAptPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesDebAptPartialUpdateExecute(r) +} + +/* +RemotesDebAptPartialUpdate Update an apt remote + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRemoteHref + @return RemotesAptAPIRemotesDebAptPartialUpdateRequest +*/ +func (a *RemotesAptAPIService) RemotesDebAptPartialUpdate(ctx context.Context, debAptRemoteHref string) RemotesAptAPIRemotesDebAptPartialUpdateRequest { + return RemotesAptAPIRemotesDebAptPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + debAptRemoteHref: debAptRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesAptAPIService) RemotesDebAptPartialUpdateExecute(r RemotesAptAPIRemotesDebAptPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesAptAPIService.RemotesDebAptPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_remote_href"+"}", parameterValueToString(r.debAptRemoteHref, "debAptRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patcheddebAptRemote == nil { + return localVarReturnValue, nil, reportError("patcheddebAptRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patcheddebAptRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesAptAPIRemotesDebAptReadRequest struct { + ctx context.Context + ApiService *RemotesAptAPIService + debAptRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesAptAPIRemotesDebAptReadRequest) Fields(fields []string) RemotesAptAPIRemotesDebAptReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesAptAPIRemotesDebAptReadRequest) ExcludeFields(excludeFields []string) RemotesAptAPIRemotesDebAptReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesAptAPIRemotesDebAptReadRequest) Execute() (*DebAptRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesDebAptReadExecute(r) +} + +/* +RemotesDebAptRead Inspect an apt remote + +An AptRemote represents an external APT repository content source. + +It contains the location of the upstream APT repository, as well as the user options that are +applied when using the remote to synchronize the upstream repository to Pulp. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRemoteHref + @return RemotesAptAPIRemotesDebAptReadRequest +*/ +func (a *RemotesAptAPIService) RemotesDebAptRead(ctx context.Context, debAptRemoteHref string) RemotesAptAPIRemotesDebAptReadRequest { + return RemotesAptAPIRemotesDebAptReadRequest{ + ApiService: a, + ctx: ctx, + debAptRemoteHref: debAptRemoteHref, + } +} + +// Execute executes the request +// @return DebAptRemoteResponse +func (a *RemotesAptAPIService) RemotesDebAptReadExecute(r RemotesAptAPIRemotesDebAptReadRequest) (*DebAptRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebAptRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesAptAPIService.RemotesDebAptRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_remote_href"+"}", parameterValueToString(r.debAptRemoteHref, "debAptRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesAptAPIRemotesDebAptUpdateRequest struct { + ctx context.Context + ApiService *RemotesAptAPIService + debAptRemoteHref string + debAptRemote *DebAptRemote +} + +func (r RemotesAptAPIRemotesDebAptUpdateRequest) DebAptRemote(debAptRemote DebAptRemote) RemotesAptAPIRemotesDebAptUpdateRequest { + r.debAptRemote = &debAptRemote + return r +} + +func (r RemotesAptAPIRemotesDebAptUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesDebAptUpdateExecute(r) +} + +/* +RemotesDebAptUpdate Update an apt remote + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRemoteHref + @return RemotesAptAPIRemotesDebAptUpdateRequest +*/ +func (a *RemotesAptAPIService) RemotesDebAptUpdate(ctx context.Context, debAptRemoteHref string) RemotesAptAPIRemotesDebAptUpdateRequest { + return RemotesAptAPIRemotesDebAptUpdateRequest{ + ApiService: a, + ctx: ctx, + debAptRemoteHref: debAptRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesAptAPIService) RemotesDebAptUpdateExecute(r RemotesAptAPIRemotesDebAptUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesAptAPIService.RemotesDebAptUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_remote_href"+"}", parameterValueToString(r.debAptRemoteHref, "debAptRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debAptRemote == nil { + return localVarReturnValue, nil, reportError("debAptRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debAptRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_collection.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_collection.go new file mode 100644 index 0000000000..60f48bf712 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_collection.go @@ -0,0 +1,1458 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RemotesCollectionAPIService RemotesCollectionAPI service +type RemotesCollectionAPIService service + +type RemotesCollectionAPIRemotesAnsibleCollectionAddRoleRequest struct { + ctx context.Context + ApiService *RemotesCollectionAPIService + ansibleCollectionRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionAddRoleRequest) NestedRole(nestedRole NestedRole) RemotesCollectionAPIRemotesAnsibleCollectionAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleCollectionAddRoleExecute(r) +} + +/* +RemotesAnsibleCollectionAddRole Method for RemotesAnsibleCollectionAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionRemoteHref + @return RemotesCollectionAPIRemotesAnsibleCollectionAddRoleRequest +*/ +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionAddRole(ctx context.Context, ansibleCollectionRemoteHref string) RemotesCollectionAPIRemotesAnsibleCollectionAddRoleRequest { + return RemotesCollectionAPIRemotesAnsibleCollectionAddRoleRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionRemoteHref: ansibleCollectionRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionAddRoleExecute(r RemotesCollectionAPIRemotesAnsibleCollectionAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesCollectionAPIService.RemotesAnsibleCollectionAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_remote_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_remote_href"+"}", parameterValueToString(r.ansibleCollectionRemoteHref, "ansibleCollectionRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesCollectionAPIRemotesAnsibleCollectionCreateRequest struct { + ctx context.Context + ApiService *RemotesCollectionAPIService + ansibleCollectionRemote *AnsibleCollectionRemote +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionCreateRequest) AnsibleCollectionRemote(ansibleCollectionRemote AnsibleCollectionRemote) RemotesCollectionAPIRemotesAnsibleCollectionCreateRequest { + r.ansibleCollectionRemote = &ansibleCollectionRemote + return r +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionCreateRequest) Execute() (*AnsibleCollectionRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleCollectionCreateExecute(r) +} + +/* +RemotesAnsibleCollectionCreate Create a collection remote + +ViewSet for Collection Remotes. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesCollectionAPIRemotesAnsibleCollectionCreateRequest +*/ +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionCreate(ctx context.Context) RemotesCollectionAPIRemotesAnsibleCollectionCreateRequest { + return RemotesCollectionAPIRemotesAnsibleCollectionCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AnsibleCollectionRemoteResponse +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionCreateExecute(r RemotesCollectionAPIRemotesAnsibleCollectionCreateRequest) (*AnsibleCollectionRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleCollectionRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesCollectionAPIService.RemotesAnsibleCollectionCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/ansible/collection/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleCollectionRemote == nil { + return localVarReturnValue, nil, reportError("ansibleCollectionRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleCollectionRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesCollectionAPIRemotesAnsibleCollectionDeleteRequest struct { + ctx context.Context + ApiService *RemotesCollectionAPIService + ansibleCollectionRemoteHref string +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleCollectionDeleteExecute(r) +} + +/* +RemotesAnsibleCollectionDelete Delete a collection remote + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionRemoteHref + @return RemotesCollectionAPIRemotesAnsibleCollectionDeleteRequest +*/ +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionDelete(ctx context.Context, ansibleCollectionRemoteHref string) RemotesCollectionAPIRemotesAnsibleCollectionDeleteRequest { + return RemotesCollectionAPIRemotesAnsibleCollectionDeleteRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionRemoteHref: ansibleCollectionRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionDeleteExecute(r RemotesCollectionAPIRemotesAnsibleCollectionDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesCollectionAPIService.RemotesAnsibleCollectionDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_remote_href"+"}", parameterValueToString(r.ansibleCollectionRemoteHref, "ansibleCollectionRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesCollectionAPIRemotesAnsibleCollectionListRequest struct { + ctx context.Context + ApiService *RemotesCollectionAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpLastUpdated *time.Time + pulpLastUpdatedGt *time.Time + pulpLastUpdatedGte *time.Time + pulpLastUpdatedLt *time.Time + pulpLastUpdatedLte *time.Time + pulpLastUpdatedRange *[]time.Time + url *string + urlContains *string + urlIcontains *string + urlIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) Limit(limit int32) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) Name(name string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) NameContains(nameContains string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) NameIcontains(nameIcontains string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) NameIn(nameIn []string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) NameStartswith(nameStartswith string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) Offset(offset int32) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `requirements_file` - Requirements file * `-requirements_file` - Requirements file (descending) * `auth_url` - Auth url * `-auth_url` - Auth url (descending) * `token` - Token * `-token` - Token (descending) * `sync_dependencies` - Sync dependencies * `-sync_dependencies` - Sync dependencies (descending) * `signed_only` - Signed only * `-signed_only` - Signed only (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) Ordering(ordering []string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) PulpHrefIn(pulpHrefIn []string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) PulpIdIn(pulpIdIn []string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) PulpLabelSelect(pulpLabelSelect string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where pulp_last_updated matches value +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) PulpLastUpdated(pulpLastUpdated time.Time) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.pulpLastUpdated = &pulpLastUpdated + return r +} + +// Filter results where pulp_last_updated is greater than value +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) PulpLastUpdatedGt(pulpLastUpdatedGt time.Time) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.pulpLastUpdatedGt = &pulpLastUpdatedGt + return r +} + +// Filter results where pulp_last_updated is greater than or equal to value +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) PulpLastUpdatedGte(pulpLastUpdatedGte time.Time) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.pulpLastUpdatedGte = &pulpLastUpdatedGte + return r +} + +// Filter results where pulp_last_updated is less than value +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) PulpLastUpdatedLt(pulpLastUpdatedLt time.Time) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.pulpLastUpdatedLt = &pulpLastUpdatedLt + return r +} + +// Filter results where pulp_last_updated is less than or equal to value +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) PulpLastUpdatedLte(pulpLastUpdatedLte time.Time) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.pulpLastUpdatedLte = &pulpLastUpdatedLte + return r +} + +// Filter results where pulp_last_updated is between two comma separated values +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) PulpLastUpdatedRange(pulpLastUpdatedRange []time.Time) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.pulpLastUpdatedRange = &pulpLastUpdatedRange + return r +} + +// Filter results where url matches value +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) Url(url string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.url = &url + return r +} + +// Filter results where url contains value +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) UrlContains(urlContains string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.urlContains = &urlContains + return r +} + +// Filter results where url contains value +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) UrlIcontains(urlIcontains string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.urlIcontains = &urlIcontains + return r +} + +// Filter results where url is in a comma-separated list of values +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) UrlIn(urlIn []string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.urlIn = &urlIn + return r +} + +// A list of fields to include in the response. +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) Fields(fields []string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) ExcludeFields(excludeFields []string) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) Execute() (*PaginatedansibleCollectionRemoteResponseList, *http.Response, error) { + return r.ApiService.RemotesAnsibleCollectionListExecute(r) +} + +/* +RemotesAnsibleCollectionList List collection remotes + +ViewSet for Collection Remotes. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesCollectionAPIRemotesAnsibleCollectionListRequest +*/ +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionList(ctx context.Context) RemotesCollectionAPIRemotesAnsibleCollectionListRequest { + return RemotesCollectionAPIRemotesAnsibleCollectionListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedansibleCollectionRemoteResponseList +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionListExecute(r RemotesCollectionAPIRemotesAnsibleCollectionListRequest) (*PaginatedansibleCollectionRemoteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleCollectionRemoteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesCollectionAPIService.RemotesAnsibleCollectionList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/ansible/collection/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpLastUpdated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated", r.pulpLastUpdated, "") + } + if r.pulpLastUpdatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gt", r.pulpLastUpdatedGt, "") + } + if r.pulpLastUpdatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gte", r.pulpLastUpdatedGte, "") + } + if r.pulpLastUpdatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lt", r.pulpLastUpdatedLt, "") + } + if r.pulpLastUpdatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lte", r.pulpLastUpdatedLte, "") + } + if r.pulpLastUpdatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__range", r.pulpLastUpdatedRange, "csv") + } + if r.url != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "url", r.url, "") + } + if r.urlContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "url__contains", r.urlContains, "") + } + if r.urlIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "url__icontains", r.urlIcontains, "") + } + if r.urlIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "url__in", r.urlIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesCollectionAPIRemotesAnsibleCollectionListRolesRequest struct { + ctx context.Context + ApiService *RemotesCollectionAPIService + ansibleCollectionRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRolesRequest) Fields(fields []string) RemotesCollectionAPIRemotesAnsibleCollectionListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRolesRequest) ExcludeFields(excludeFields []string) RemotesCollectionAPIRemotesAnsibleCollectionListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleCollectionListRolesExecute(r) +} + +/* +RemotesAnsibleCollectionListRoles Method for RemotesAnsibleCollectionListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionRemoteHref + @return RemotesCollectionAPIRemotesAnsibleCollectionListRolesRequest +*/ +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionListRoles(ctx context.Context, ansibleCollectionRemoteHref string) RemotesCollectionAPIRemotesAnsibleCollectionListRolesRequest { + return RemotesCollectionAPIRemotesAnsibleCollectionListRolesRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionRemoteHref: ansibleCollectionRemoteHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionListRolesExecute(r RemotesCollectionAPIRemotesAnsibleCollectionListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesCollectionAPIService.RemotesAnsibleCollectionListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_remote_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_remote_href"+"}", parameterValueToString(r.ansibleCollectionRemoteHref, "ansibleCollectionRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesCollectionAPIRemotesAnsibleCollectionMyPermissionsRequest struct { + ctx context.Context + ApiService *RemotesCollectionAPIService + ansibleCollectionRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesCollectionAPIRemotesAnsibleCollectionMyPermissionsRequest) Fields(fields []string) RemotesCollectionAPIRemotesAnsibleCollectionMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesCollectionAPIRemotesAnsibleCollectionMyPermissionsRequest) ExcludeFields(excludeFields []string) RemotesCollectionAPIRemotesAnsibleCollectionMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleCollectionMyPermissionsExecute(r) +} + +/* +RemotesAnsibleCollectionMyPermissions Method for RemotesAnsibleCollectionMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionRemoteHref + @return RemotesCollectionAPIRemotesAnsibleCollectionMyPermissionsRequest +*/ +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionMyPermissions(ctx context.Context, ansibleCollectionRemoteHref string) RemotesCollectionAPIRemotesAnsibleCollectionMyPermissionsRequest { + return RemotesCollectionAPIRemotesAnsibleCollectionMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionRemoteHref: ansibleCollectionRemoteHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionMyPermissionsExecute(r RemotesCollectionAPIRemotesAnsibleCollectionMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesCollectionAPIService.RemotesAnsibleCollectionMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_remote_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_remote_href"+"}", parameterValueToString(r.ansibleCollectionRemoteHref, "ansibleCollectionRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesCollectionAPIRemotesAnsibleCollectionPartialUpdateRequest struct { + ctx context.Context + ApiService *RemotesCollectionAPIService + ansibleCollectionRemoteHref string + patchedansibleCollectionRemote *PatchedansibleCollectionRemote +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionPartialUpdateRequest) PatchedansibleCollectionRemote(patchedansibleCollectionRemote PatchedansibleCollectionRemote) RemotesCollectionAPIRemotesAnsibleCollectionPartialUpdateRequest { + r.patchedansibleCollectionRemote = &patchedansibleCollectionRemote + return r +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleCollectionPartialUpdateExecute(r) +} + +/* +RemotesAnsibleCollectionPartialUpdate Update a collection remote + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionRemoteHref + @return RemotesCollectionAPIRemotesAnsibleCollectionPartialUpdateRequest +*/ +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionPartialUpdate(ctx context.Context, ansibleCollectionRemoteHref string) RemotesCollectionAPIRemotesAnsibleCollectionPartialUpdateRequest { + return RemotesCollectionAPIRemotesAnsibleCollectionPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionRemoteHref: ansibleCollectionRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionPartialUpdateExecute(r RemotesCollectionAPIRemotesAnsibleCollectionPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesCollectionAPIService.RemotesAnsibleCollectionPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_remote_href"+"}", parameterValueToString(r.ansibleCollectionRemoteHref, "ansibleCollectionRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedansibleCollectionRemote == nil { + return localVarReturnValue, nil, reportError("patchedansibleCollectionRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedansibleCollectionRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesCollectionAPIRemotesAnsibleCollectionReadRequest struct { + ctx context.Context + ApiService *RemotesCollectionAPIService + ansibleCollectionRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesCollectionAPIRemotesAnsibleCollectionReadRequest) Fields(fields []string) RemotesCollectionAPIRemotesAnsibleCollectionReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesCollectionAPIRemotesAnsibleCollectionReadRequest) ExcludeFields(excludeFields []string) RemotesCollectionAPIRemotesAnsibleCollectionReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionReadRequest) Execute() (*AnsibleCollectionRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleCollectionReadExecute(r) +} + +/* +RemotesAnsibleCollectionRead Inspect a collection remote + +ViewSet for Collection Remotes. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionRemoteHref + @return RemotesCollectionAPIRemotesAnsibleCollectionReadRequest +*/ +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionRead(ctx context.Context, ansibleCollectionRemoteHref string) RemotesCollectionAPIRemotesAnsibleCollectionReadRequest { + return RemotesCollectionAPIRemotesAnsibleCollectionReadRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionRemoteHref: ansibleCollectionRemoteHref, + } +} + +// Execute executes the request +// @return AnsibleCollectionRemoteResponse +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionReadExecute(r RemotesCollectionAPIRemotesAnsibleCollectionReadRequest) (*AnsibleCollectionRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleCollectionRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesCollectionAPIService.RemotesAnsibleCollectionRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_remote_href"+"}", parameterValueToString(r.ansibleCollectionRemoteHref, "ansibleCollectionRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesCollectionAPIRemotesAnsibleCollectionRemoveRoleRequest struct { + ctx context.Context + ApiService *RemotesCollectionAPIService + ansibleCollectionRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionRemoveRoleRequest) NestedRole(nestedRole NestedRole) RemotesCollectionAPIRemotesAnsibleCollectionRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleCollectionRemoveRoleExecute(r) +} + +/* +RemotesAnsibleCollectionRemoveRole Method for RemotesAnsibleCollectionRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionRemoteHref + @return RemotesCollectionAPIRemotesAnsibleCollectionRemoveRoleRequest +*/ +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionRemoveRole(ctx context.Context, ansibleCollectionRemoteHref string) RemotesCollectionAPIRemotesAnsibleCollectionRemoveRoleRequest { + return RemotesCollectionAPIRemotesAnsibleCollectionRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionRemoteHref: ansibleCollectionRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionRemoveRoleExecute(r RemotesCollectionAPIRemotesAnsibleCollectionRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesCollectionAPIService.RemotesAnsibleCollectionRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_remote_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_remote_href"+"}", parameterValueToString(r.ansibleCollectionRemoteHref, "ansibleCollectionRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesCollectionAPIRemotesAnsibleCollectionUpdateRequest struct { + ctx context.Context + ApiService *RemotesCollectionAPIService + ansibleCollectionRemoteHref string + ansibleCollectionRemote *AnsibleCollectionRemote +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionUpdateRequest) AnsibleCollectionRemote(ansibleCollectionRemote AnsibleCollectionRemote) RemotesCollectionAPIRemotesAnsibleCollectionUpdateRequest { + r.ansibleCollectionRemote = &ansibleCollectionRemote + return r +} + +func (r RemotesCollectionAPIRemotesAnsibleCollectionUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleCollectionUpdateExecute(r) +} + +/* +RemotesAnsibleCollectionUpdate Update a collection remote + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionRemoteHref + @return RemotesCollectionAPIRemotesAnsibleCollectionUpdateRequest +*/ +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionUpdate(ctx context.Context, ansibleCollectionRemoteHref string) RemotesCollectionAPIRemotesAnsibleCollectionUpdateRequest { + return RemotesCollectionAPIRemotesAnsibleCollectionUpdateRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionRemoteHref: ansibleCollectionRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesCollectionAPIService) RemotesAnsibleCollectionUpdateExecute(r RemotesCollectionAPIRemotesAnsibleCollectionUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesCollectionAPIService.RemotesAnsibleCollectionUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_remote_href"+"}", parameterValueToString(r.ansibleCollectionRemoteHref, "ansibleCollectionRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleCollectionRemote == nil { + return localVarReturnValue, nil, reportError("ansibleCollectionRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleCollectionRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_container.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_container.go new file mode 100644 index 0000000000..cc4e78a20a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_container.go @@ -0,0 +1,1427 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RemotesContainerAPIService RemotesContainerAPI service +type RemotesContainerAPIService service + +type RemotesContainerAPIRemotesContainerContainerAddRoleRequest struct { + ctx context.Context + ApiService *RemotesContainerAPIService + containerContainerRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesContainerAPIRemotesContainerContainerAddRoleRequest) NestedRole(nestedRole NestedRole) RemotesContainerAPIRemotesContainerContainerAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesContainerAPIRemotesContainerContainerAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesContainerContainerAddRoleExecute(r) +} + +/* +RemotesContainerContainerAddRole Method for RemotesContainerContainerAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRemoteHref + @return RemotesContainerAPIRemotesContainerContainerAddRoleRequest +*/ +func (a *RemotesContainerAPIService) RemotesContainerContainerAddRole(ctx context.Context, containerContainerRemoteHref string) RemotesContainerAPIRemotesContainerContainerAddRoleRequest { + return RemotesContainerAPIRemotesContainerContainerAddRoleRequest{ + ApiService: a, + ctx: ctx, + containerContainerRemoteHref: containerContainerRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesContainerAPIService) RemotesContainerContainerAddRoleExecute(r RemotesContainerAPIRemotesContainerContainerAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesContainerAPIService.RemotesContainerContainerAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_remote_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_remote_href"+"}", parameterValueToString(r.containerContainerRemoteHref, "containerContainerRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesContainerAPIRemotesContainerContainerCreateRequest struct { + ctx context.Context + ApiService *RemotesContainerAPIService + containerContainerRemote *ContainerContainerRemote +} + +func (r RemotesContainerAPIRemotesContainerContainerCreateRequest) ContainerContainerRemote(containerContainerRemote ContainerContainerRemote) RemotesContainerAPIRemotesContainerContainerCreateRequest { + r.containerContainerRemote = &containerContainerRemote + return r +} + +func (r RemotesContainerAPIRemotesContainerContainerCreateRequest) Execute() (*ContainerContainerRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesContainerContainerCreateExecute(r) +} + +/* +RemotesContainerContainerCreate Create a container remote + +Container remotes represent an external repository that implements the Container +Registry API. Container remotes support deferred downloading by configuring +the ``policy`` field. ``on_demand`` and ``streamed`` policies can provide +significant disk space savings. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesContainerAPIRemotesContainerContainerCreateRequest +*/ +func (a *RemotesContainerAPIService) RemotesContainerContainerCreate(ctx context.Context) RemotesContainerAPIRemotesContainerContainerCreateRequest { + return RemotesContainerAPIRemotesContainerContainerCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ContainerContainerRemoteResponse +func (a *RemotesContainerAPIService) RemotesContainerContainerCreateExecute(r RemotesContainerAPIRemotesContainerContainerCreateRequest) (*ContainerContainerRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContainerContainerRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesContainerAPIService.RemotesContainerContainerCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/container/container/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.containerContainerRemote == nil { + return localVarReturnValue, nil, reportError("containerContainerRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.containerContainerRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesContainerAPIRemotesContainerContainerDeleteRequest struct { + ctx context.Context + ApiService *RemotesContainerAPIService + containerContainerRemoteHref string +} + +func (r RemotesContainerAPIRemotesContainerContainerDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesContainerContainerDeleteExecute(r) +} + +/* +RemotesContainerContainerDelete Delete a container remote + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRemoteHref + @return RemotesContainerAPIRemotesContainerContainerDeleteRequest +*/ +func (a *RemotesContainerAPIService) RemotesContainerContainerDelete(ctx context.Context, containerContainerRemoteHref string) RemotesContainerAPIRemotesContainerContainerDeleteRequest { + return RemotesContainerAPIRemotesContainerContainerDeleteRequest{ + ApiService: a, + ctx: ctx, + containerContainerRemoteHref: containerContainerRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesContainerAPIService) RemotesContainerContainerDeleteExecute(r RemotesContainerAPIRemotesContainerContainerDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesContainerAPIService.RemotesContainerContainerDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_remote_href"+"}", parameterValueToString(r.containerContainerRemoteHref, "containerContainerRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesContainerAPIRemotesContainerContainerListRequest struct { + ctx context.Context + ApiService *RemotesContainerAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpLastUpdated *time.Time + pulpLastUpdatedGt *time.Time + pulpLastUpdatedGte *time.Time + pulpLastUpdatedLt *time.Time + pulpLastUpdatedLte *time.Time + pulpLastUpdatedRange *[]time.Time + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r RemotesContainerAPIRemotesContainerContainerListRequest) Limit(limit int32) RemotesContainerAPIRemotesContainerContainerListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RemotesContainerAPIRemotesContainerContainerListRequest) Name(name string) RemotesContainerAPIRemotesContainerContainerListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RemotesContainerAPIRemotesContainerContainerListRequest) NameContains(nameContains string) RemotesContainerAPIRemotesContainerContainerListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RemotesContainerAPIRemotesContainerContainerListRequest) NameIcontains(nameIcontains string) RemotesContainerAPIRemotesContainerContainerListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RemotesContainerAPIRemotesContainerContainerListRequest) NameIn(nameIn []string) RemotesContainerAPIRemotesContainerContainerListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RemotesContainerAPIRemotesContainerContainerListRequest) NameStartswith(nameStartswith string) RemotesContainerAPIRemotesContainerContainerListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RemotesContainerAPIRemotesContainerContainerListRequest) Offset(offset int32) RemotesContainerAPIRemotesContainerContainerListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RemotesContainerAPIRemotesContainerContainerListRequest) Ordering(ordering []string) RemotesContainerAPIRemotesContainerContainerListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RemotesContainerAPIRemotesContainerContainerListRequest) PulpHrefIn(pulpHrefIn []string) RemotesContainerAPIRemotesContainerContainerListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RemotesContainerAPIRemotesContainerContainerListRequest) PulpIdIn(pulpIdIn []string) RemotesContainerAPIRemotesContainerContainerListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RemotesContainerAPIRemotesContainerContainerListRequest) PulpLabelSelect(pulpLabelSelect string) RemotesContainerAPIRemotesContainerContainerListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where pulp_last_updated matches value +func (r RemotesContainerAPIRemotesContainerContainerListRequest) PulpLastUpdated(pulpLastUpdated time.Time) RemotesContainerAPIRemotesContainerContainerListRequest { + r.pulpLastUpdated = &pulpLastUpdated + return r +} + +// Filter results where pulp_last_updated is greater than value +func (r RemotesContainerAPIRemotesContainerContainerListRequest) PulpLastUpdatedGt(pulpLastUpdatedGt time.Time) RemotesContainerAPIRemotesContainerContainerListRequest { + r.pulpLastUpdatedGt = &pulpLastUpdatedGt + return r +} + +// Filter results where pulp_last_updated is greater than or equal to value +func (r RemotesContainerAPIRemotesContainerContainerListRequest) PulpLastUpdatedGte(pulpLastUpdatedGte time.Time) RemotesContainerAPIRemotesContainerContainerListRequest { + r.pulpLastUpdatedGte = &pulpLastUpdatedGte + return r +} + +// Filter results where pulp_last_updated is less than value +func (r RemotesContainerAPIRemotesContainerContainerListRequest) PulpLastUpdatedLt(pulpLastUpdatedLt time.Time) RemotesContainerAPIRemotesContainerContainerListRequest { + r.pulpLastUpdatedLt = &pulpLastUpdatedLt + return r +} + +// Filter results where pulp_last_updated is less than or equal to value +func (r RemotesContainerAPIRemotesContainerContainerListRequest) PulpLastUpdatedLte(pulpLastUpdatedLte time.Time) RemotesContainerAPIRemotesContainerContainerListRequest { + r.pulpLastUpdatedLte = &pulpLastUpdatedLte + return r +} + +// Filter results where pulp_last_updated is between two comma separated values +func (r RemotesContainerAPIRemotesContainerContainerListRequest) PulpLastUpdatedRange(pulpLastUpdatedRange []time.Time) RemotesContainerAPIRemotesContainerContainerListRequest { + r.pulpLastUpdatedRange = &pulpLastUpdatedRange + return r +} + +// A list of fields to include in the response. +func (r RemotesContainerAPIRemotesContainerContainerListRequest) Fields(fields []string) RemotesContainerAPIRemotesContainerContainerListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesContainerAPIRemotesContainerContainerListRequest) ExcludeFields(excludeFields []string) RemotesContainerAPIRemotesContainerContainerListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesContainerAPIRemotesContainerContainerListRequest) Execute() (*PaginatedcontainerContainerRemoteResponseList, *http.Response, error) { + return r.ApiService.RemotesContainerContainerListExecute(r) +} + +/* +RemotesContainerContainerList List container remotes + +Container remotes represent an external repository that implements the Container +Registry API. Container remotes support deferred downloading by configuring +the ``policy`` field. ``on_demand`` and ``streamed`` policies can provide +significant disk space savings. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesContainerAPIRemotesContainerContainerListRequest +*/ +func (a *RemotesContainerAPIService) RemotesContainerContainerList(ctx context.Context) RemotesContainerAPIRemotesContainerContainerListRequest { + return RemotesContainerAPIRemotesContainerContainerListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedcontainerContainerRemoteResponseList +func (a *RemotesContainerAPIService) RemotesContainerContainerListExecute(r RemotesContainerAPIRemotesContainerContainerListRequest) (*PaginatedcontainerContainerRemoteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedcontainerContainerRemoteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesContainerAPIService.RemotesContainerContainerList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/container/container/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpLastUpdated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated", r.pulpLastUpdated, "") + } + if r.pulpLastUpdatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gt", r.pulpLastUpdatedGt, "") + } + if r.pulpLastUpdatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gte", r.pulpLastUpdatedGte, "") + } + if r.pulpLastUpdatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lt", r.pulpLastUpdatedLt, "") + } + if r.pulpLastUpdatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lte", r.pulpLastUpdatedLte, "") + } + if r.pulpLastUpdatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__range", r.pulpLastUpdatedRange, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesContainerAPIRemotesContainerContainerListRolesRequest struct { + ctx context.Context + ApiService *RemotesContainerAPIService + containerContainerRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesContainerAPIRemotesContainerContainerListRolesRequest) Fields(fields []string) RemotesContainerAPIRemotesContainerContainerListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesContainerAPIRemotesContainerContainerListRolesRequest) ExcludeFields(excludeFields []string) RemotesContainerAPIRemotesContainerContainerListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesContainerAPIRemotesContainerContainerListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.RemotesContainerContainerListRolesExecute(r) +} + +/* +RemotesContainerContainerListRoles Method for RemotesContainerContainerListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRemoteHref + @return RemotesContainerAPIRemotesContainerContainerListRolesRequest +*/ +func (a *RemotesContainerAPIService) RemotesContainerContainerListRoles(ctx context.Context, containerContainerRemoteHref string) RemotesContainerAPIRemotesContainerContainerListRolesRequest { + return RemotesContainerAPIRemotesContainerContainerListRolesRequest{ + ApiService: a, + ctx: ctx, + containerContainerRemoteHref: containerContainerRemoteHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *RemotesContainerAPIService) RemotesContainerContainerListRolesExecute(r RemotesContainerAPIRemotesContainerContainerListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesContainerAPIService.RemotesContainerContainerListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_remote_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_remote_href"+"}", parameterValueToString(r.containerContainerRemoteHref, "containerContainerRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesContainerAPIRemotesContainerContainerMyPermissionsRequest struct { + ctx context.Context + ApiService *RemotesContainerAPIService + containerContainerRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesContainerAPIRemotesContainerContainerMyPermissionsRequest) Fields(fields []string) RemotesContainerAPIRemotesContainerContainerMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesContainerAPIRemotesContainerContainerMyPermissionsRequest) ExcludeFields(excludeFields []string) RemotesContainerAPIRemotesContainerContainerMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesContainerAPIRemotesContainerContainerMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.RemotesContainerContainerMyPermissionsExecute(r) +} + +/* +RemotesContainerContainerMyPermissions Method for RemotesContainerContainerMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRemoteHref + @return RemotesContainerAPIRemotesContainerContainerMyPermissionsRequest +*/ +func (a *RemotesContainerAPIService) RemotesContainerContainerMyPermissions(ctx context.Context, containerContainerRemoteHref string) RemotesContainerAPIRemotesContainerContainerMyPermissionsRequest { + return RemotesContainerAPIRemotesContainerContainerMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + containerContainerRemoteHref: containerContainerRemoteHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *RemotesContainerAPIService) RemotesContainerContainerMyPermissionsExecute(r RemotesContainerAPIRemotesContainerContainerMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesContainerAPIService.RemotesContainerContainerMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_remote_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_remote_href"+"}", parameterValueToString(r.containerContainerRemoteHref, "containerContainerRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesContainerAPIRemotesContainerContainerPartialUpdateRequest struct { + ctx context.Context + ApiService *RemotesContainerAPIService + containerContainerRemoteHref string + patchedcontainerContainerRemote *PatchedcontainerContainerRemote +} + +func (r RemotesContainerAPIRemotesContainerContainerPartialUpdateRequest) PatchedcontainerContainerRemote(patchedcontainerContainerRemote PatchedcontainerContainerRemote) RemotesContainerAPIRemotesContainerContainerPartialUpdateRequest { + r.patchedcontainerContainerRemote = &patchedcontainerContainerRemote + return r +} + +func (r RemotesContainerAPIRemotesContainerContainerPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesContainerContainerPartialUpdateExecute(r) +} + +/* +RemotesContainerContainerPartialUpdate Update a container remote + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRemoteHref + @return RemotesContainerAPIRemotesContainerContainerPartialUpdateRequest +*/ +func (a *RemotesContainerAPIService) RemotesContainerContainerPartialUpdate(ctx context.Context, containerContainerRemoteHref string) RemotesContainerAPIRemotesContainerContainerPartialUpdateRequest { + return RemotesContainerAPIRemotesContainerContainerPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + containerContainerRemoteHref: containerContainerRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesContainerAPIService) RemotesContainerContainerPartialUpdateExecute(r RemotesContainerAPIRemotesContainerContainerPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesContainerAPIService.RemotesContainerContainerPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_remote_href"+"}", parameterValueToString(r.containerContainerRemoteHref, "containerContainerRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedcontainerContainerRemote == nil { + return localVarReturnValue, nil, reportError("patchedcontainerContainerRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedcontainerContainerRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesContainerAPIRemotesContainerContainerReadRequest struct { + ctx context.Context + ApiService *RemotesContainerAPIService + containerContainerRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesContainerAPIRemotesContainerContainerReadRequest) Fields(fields []string) RemotesContainerAPIRemotesContainerContainerReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesContainerAPIRemotesContainerContainerReadRequest) ExcludeFields(excludeFields []string) RemotesContainerAPIRemotesContainerContainerReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesContainerAPIRemotesContainerContainerReadRequest) Execute() (*ContainerContainerRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesContainerContainerReadExecute(r) +} + +/* +RemotesContainerContainerRead Inspect a container remote + +Container remotes represent an external repository that implements the Container +Registry API. Container remotes support deferred downloading by configuring +the ``policy`` field. ``on_demand`` and ``streamed`` policies can provide +significant disk space savings. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRemoteHref + @return RemotesContainerAPIRemotesContainerContainerReadRequest +*/ +func (a *RemotesContainerAPIService) RemotesContainerContainerRead(ctx context.Context, containerContainerRemoteHref string) RemotesContainerAPIRemotesContainerContainerReadRequest { + return RemotesContainerAPIRemotesContainerContainerReadRequest{ + ApiService: a, + ctx: ctx, + containerContainerRemoteHref: containerContainerRemoteHref, + } +} + +// Execute executes the request +// @return ContainerContainerRemoteResponse +func (a *RemotesContainerAPIService) RemotesContainerContainerReadExecute(r RemotesContainerAPIRemotesContainerContainerReadRequest) (*ContainerContainerRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContainerContainerRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesContainerAPIService.RemotesContainerContainerRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_remote_href"+"}", parameterValueToString(r.containerContainerRemoteHref, "containerContainerRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesContainerAPIRemotesContainerContainerRemoveRoleRequest struct { + ctx context.Context + ApiService *RemotesContainerAPIService + containerContainerRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesContainerAPIRemotesContainerContainerRemoveRoleRequest) NestedRole(nestedRole NestedRole) RemotesContainerAPIRemotesContainerContainerRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesContainerAPIRemotesContainerContainerRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesContainerContainerRemoveRoleExecute(r) +} + +/* +RemotesContainerContainerRemoveRole Method for RemotesContainerContainerRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRemoteHref + @return RemotesContainerAPIRemotesContainerContainerRemoveRoleRequest +*/ +func (a *RemotesContainerAPIService) RemotesContainerContainerRemoveRole(ctx context.Context, containerContainerRemoteHref string) RemotesContainerAPIRemotesContainerContainerRemoveRoleRequest { + return RemotesContainerAPIRemotesContainerContainerRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + containerContainerRemoteHref: containerContainerRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesContainerAPIService) RemotesContainerContainerRemoveRoleExecute(r RemotesContainerAPIRemotesContainerContainerRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesContainerAPIService.RemotesContainerContainerRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_remote_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_remote_href"+"}", parameterValueToString(r.containerContainerRemoteHref, "containerContainerRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesContainerAPIRemotesContainerContainerUpdateRequest struct { + ctx context.Context + ApiService *RemotesContainerAPIService + containerContainerRemoteHref string + containerContainerRemote *ContainerContainerRemote +} + +func (r RemotesContainerAPIRemotesContainerContainerUpdateRequest) ContainerContainerRemote(containerContainerRemote ContainerContainerRemote) RemotesContainerAPIRemotesContainerContainerUpdateRequest { + r.containerContainerRemote = &containerContainerRemote + return r +} + +func (r RemotesContainerAPIRemotesContainerContainerUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesContainerContainerUpdateExecute(r) +} + +/* +RemotesContainerContainerUpdate Update a container remote + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRemoteHref + @return RemotesContainerAPIRemotesContainerContainerUpdateRequest +*/ +func (a *RemotesContainerAPIService) RemotesContainerContainerUpdate(ctx context.Context, containerContainerRemoteHref string) RemotesContainerAPIRemotesContainerContainerUpdateRequest { + return RemotesContainerAPIRemotesContainerContainerUpdateRequest{ + ApiService: a, + ctx: ctx, + containerContainerRemoteHref: containerContainerRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesContainerAPIService) RemotesContainerContainerUpdateExecute(r RemotesContainerAPIRemotesContainerContainerUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesContainerAPIService.RemotesContainerContainerUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_remote_href"+"}", parameterValueToString(r.containerContainerRemoteHref, "containerContainerRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.containerContainerRemote == nil { + return localVarReturnValue, nil, reportError("containerContainerRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.containerContainerRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_file.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_file.go new file mode 100644 index 0000000000..5036ea2392 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_file.go @@ -0,0 +1,1427 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RemotesFileAPIService RemotesFileAPI service +type RemotesFileAPIService service + +type RemotesFileAPIRemotesFileFileAddRoleRequest struct { + ctx context.Context + ApiService *RemotesFileAPIService + fileFileRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesFileAPIRemotesFileFileAddRoleRequest) NestedRole(nestedRole NestedRole) RemotesFileAPIRemotesFileFileAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesFileAPIRemotesFileFileAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesFileFileAddRoleExecute(r) +} + +/* +RemotesFileFileAddRole Method for RemotesFileFileAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRemoteHref + @return RemotesFileAPIRemotesFileFileAddRoleRequest +*/ +func (a *RemotesFileAPIService) RemotesFileFileAddRole(ctx context.Context, fileFileRemoteHref string) RemotesFileAPIRemotesFileFileAddRoleRequest { + return RemotesFileAPIRemotesFileFileAddRoleRequest{ + ApiService: a, + ctx: ctx, + fileFileRemoteHref: fileFileRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesFileAPIService) RemotesFileFileAddRoleExecute(r RemotesFileAPIRemotesFileFileAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesFileAPIService.RemotesFileFileAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_remote_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_remote_href"+"}", parameterValueToString(r.fileFileRemoteHref, "fileFileRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesFileAPIRemotesFileFileCreateRequest struct { + ctx context.Context + ApiService *RemotesFileAPIService + fileFileRemote *FileFileRemote +} + +func (r RemotesFileAPIRemotesFileFileCreateRequest) FileFileRemote(fileFileRemote FileFileRemote) RemotesFileAPIRemotesFileFileCreateRequest { + r.fileFileRemote = &fileFileRemote + return r +} + +func (r RemotesFileAPIRemotesFileFileCreateRequest) Execute() (*FileFileRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesFileFileCreateExecute(r) +} + +/* +RemotesFileFileCreate Create a file remote + + +FileRemote represents an external source of File +Content. The target url of a FileRemote must contain a file manifest, which contains the +metadata for all files at the source. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesFileAPIRemotesFileFileCreateRequest +*/ +func (a *RemotesFileAPIService) RemotesFileFileCreate(ctx context.Context) RemotesFileAPIRemotesFileFileCreateRequest { + return RemotesFileAPIRemotesFileFileCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return FileFileRemoteResponse +func (a *RemotesFileAPIService) RemotesFileFileCreateExecute(r RemotesFileAPIRemotesFileFileCreateRequest) (*FileFileRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FileFileRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesFileAPIService.RemotesFileFileCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/file/file/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.fileFileRemote == nil { + return localVarReturnValue, nil, reportError("fileFileRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.fileFileRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesFileAPIRemotesFileFileDeleteRequest struct { + ctx context.Context + ApiService *RemotesFileAPIService + fileFileRemoteHref string +} + +func (r RemotesFileAPIRemotesFileFileDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesFileFileDeleteExecute(r) +} + +/* +RemotesFileFileDelete Delete a file remote + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRemoteHref + @return RemotesFileAPIRemotesFileFileDeleteRequest +*/ +func (a *RemotesFileAPIService) RemotesFileFileDelete(ctx context.Context, fileFileRemoteHref string) RemotesFileAPIRemotesFileFileDeleteRequest { + return RemotesFileAPIRemotesFileFileDeleteRequest{ + ApiService: a, + ctx: ctx, + fileFileRemoteHref: fileFileRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesFileAPIService) RemotesFileFileDeleteExecute(r RemotesFileAPIRemotesFileFileDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesFileAPIService.RemotesFileFileDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_remote_href"+"}", parameterValueToString(r.fileFileRemoteHref, "fileFileRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesFileAPIRemotesFileFileListRequest struct { + ctx context.Context + ApiService *RemotesFileAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpLastUpdated *time.Time + pulpLastUpdatedGt *time.Time + pulpLastUpdatedGte *time.Time + pulpLastUpdatedLt *time.Time + pulpLastUpdatedLte *time.Time + pulpLastUpdatedRange *[]time.Time + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r RemotesFileAPIRemotesFileFileListRequest) Limit(limit int32) RemotesFileAPIRemotesFileFileListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RemotesFileAPIRemotesFileFileListRequest) Name(name string) RemotesFileAPIRemotesFileFileListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RemotesFileAPIRemotesFileFileListRequest) NameContains(nameContains string) RemotesFileAPIRemotesFileFileListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RemotesFileAPIRemotesFileFileListRequest) NameIcontains(nameIcontains string) RemotesFileAPIRemotesFileFileListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RemotesFileAPIRemotesFileFileListRequest) NameIn(nameIn []string) RemotesFileAPIRemotesFileFileListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RemotesFileAPIRemotesFileFileListRequest) NameStartswith(nameStartswith string) RemotesFileAPIRemotesFileFileListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RemotesFileAPIRemotesFileFileListRequest) Offset(offset int32) RemotesFileAPIRemotesFileFileListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RemotesFileAPIRemotesFileFileListRequest) Ordering(ordering []string) RemotesFileAPIRemotesFileFileListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RemotesFileAPIRemotesFileFileListRequest) PulpHrefIn(pulpHrefIn []string) RemotesFileAPIRemotesFileFileListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RemotesFileAPIRemotesFileFileListRequest) PulpIdIn(pulpIdIn []string) RemotesFileAPIRemotesFileFileListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RemotesFileAPIRemotesFileFileListRequest) PulpLabelSelect(pulpLabelSelect string) RemotesFileAPIRemotesFileFileListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where pulp_last_updated matches value +func (r RemotesFileAPIRemotesFileFileListRequest) PulpLastUpdated(pulpLastUpdated time.Time) RemotesFileAPIRemotesFileFileListRequest { + r.pulpLastUpdated = &pulpLastUpdated + return r +} + +// Filter results where pulp_last_updated is greater than value +func (r RemotesFileAPIRemotesFileFileListRequest) PulpLastUpdatedGt(pulpLastUpdatedGt time.Time) RemotesFileAPIRemotesFileFileListRequest { + r.pulpLastUpdatedGt = &pulpLastUpdatedGt + return r +} + +// Filter results where pulp_last_updated is greater than or equal to value +func (r RemotesFileAPIRemotesFileFileListRequest) PulpLastUpdatedGte(pulpLastUpdatedGte time.Time) RemotesFileAPIRemotesFileFileListRequest { + r.pulpLastUpdatedGte = &pulpLastUpdatedGte + return r +} + +// Filter results where pulp_last_updated is less than value +func (r RemotesFileAPIRemotesFileFileListRequest) PulpLastUpdatedLt(pulpLastUpdatedLt time.Time) RemotesFileAPIRemotesFileFileListRequest { + r.pulpLastUpdatedLt = &pulpLastUpdatedLt + return r +} + +// Filter results where pulp_last_updated is less than or equal to value +func (r RemotesFileAPIRemotesFileFileListRequest) PulpLastUpdatedLte(pulpLastUpdatedLte time.Time) RemotesFileAPIRemotesFileFileListRequest { + r.pulpLastUpdatedLte = &pulpLastUpdatedLte + return r +} + +// Filter results where pulp_last_updated is between two comma separated values +func (r RemotesFileAPIRemotesFileFileListRequest) PulpLastUpdatedRange(pulpLastUpdatedRange []time.Time) RemotesFileAPIRemotesFileFileListRequest { + r.pulpLastUpdatedRange = &pulpLastUpdatedRange + return r +} + +// A list of fields to include in the response. +func (r RemotesFileAPIRemotesFileFileListRequest) Fields(fields []string) RemotesFileAPIRemotesFileFileListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesFileAPIRemotesFileFileListRequest) ExcludeFields(excludeFields []string) RemotesFileAPIRemotesFileFileListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesFileAPIRemotesFileFileListRequest) Execute() (*PaginatedfileFileRemoteResponseList, *http.Response, error) { + return r.ApiService.RemotesFileFileListExecute(r) +} + +/* +RemotesFileFileList List file remotes + + +FileRemote represents an external source of File +Content. The target url of a FileRemote must contain a file manifest, which contains the +metadata for all files at the source. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesFileAPIRemotesFileFileListRequest +*/ +func (a *RemotesFileAPIService) RemotesFileFileList(ctx context.Context) RemotesFileAPIRemotesFileFileListRequest { + return RemotesFileAPIRemotesFileFileListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedfileFileRemoteResponseList +func (a *RemotesFileAPIService) RemotesFileFileListExecute(r RemotesFileAPIRemotesFileFileListRequest) (*PaginatedfileFileRemoteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedfileFileRemoteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesFileAPIService.RemotesFileFileList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/file/file/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpLastUpdated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated", r.pulpLastUpdated, "") + } + if r.pulpLastUpdatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gt", r.pulpLastUpdatedGt, "") + } + if r.pulpLastUpdatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gte", r.pulpLastUpdatedGte, "") + } + if r.pulpLastUpdatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lt", r.pulpLastUpdatedLt, "") + } + if r.pulpLastUpdatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lte", r.pulpLastUpdatedLte, "") + } + if r.pulpLastUpdatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__range", r.pulpLastUpdatedRange, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesFileAPIRemotesFileFileListRolesRequest struct { + ctx context.Context + ApiService *RemotesFileAPIService + fileFileRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesFileAPIRemotesFileFileListRolesRequest) Fields(fields []string) RemotesFileAPIRemotesFileFileListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesFileAPIRemotesFileFileListRolesRequest) ExcludeFields(excludeFields []string) RemotesFileAPIRemotesFileFileListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesFileAPIRemotesFileFileListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.RemotesFileFileListRolesExecute(r) +} + +/* +RemotesFileFileListRoles Method for RemotesFileFileListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRemoteHref + @return RemotesFileAPIRemotesFileFileListRolesRequest +*/ +func (a *RemotesFileAPIService) RemotesFileFileListRoles(ctx context.Context, fileFileRemoteHref string) RemotesFileAPIRemotesFileFileListRolesRequest { + return RemotesFileAPIRemotesFileFileListRolesRequest{ + ApiService: a, + ctx: ctx, + fileFileRemoteHref: fileFileRemoteHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *RemotesFileAPIService) RemotesFileFileListRolesExecute(r RemotesFileAPIRemotesFileFileListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesFileAPIService.RemotesFileFileListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_remote_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_remote_href"+"}", parameterValueToString(r.fileFileRemoteHref, "fileFileRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesFileAPIRemotesFileFileMyPermissionsRequest struct { + ctx context.Context + ApiService *RemotesFileAPIService + fileFileRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesFileAPIRemotesFileFileMyPermissionsRequest) Fields(fields []string) RemotesFileAPIRemotesFileFileMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesFileAPIRemotesFileFileMyPermissionsRequest) ExcludeFields(excludeFields []string) RemotesFileAPIRemotesFileFileMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesFileAPIRemotesFileFileMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.RemotesFileFileMyPermissionsExecute(r) +} + +/* +RemotesFileFileMyPermissions Method for RemotesFileFileMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRemoteHref + @return RemotesFileAPIRemotesFileFileMyPermissionsRequest +*/ +func (a *RemotesFileAPIService) RemotesFileFileMyPermissions(ctx context.Context, fileFileRemoteHref string) RemotesFileAPIRemotesFileFileMyPermissionsRequest { + return RemotesFileAPIRemotesFileFileMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + fileFileRemoteHref: fileFileRemoteHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *RemotesFileAPIService) RemotesFileFileMyPermissionsExecute(r RemotesFileAPIRemotesFileFileMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesFileAPIService.RemotesFileFileMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_remote_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_remote_href"+"}", parameterValueToString(r.fileFileRemoteHref, "fileFileRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesFileAPIRemotesFileFilePartialUpdateRequest struct { + ctx context.Context + ApiService *RemotesFileAPIService + fileFileRemoteHref string + patchedfileFileRemote *PatchedfileFileRemote +} + +func (r RemotesFileAPIRemotesFileFilePartialUpdateRequest) PatchedfileFileRemote(patchedfileFileRemote PatchedfileFileRemote) RemotesFileAPIRemotesFileFilePartialUpdateRequest { + r.patchedfileFileRemote = &patchedfileFileRemote + return r +} + +func (r RemotesFileAPIRemotesFileFilePartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesFileFilePartialUpdateExecute(r) +} + +/* +RemotesFileFilePartialUpdate Update a file remote + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRemoteHref + @return RemotesFileAPIRemotesFileFilePartialUpdateRequest +*/ +func (a *RemotesFileAPIService) RemotesFileFilePartialUpdate(ctx context.Context, fileFileRemoteHref string) RemotesFileAPIRemotesFileFilePartialUpdateRequest { + return RemotesFileAPIRemotesFileFilePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + fileFileRemoteHref: fileFileRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesFileAPIService) RemotesFileFilePartialUpdateExecute(r RemotesFileAPIRemotesFileFilePartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesFileAPIService.RemotesFileFilePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_remote_href"+"}", parameterValueToString(r.fileFileRemoteHref, "fileFileRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedfileFileRemote == nil { + return localVarReturnValue, nil, reportError("patchedfileFileRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedfileFileRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesFileAPIRemotesFileFileReadRequest struct { + ctx context.Context + ApiService *RemotesFileAPIService + fileFileRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesFileAPIRemotesFileFileReadRequest) Fields(fields []string) RemotesFileAPIRemotesFileFileReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesFileAPIRemotesFileFileReadRequest) ExcludeFields(excludeFields []string) RemotesFileAPIRemotesFileFileReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesFileAPIRemotesFileFileReadRequest) Execute() (*FileFileRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesFileFileReadExecute(r) +} + +/* +RemotesFileFileRead Inspect a file remote + + +FileRemote represents an external source of File +Content. The target url of a FileRemote must contain a file manifest, which contains the +metadata for all files at the source. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRemoteHref + @return RemotesFileAPIRemotesFileFileReadRequest +*/ +func (a *RemotesFileAPIService) RemotesFileFileRead(ctx context.Context, fileFileRemoteHref string) RemotesFileAPIRemotesFileFileReadRequest { + return RemotesFileAPIRemotesFileFileReadRequest{ + ApiService: a, + ctx: ctx, + fileFileRemoteHref: fileFileRemoteHref, + } +} + +// Execute executes the request +// @return FileFileRemoteResponse +func (a *RemotesFileAPIService) RemotesFileFileReadExecute(r RemotesFileAPIRemotesFileFileReadRequest) (*FileFileRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FileFileRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesFileAPIService.RemotesFileFileRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_remote_href"+"}", parameterValueToString(r.fileFileRemoteHref, "fileFileRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesFileAPIRemotesFileFileRemoveRoleRequest struct { + ctx context.Context + ApiService *RemotesFileAPIService + fileFileRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesFileAPIRemotesFileFileRemoveRoleRequest) NestedRole(nestedRole NestedRole) RemotesFileAPIRemotesFileFileRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesFileAPIRemotesFileFileRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesFileFileRemoveRoleExecute(r) +} + +/* +RemotesFileFileRemoveRole Method for RemotesFileFileRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRemoteHref + @return RemotesFileAPIRemotesFileFileRemoveRoleRequest +*/ +func (a *RemotesFileAPIService) RemotesFileFileRemoveRole(ctx context.Context, fileFileRemoteHref string) RemotesFileAPIRemotesFileFileRemoveRoleRequest { + return RemotesFileAPIRemotesFileFileRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + fileFileRemoteHref: fileFileRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesFileAPIService) RemotesFileFileRemoveRoleExecute(r RemotesFileAPIRemotesFileFileRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesFileAPIService.RemotesFileFileRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_remote_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_remote_href"+"}", parameterValueToString(r.fileFileRemoteHref, "fileFileRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesFileAPIRemotesFileFileUpdateRequest struct { + ctx context.Context + ApiService *RemotesFileAPIService + fileFileRemoteHref string + fileFileRemote *FileFileRemote +} + +func (r RemotesFileAPIRemotesFileFileUpdateRequest) FileFileRemote(fileFileRemote FileFileRemote) RemotesFileAPIRemotesFileFileUpdateRequest { + r.fileFileRemote = &fileFileRemote + return r +} + +func (r RemotesFileAPIRemotesFileFileUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesFileFileUpdateExecute(r) +} + +/* +RemotesFileFileUpdate Update a file remote + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRemoteHref + @return RemotesFileAPIRemotesFileFileUpdateRequest +*/ +func (a *RemotesFileAPIService) RemotesFileFileUpdate(ctx context.Context, fileFileRemoteHref string) RemotesFileAPIRemotesFileFileUpdateRequest { + return RemotesFileAPIRemotesFileFileUpdateRequest{ + ApiService: a, + ctx: ctx, + fileFileRemoteHref: fileFileRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesFileAPIService) RemotesFileFileUpdateExecute(r RemotesFileAPIRemotesFileFileUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesFileAPIService.RemotesFileFileUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_remote_href"+"}", parameterValueToString(r.fileFileRemoteHref, "fileFileRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.fileFileRemote == nil { + return localVarReturnValue, nil, reportError("fileFileRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.fileFileRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_gem.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_gem.go new file mode 100644 index 0000000000..37e229bcc5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_gem.go @@ -0,0 +1,912 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RemotesGemAPIService RemotesGemAPI service +type RemotesGemAPIService service + +type RemotesGemAPIRemotesGemGemCreateRequest struct { + ctx context.Context + ApiService *RemotesGemAPIService + gemGemRemote *GemGemRemote +} + +func (r RemotesGemAPIRemotesGemGemCreateRequest) GemGemRemote(gemGemRemote GemGemRemote) RemotesGemAPIRemotesGemGemCreateRequest { + r.gemGemRemote = &gemGemRemote + return r +} + +func (r RemotesGemAPIRemotesGemGemCreateRequest) Execute() (*GemGemRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesGemGemCreateExecute(r) +} + +/* +RemotesGemGemCreate Create a gem remote + +A ViewSet for GemRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesGemAPIRemotesGemGemCreateRequest +*/ +func (a *RemotesGemAPIService) RemotesGemGemCreate(ctx context.Context) RemotesGemAPIRemotesGemGemCreateRequest { + return RemotesGemAPIRemotesGemGemCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GemGemRemoteResponse +func (a *RemotesGemAPIService) RemotesGemGemCreateExecute(r RemotesGemAPIRemotesGemGemCreateRequest) (*GemGemRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GemGemRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGemAPIService.RemotesGemGemCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/gem/gem/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.gemGemRemote == nil { + return localVarReturnValue, nil, reportError("gemGemRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.gemGemRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGemAPIRemotesGemGemDeleteRequest struct { + ctx context.Context + ApiService *RemotesGemAPIService + gemGemRemoteHref string +} + +func (r RemotesGemAPIRemotesGemGemDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesGemGemDeleteExecute(r) +} + +/* +RemotesGemGemDelete Delete a gem remote + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRemoteHref + @return RemotesGemAPIRemotesGemGemDeleteRequest +*/ +func (a *RemotesGemAPIService) RemotesGemGemDelete(ctx context.Context, gemGemRemoteHref string) RemotesGemAPIRemotesGemGemDeleteRequest { + return RemotesGemAPIRemotesGemGemDeleteRequest{ + ApiService: a, + ctx: ctx, + gemGemRemoteHref: gemGemRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesGemAPIService) RemotesGemGemDeleteExecute(r RemotesGemAPIRemotesGemGemDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGemAPIService.RemotesGemGemDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_remote_href"+"}", parameterValueToString(r.gemGemRemoteHref, "gemGemRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGemAPIRemotesGemGemListRequest struct { + ctx context.Context + ApiService *RemotesGemAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpLastUpdated *time.Time + pulpLastUpdatedGt *time.Time + pulpLastUpdatedGte *time.Time + pulpLastUpdatedLt *time.Time + pulpLastUpdatedLte *time.Time + pulpLastUpdatedRange *[]time.Time + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r RemotesGemAPIRemotesGemGemListRequest) Limit(limit int32) RemotesGemAPIRemotesGemGemListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RemotesGemAPIRemotesGemGemListRequest) Name(name string) RemotesGemAPIRemotesGemGemListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RemotesGemAPIRemotesGemGemListRequest) NameContains(nameContains string) RemotesGemAPIRemotesGemGemListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RemotesGemAPIRemotesGemGemListRequest) NameIcontains(nameIcontains string) RemotesGemAPIRemotesGemGemListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RemotesGemAPIRemotesGemGemListRequest) NameIn(nameIn []string) RemotesGemAPIRemotesGemGemListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RemotesGemAPIRemotesGemGemListRequest) NameStartswith(nameStartswith string) RemotesGemAPIRemotesGemGemListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RemotesGemAPIRemotesGemGemListRequest) Offset(offset int32) RemotesGemAPIRemotesGemGemListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RemotesGemAPIRemotesGemGemListRequest) Ordering(ordering []string) RemotesGemAPIRemotesGemGemListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RemotesGemAPIRemotesGemGemListRequest) PulpHrefIn(pulpHrefIn []string) RemotesGemAPIRemotesGemGemListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RemotesGemAPIRemotesGemGemListRequest) PulpIdIn(pulpIdIn []string) RemotesGemAPIRemotesGemGemListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RemotesGemAPIRemotesGemGemListRequest) PulpLabelSelect(pulpLabelSelect string) RemotesGemAPIRemotesGemGemListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where pulp_last_updated matches value +func (r RemotesGemAPIRemotesGemGemListRequest) PulpLastUpdated(pulpLastUpdated time.Time) RemotesGemAPIRemotesGemGemListRequest { + r.pulpLastUpdated = &pulpLastUpdated + return r +} + +// Filter results where pulp_last_updated is greater than value +func (r RemotesGemAPIRemotesGemGemListRequest) PulpLastUpdatedGt(pulpLastUpdatedGt time.Time) RemotesGemAPIRemotesGemGemListRequest { + r.pulpLastUpdatedGt = &pulpLastUpdatedGt + return r +} + +// Filter results where pulp_last_updated is greater than or equal to value +func (r RemotesGemAPIRemotesGemGemListRequest) PulpLastUpdatedGte(pulpLastUpdatedGte time.Time) RemotesGemAPIRemotesGemGemListRequest { + r.pulpLastUpdatedGte = &pulpLastUpdatedGte + return r +} + +// Filter results where pulp_last_updated is less than value +func (r RemotesGemAPIRemotesGemGemListRequest) PulpLastUpdatedLt(pulpLastUpdatedLt time.Time) RemotesGemAPIRemotesGemGemListRequest { + r.pulpLastUpdatedLt = &pulpLastUpdatedLt + return r +} + +// Filter results where pulp_last_updated is less than or equal to value +func (r RemotesGemAPIRemotesGemGemListRequest) PulpLastUpdatedLte(pulpLastUpdatedLte time.Time) RemotesGemAPIRemotesGemGemListRequest { + r.pulpLastUpdatedLte = &pulpLastUpdatedLte + return r +} + +// Filter results where pulp_last_updated is between two comma separated values +func (r RemotesGemAPIRemotesGemGemListRequest) PulpLastUpdatedRange(pulpLastUpdatedRange []time.Time) RemotesGemAPIRemotesGemGemListRequest { + r.pulpLastUpdatedRange = &pulpLastUpdatedRange + return r +} + +// A list of fields to include in the response. +func (r RemotesGemAPIRemotesGemGemListRequest) Fields(fields []string) RemotesGemAPIRemotesGemGemListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesGemAPIRemotesGemGemListRequest) ExcludeFields(excludeFields []string) RemotesGemAPIRemotesGemGemListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesGemAPIRemotesGemGemListRequest) Execute() (*PaginatedgemGemRemoteResponseList, *http.Response, error) { + return r.ApiService.RemotesGemGemListExecute(r) +} + +/* +RemotesGemGemList List gem remotes + +A ViewSet for GemRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesGemAPIRemotesGemGemListRequest +*/ +func (a *RemotesGemAPIService) RemotesGemGemList(ctx context.Context) RemotesGemAPIRemotesGemGemListRequest { + return RemotesGemAPIRemotesGemGemListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedgemGemRemoteResponseList +func (a *RemotesGemAPIService) RemotesGemGemListExecute(r RemotesGemAPIRemotesGemGemListRequest) (*PaginatedgemGemRemoteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedgemGemRemoteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGemAPIService.RemotesGemGemList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/gem/gem/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpLastUpdated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated", r.pulpLastUpdated, "") + } + if r.pulpLastUpdatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gt", r.pulpLastUpdatedGt, "") + } + if r.pulpLastUpdatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gte", r.pulpLastUpdatedGte, "") + } + if r.pulpLastUpdatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lt", r.pulpLastUpdatedLt, "") + } + if r.pulpLastUpdatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lte", r.pulpLastUpdatedLte, "") + } + if r.pulpLastUpdatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__range", r.pulpLastUpdatedRange, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGemAPIRemotesGemGemPartialUpdateRequest struct { + ctx context.Context + ApiService *RemotesGemAPIService + gemGemRemoteHref string + patchedgemGemRemote *PatchedgemGemRemote +} + +func (r RemotesGemAPIRemotesGemGemPartialUpdateRequest) PatchedgemGemRemote(patchedgemGemRemote PatchedgemGemRemote) RemotesGemAPIRemotesGemGemPartialUpdateRequest { + r.patchedgemGemRemote = &patchedgemGemRemote + return r +} + +func (r RemotesGemAPIRemotesGemGemPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesGemGemPartialUpdateExecute(r) +} + +/* +RemotesGemGemPartialUpdate Update a gem remote + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRemoteHref + @return RemotesGemAPIRemotesGemGemPartialUpdateRequest +*/ +func (a *RemotesGemAPIService) RemotesGemGemPartialUpdate(ctx context.Context, gemGemRemoteHref string) RemotesGemAPIRemotesGemGemPartialUpdateRequest { + return RemotesGemAPIRemotesGemGemPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + gemGemRemoteHref: gemGemRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesGemAPIService) RemotesGemGemPartialUpdateExecute(r RemotesGemAPIRemotesGemGemPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGemAPIService.RemotesGemGemPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_remote_href"+"}", parameterValueToString(r.gemGemRemoteHref, "gemGemRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedgemGemRemote == nil { + return localVarReturnValue, nil, reportError("patchedgemGemRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedgemGemRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGemAPIRemotesGemGemReadRequest struct { + ctx context.Context + ApiService *RemotesGemAPIService + gemGemRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesGemAPIRemotesGemGemReadRequest) Fields(fields []string) RemotesGemAPIRemotesGemGemReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesGemAPIRemotesGemGemReadRequest) ExcludeFields(excludeFields []string) RemotesGemAPIRemotesGemGemReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesGemAPIRemotesGemGemReadRequest) Execute() (*GemGemRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesGemGemReadExecute(r) +} + +/* +RemotesGemGemRead Inspect a gem remote + +A ViewSet for GemRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRemoteHref + @return RemotesGemAPIRemotesGemGemReadRequest +*/ +func (a *RemotesGemAPIService) RemotesGemGemRead(ctx context.Context, gemGemRemoteHref string) RemotesGemAPIRemotesGemGemReadRequest { + return RemotesGemAPIRemotesGemGemReadRequest{ + ApiService: a, + ctx: ctx, + gemGemRemoteHref: gemGemRemoteHref, + } +} + +// Execute executes the request +// @return GemGemRemoteResponse +func (a *RemotesGemAPIService) RemotesGemGemReadExecute(r RemotesGemAPIRemotesGemGemReadRequest) (*GemGemRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GemGemRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGemAPIService.RemotesGemGemRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_remote_href"+"}", parameterValueToString(r.gemGemRemoteHref, "gemGemRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGemAPIRemotesGemGemUpdateRequest struct { + ctx context.Context + ApiService *RemotesGemAPIService + gemGemRemoteHref string + gemGemRemote *GemGemRemote +} + +func (r RemotesGemAPIRemotesGemGemUpdateRequest) GemGemRemote(gemGemRemote GemGemRemote) RemotesGemAPIRemotesGemGemUpdateRequest { + r.gemGemRemote = &gemGemRemote + return r +} + +func (r RemotesGemAPIRemotesGemGemUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesGemGemUpdateExecute(r) +} + +/* +RemotesGemGemUpdate Update a gem remote + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRemoteHref + @return RemotesGemAPIRemotesGemGemUpdateRequest +*/ +func (a *RemotesGemAPIService) RemotesGemGemUpdate(ctx context.Context, gemGemRemoteHref string) RemotesGemAPIRemotesGemGemUpdateRequest { + return RemotesGemAPIRemotesGemGemUpdateRequest{ + ApiService: a, + ctx: ctx, + gemGemRemoteHref: gemGemRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesGemAPIService) RemotesGemGemUpdateExecute(r RemotesGemAPIRemotesGemGemUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGemAPIService.RemotesGemGemUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_remote_href"+"}", parameterValueToString(r.gemGemRemoteHref, "gemGemRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.gemGemRemote == nil { + return localVarReturnValue, nil, reportError("gemGemRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.gemGemRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_git.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_git.go new file mode 100644 index 0000000000..b1943eccb4 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_git.go @@ -0,0 +1,1424 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RemotesGitAPIService RemotesGitAPI service +type RemotesGitAPIService service + +type RemotesGitAPIRemotesAnsibleGitAddRoleRequest struct { + ctx context.Context + ApiService *RemotesGitAPIService + ansibleGitRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesGitAPIRemotesAnsibleGitAddRoleRequest) NestedRole(nestedRole NestedRole) RemotesGitAPIRemotesAnsibleGitAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesGitAPIRemotesAnsibleGitAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleGitAddRoleExecute(r) +} + +/* +RemotesAnsibleGitAddRole Method for RemotesAnsibleGitAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleGitRemoteHref + @return RemotesGitAPIRemotesAnsibleGitAddRoleRequest +*/ +func (a *RemotesGitAPIService) RemotesAnsibleGitAddRole(ctx context.Context, ansibleGitRemoteHref string) RemotesGitAPIRemotesAnsibleGitAddRoleRequest { + return RemotesGitAPIRemotesAnsibleGitAddRoleRequest{ + ApiService: a, + ctx: ctx, + ansibleGitRemoteHref: ansibleGitRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesGitAPIService) RemotesAnsibleGitAddRoleExecute(r RemotesGitAPIRemotesAnsibleGitAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGitAPIService.RemotesAnsibleGitAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_git_remote_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_git_remote_href"+"}", parameterValueToString(r.ansibleGitRemoteHref, "ansibleGitRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGitAPIRemotesAnsibleGitCreateRequest struct { + ctx context.Context + ApiService *RemotesGitAPIService + ansibleGitRemote *AnsibleGitRemote +} + +func (r RemotesGitAPIRemotesAnsibleGitCreateRequest) AnsibleGitRemote(ansibleGitRemote AnsibleGitRemote) RemotesGitAPIRemotesAnsibleGitCreateRequest { + r.ansibleGitRemote = &ansibleGitRemote + return r +} + +func (r RemotesGitAPIRemotesAnsibleGitCreateRequest) Execute() (*AnsibleGitRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleGitCreateExecute(r) +} + +/* +RemotesAnsibleGitCreate Create a git remote + +ViewSet for Ansible Remotes. + +This is a tech preview feature. The functionality may change in the future. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesGitAPIRemotesAnsibleGitCreateRequest +*/ +func (a *RemotesGitAPIService) RemotesAnsibleGitCreate(ctx context.Context) RemotesGitAPIRemotesAnsibleGitCreateRequest { + return RemotesGitAPIRemotesAnsibleGitCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AnsibleGitRemoteResponse +func (a *RemotesGitAPIService) RemotesAnsibleGitCreateExecute(r RemotesGitAPIRemotesAnsibleGitCreateRequest) (*AnsibleGitRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleGitRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGitAPIService.RemotesAnsibleGitCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/ansible/git/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleGitRemote == nil { + return localVarReturnValue, nil, reportError("ansibleGitRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleGitRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGitAPIRemotesAnsibleGitDeleteRequest struct { + ctx context.Context + ApiService *RemotesGitAPIService + ansibleGitRemoteHref string +} + +func (r RemotesGitAPIRemotesAnsibleGitDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleGitDeleteExecute(r) +} + +/* +RemotesAnsibleGitDelete Delete a git remote + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleGitRemoteHref + @return RemotesGitAPIRemotesAnsibleGitDeleteRequest +*/ +func (a *RemotesGitAPIService) RemotesAnsibleGitDelete(ctx context.Context, ansibleGitRemoteHref string) RemotesGitAPIRemotesAnsibleGitDeleteRequest { + return RemotesGitAPIRemotesAnsibleGitDeleteRequest{ + ApiService: a, + ctx: ctx, + ansibleGitRemoteHref: ansibleGitRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesGitAPIService) RemotesAnsibleGitDeleteExecute(r RemotesGitAPIRemotesAnsibleGitDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGitAPIService.RemotesAnsibleGitDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_git_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_git_remote_href"+"}", parameterValueToString(r.ansibleGitRemoteHref, "ansibleGitRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGitAPIRemotesAnsibleGitListRequest struct { + ctx context.Context + ApiService *RemotesGitAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpLastUpdated *time.Time + pulpLastUpdatedGt *time.Time + pulpLastUpdatedGte *time.Time + pulpLastUpdatedLt *time.Time + pulpLastUpdatedLte *time.Time + pulpLastUpdatedRange *[]time.Time + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r RemotesGitAPIRemotesAnsibleGitListRequest) Limit(limit int32) RemotesGitAPIRemotesAnsibleGitListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RemotesGitAPIRemotesAnsibleGitListRequest) Name(name string) RemotesGitAPIRemotesAnsibleGitListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RemotesGitAPIRemotesAnsibleGitListRequest) NameContains(nameContains string) RemotesGitAPIRemotesAnsibleGitListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RemotesGitAPIRemotesAnsibleGitListRequest) NameIcontains(nameIcontains string) RemotesGitAPIRemotesAnsibleGitListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RemotesGitAPIRemotesAnsibleGitListRequest) NameIn(nameIn []string) RemotesGitAPIRemotesAnsibleGitListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RemotesGitAPIRemotesAnsibleGitListRequest) NameStartswith(nameStartswith string) RemotesGitAPIRemotesAnsibleGitListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RemotesGitAPIRemotesAnsibleGitListRequest) Offset(offset int32) RemotesGitAPIRemotesAnsibleGitListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RemotesGitAPIRemotesAnsibleGitListRequest) Ordering(ordering []string) RemotesGitAPIRemotesAnsibleGitListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RemotesGitAPIRemotesAnsibleGitListRequest) PulpHrefIn(pulpHrefIn []string) RemotesGitAPIRemotesAnsibleGitListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RemotesGitAPIRemotesAnsibleGitListRequest) PulpIdIn(pulpIdIn []string) RemotesGitAPIRemotesAnsibleGitListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RemotesGitAPIRemotesAnsibleGitListRequest) PulpLabelSelect(pulpLabelSelect string) RemotesGitAPIRemotesAnsibleGitListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where pulp_last_updated matches value +func (r RemotesGitAPIRemotesAnsibleGitListRequest) PulpLastUpdated(pulpLastUpdated time.Time) RemotesGitAPIRemotesAnsibleGitListRequest { + r.pulpLastUpdated = &pulpLastUpdated + return r +} + +// Filter results where pulp_last_updated is greater than value +func (r RemotesGitAPIRemotesAnsibleGitListRequest) PulpLastUpdatedGt(pulpLastUpdatedGt time.Time) RemotesGitAPIRemotesAnsibleGitListRequest { + r.pulpLastUpdatedGt = &pulpLastUpdatedGt + return r +} + +// Filter results where pulp_last_updated is greater than or equal to value +func (r RemotesGitAPIRemotesAnsibleGitListRequest) PulpLastUpdatedGte(pulpLastUpdatedGte time.Time) RemotesGitAPIRemotesAnsibleGitListRequest { + r.pulpLastUpdatedGte = &pulpLastUpdatedGte + return r +} + +// Filter results where pulp_last_updated is less than value +func (r RemotesGitAPIRemotesAnsibleGitListRequest) PulpLastUpdatedLt(pulpLastUpdatedLt time.Time) RemotesGitAPIRemotesAnsibleGitListRequest { + r.pulpLastUpdatedLt = &pulpLastUpdatedLt + return r +} + +// Filter results where pulp_last_updated is less than or equal to value +func (r RemotesGitAPIRemotesAnsibleGitListRequest) PulpLastUpdatedLte(pulpLastUpdatedLte time.Time) RemotesGitAPIRemotesAnsibleGitListRequest { + r.pulpLastUpdatedLte = &pulpLastUpdatedLte + return r +} + +// Filter results where pulp_last_updated is between two comma separated values +func (r RemotesGitAPIRemotesAnsibleGitListRequest) PulpLastUpdatedRange(pulpLastUpdatedRange []time.Time) RemotesGitAPIRemotesAnsibleGitListRequest { + r.pulpLastUpdatedRange = &pulpLastUpdatedRange + return r +} + +// A list of fields to include in the response. +func (r RemotesGitAPIRemotesAnsibleGitListRequest) Fields(fields []string) RemotesGitAPIRemotesAnsibleGitListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesGitAPIRemotesAnsibleGitListRequest) ExcludeFields(excludeFields []string) RemotesGitAPIRemotesAnsibleGitListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesGitAPIRemotesAnsibleGitListRequest) Execute() (*PaginatedansibleGitRemoteResponseList, *http.Response, error) { + return r.ApiService.RemotesAnsibleGitListExecute(r) +} + +/* +RemotesAnsibleGitList List git remotes + +ViewSet for Ansible Remotes. + +This is a tech preview feature. The functionality may change in the future. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesGitAPIRemotesAnsibleGitListRequest +*/ +func (a *RemotesGitAPIService) RemotesAnsibleGitList(ctx context.Context) RemotesGitAPIRemotesAnsibleGitListRequest { + return RemotesGitAPIRemotesAnsibleGitListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedansibleGitRemoteResponseList +func (a *RemotesGitAPIService) RemotesAnsibleGitListExecute(r RemotesGitAPIRemotesAnsibleGitListRequest) (*PaginatedansibleGitRemoteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleGitRemoteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGitAPIService.RemotesAnsibleGitList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/ansible/git/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpLastUpdated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated", r.pulpLastUpdated, "") + } + if r.pulpLastUpdatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gt", r.pulpLastUpdatedGt, "") + } + if r.pulpLastUpdatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gte", r.pulpLastUpdatedGte, "") + } + if r.pulpLastUpdatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lt", r.pulpLastUpdatedLt, "") + } + if r.pulpLastUpdatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lte", r.pulpLastUpdatedLte, "") + } + if r.pulpLastUpdatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__range", r.pulpLastUpdatedRange, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGitAPIRemotesAnsibleGitListRolesRequest struct { + ctx context.Context + ApiService *RemotesGitAPIService + ansibleGitRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesGitAPIRemotesAnsibleGitListRolesRequest) Fields(fields []string) RemotesGitAPIRemotesAnsibleGitListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesGitAPIRemotesAnsibleGitListRolesRequest) ExcludeFields(excludeFields []string) RemotesGitAPIRemotesAnsibleGitListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesGitAPIRemotesAnsibleGitListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleGitListRolesExecute(r) +} + +/* +RemotesAnsibleGitListRoles Method for RemotesAnsibleGitListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleGitRemoteHref + @return RemotesGitAPIRemotesAnsibleGitListRolesRequest +*/ +func (a *RemotesGitAPIService) RemotesAnsibleGitListRoles(ctx context.Context, ansibleGitRemoteHref string) RemotesGitAPIRemotesAnsibleGitListRolesRequest { + return RemotesGitAPIRemotesAnsibleGitListRolesRequest{ + ApiService: a, + ctx: ctx, + ansibleGitRemoteHref: ansibleGitRemoteHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *RemotesGitAPIService) RemotesAnsibleGitListRolesExecute(r RemotesGitAPIRemotesAnsibleGitListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGitAPIService.RemotesAnsibleGitListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_git_remote_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_git_remote_href"+"}", parameterValueToString(r.ansibleGitRemoteHref, "ansibleGitRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGitAPIRemotesAnsibleGitMyPermissionsRequest struct { + ctx context.Context + ApiService *RemotesGitAPIService + ansibleGitRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesGitAPIRemotesAnsibleGitMyPermissionsRequest) Fields(fields []string) RemotesGitAPIRemotesAnsibleGitMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesGitAPIRemotesAnsibleGitMyPermissionsRequest) ExcludeFields(excludeFields []string) RemotesGitAPIRemotesAnsibleGitMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesGitAPIRemotesAnsibleGitMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleGitMyPermissionsExecute(r) +} + +/* +RemotesAnsibleGitMyPermissions Method for RemotesAnsibleGitMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleGitRemoteHref + @return RemotesGitAPIRemotesAnsibleGitMyPermissionsRequest +*/ +func (a *RemotesGitAPIService) RemotesAnsibleGitMyPermissions(ctx context.Context, ansibleGitRemoteHref string) RemotesGitAPIRemotesAnsibleGitMyPermissionsRequest { + return RemotesGitAPIRemotesAnsibleGitMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + ansibleGitRemoteHref: ansibleGitRemoteHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *RemotesGitAPIService) RemotesAnsibleGitMyPermissionsExecute(r RemotesGitAPIRemotesAnsibleGitMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGitAPIService.RemotesAnsibleGitMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_git_remote_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_git_remote_href"+"}", parameterValueToString(r.ansibleGitRemoteHref, "ansibleGitRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGitAPIRemotesAnsibleGitPartialUpdateRequest struct { + ctx context.Context + ApiService *RemotesGitAPIService + ansibleGitRemoteHref string + patchedansibleGitRemote *PatchedansibleGitRemote +} + +func (r RemotesGitAPIRemotesAnsibleGitPartialUpdateRequest) PatchedansibleGitRemote(patchedansibleGitRemote PatchedansibleGitRemote) RemotesGitAPIRemotesAnsibleGitPartialUpdateRequest { + r.patchedansibleGitRemote = &patchedansibleGitRemote + return r +} + +func (r RemotesGitAPIRemotesAnsibleGitPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleGitPartialUpdateExecute(r) +} + +/* +RemotesAnsibleGitPartialUpdate Update a git remote + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleGitRemoteHref + @return RemotesGitAPIRemotesAnsibleGitPartialUpdateRequest +*/ +func (a *RemotesGitAPIService) RemotesAnsibleGitPartialUpdate(ctx context.Context, ansibleGitRemoteHref string) RemotesGitAPIRemotesAnsibleGitPartialUpdateRequest { + return RemotesGitAPIRemotesAnsibleGitPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + ansibleGitRemoteHref: ansibleGitRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesGitAPIService) RemotesAnsibleGitPartialUpdateExecute(r RemotesGitAPIRemotesAnsibleGitPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGitAPIService.RemotesAnsibleGitPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_git_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_git_remote_href"+"}", parameterValueToString(r.ansibleGitRemoteHref, "ansibleGitRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedansibleGitRemote == nil { + return localVarReturnValue, nil, reportError("patchedansibleGitRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedansibleGitRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGitAPIRemotesAnsibleGitReadRequest struct { + ctx context.Context + ApiService *RemotesGitAPIService + ansibleGitRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesGitAPIRemotesAnsibleGitReadRequest) Fields(fields []string) RemotesGitAPIRemotesAnsibleGitReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesGitAPIRemotesAnsibleGitReadRequest) ExcludeFields(excludeFields []string) RemotesGitAPIRemotesAnsibleGitReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesGitAPIRemotesAnsibleGitReadRequest) Execute() (*AnsibleGitRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleGitReadExecute(r) +} + +/* +RemotesAnsibleGitRead Inspect a git remote + +ViewSet for Ansible Remotes. + +This is a tech preview feature. The functionality may change in the future. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleGitRemoteHref + @return RemotesGitAPIRemotesAnsibleGitReadRequest +*/ +func (a *RemotesGitAPIService) RemotesAnsibleGitRead(ctx context.Context, ansibleGitRemoteHref string) RemotesGitAPIRemotesAnsibleGitReadRequest { + return RemotesGitAPIRemotesAnsibleGitReadRequest{ + ApiService: a, + ctx: ctx, + ansibleGitRemoteHref: ansibleGitRemoteHref, + } +} + +// Execute executes the request +// @return AnsibleGitRemoteResponse +func (a *RemotesGitAPIService) RemotesAnsibleGitReadExecute(r RemotesGitAPIRemotesAnsibleGitReadRequest) (*AnsibleGitRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleGitRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGitAPIService.RemotesAnsibleGitRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_git_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_git_remote_href"+"}", parameterValueToString(r.ansibleGitRemoteHref, "ansibleGitRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGitAPIRemotesAnsibleGitRemoveRoleRequest struct { + ctx context.Context + ApiService *RemotesGitAPIService + ansibleGitRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesGitAPIRemotesAnsibleGitRemoveRoleRequest) NestedRole(nestedRole NestedRole) RemotesGitAPIRemotesAnsibleGitRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesGitAPIRemotesAnsibleGitRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleGitRemoveRoleExecute(r) +} + +/* +RemotesAnsibleGitRemoveRole Method for RemotesAnsibleGitRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleGitRemoteHref + @return RemotesGitAPIRemotesAnsibleGitRemoveRoleRequest +*/ +func (a *RemotesGitAPIService) RemotesAnsibleGitRemoveRole(ctx context.Context, ansibleGitRemoteHref string) RemotesGitAPIRemotesAnsibleGitRemoveRoleRequest { + return RemotesGitAPIRemotesAnsibleGitRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + ansibleGitRemoteHref: ansibleGitRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesGitAPIService) RemotesAnsibleGitRemoveRoleExecute(r RemotesGitAPIRemotesAnsibleGitRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGitAPIService.RemotesAnsibleGitRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_git_remote_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_git_remote_href"+"}", parameterValueToString(r.ansibleGitRemoteHref, "ansibleGitRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesGitAPIRemotesAnsibleGitUpdateRequest struct { + ctx context.Context + ApiService *RemotesGitAPIService + ansibleGitRemoteHref string + ansibleGitRemote *AnsibleGitRemote +} + +func (r RemotesGitAPIRemotesAnsibleGitUpdateRequest) AnsibleGitRemote(ansibleGitRemote AnsibleGitRemote) RemotesGitAPIRemotesAnsibleGitUpdateRequest { + r.ansibleGitRemote = &ansibleGitRemote + return r +} + +func (r RemotesGitAPIRemotesAnsibleGitUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleGitUpdateExecute(r) +} + +/* +RemotesAnsibleGitUpdate Update a git remote + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleGitRemoteHref + @return RemotesGitAPIRemotesAnsibleGitUpdateRequest +*/ +func (a *RemotesGitAPIService) RemotesAnsibleGitUpdate(ctx context.Context, ansibleGitRemoteHref string) RemotesGitAPIRemotesAnsibleGitUpdateRequest { + return RemotesGitAPIRemotesAnsibleGitUpdateRequest{ + ApiService: a, + ctx: ctx, + ansibleGitRemoteHref: ansibleGitRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesGitAPIService) RemotesAnsibleGitUpdateExecute(r RemotesGitAPIRemotesAnsibleGitUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesGitAPIService.RemotesAnsibleGitUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_git_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_git_remote_href"+"}", parameterValueToString(r.ansibleGitRemoteHref, "ansibleGitRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleGitRemote == nil { + return localVarReturnValue, nil, reportError("ansibleGitRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleGitRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_maven.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_maven.go new file mode 100644 index 0000000000..1b6012ba44 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_maven.go @@ -0,0 +1,912 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RemotesMavenAPIService RemotesMavenAPI service +type RemotesMavenAPIService service + +type RemotesMavenAPIRemotesMavenMavenCreateRequest struct { + ctx context.Context + ApiService *RemotesMavenAPIService + mavenMavenRemote *MavenMavenRemote +} + +func (r RemotesMavenAPIRemotesMavenMavenCreateRequest) MavenMavenRemote(mavenMavenRemote MavenMavenRemote) RemotesMavenAPIRemotesMavenMavenCreateRequest { + r.mavenMavenRemote = &mavenMavenRemote + return r +} + +func (r RemotesMavenAPIRemotesMavenMavenCreateRequest) Execute() (*MavenMavenRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesMavenMavenCreateExecute(r) +} + +/* +RemotesMavenMavenCreate Create a maven remote + +A ViewSet for MavenRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesMavenAPIRemotesMavenMavenCreateRequest +*/ +func (a *RemotesMavenAPIService) RemotesMavenMavenCreate(ctx context.Context) RemotesMavenAPIRemotesMavenMavenCreateRequest { + return RemotesMavenAPIRemotesMavenMavenCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return MavenMavenRemoteResponse +func (a *RemotesMavenAPIService) RemotesMavenMavenCreateExecute(r RemotesMavenAPIRemotesMavenMavenCreateRequest) (*MavenMavenRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MavenMavenRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesMavenAPIService.RemotesMavenMavenCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/maven/maven/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.mavenMavenRemote == nil { + return localVarReturnValue, nil, reportError("mavenMavenRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.mavenMavenRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesMavenAPIRemotesMavenMavenDeleteRequest struct { + ctx context.Context + ApiService *RemotesMavenAPIService + mavenMavenRemoteHref string +} + +func (r RemotesMavenAPIRemotesMavenMavenDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesMavenMavenDeleteExecute(r) +} + +/* +RemotesMavenMavenDelete Delete a maven remote + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenRemoteHref + @return RemotesMavenAPIRemotesMavenMavenDeleteRequest +*/ +func (a *RemotesMavenAPIService) RemotesMavenMavenDelete(ctx context.Context, mavenMavenRemoteHref string) RemotesMavenAPIRemotesMavenMavenDeleteRequest { + return RemotesMavenAPIRemotesMavenMavenDeleteRequest{ + ApiService: a, + ctx: ctx, + mavenMavenRemoteHref: mavenMavenRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesMavenAPIService) RemotesMavenMavenDeleteExecute(r RemotesMavenAPIRemotesMavenMavenDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesMavenAPIService.RemotesMavenMavenDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_remote_href"+"}", parameterValueToString(r.mavenMavenRemoteHref, "mavenMavenRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesMavenAPIRemotesMavenMavenListRequest struct { + ctx context.Context + ApiService *RemotesMavenAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpLastUpdated *time.Time + pulpLastUpdatedGt *time.Time + pulpLastUpdatedGte *time.Time + pulpLastUpdatedLt *time.Time + pulpLastUpdatedLte *time.Time + pulpLastUpdatedRange *[]time.Time + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r RemotesMavenAPIRemotesMavenMavenListRequest) Limit(limit int32) RemotesMavenAPIRemotesMavenMavenListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RemotesMavenAPIRemotesMavenMavenListRequest) Name(name string) RemotesMavenAPIRemotesMavenMavenListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RemotesMavenAPIRemotesMavenMavenListRequest) NameContains(nameContains string) RemotesMavenAPIRemotesMavenMavenListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RemotesMavenAPIRemotesMavenMavenListRequest) NameIcontains(nameIcontains string) RemotesMavenAPIRemotesMavenMavenListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RemotesMavenAPIRemotesMavenMavenListRequest) NameIn(nameIn []string) RemotesMavenAPIRemotesMavenMavenListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RemotesMavenAPIRemotesMavenMavenListRequest) NameStartswith(nameStartswith string) RemotesMavenAPIRemotesMavenMavenListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RemotesMavenAPIRemotesMavenMavenListRequest) Offset(offset int32) RemotesMavenAPIRemotesMavenMavenListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RemotesMavenAPIRemotesMavenMavenListRequest) Ordering(ordering []string) RemotesMavenAPIRemotesMavenMavenListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RemotesMavenAPIRemotesMavenMavenListRequest) PulpHrefIn(pulpHrefIn []string) RemotesMavenAPIRemotesMavenMavenListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RemotesMavenAPIRemotesMavenMavenListRequest) PulpIdIn(pulpIdIn []string) RemotesMavenAPIRemotesMavenMavenListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RemotesMavenAPIRemotesMavenMavenListRequest) PulpLabelSelect(pulpLabelSelect string) RemotesMavenAPIRemotesMavenMavenListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where pulp_last_updated matches value +func (r RemotesMavenAPIRemotesMavenMavenListRequest) PulpLastUpdated(pulpLastUpdated time.Time) RemotesMavenAPIRemotesMavenMavenListRequest { + r.pulpLastUpdated = &pulpLastUpdated + return r +} + +// Filter results where pulp_last_updated is greater than value +func (r RemotesMavenAPIRemotesMavenMavenListRequest) PulpLastUpdatedGt(pulpLastUpdatedGt time.Time) RemotesMavenAPIRemotesMavenMavenListRequest { + r.pulpLastUpdatedGt = &pulpLastUpdatedGt + return r +} + +// Filter results where pulp_last_updated is greater than or equal to value +func (r RemotesMavenAPIRemotesMavenMavenListRequest) PulpLastUpdatedGte(pulpLastUpdatedGte time.Time) RemotesMavenAPIRemotesMavenMavenListRequest { + r.pulpLastUpdatedGte = &pulpLastUpdatedGte + return r +} + +// Filter results where pulp_last_updated is less than value +func (r RemotesMavenAPIRemotesMavenMavenListRequest) PulpLastUpdatedLt(pulpLastUpdatedLt time.Time) RemotesMavenAPIRemotesMavenMavenListRequest { + r.pulpLastUpdatedLt = &pulpLastUpdatedLt + return r +} + +// Filter results where pulp_last_updated is less than or equal to value +func (r RemotesMavenAPIRemotesMavenMavenListRequest) PulpLastUpdatedLte(pulpLastUpdatedLte time.Time) RemotesMavenAPIRemotesMavenMavenListRequest { + r.pulpLastUpdatedLte = &pulpLastUpdatedLte + return r +} + +// Filter results where pulp_last_updated is between two comma separated values +func (r RemotesMavenAPIRemotesMavenMavenListRequest) PulpLastUpdatedRange(pulpLastUpdatedRange []time.Time) RemotesMavenAPIRemotesMavenMavenListRequest { + r.pulpLastUpdatedRange = &pulpLastUpdatedRange + return r +} + +// A list of fields to include in the response. +func (r RemotesMavenAPIRemotesMavenMavenListRequest) Fields(fields []string) RemotesMavenAPIRemotesMavenMavenListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesMavenAPIRemotesMavenMavenListRequest) ExcludeFields(excludeFields []string) RemotesMavenAPIRemotesMavenMavenListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesMavenAPIRemotesMavenMavenListRequest) Execute() (*PaginatedmavenMavenRemoteResponseList, *http.Response, error) { + return r.ApiService.RemotesMavenMavenListExecute(r) +} + +/* +RemotesMavenMavenList List maven remotes + +A ViewSet for MavenRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesMavenAPIRemotesMavenMavenListRequest +*/ +func (a *RemotesMavenAPIService) RemotesMavenMavenList(ctx context.Context) RemotesMavenAPIRemotesMavenMavenListRequest { + return RemotesMavenAPIRemotesMavenMavenListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedmavenMavenRemoteResponseList +func (a *RemotesMavenAPIService) RemotesMavenMavenListExecute(r RemotesMavenAPIRemotesMavenMavenListRequest) (*PaginatedmavenMavenRemoteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedmavenMavenRemoteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesMavenAPIService.RemotesMavenMavenList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/maven/maven/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpLastUpdated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated", r.pulpLastUpdated, "") + } + if r.pulpLastUpdatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gt", r.pulpLastUpdatedGt, "") + } + if r.pulpLastUpdatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gte", r.pulpLastUpdatedGte, "") + } + if r.pulpLastUpdatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lt", r.pulpLastUpdatedLt, "") + } + if r.pulpLastUpdatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lte", r.pulpLastUpdatedLte, "") + } + if r.pulpLastUpdatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__range", r.pulpLastUpdatedRange, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesMavenAPIRemotesMavenMavenPartialUpdateRequest struct { + ctx context.Context + ApiService *RemotesMavenAPIService + mavenMavenRemoteHref string + patchedmavenMavenRemote *PatchedmavenMavenRemote +} + +func (r RemotesMavenAPIRemotesMavenMavenPartialUpdateRequest) PatchedmavenMavenRemote(patchedmavenMavenRemote PatchedmavenMavenRemote) RemotesMavenAPIRemotesMavenMavenPartialUpdateRequest { + r.patchedmavenMavenRemote = &patchedmavenMavenRemote + return r +} + +func (r RemotesMavenAPIRemotesMavenMavenPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesMavenMavenPartialUpdateExecute(r) +} + +/* +RemotesMavenMavenPartialUpdate Update a maven remote + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenRemoteHref + @return RemotesMavenAPIRemotesMavenMavenPartialUpdateRequest +*/ +func (a *RemotesMavenAPIService) RemotesMavenMavenPartialUpdate(ctx context.Context, mavenMavenRemoteHref string) RemotesMavenAPIRemotesMavenMavenPartialUpdateRequest { + return RemotesMavenAPIRemotesMavenMavenPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + mavenMavenRemoteHref: mavenMavenRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesMavenAPIService) RemotesMavenMavenPartialUpdateExecute(r RemotesMavenAPIRemotesMavenMavenPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesMavenAPIService.RemotesMavenMavenPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_remote_href"+"}", parameterValueToString(r.mavenMavenRemoteHref, "mavenMavenRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedmavenMavenRemote == nil { + return localVarReturnValue, nil, reportError("patchedmavenMavenRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedmavenMavenRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesMavenAPIRemotesMavenMavenReadRequest struct { + ctx context.Context + ApiService *RemotesMavenAPIService + mavenMavenRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesMavenAPIRemotesMavenMavenReadRequest) Fields(fields []string) RemotesMavenAPIRemotesMavenMavenReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesMavenAPIRemotesMavenMavenReadRequest) ExcludeFields(excludeFields []string) RemotesMavenAPIRemotesMavenMavenReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesMavenAPIRemotesMavenMavenReadRequest) Execute() (*MavenMavenRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesMavenMavenReadExecute(r) +} + +/* +RemotesMavenMavenRead Inspect a maven remote + +A ViewSet for MavenRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenRemoteHref + @return RemotesMavenAPIRemotesMavenMavenReadRequest +*/ +func (a *RemotesMavenAPIService) RemotesMavenMavenRead(ctx context.Context, mavenMavenRemoteHref string) RemotesMavenAPIRemotesMavenMavenReadRequest { + return RemotesMavenAPIRemotesMavenMavenReadRequest{ + ApiService: a, + ctx: ctx, + mavenMavenRemoteHref: mavenMavenRemoteHref, + } +} + +// Execute executes the request +// @return MavenMavenRemoteResponse +func (a *RemotesMavenAPIService) RemotesMavenMavenReadExecute(r RemotesMavenAPIRemotesMavenMavenReadRequest) (*MavenMavenRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MavenMavenRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesMavenAPIService.RemotesMavenMavenRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_remote_href"+"}", parameterValueToString(r.mavenMavenRemoteHref, "mavenMavenRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesMavenAPIRemotesMavenMavenUpdateRequest struct { + ctx context.Context + ApiService *RemotesMavenAPIService + mavenMavenRemoteHref string + mavenMavenRemote *MavenMavenRemote +} + +func (r RemotesMavenAPIRemotesMavenMavenUpdateRequest) MavenMavenRemote(mavenMavenRemote MavenMavenRemote) RemotesMavenAPIRemotesMavenMavenUpdateRequest { + r.mavenMavenRemote = &mavenMavenRemote + return r +} + +func (r RemotesMavenAPIRemotesMavenMavenUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesMavenMavenUpdateExecute(r) +} + +/* +RemotesMavenMavenUpdate Update a maven remote + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenRemoteHref + @return RemotesMavenAPIRemotesMavenMavenUpdateRequest +*/ +func (a *RemotesMavenAPIService) RemotesMavenMavenUpdate(ctx context.Context, mavenMavenRemoteHref string) RemotesMavenAPIRemotesMavenMavenUpdateRequest { + return RemotesMavenAPIRemotesMavenMavenUpdateRequest{ + ApiService: a, + ctx: ctx, + mavenMavenRemoteHref: mavenMavenRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesMavenAPIService) RemotesMavenMavenUpdateExecute(r RemotesMavenAPIRemotesMavenMavenUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesMavenAPIService.RemotesMavenMavenUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_remote_href"+"}", parameterValueToString(r.mavenMavenRemoteHref, "mavenMavenRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.mavenMavenRemote == nil { + return localVarReturnValue, nil, reportError("mavenMavenRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.mavenMavenRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_ostree.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_ostree.go new file mode 100644 index 0000000000..310c954d2d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_ostree.go @@ -0,0 +1,912 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RemotesOstreeAPIService RemotesOstreeAPI service +type RemotesOstreeAPIService service + +type RemotesOstreeAPIRemotesOstreeOstreeCreateRequest struct { + ctx context.Context + ApiService *RemotesOstreeAPIService + ostreeOstreeRemote *OstreeOstreeRemote +} + +func (r RemotesOstreeAPIRemotesOstreeOstreeCreateRequest) OstreeOstreeRemote(ostreeOstreeRemote OstreeOstreeRemote) RemotesOstreeAPIRemotesOstreeOstreeCreateRequest { + r.ostreeOstreeRemote = &ostreeOstreeRemote + return r +} + +func (r RemotesOstreeAPIRemotesOstreeOstreeCreateRequest) Execute() (*OstreeOstreeRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesOstreeOstreeCreateExecute(r) +} + +/* +RemotesOstreeOstreeCreate Create an ostree remote + +A ViewSet class for OSTree remote repositories. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesOstreeAPIRemotesOstreeOstreeCreateRequest +*/ +func (a *RemotesOstreeAPIService) RemotesOstreeOstreeCreate(ctx context.Context) RemotesOstreeAPIRemotesOstreeOstreeCreateRequest { + return RemotesOstreeAPIRemotesOstreeOstreeCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OstreeOstreeRemoteResponse +func (a *RemotesOstreeAPIService) RemotesOstreeOstreeCreateExecute(r RemotesOstreeAPIRemotesOstreeOstreeCreateRequest) (*OstreeOstreeRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OstreeOstreeRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesOstreeAPIService.RemotesOstreeOstreeCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/ostree/ostree/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ostreeOstreeRemote == nil { + return localVarReturnValue, nil, reportError("ostreeOstreeRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ostreeOstreeRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesOstreeAPIRemotesOstreeOstreeDeleteRequest struct { + ctx context.Context + ApiService *RemotesOstreeAPIService + ostreeOstreeRemoteHref string +} + +func (r RemotesOstreeAPIRemotesOstreeOstreeDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesOstreeOstreeDeleteExecute(r) +} + +/* +RemotesOstreeOstreeDelete Delete an ostree remote + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRemoteHref + @return RemotesOstreeAPIRemotesOstreeOstreeDeleteRequest +*/ +func (a *RemotesOstreeAPIService) RemotesOstreeOstreeDelete(ctx context.Context, ostreeOstreeRemoteHref string) RemotesOstreeAPIRemotesOstreeOstreeDeleteRequest { + return RemotesOstreeAPIRemotesOstreeOstreeDeleteRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRemoteHref: ostreeOstreeRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesOstreeAPIService) RemotesOstreeOstreeDeleteExecute(r RemotesOstreeAPIRemotesOstreeOstreeDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesOstreeAPIService.RemotesOstreeOstreeDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_remote_href"+"}", parameterValueToString(r.ostreeOstreeRemoteHref, "ostreeOstreeRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesOstreeAPIRemotesOstreeOstreeListRequest struct { + ctx context.Context + ApiService *RemotesOstreeAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpLastUpdated *time.Time + pulpLastUpdatedGt *time.Time + pulpLastUpdatedGte *time.Time + pulpLastUpdatedLt *time.Time + pulpLastUpdatedLte *time.Time + pulpLastUpdatedRange *[]time.Time + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) Limit(limit int32) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) Name(name string) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) NameContains(nameContains string) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) NameIcontains(nameIcontains string) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) NameIn(nameIn []string) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) NameStartswith(nameStartswith string) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) Offset(offset int32) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) Ordering(ordering []string) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) PulpHrefIn(pulpHrefIn []string) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) PulpIdIn(pulpIdIn []string) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) PulpLabelSelect(pulpLabelSelect string) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where pulp_last_updated matches value +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) PulpLastUpdated(pulpLastUpdated time.Time) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.pulpLastUpdated = &pulpLastUpdated + return r +} + +// Filter results where pulp_last_updated is greater than value +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) PulpLastUpdatedGt(pulpLastUpdatedGt time.Time) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.pulpLastUpdatedGt = &pulpLastUpdatedGt + return r +} + +// Filter results where pulp_last_updated is greater than or equal to value +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) PulpLastUpdatedGte(pulpLastUpdatedGte time.Time) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.pulpLastUpdatedGte = &pulpLastUpdatedGte + return r +} + +// Filter results where pulp_last_updated is less than value +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) PulpLastUpdatedLt(pulpLastUpdatedLt time.Time) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.pulpLastUpdatedLt = &pulpLastUpdatedLt + return r +} + +// Filter results where pulp_last_updated is less than or equal to value +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) PulpLastUpdatedLte(pulpLastUpdatedLte time.Time) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.pulpLastUpdatedLte = &pulpLastUpdatedLte + return r +} + +// Filter results where pulp_last_updated is between two comma separated values +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) PulpLastUpdatedRange(pulpLastUpdatedRange []time.Time) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.pulpLastUpdatedRange = &pulpLastUpdatedRange + return r +} + +// A list of fields to include in the response. +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) Fields(fields []string) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) ExcludeFields(excludeFields []string) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesOstreeAPIRemotesOstreeOstreeListRequest) Execute() (*PaginatedostreeOstreeRemoteResponseList, *http.Response, error) { + return r.ApiService.RemotesOstreeOstreeListExecute(r) +} + +/* +RemotesOstreeOstreeList List ostree remotes + +A ViewSet class for OSTree remote repositories. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesOstreeAPIRemotesOstreeOstreeListRequest +*/ +func (a *RemotesOstreeAPIService) RemotesOstreeOstreeList(ctx context.Context) RemotesOstreeAPIRemotesOstreeOstreeListRequest { + return RemotesOstreeAPIRemotesOstreeOstreeListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedostreeOstreeRemoteResponseList +func (a *RemotesOstreeAPIService) RemotesOstreeOstreeListExecute(r RemotesOstreeAPIRemotesOstreeOstreeListRequest) (*PaginatedostreeOstreeRemoteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedostreeOstreeRemoteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesOstreeAPIService.RemotesOstreeOstreeList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/ostree/ostree/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpLastUpdated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated", r.pulpLastUpdated, "") + } + if r.pulpLastUpdatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gt", r.pulpLastUpdatedGt, "") + } + if r.pulpLastUpdatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gte", r.pulpLastUpdatedGte, "") + } + if r.pulpLastUpdatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lt", r.pulpLastUpdatedLt, "") + } + if r.pulpLastUpdatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lte", r.pulpLastUpdatedLte, "") + } + if r.pulpLastUpdatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__range", r.pulpLastUpdatedRange, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesOstreeAPIRemotesOstreeOstreePartialUpdateRequest struct { + ctx context.Context + ApiService *RemotesOstreeAPIService + ostreeOstreeRemoteHref string + patchedostreeOstreeRemote *PatchedostreeOstreeRemote +} + +func (r RemotesOstreeAPIRemotesOstreeOstreePartialUpdateRequest) PatchedostreeOstreeRemote(patchedostreeOstreeRemote PatchedostreeOstreeRemote) RemotesOstreeAPIRemotesOstreeOstreePartialUpdateRequest { + r.patchedostreeOstreeRemote = &patchedostreeOstreeRemote + return r +} + +func (r RemotesOstreeAPIRemotesOstreeOstreePartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesOstreeOstreePartialUpdateExecute(r) +} + +/* +RemotesOstreeOstreePartialUpdate Update an ostree remote + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRemoteHref + @return RemotesOstreeAPIRemotesOstreeOstreePartialUpdateRequest +*/ +func (a *RemotesOstreeAPIService) RemotesOstreeOstreePartialUpdate(ctx context.Context, ostreeOstreeRemoteHref string) RemotesOstreeAPIRemotesOstreeOstreePartialUpdateRequest { + return RemotesOstreeAPIRemotesOstreeOstreePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRemoteHref: ostreeOstreeRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesOstreeAPIService) RemotesOstreeOstreePartialUpdateExecute(r RemotesOstreeAPIRemotesOstreeOstreePartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesOstreeAPIService.RemotesOstreeOstreePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_remote_href"+"}", parameterValueToString(r.ostreeOstreeRemoteHref, "ostreeOstreeRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedostreeOstreeRemote == nil { + return localVarReturnValue, nil, reportError("patchedostreeOstreeRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedostreeOstreeRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesOstreeAPIRemotesOstreeOstreeReadRequest struct { + ctx context.Context + ApiService *RemotesOstreeAPIService + ostreeOstreeRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesOstreeAPIRemotesOstreeOstreeReadRequest) Fields(fields []string) RemotesOstreeAPIRemotesOstreeOstreeReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesOstreeAPIRemotesOstreeOstreeReadRequest) ExcludeFields(excludeFields []string) RemotesOstreeAPIRemotesOstreeOstreeReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesOstreeAPIRemotesOstreeOstreeReadRequest) Execute() (*OstreeOstreeRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesOstreeOstreeReadExecute(r) +} + +/* +RemotesOstreeOstreeRead Inspect an ostree remote + +A ViewSet class for OSTree remote repositories. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRemoteHref + @return RemotesOstreeAPIRemotesOstreeOstreeReadRequest +*/ +func (a *RemotesOstreeAPIService) RemotesOstreeOstreeRead(ctx context.Context, ostreeOstreeRemoteHref string) RemotesOstreeAPIRemotesOstreeOstreeReadRequest { + return RemotesOstreeAPIRemotesOstreeOstreeReadRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRemoteHref: ostreeOstreeRemoteHref, + } +} + +// Execute executes the request +// @return OstreeOstreeRemoteResponse +func (a *RemotesOstreeAPIService) RemotesOstreeOstreeReadExecute(r RemotesOstreeAPIRemotesOstreeOstreeReadRequest) (*OstreeOstreeRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OstreeOstreeRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesOstreeAPIService.RemotesOstreeOstreeRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_remote_href"+"}", parameterValueToString(r.ostreeOstreeRemoteHref, "ostreeOstreeRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesOstreeAPIRemotesOstreeOstreeUpdateRequest struct { + ctx context.Context + ApiService *RemotesOstreeAPIService + ostreeOstreeRemoteHref string + ostreeOstreeRemote *OstreeOstreeRemote +} + +func (r RemotesOstreeAPIRemotesOstreeOstreeUpdateRequest) OstreeOstreeRemote(ostreeOstreeRemote OstreeOstreeRemote) RemotesOstreeAPIRemotesOstreeOstreeUpdateRequest { + r.ostreeOstreeRemote = &ostreeOstreeRemote + return r +} + +func (r RemotesOstreeAPIRemotesOstreeOstreeUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesOstreeOstreeUpdateExecute(r) +} + +/* +RemotesOstreeOstreeUpdate Update an ostree remote + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRemoteHref + @return RemotesOstreeAPIRemotesOstreeOstreeUpdateRequest +*/ +func (a *RemotesOstreeAPIService) RemotesOstreeOstreeUpdate(ctx context.Context, ostreeOstreeRemoteHref string) RemotesOstreeAPIRemotesOstreeOstreeUpdateRequest { + return RemotesOstreeAPIRemotesOstreeOstreeUpdateRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRemoteHref: ostreeOstreeRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesOstreeAPIService) RemotesOstreeOstreeUpdateExecute(r RemotesOstreeAPIRemotesOstreeOstreeUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesOstreeAPIService.RemotesOstreeOstreeUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_remote_href"+"}", parameterValueToString(r.ostreeOstreeRemoteHref, "ostreeOstreeRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ostreeOstreeRemote == nil { + return localVarReturnValue, nil, reportError("ostreeOstreeRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ostreeOstreeRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_python.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_python.go new file mode 100644 index 0000000000..360a15c9c7 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_python.go @@ -0,0 +1,1072 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "time" + "reflect" +) + + +// RemotesPythonAPIService RemotesPythonAPI service +type RemotesPythonAPIService service + +type RemotesPythonAPIRemotesPythonPythonCreateRequest struct { + ctx context.Context + ApiService *RemotesPythonAPIService + pythonPythonRemote *PythonPythonRemote +} + +func (r RemotesPythonAPIRemotesPythonPythonCreateRequest) PythonPythonRemote(pythonPythonRemote PythonPythonRemote) RemotesPythonAPIRemotesPythonPythonCreateRequest { + r.pythonPythonRemote = &pythonPythonRemote + return r +} + +func (r RemotesPythonAPIRemotesPythonPythonCreateRequest) Execute() (*PythonPythonRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesPythonPythonCreateExecute(r) +} + +/* +RemotesPythonPythonCreate Create a python remote + + +Python Remotes are representations of an external repository of Python content, eg. +PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from +upstream repositories, and contains sync settings. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesPythonAPIRemotesPythonPythonCreateRequest +*/ +func (a *RemotesPythonAPIService) RemotesPythonPythonCreate(ctx context.Context) RemotesPythonAPIRemotesPythonPythonCreateRequest { + return RemotesPythonAPIRemotesPythonPythonCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PythonPythonRemoteResponse +func (a *RemotesPythonAPIService) RemotesPythonPythonCreateExecute(r RemotesPythonAPIRemotesPythonPythonCreateRequest) (*PythonPythonRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PythonPythonRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesPythonAPIService.RemotesPythonPythonCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/python/python/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pythonPythonRemote == nil { + return localVarReturnValue, nil, reportError("pythonPythonRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pythonPythonRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesPythonAPIRemotesPythonPythonDeleteRequest struct { + ctx context.Context + ApiService *RemotesPythonAPIService + pythonPythonRemoteHref string +} + +func (r RemotesPythonAPIRemotesPythonPythonDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesPythonPythonDeleteExecute(r) +} + +/* +RemotesPythonPythonDelete Delete a python remote + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRemoteHref + @return RemotesPythonAPIRemotesPythonPythonDeleteRequest +*/ +func (a *RemotesPythonAPIService) RemotesPythonPythonDelete(ctx context.Context, pythonPythonRemoteHref string) RemotesPythonAPIRemotesPythonPythonDeleteRequest { + return RemotesPythonAPIRemotesPythonPythonDeleteRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRemoteHref: pythonPythonRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesPythonAPIService) RemotesPythonPythonDeleteExecute(r RemotesPythonAPIRemotesPythonPythonDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesPythonAPIService.RemotesPythonPythonDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_remote_href"+"}", parameterValueToString(r.pythonPythonRemoteHref, "pythonPythonRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesPythonAPIRemotesPythonPythonFromBandersnatchRequest struct { + ctx context.Context + ApiService *RemotesPythonAPIService + config *os.File + name *string + policy *Policy762Enum +} + +// A Bandersnatch config that may be used to construct a Python Remote. +func (r RemotesPythonAPIRemotesPythonPythonFromBandersnatchRequest) Config(config *os.File) RemotesPythonAPIRemotesPythonPythonFromBandersnatchRequest { + r.config = config + return r +} + +// A unique name for this remote +func (r RemotesPythonAPIRemotesPythonPythonFromBandersnatchRequest) Name(name string) RemotesPythonAPIRemotesPythonPythonFromBandersnatchRequest { + r.name = &name + return r +} + +func (r RemotesPythonAPIRemotesPythonPythonFromBandersnatchRequest) Policy(policy Policy762Enum) RemotesPythonAPIRemotesPythonPythonFromBandersnatchRequest { + r.policy = &policy + return r +} + +func (r RemotesPythonAPIRemotesPythonPythonFromBandersnatchRequest) Execute() (*PythonPythonRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesPythonPythonFromBandersnatchExecute(r) +} + +/* +RemotesPythonPythonFromBandersnatch Create from Bandersnatch + + +Takes the fields specified in the Bandersnatch config and creates a Python Remote from it. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesPythonAPIRemotesPythonPythonFromBandersnatchRequest +*/ +func (a *RemotesPythonAPIService) RemotesPythonPythonFromBandersnatch(ctx context.Context) RemotesPythonAPIRemotesPythonPythonFromBandersnatchRequest { + return RemotesPythonAPIRemotesPythonPythonFromBandersnatchRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PythonPythonRemoteResponse +func (a *RemotesPythonAPIService) RemotesPythonPythonFromBandersnatchExecute(r RemotesPythonAPIRemotesPythonPythonFromBandersnatchRequest) (*PythonPythonRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PythonPythonRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesPythonAPIService.RemotesPythonPythonFromBandersnatch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/python/python/from_bandersnatch/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.config == nil { + return localVarReturnValue, nil, reportError("config is required and must be specified") + } + if r.name == nil { + return localVarReturnValue, nil, reportError("name is required and must be specified") + } + if strlen(*r.name) < 1 { + return localVarReturnValue, nil, reportError("name must have at least 1 elements") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var configLocalVarFormFileName string + var configLocalVarFileName string + var configLocalVarFileBytes []byte + + configLocalVarFormFileName = "config" + + + configLocalVarFile := r.config + + if configLocalVarFile != nil { + fbs, _ := io.ReadAll(configLocalVarFile) + + configLocalVarFileBytes = fbs + configLocalVarFileName = configLocalVarFile.Name() + configLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: configLocalVarFileBytes, fileName: configLocalVarFileName, formFileName: configLocalVarFormFileName}) + } + parameterAddToHeaderOrQuery(localVarFormParams, "name", r.name, "") + if r.policy != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "policy", r.policy, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesPythonAPIRemotesPythonPythonListRequest struct { + ctx context.Context + ApiService *RemotesPythonAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpLastUpdated *time.Time + pulpLastUpdatedGt *time.Time + pulpLastUpdatedGte *time.Time + pulpLastUpdatedLt *time.Time + pulpLastUpdatedLte *time.Time + pulpLastUpdatedRange *[]time.Time + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r RemotesPythonAPIRemotesPythonPythonListRequest) Limit(limit int32) RemotesPythonAPIRemotesPythonPythonListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RemotesPythonAPIRemotesPythonPythonListRequest) Name(name string) RemotesPythonAPIRemotesPythonPythonListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RemotesPythonAPIRemotesPythonPythonListRequest) NameContains(nameContains string) RemotesPythonAPIRemotesPythonPythonListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RemotesPythonAPIRemotesPythonPythonListRequest) NameIcontains(nameIcontains string) RemotesPythonAPIRemotesPythonPythonListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RemotesPythonAPIRemotesPythonPythonListRequest) NameIn(nameIn []string) RemotesPythonAPIRemotesPythonPythonListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RemotesPythonAPIRemotesPythonPythonListRequest) NameStartswith(nameStartswith string) RemotesPythonAPIRemotesPythonPythonListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RemotesPythonAPIRemotesPythonPythonListRequest) Offset(offset int32) RemotesPythonAPIRemotesPythonPythonListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RemotesPythonAPIRemotesPythonPythonListRequest) Ordering(ordering []string) RemotesPythonAPIRemotesPythonPythonListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RemotesPythonAPIRemotesPythonPythonListRequest) PulpHrefIn(pulpHrefIn []string) RemotesPythonAPIRemotesPythonPythonListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RemotesPythonAPIRemotesPythonPythonListRequest) PulpIdIn(pulpIdIn []string) RemotesPythonAPIRemotesPythonPythonListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RemotesPythonAPIRemotesPythonPythonListRequest) PulpLabelSelect(pulpLabelSelect string) RemotesPythonAPIRemotesPythonPythonListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where pulp_last_updated matches value +func (r RemotesPythonAPIRemotesPythonPythonListRequest) PulpLastUpdated(pulpLastUpdated time.Time) RemotesPythonAPIRemotesPythonPythonListRequest { + r.pulpLastUpdated = &pulpLastUpdated + return r +} + +// Filter results where pulp_last_updated is greater than value +func (r RemotesPythonAPIRemotesPythonPythonListRequest) PulpLastUpdatedGt(pulpLastUpdatedGt time.Time) RemotesPythonAPIRemotesPythonPythonListRequest { + r.pulpLastUpdatedGt = &pulpLastUpdatedGt + return r +} + +// Filter results where pulp_last_updated is greater than or equal to value +func (r RemotesPythonAPIRemotesPythonPythonListRequest) PulpLastUpdatedGte(pulpLastUpdatedGte time.Time) RemotesPythonAPIRemotesPythonPythonListRequest { + r.pulpLastUpdatedGte = &pulpLastUpdatedGte + return r +} + +// Filter results where pulp_last_updated is less than value +func (r RemotesPythonAPIRemotesPythonPythonListRequest) PulpLastUpdatedLt(pulpLastUpdatedLt time.Time) RemotesPythonAPIRemotesPythonPythonListRequest { + r.pulpLastUpdatedLt = &pulpLastUpdatedLt + return r +} + +// Filter results where pulp_last_updated is less than or equal to value +func (r RemotesPythonAPIRemotesPythonPythonListRequest) PulpLastUpdatedLte(pulpLastUpdatedLte time.Time) RemotesPythonAPIRemotesPythonPythonListRequest { + r.pulpLastUpdatedLte = &pulpLastUpdatedLte + return r +} + +// Filter results where pulp_last_updated is between two comma separated values +func (r RemotesPythonAPIRemotesPythonPythonListRequest) PulpLastUpdatedRange(pulpLastUpdatedRange []time.Time) RemotesPythonAPIRemotesPythonPythonListRequest { + r.pulpLastUpdatedRange = &pulpLastUpdatedRange + return r +} + +// A list of fields to include in the response. +func (r RemotesPythonAPIRemotesPythonPythonListRequest) Fields(fields []string) RemotesPythonAPIRemotesPythonPythonListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesPythonAPIRemotesPythonPythonListRequest) ExcludeFields(excludeFields []string) RemotesPythonAPIRemotesPythonPythonListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesPythonAPIRemotesPythonPythonListRequest) Execute() (*PaginatedpythonPythonRemoteResponseList, *http.Response, error) { + return r.ApiService.RemotesPythonPythonListExecute(r) +} + +/* +RemotesPythonPythonList List python remotes + + +Python Remotes are representations of an external repository of Python content, eg. +PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from +upstream repositories, and contains sync settings. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesPythonAPIRemotesPythonPythonListRequest +*/ +func (a *RemotesPythonAPIService) RemotesPythonPythonList(ctx context.Context) RemotesPythonAPIRemotesPythonPythonListRequest { + return RemotesPythonAPIRemotesPythonPythonListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedpythonPythonRemoteResponseList +func (a *RemotesPythonAPIService) RemotesPythonPythonListExecute(r RemotesPythonAPIRemotesPythonPythonListRequest) (*PaginatedpythonPythonRemoteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedpythonPythonRemoteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesPythonAPIService.RemotesPythonPythonList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/python/python/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpLastUpdated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated", r.pulpLastUpdated, "") + } + if r.pulpLastUpdatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gt", r.pulpLastUpdatedGt, "") + } + if r.pulpLastUpdatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gte", r.pulpLastUpdatedGte, "") + } + if r.pulpLastUpdatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lt", r.pulpLastUpdatedLt, "") + } + if r.pulpLastUpdatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lte", r.pulpLastUpdatedLte, "") + } + if r.pulpLastUpdatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__range", r.pulpLastUpdatedRange, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesPythonAPIRemotesPythonPythonPartialUpdateRequest struct { + ctx context.Context + ApiService *RemotesPythonAPIService + pythonPythonRemoteHref string + patchedpythonPythonRemote *PatchedpythonPythonRemote +} + +func (r RemotesPythonAPIRemotesPythonPythonPartialUpdateRequest) PatchedpythonPythonRemote(patchedpythonPythonRemote PatchedpythonPythonRemote) RemotesPythonAPIRemotesPythonPythonPartialUpdateRequest { + r.patchedpythonPythonRemote = &patchedpythonPythonRemote + return r +} + +func (r RemotesPythonAPIRemotesPythonPythonPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesPythonPythonPartialUpdateExecute(r) +} + +/* +RemotesPythonPythonPartialUpdate Update a python remote + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRemoteHref + @return RemotesPythonAPIRemotesPythonPythonPartialUpdateRequest +*/ +func (a *RemotesPythonAPIService) RemotesPythonPythonPartialUpdate(ctx context.Context, pythonPythonRemoteHref string) RemotesPythonAPIRemotesPythonPythonPartialUpdateRequest { + return RemotesPythonAPIRemotesPythonPythonPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRemoteHref: pythonPythonRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesPythonAPIService) RemotesPythonPythonPartialUpdateExecute(r RemotesPythonAPIRemotesPythonPythonPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesPythonAPIService.RemotesPythonPythonPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_remote_href"+"}", parameterValueToString(r.pythonPythonRemoteHref, "pythonPythonRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedpythonPythonRemote == nil { + return localVarReturnValue, nil, reportError("patchedpythonPythonRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedpythonPythonRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesPythonAPIRemotesPythonPythonReadRequest struct { + ctx context.Context + ApiService *RemotesPythonAPIService + pythonPythonRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesPythonAPIRemotesPythonPythonReadRequest) Fields(fields []string) RemotesPythonAPIRemotesPythonPythonReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesPythonAPIRemotesPythonPythonReadRequest) ExcludeFields(excludeFields []string) RemotesPythonAPIRemotesPythonPythonReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesPythonAPIRemotesPythonPythonReadRequest) Execute() (*PythonPythonRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesPythonPythonReadExecute(r) +} + +/* +RemotesPythonPythonRead Inspect a python remote + + +Python Remotes are representations of an external repository of Python content, eg. +PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from +upstream repositories, and contains sync settings. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRemoteHref + @return RemotesPythonAPIRemotesPythonPythonReadRequest +*/ +func (a *RemotesPythonAPIService) RemotesPythonPythonRead(ctx context.Context, pythonPythonRemoteHref string) RemotesPythonAPIRemotesPythonPythonReadRequest { + return RemotesPythonAPIRemotesPythonPythonReadRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRemoteHref: pythonPythonRemoteHref, + } +} + +// Execute executes the request +// @return PythonPythonRemoteResponse +func (a *RemotesPythonAPIService) RemotesPythonPythonReadExecute(r RemotesPythonAPIRemotesPythonPythonReadRequest) (*PythonPythonRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PythonPythonRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesPythonAPIService.RemotesPythonPythonRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_remote_href"+"}", parameterValueToString(r.pythonPythonRemoteHref, "pythonPythonRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesPythonAPIRemotesPythonPythonUpdateRequest struct { + ctx context.Context + ApiService *RemotesPythonAPIService + pythonPythonRemoteHref string + pythonPythonRemote *PythonPythonRemote +} + +func (r RemotesPythonAPIRemotesPythonPythonUpdateRequest) PythonPythonRemote(pythonPythonRemote PythonPythonRemote) RemotesPythonAPIRemotesPythonPythonUpdateRequest { + r.pythonPythonRemote = &pythonPythonRemote + return r +} + +func (r RemotesPythonAPIRemotesPythonPythonUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesPythonPythonUpdateExecute(r) +} + +/* +RemotesPythonPythonUpdate Update a python remote + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRemoteHref + @return RemotesPythonAPIRemotesPythonPythonUpdateRequest +*/ +func (a *RemotesPythonAPIService) RemotesPythonPythonUpdate(ctx context.Context, pythonPythonRemoteHref string) RemotesPythonAPIRemotesPythonPythonUpdateRequest { + return RemotesPythonAPIRemotesPythonPythonUpdateRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRemoteHref: pythonPythonRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesPythonAPIService) RemotesPythonPythonUpdateExecute(r RemotesPythonAPIRemotesPythonPythonUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesPythonAPIService.RemotesPythonPythonUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_remote_href"+"}", parameterValueToString(r.pythonPythonRemoteHref, "pythonPythonRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pythonPythonRemote == nil { + return localVarReturnValue, nil, reportError("pythonPythonRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pythonPythonRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_role.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_role.go new file mode 100644 index 0000000000..8e85aec3a2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_role.go @@ -0,0 +1,1418 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RemotesRoleAPIService RemotesRoleAPI service +type RemotesRoleAPIService service + +type RemotesRoleAPIRemotesAnsibleRoleAddRoleRequest struct { + ctx context.Context + ApiService *RemotesRoleAPIService + ansibleRoleRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesRoleAPIRemotesAnsibleRoleAddRoleRequest) NestedRole(nestedRole NestedRole) RemotesRoleAPIRemotesAnsibleRoleAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesRoleAPIRemotesAnsibleRoleAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleRoleAddRoleExecute(r) +} + +/* +RemotesAnsibleRoleAddRole Method for RemotesAnsibleRoleAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleRoleRemoteHref + @return RemotesRoleAPIRemotesAnsibleRoleAddRoleRequest +*/ +func (a *RemotesRoleAPIService) RemotesAnsibleRoleAddRole(ctx context.Context, ansibleRoleRemoteHref string) RemotesRoleAPIRemotesAnsibleRoleAddRoleRequest { + return RemotesRoleAPIRemotesAnsibleRoleAddRoleRequest{ + ApiService: a, + ctx: ctx, + ansibleRoleRemoteHref: ansibleRoleRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesRoleAPIService) RemotesAnsibleRoleAddRoleExecute(r RemotesRoleAPIRemotesAnsibleRoleAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRoleAPIService.RemotesAnsibleRoleAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_role_remote_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_role_remote_href"+"}", parameterValueToString(r.ansibleRoleRemoteHref, "ansibleRoleRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRoleAPIRemotesAnsibleRoleCreateRequest struct { + ctx context.Context + ApiService *RemotesRoleAPIService + ansibleRoleRemote *AnsibleRoleRemote +} + +func (r RemotesRoleAPIRemotesAnsibleRoleCreateRequest) AnsibleRoleRemote(ansibleRoleRemote AnsibleRoleRemote) RemotesRoleAPIRemotesAnsibleRoleCreateRequest { + r.ansibleRoleRemote = &ansibleRoleRemote + return r +} + +func (r RemotesRoleAPIRemotesAnsibleRoleCreateRequest) Execute() (*AnsibleRoleRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleRoleCreateExecute(r) +} + +/* +RemotesAnsibleRoleCreate Create a role remote + +ViewSet for Role Remotes. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesRoleAPIRemotesAnsibleRoleCreateRequest +*/ +func (a *RemotesRoleAPIService) RemotesAnsibleRoleCreate(ctx context.Context) RemotesRoleAPIRemotesAnsibleRoleCreateRequest { + return RemotesRoleAPIRemotesAnsibleRoleCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AnsibleRoleRemoteResponse +func (a *RemotesRoleAPIService) RemotesAnsibleRoleCreateExecute(r RemotesRoleAPIRemotesAnsibleRoleCreateRequest) (*AnsibleRoleRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleRoleRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRoleAPIService.RemotesAnsibleRoleCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/ansible/role/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleRoleRemote == nil { + return localVarReturnValue, nil, reportError("ansibleRoleRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleRoleRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRoleAPIRemotesAnsibleRoleDeleteRequest struct { + ctx context.Context + ApiService *RemotesRoleAPIService + ansibleRoleRemoteHref string +} + +func (r RemotesRoleAPIRemotesAnsibleRoleDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleRoleDeleteExecute(r) +} + +/* +RemotesAnsibleRoleDelete Delete a role remote + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleRoleRemoteHref + @return RemotesRoleAPIRemotesAnsibleRoleDeleteRequest +*/ +func (a *RemotesRoleAPIService) RemotesAnsibleRoleDelete(ctx context.Context, ansibleRoleRemoteHref string) RemotesRoleAPIRemotesAnsibleRoleDeleteRequest { + return RemotesRoleAPIRemotesAnsibleRoleDeleteRequest{ + ApiService: a, + ctx: ctx, + ansibleRoleRemoteHref: ansibleRoleRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesRoleAPIService) RemotesAnsibleRoleDeleteExecute(r RemotesRoleAPIRemotesAnsibleRoleDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRoleAPIService.RemotesAnsibleRoleDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_role_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_role_remote_href"+"}", parameterValueToString(r.ansibleRoleRemoteHref, "ansibleRoleRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRoleAPIRemotesAnsibleRoleListRequest struct { + ctx context.Context + ApiService *RemotesRoleAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpLastUpdated *time.Time + pulpLastUpdatedGt *time.Time + pulpLastUpdatedGte *time.Time + pulpLastUpdatedLt *time.Time + pulpLastUpdatedLte *time.Time + pulpLastUpdatedRange *[]time.Time + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) Limit(limit int32) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) Name(name string) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) NameContains(nameContains string) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) NameIcontains(nameIcontains string) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) NameIn(nameIn []string) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) NameStartswith(nameStartswith string) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) Offset(offset int32) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) Ordering(ordering []string) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) PulpHrefIn(pulpHrefIn []string) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) PulpIdIn(pulpIdIn []string) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) PulpLabelSelect(pulpLabelSelect string) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where pulp_last_updated matches value +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) PulpLastUpdated(pulpLastUpdated time.Time) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.pulpLastUpdated = &pulpLastUpdated + return r +} + +// Filter results where pulp_last_updated is greater than value +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) PulpLastUpdatedGt(pulpLastUpdatedGt time.Time) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.pulpLastUpdatedGt = &pulpLastUpdatedGt + return r +} + +// Filter results where pulp_last_updated is greater than or equal to value +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) PulpLastUpdatedGte(pulpLastUpdatedGte time.Time) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.pulpLastUpdatedGte = &pulpLastUpdatedGte + return r +} + +// Filter results where pulp_last_updated is less than value +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) PulpLastUpdatedLt(pulpLastUpdatedLt time.Time) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.pulpLastUpdatedLt = &pulpLastUpdatedLt + return r +} + +// Filter results where pulp_last_updated is less than or equal to value +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) PulpLastUpdatedLte(pulpLastUpdatedLte time.Time) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.pulpLastUpdatedLte = &pulpLastUpdatedLte + return r +} + +// Filter results where pulp_last_updated is between two comma separated values +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) PulpLastUpdatedRange(pulpLastUpdatedRange []time.Time) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.pulpLastUpdatedRange = &pulpLastUpdatedRange + return r +} + +// A list of fields to include in the response. +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) Fields(fields []string) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) ExcludeFields(excludeFields []string) RemotesRoleAPIRemotesAnsibleRoleListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesRoleAPIRemotesAnsibleRoleListRequest) Execute() (*PaginatedansibleRoleRemoteResponseList, *http.Response, error) { + return r.ApiService.RemotesAnsibleRoleListExecute(r) +} + +/* +RemotesAnsibleRoleList List role remotes + +ViewSet for Role Remotes. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesRoleAPIRemotesAnsibleRoleListRequest +*/ +func (a *RemotesRoleAPIService) RemotesAnsibleRoleList(ctx context.Context) RemotesRoleAPIRemotesAnsibleRoleListRequest { + return RemotesRoleAPIRemotesAnsibleRoleListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedansibleRoleRemoteResponseList +func (a *RemotesRoleAPIService) RemotesAnsibleRoleListExecute(r RemotesRoleAPIRemotesAnsibleRoleListRequest) (*PaginatedansibleRoleRemoteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleRoleRemoteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRoleAPIService.RemotesAnsibleRoleList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/ansible/role/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpLastUpdated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated", r.pulpLastUpdated, "") + } + if r.pulpLastUpdatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gt", r.pulpLastUpdatedGt, "") + } + if r.pulpLastUpdatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gte", r.pulpLastUpdatedGte, "") + } + if r.pulpLastUpdatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lt", r.pulpLastUpdatedLt, "") + } + if r.pulpLastUpdatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lte", r.pulpLastUpdatedLte, "") + } + if r.pulpLastUpdatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__range", r.pulpLastUpdatedRange, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRoleAPIRemotesAnsibleRoleListRolesRequest struct { + ctx context.Context + ApiService *RemotesRoleAPIService + ansibleRoleRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesRoleAPIRemotesAnsibleRoleListRolesRequest) Fields(fields []string) RemotesRoleAPIRemotesAnsibleRoleListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesRoleAPIRemotesAnsibleRoleListRolesRequest) ExcludeFields(excludeFields []string) RemotesRoleAPIRemotesAnsibleRoleListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesRoleAPIRemotesAnsibleRoleListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleRoleListRolesExecute(r) +} + +/* +RemotesAnsibleRoleListRoles Method for RemotesAnsibleRoleListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleRoleRemoteHref + @return RemotesRoleAPIRemotesAnsibleRoleListRolesRequest +*/ +func (a *RemotesRoleAPIService) RemotesAnsibleRoleListRoles(ctx context.Context, ansibleRoleRemoteHref string) RemotesRoleAPIRemotesAnsibleRoleListRolesRequest { + return RemotesRoleAPIRemotesAnsibleRoleListRolesRequest{ + ApiService: a, + ctx: ctx, + ansibleRoleRemoteHref: ansibleRoleRemoteHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *RemotesRoleAPIService) RemotesAnsibleRoleListRolesExecute(r RemotesRoleAPIRemotesAnsibleRoleListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRoleAPIService.RemotesAnsibleRoleListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_role_remote_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_role_remote_href"+"}", parameterValueToString(r.ansibleRoleRemoteHref, "ansibleRoleRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRoleAPIRemotesAnsibleRoleMyPermissionsRequest struct { + ctx context.Context + ApiService *RemotesRoleAPIService + ansibleRoleRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesRoleAPIRemotesAnsibleRoleMyPermissionsRequest) Fields(fields []string) RemotesRoleAPIRemotesAnsibleRoleMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesRoleAPIRemotesAnsibleRoleMyPermissionsRequest) ExcludeFields(excludeFields []string) RemotesRoleAPIRemotesAnsibleRoleMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesRoleAPIRemotesAnsibleRoleMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleRoleMyPermissionsExecute(r) +} + +/* +RemotesAnsibleRoleMyPermissions Method for RemotesAnsibleRoleMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleRoleRemoteHref + @return RemotesRoleAPIRemotesAnsibleRoleMyPermissionsRequest +*/ +func (a *RemotesRoleAPIService) RemotesAnsibleRoleMyPermissions(ctx context.Context, ansibleRoleRemoteHref string) RemotesRoleAPIRemotesAnsibleRoleMyPermissionsRequest { + return RemotesRoleAPIRemotesAnsibleRoleMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + ansibleRoleRemoteHref: ansibleRoleRemoteHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *RemotesRoleAPIService) RemotesAnsibleRoleMyPermissionsExecute(r RemotesRoleAPIRemotesAnsibleRoleMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRoleAPIService.RemotesAnsibleRoleMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_role_remote_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_role_remote_href"+"}", parameterValueToString(r.ansibleRoleRemoteHref, "ansibleRoleRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRoleAPIRemotesAnsibleRolePartialUpdateRequest struct { + ctx context.Context + ApiService *RemotesRoleAPIService + ansibleRoleRemoteHref string + patchedansibleRoleRemote *PatchedansibleRoleRemote +} + +func (r RemotesRoleAPIRemotesAnsibleRolePartialUpdateRequest) PatchedansibleRoleRemote(patchedansibleRoleRemote PatchedansibleRoleRemote) RemotesRoleAPIRemotesAnsibleRolePartialUpdateRequest { + r.patchedansibleRoleRemote = &patchedansibleRoleRemote + return r +} + +func (r RemotesRoleAPIRemotesAnsibleRolePartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleRolePartialUpdateExecute(r) +} + +/* +RemotesAnsibleRolePartialUpdate Update a role remote + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleRoleRemoteHref + @return RemotesRoleAPIRemotesAnsibleRolePartialUpdateRequest +*/ +func (a *RemotesRoleAPIService) RemotesAnsibleRolePartialUpdate(ctx context.Context, ansibleRoleRemoteHref string) RemotesRoleAPIRemotesAnsibleRolePartialUpdateRequest { + return RemotesRoleAPIRemotesAnsibleRolePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + ansibleRoleRemoteHref: ansibleRoleRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesRoleAPIService) RemotesAnsibleRolePartialUpdateExecute(r RemotesRoleAPIRemotesAnsibleRolePartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRoleAPIService.RemotesAnsibleRolePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_role_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_role_remote_href"+"}", parameterValueToString(r.ansibleRoleRemoteHref, "ansibleRoleRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedansibleRoleRemote == nil { + return localVarReturnValue, nil, reportError("patchedansibleRoleRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedansibleRoleRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRoleAPIRemotesAnsibleRoleReadRequest struct { + ctx context.Context + ApiService *RemotesRoleAPIService + ansibleRoleRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesRoleAPIRemotesAnsibleRoleReadRequest) Fields(fields []string) RemotesRoleAPIRemotesAnsibleRoleReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesRoleAPIRemotesAnsibleRoleReadRequest) ExcludeFields(excludeFields []string) RemotesRoleAPIRemotesAnsibleRoleReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesRoleAPIRemotesAnsibleRoleReadRequest) Execute() (*AnsibleRoleRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleRoleReadExecute(r) +} + +/* +RemotesAnsibleRoleRead Inspect a role remote + +ViewSet for Role Remotes. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleRoleRemoteHref + @return RemotesRoleAPIRemotesAnsibleRoleReadRequest +*/ +func (a *RemotesRoleAPIService) RemotesAnsibleRoleRead(ctx context.Context, ansibleRoleRemoteHref string) RemotesRoleAPIRemotesAnsibleRoleReadRequest { + return RemotesRoleAPIRemotesAnsibleRoleReadRequest{ + ApiService: a, + ctx: ctx, + ansibleRoleRemoteHref: ansibleRoleRemoteHref, + } +} + +// Execute executes the request +// @return AnsibleRoleRemoteResponse +func (a *RemotesRoleAPIService) RemotesAnsibleRoleReadExecute(r RemotesRoleAPIRemotesAnsibleRoleReadRequest) (*AnsibleRoleRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleRoleRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRoleAPIService.RemotesAnsibleRoleRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_role_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_role_remote_href"+"}", parameterValueToString(r.ansibleRoleRemoteHref, "ansibleRoleRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRoleAPIRemotesAnsibleRoleRemoveRoleRequest struct { + ctx context.Context + ApiService *RemotesRoleAPIService + ansibleRoleRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesRoleAPIRemotesAnsibleRoleRemoveRoleRequest) NestedRole(nestedRole NestedRole) RemotesRoleAPIRemotesAnsibleRoleRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesRoleAPIRemotesAnsibleRoleRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleRoleRemoveRoleExecute(r) +} + +/* +RemotesAnsibleRoleRemoveRole Method for RemotesAnsibleRoleRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleRoleRemoteHref + @return RemotesRoleAPIRemotesAnsibleRoleRemoveRoleRequest +*/ +func (a *RemotesRoleAPIService) RemotesAnsibleRoleRemoveRole(ctx context.Context, ansibleRoleRemoteHref string) RemotesRoleAPIRemotesAnsibleRoleRemoveRoleRequest { + return RemotesRoleAPIRemotesAnsibleRoleRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + ansibleRoleRemoteHref: ansibleRoleRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesRoleAPIService) RemotesAnsibleRoleRemoveRoleExecute(r RemotesRoleAPIRemotesAnsibleRoleRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRoleAPIService.RemotesAnsibleRoleRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_role_remote_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_role_remote_href"+"}", parameterValueToString(r.ansibleRoleRemoteHref, "ansibleRoleRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRoleAPIRemotesAnsibleRoleUpdateRequest struct { + ctx context.Context + ApiService *RemotesRoleAPIService + ansibleRoleRemoteHref string + ansibleRoleRemote *AnsibleRoleRemote +} + +func (r RemotesRoleAPIRemotesAnsibleRoleUpdateRequest) AnsibleRoleRemote(ansibleRoleRemote AnsibleRoleRemote) RemotesRoleAPIRemotesAnsibleRoleUpdateRequest { + r.ansibleRoleRemote = &ansibleRoleRemote + return r +} + +func (r RemotesRoleAPIRemotesAnsibleRoleUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesAnsibleRoleUpdateExecute(r) +} + +/* +RemotesAnsibleRoleUpdate Update a role remote + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleRoleRemoteHref + @return RemotesRoleAPIRemotesAnsibleRoleUpdateRequest +*/ +func (a *RemotesRoleAPIService) RemotesAnsibleRoleUpdate(ctx context.Context, ansibleRoleRemoteHref string) RemotesRoleAPIRemotesAnsibleRoleUpdateRequest { + return RemotesRoleAPIRemotesAnsibleRoleUpdateRequest{ + ApiService: a, + ctx: ctx, + ansibleRoleRemoteHref: ansibleRoleRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesRoleAPIService) RemotesAnsibleRoleUpdateExecute(r RemotesRoleAPIRemotesAnsibleRoleUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRoleAPIService.RemotesAnsibleRoleUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_role_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_role_remote_href"+"}", parameterValueToString(r.ansibleRoleRemoteHref, "ansibleRoleRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleRoleRemote == nil { + return localVarReturnValue, nil, reportError("ansibleRoleRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleRoleRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_rpm.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_rpm.go new file mode 100644 index 0000000000..6f635c079a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_rpm.go @@ -0,0 +1,1418 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RemotesRpmAPIService RemotesRpmAPI service +type RemotesRpmAPIService service + +type RemotesRpmAPIRemotesRpmRpmAddRoleRequest struct { + ctx context.Context + ApiService *RemotesRpmAPIService + rpmRpmRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesRpmAPIRemotesRpmRpmAddRoleRequest) NestedRole(nestedRole NestedRole) RemotesRpmAPIRemotesRpmRpmAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesRpmAPIRemotesRpmRpmAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesRpmRpmAddRoleExecute(r) +} + +/* +RemotesRpmRpmAddRole Method for RemotesRpmRpmAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRemoteHref + @return RemotesRpmAPIRemotesRpmRpmAddRoleRequest +*/ +func (a *RemotesRpmAPIService) RemotesRpmRpmAddRole(ctx context.Context, rpmRpmRemoteHref string) RemotesRpmAPIRemotesRpmRpmAddRoleRequest { + return RemotesRpmAPIRemotesRpmRpmAddRoleRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRemoteHref: rpmRpmRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesRpmAPIService) RemotesRpmRpmAddRoleExecute(r RemotesRpmAPIRemotesRpmRpmAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRpmAPIService.RemotesRpmRpmAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_remote_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_remote_href"+"}", parameterValueToString(r.rpmRpmRemoteHref, "rpmRpmRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRpmAPIRemotesRpmRpmCreateRequest struct { + ctx context.Context + ApiService *RemotesRpmAPIService + rpmRpmRemote *RpmRpmRemote +} + +func (r RemotesRpmAPIRemotesRpmRpmCreateRequest) RpmRpmRemote(rpmRpmRemote RpmRpmRemote) RemotesRpmAPIRemotesRpmRpmCreateRequest { + r.rpmRpmRemote = &rpmRpmRemote + return r +} + +func (r RemotesRpmAPIRemotesRpmRpmCreateRequest) Execute() (*RpmRpmRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesRpmRpmCreateExecute(r) +} + +/* +RemotesRpmRpmCreate Create a rpm remote + +A ViewSet for RpmRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesRpmAPIRemotesRpmRpmCreateRequest +*/ +func (a *RemotesRpmAPIService) RemotesRpmRpmCreate(ctx context.Context) RemotesRpmAPIRemotesRpmRpmCreateRequest { + return RemotesRpmAPIRemotesRpmRpmCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return RpmRpmRemoteResponse +func (a *RemotesRpmAPIService) RemotesRpmRpmCreateExecute(r RemotesRpmAPIRemotesRpmRpmCreateRequest) (*RpmRpmRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmRpmRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRpmAPIService.RemotesRpmRpmCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/rpm/rpm/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmRpmRemote == nil { + return localVarReturnValue, nil, reportError("rpmRpmRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmRpmRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRpmAPIRemotesRpmRpmDeleteRequest struct { + ctx context.Context + ApiService *RemotesRpmAPIService + rpmRpmRemoteHref string +} + +func (r RemotesRpmAPIRemotesRpmRpmDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesRpmRpmDeleteExecute(r) +} + +/* +RemotesRpmRpmDelete Delete a rpm remote + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRemoteHref + @return RemotesRpmAPIRemotesRpmRpmDeleteRequest +*/ +func (a *RemotesRpmAPIService) RemotesRpmRpmDelete(ctx context.Context, rpmRpmRemoteHref string) RemotesRpmAPIRemotesRpmRpmDeleteRequest { + return RemotesRpmAPIRemotesRpmRpmDeleteRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRemoteHref: rpmRpmRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesRpmAPIService) RemotesRpmRpmDeleteExecute(r RemotesRpmAPIRemotesRpmRpmDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRpmAPIService.RemotesRpmRpmDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_remote_href"+"}", parameterValueToString(r.rpmRpmRemoteHref, "rpmRpmRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRpmAPIRemotesRpmRpmListRequest struct { + ctx context.Context + ApiService *RemotesRpmAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpLastUpdated *time.Time + pulpLastUpdatedGt *time.Time + pulpLastUpdatedGte *time.Time + pulpLastUpdatedLt *time.Time + pulpLastUpdatedLte *time.Time + pulpLastUpdatedRange *[]time.Time + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r RemotesRpmAPIRemotesRpmRpmListRequest) Limit(limit int32) RemotesRpmAPIRemotesRpmRpmListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RemotesRpmAPIRemotesRpmRpmListRequest) Name(name string) RemotesRpmAPIRemotesRpmRpmListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RemotesRpmAPIRemotesRpmRpmListRequest) NameContains(nameContains string) RemotesRpmAPIRemotesRpmRpmListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RemotesRpmAPIRemotesRpmRpmListRequest) NameIcontains(nameIcontains string) RemotesRpmAPIRemotesRpmRpmListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RemotesRpmAPIRemotesRpmRpmListRequest) NameIn(nameIn []string) RemotesRpmAPIRemotesRpmRpmListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RemotesRpmAPIRemotesRpmRpmListRequest) NameStartswith(nameStartswith string) RemotesRpmAPIRemotesRpmRpmListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RemotesRpmAPIRemotesRpmRpmListRequest) Offset(offset int32) RemotesRpmAPIRemotesRpmRpmListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RemotesRpmAPIRemotesRpmRpmListRequest) Ordering(ordering []string) RemotesRpmAPIRemotesRpmRpmListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RemotesRpmAPIRemotesRpmRpmListRequest) PulpHrefIn(pulpHrefIn []string) RemotesRpmAPIRemotesRpmRpmListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RemotesRpmAPIRemotesRpmRpmListRequest) PulpIdIn(pulpIdIn []string) RemotesRpmAPIRemotesRpmRpmListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RemotesRpmAPIRemotesRpmRpmListRequest) PulpLabelSelect(pulpLabelSelect string) RemotesRpmAPIRemotesRpmRpmListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where pulp_last_updated matches value +func (r RemotesRpmAPIRemotesRpmRpmListRequest) PulpLastUpdated(pulpLastUpdated time.Time) RemotesRpmAPIRemotesRpmRpmListRequest { + r.pulpLastUpdated = &pulpLastUpdated + return r +} + +// Filter results where pulp_last_updated is greater than value +func (r RemotesRpmAPIRemotesRpmRpmListRequest) PulpLastUpdatedGt(pulpLastUpdatedGt time.Time) RemotesRpmAPIRemotesRpmRpmListRequest { + r.pulpLastUpdatedGt = &pulpLastUpdatedGt + return r +} + +// Filter results where pulp_last_updated is greater than or equal to value +func (r RemotesRpmAPIRemotesRpmRpmListRequest) PulpLastUpdatedGte(pulpLastUpdatedGte time.Time) RemotesRpmAPIRemotesRpmRpmListRequest { + r.pulpLastUpdatedGte = &pulpLastUpdatedGte + return r +} + +// Filter results where pulp_last_updated is less than value +func (r RemotesRpmAPIRemotesRpmRpmListRequest) PulpLastUpdatedLt(pulpLastUpdatedLt time.Time) RemotesRpmAPIRemotesRpmRpmListRequest { + r.pulpLastUpdatedLt = &pulpLastUpdatedLt + return r +} + +// Filter results where pulp_last_updated is less than or equal to value +func (r RemotesRpmAPIRemotesRpmRpmListRequest) PulpLastUpdatedLte(pulpLastUpdatedLte time.Time) RemotesRpmAPIRemotesRpmRpmListRequest { + r.pulpLastUpdatedLte = &pulpLastUpdatedLte + return r +} + +// Filter results where pulp_last_updated is between two comma separated values +func (r RemotesRpmAPIRemotesRpmRpmListRequest) PulpLastUpdatedRange(pulpLastUpdatedRange []time.Time) RemotesRpmAPIRemotesRpmRpmListRequest { + r.pulpLastUpdatedRange = &pulpLastUpdatedRange + return r +} + +// A list of fields to include in the response. +func (r RemotesRpmAPIRemotesRpmRpmListRequest) Fields(fields []string) RemotesRpmAPIRemotesRpmRpmListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesRpmAPIRemotesRpmRpmListRequest) ExcludeFields(excludeFields []string) RemotesRpmAPIRemotesRpmRpmListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesRpmAPIRemotesRpmRpmListRequest) Execute() (*PaginatedrpmRpmRemoteResponseList, *http.Response, error) { + return r.ApiService.RemotesRpmRpmListExecute(r) +} + +/* +RemotesRpmRpmList List rpm remotes + +A ViewSet for RpmRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesRpmAPIRemotesRpmRpmListRequest +*/ +func (a *RemotesRpmAPIService) RemotesRpmRpmList(ctx context.Context) RemotesRpmAPIRemotesRpmRpmListRequest { + return RemotesRpmAPIRemotesRpmRpmListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmRpmRemoteResponseList +func (a *RemotesRpmAPIService) RemotesRpmRpmListExecute(r RemotesRpmAPIRemotesRpmRpmListRequest) (*PaginatedrpmRpmRemoteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmRpmRemoteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRpmAPIService.RemotesRpmRpmList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/rpm/rpm/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpLastUpdated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated", r.pulpLastUpdated, "") + } + if r.pulpLastUpdatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gt", r.pulpLastUpdatedGt, "") + } + if r.pulpLastUpdatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gte", r.pulpLastUpdatedGte, "") + } + if r.pulpLastUpdatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lt", r.pulpLastUpdatedLt, "") + } + if r.pulpLastUpdatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lte", r.pulpLastUpdatedLte, "") + } + if r.pulpLastUpdatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__range", r.pulpLastUpdatedRange, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRpmAPIRemotesRpmRpmListRolesRequest struct { + ctx context.Context + ApiService *RemotesRpmAPIService + rpmRpmRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesRpmAPIRemotesRpmRpmListRolesRequest) Fields(fields []string) RemotesRpmAPIRemotesRpmRpmListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesRpmAPIRemotesRpmRpmListRolesRequest) ExcludeFields(excludeFields []string) RemotesRpmAPIRemotesRpmRpmListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesRpmAPIRemotesRpmRpmListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.RemotesRpmRpmListRolesExecute(r) +} + +/* +RemotesRpmRpmListRoles Method for RemotesRpmRpmListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRemoteHref + @return RemotesRpmAPIRemotesRpmRpmListRolesRequest +*/ +func (a *RemotesRpmAPIService) RemotesRpmRpmListRoles(ctx context.Context, rpmRpmRemoteHref string) RemotesRpmAPIRemotesRpmRpmListRolesRequest { + return RemotesRpmAPIRemotesRpmRpmListRolesRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRemoteHref: rpmRpmRemoteHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *RemotesRpmAPIService) RemotesRpmRpmListRolesExecute(r RemotesRpmAPIRemotesRpmRpmListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRpmAPIService.RemotesRpmRpmListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_remote_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_remote_href"+"}", parameterValueToString(r.rpmRpmRemoteHref, "rpmRpmRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRpmAPIRemotesRpmRpmMyPermissionsRequest struct { + ctx context.Context + ApiService *RemotesRpmAPIService + rpmRpmRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesRpmAPIRemotesRpmRpmMyPermissionsRequest) Fields(fields []string) RemotesRpmAPIRemotesRpmRpmMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesRpmAPIRemotesRpmRpmMyPermissionsRequest) ExcludeFields(excludeFields []string) RemotesRpmAPIRemotesRpmRpmMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesRpmAPIRemotesRpmRpmMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.RemotesRpmRpmMyPermissionsExecute(r) +} + +/* +RemotesRpmRpmMyPermissions Method for RemotesRpmRpmMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRemoteHref + @return RemotesRpmAPIRemotesRpmRpmMyPermissionsRequest +*/ +func (a *RemotesRpmAPIService) RemotesRpmRpmMyPermissions(ctx context.Context, rpmRpmRemoteHref string) RemotesRpmAPIRemotesRpmRpmMyPermissionsRequest { + return RemotesRpmAPIRemotesRpmRpmMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRemoteHref: rpmRpmRemoteHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *RemotesRpmAPIService) RemotesRpmRpmMyPermissionsExecute(r RemotesRpmAPIRemotesRpmRpmMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRpmAPIService.RemotesRpmRpmMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_remote_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_remote_href"+"}", parameterValueToString(r.rpmRpmRemoteHref, "rpmRpmRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRpmAPIRemotesRpmRpmPartialUpdateRequest struct { + ctx context.Context + ApiService *RemotesRpmAPIService + rpmRpmRemoteHref string + patchedrpmRpmRemote *PatchedrpmRpmRemote +} + +func (r RemotesRpmAPIRemotesRpmRpmPartialUpdateRequest) PatchedrpmRpmRemote(patchedrpmRpmRemote PatchedrpmRpmRemote) RemotesRpmAPIRemotesRpmRpmPartialUpdateRequest { + r.patchedrpmRpmRemote = &patchedrpmRpmRemote + return r +} + +func (r RemotesRpmAPIRemotesRpmRpmPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesRpmRpmPartialUpdateExecute(r) +} + +/* +RemotesRpmRpmPartialUpdate Update a rpm remote + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRemoteHref + @return RemotesRpmAPIRemotesRpmRpmPartialUpdateRequest +*/ +func (a *RemotesRpmAPIService) RemotesRpmRpmPartialUpdate(ctx context.Context, rpmRpmRemoteHref string) RemotesRpmAPIRemotesRpmRpmPartialUpdateRequest { + return RemotesRpmAPIRemotesRpmRpmPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRemoteHref: rpmRpmRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesRpmAPIService) RemotesRpmRpmPartialUpdateExecute(r RemotesRpmAPIRemotesRpmRpmPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRpmAPIService.RemotesRpmRpmPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_remote_href"+"}", parameterValueToString(r.rpmRpmRemoteHref, "rpmRpmRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedrpmRpmRemote == nil { + return localVarReturnValue, nil, reportError("patchedrpmRpmRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedrpmRpmRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRpmAPIRemotesRpmRpmReadRequest struct { + ctx context.Context + ApiService *RemotesRpmAPIService + rpmRpmRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesRpmAPIRemotesRpmRpmReadRequest) Fields(fields []string) RemotesRpmAPIRemotesRpmRpmReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesRpmAPIRemotesRpmRpmReadRequest) ExcludeFields(excludeFields []string) RemotesRpmAPIRemotesRpmRpmReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesRpmAPIRemotesRpmRpmReadRequest) Execute() (*RpmRpmRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesRpmRpmReadExecute(r) +} + +/* +RemotesRpmRpmRead Inspect a rpm remote + +A ViewSet for RpmRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRemoteHref + @return RemotesRpmAPIRemotesRpmRpmReadRequest +*/ +func (a *RemotesRpmAPIService) RemotesRpmRpmRead(ctx context.Context, rpmRpmRemoteHref string) RemotesRpmAPIRemotesRpmRpmReadRequest { + return RemotesRpmAPIRemotesRpmRpmReadRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRemoteHref: rpmRpmRemoteHref, + } +} + +// Execute executes the request +// @return RpmRpmRemoteResponse +func (a *RemotesRpmAPIService) RemotesRpmRpmReadExecute(r RemotesRpmAPIRemotesRpmRpmReadRequest) (*RpmRpmRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmRpmRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRpmAPIService.RemotesRpmRpmRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_remote_href"+"}", parameterValueToString(r.rpmRpmRemoteHref, "rpmRpmRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRpmAPIRemotesRpmRpmRemoveRoleRequest struct { + ctx context.Context + ApiService *RemotesRpmAPIService + rpmRpmRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesRpmAPIRemotesRpmRpmRemoveRoleRequest) NestedRole(nestedRole NestedRole) RemotesRpmAPIRemotesRpmRpmRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesRpmAPIRemotesRpmRpmRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesRpmRpmRemoveRoleExecute(r) +} + +/* +RemotesRpmRpmRemoveRole Method for RemotesRpmRpmRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRemoteHref + @return RemotesRpmAPIRemotesRpmRpmRemoveRoleRequest +*/ +func (a *RemotesRpmAPIService) RemotesRpmRpmRemoveRole(ctx context.Context, rpmRpmRemoteHref string) RemotesRpmAPIRemotesRpmRpmRemoveRoleRequest { + return RemotesRpmAPIRemotesRpmRpmRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRemoteHref: rpmRpmRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesRpmAPIService) RemotesRpmRpmRemoveRoleExecute(r RemotesRpmAPIRemotesRpmRpmRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRpmAPIService.RemotesRpmRpmRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_remote_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_remote_href"+"}", parameterValueToString(r.rpmRpmRemoteHref, "rpmRpmRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesRpmAPIRemotesRpmRpmUpdateRequest struct { + ctx context.Context + ApiService *RemotesRpmAPIService + rpmRpmRemoteHref string + rpmRpmRemote *RpmRpmRemote +} + +func (r RemotesRpmAPIRemotesRpmRpmUpdateRequest) RpmRpmRemote(rpmRpmRemote RpmRpmRemote) RemotesRpmAPIRemotesRpmRpmUpdateRequest { + r.rpmRpmRemote = &rpmRpmRemote + return r +} + +func (r RemotesRpmAPIRemotesRpmRpmUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesRpmRpmUpdateExecute(r) +} + +/* +RemotesRpmRpmUpdate Update a rpm remote + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRemoteHref + @return RemotesRpmAPIRemotesRpmRpmUpdateRequest +*/ +func (a *RemotesRpmAPIService) RemotesRpmRpmUpdate(ctx context.Context, rpmRpmRemoteHref string) RemotesRpmAPIRemotesRpmRpmUpdateRequest { + return RemotesRpmAPIRemotesRpmRpmUpdateRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRemoteHref: rpmRpmRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesRpmAPIService) RemotesRpmRpmUpdateExecute(r RemotesRpmAPIRemotesRpmRpmUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesRpmAPIService.RemotesRpmRpmUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_remote_href"+"}", parameterValueToString(r.rpmRpmRemoteHref, "rpmRpmRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmRpmRemote == nil { + return localVarReturnValue, nil, reportError("rpmRpmRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmRpmRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_uln.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_uln.go new file mode 100644 index 0000000000..7445b90a2b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_remotes_uln.go @@ -0,0 +1,1418 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RemotesUlnAPIService RemotesUlnAPI service +type RemotesUlnAPIService service + +type RemotesUlnAPIRemotesRpmUlnAddRoleRequest struct { + ctx context.Context + ApiService *RemotesUlnAPIService + rpmUlnRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesUlnAPIRemotesRpmUlnAddRoleRequest) NestedRole(nestedRole NestedRole) RemotesUlnAPIRemotesRpmUlnAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesUlnAPIRemotesRpmUlnAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesRpmUlnAddRoleExecute(r) +} + +/* +RemotesRpmUlnAddRole Method for RemotesRpmUlnAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmUlnRemoteHref + @return RemotesUlnAPIRemotesRpmUlnAddRoleRequest +*/ +func (a *RemotesUlnAPIService) RemotesRpmUlnAddRole(ctx context.Context, rpmUlnRemoteHref string) RemotesUlnAPIRemotesRpmUlnAddRoleRequest { + return RemotesUlnAPIRemotesRpmUlnAddRoleRequest{ + ApiService: a, + ctx: ctx, + rpmUlnRemoteHref: rpmUlnRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesUlnAPIService) RemotesRpmUlnAddRoleExecute(r RemotesUlnAPIRemotesRpmUlnAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesUlnAPIService.RemotesRpmUlnAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_uln_remote_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_uln_remote_href"+"}", parameterValueToString(r.rpmUlnRemoteHref, "rpmUlnRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesUlnAPIRemotesRpmUlnCreateRequest struct { + ctx context.Context + ApiService *RemotesUlnAPIService + rpmUlnRemote *RpmUlnRemote +} + +func (r RemotesUlnAPIRemotesRpmUlnCreateRequest) RpmUlnRemote(rpmUlnRemote RpmUlnRemote) RemotesUlnAPIRemotesRpmUlnCreateRequest { + r.rpmUlnRemote = &rpmUlnRemote + return r +} + +func (r RemotesUlnAPIRemotesRpmUlnCreateRequest) Execute() (*RpmUlnRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesRpmUlnCreateExecute(r) +} + +/* +RemotesRpmUlnCreate Create an uln remote + +A ViewSet for UlnRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesUlnAPIRemotesRpmUlnCreateRequest +*/ +func (a *RemotesUlnAPIService) RemotesRpmUlnCreate(ctx context.Context) RemotesUlnAPIRemotesRpmUlnCreateRequest { + return RemotesUlnAPIRemotesRpmUlnCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return RpmUlnRemoteResponse +func (a *RemotesUlnAPIService) RemotesRpmUlnCreateExecute(r RemotesUlnAPIRemotesRpmUlnCreateRequest) (*RpmUlnRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmUlnRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesUlnAPIService.RemotesRpmUlnCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/rpm/uln/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmUlnRemote == nil { + return localVarReturnValue, nil, reportError("rpmUlnRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmUlnRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesUlnAPIRemotesRpmUlnDeleteRequest struct { + ctx context.Context + ApiService *RemotesUlnAPIService + rpmUlnRemoteHref string +} + +func (r RemotesUlnAPIRemotesRpmUlnDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesRpmUlnDeleteExecute(r) +} + +/* +RemotesRpmUlnDelete Delete an uln remote + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmUlnRemoteHref + @return RemotesUlnAPIRemotesRpmUlnDeleteRequest +*/ +func (a *RemotesUlnAPIService) RemotesRpmUlnDelete(ctx context.Context, rpmUlnRemoteHref string) RemotesUlnAPIRemotesRpmUlnDeleteRequest { + return RemotesUlnAPIRemotesRpmUlnDeleteRequest{ + ApiService: a, + ctx: ctx, + rpmUlnRemoteHref: rpmUlnRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesUlnAPIService) RemotesRpmUlnDeleteExecute(r RemotesUlnAPIRemotesRpmUlnDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesUlnAPIService.RemotesRpmUlnDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_uln_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_uln_remote_href"+"}", parameterValueToString(r.rpmUlnRemoteHref, "rpmUlnRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesUlnAPIRemotesRpmUlnListRequest struct { + ctx context.Context + ApiService *RemotesUlnAPIService + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpLastUpdated *time.Time + pulpLastUpdatedGt *time.Time + pulpLastUpdatedGte *time.Time + pulpLastUpdatedLt *time.Time + pulpLastUpdatedLte *time.Time + pulpLastUpdatedRange *[]time.Time + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r RemotesUlnAPIRemotesRpmUlnListRequest) Limit(limit int32) RemotesUlnAPIRemotesRpmUlnListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RemotesUlnAPIRemotesRpmUlnListRequest) Name(name string) RemotesUlnAPIRemotesRpmUlnListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RemotesUlnAPIRemotesRpmUlnListRequest) NameContains(nameContains string) RemotesUlnAPIRemotesRpmUlnListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RemotesUlnAPIRemotesRpmUlnListRequest) NameIcontains(nameIcontains string) RemotesUlnAPIRemotesRpmUlnListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RemotesUlnAPIRemotesRpmUlnListRequest) NameIn(nameIn []string) RemotesUlnAPIRemotesRpmUlnListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RemotesUlnAPIRemotesRpmUlnListRequest) NameStartswith(nameStartswith string) RemotesUlnAPIRemotesRpmUlnListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RemotesUlnAPIRemotesRpmUlnListRequest) Offset(offset int32) RemotesUlnAPIRemotesRpmUlnListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RemotesUlnAPIRemotesRpmUlnListRequest) Ordering(ordering []string) RemotesUlnAPIRemotesRpmUlnListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RemotesUlnAPIRemotesRpmUlnListRequest) PulpHrefIn(pulpHrefIn []string) RemotesUlnAPIRemotesRpmUlnListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RemotesUlnAPIRemotesRpmUlnListRequest) PulpIdIn(pulpIdIn []string) RemotesUlnAPIRemotesRpmUlnListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RemotesUlnAPIRemotesRpmUlnListRequest) PulpLabelSelect(pulpLabelSelect string) RemotesUlnAPIRemotesRpmUlnListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Filter results where pulp_last_updated matches value +func (r RemotesUlnAPIRemotesRpmUlnListRequest) PulpLastUpdated(pulpLastUpdated time.Time) RemotesUlnAPIRemotesRpmUlnListRequest { + r.pulpLastUpdated = &pulpLastUpdated + return r +} + +// Filter results where pulp_last_updated is greater than value +func (r RemotesUlnAPIRemotesRpmUlnListRequest) PulpLastUpdatedGt(pulpLastUpdatedGt time.Time) RemotesUlnAPIRemotesRpmUlnListRequest { + r.pulpLastUpdatedGt = &pulpLastUpdatedGt + return r +} + +// Filter results where pulp_last_updated is greater than or equal to value +func (r RemotesUlnAPIRemotesRpmUlnListRequest) PulpLastUpdatedGte(pulpLastUpdatedGte time.Time) RemotesUlnAPIRemotesRpmUlnListRequest { + r.pulpLastUpdatedGte = &pulpLastUpdatedGte + return r +} + +// Filter results where pulp_last_updated is less than value +func (r RemotesUlnAPIRemotesRpmUlnListRequest) PulpLastUpdatedLt(pulpLastUpdatedLt time.Time) RemotesUlnAPIRemotesRpmUlnListRequest { + r.pulpLastUpdatedLt = &pulpLastUpdatedLt + return r +} + +// Filter results where pulp_last_updated is less than or equal to value +func (r RemotesUlnAPIRemotesRpmUlnListRequest) PulpLastUpdatedLte(pulpLastUpdatedLte time.Time) RemotesUlnAPIRemotesRpmUlnListRequest { + r.pulpLastUpdatedLte = &pulpLastUpdatedLte + return r +} + +// Filter results where pulp_last_updated is between two comma separated values +func (r RemotesUlnAPIRemotesRpmUlnListRequest) PulpLastUpdatedRange(pulpLastUpdatedRange []time.Time) RemotesUlnAPIRemotesRpmUlnListRequest { + r.pulpLastUpdatedRange = &pulpLastUpdatedRange + return r +} + +// A list of fields to include in the response. +func (r RemotesUlnAPIRemotesRpmUlnListRequest) Fields(fields []string) RemotesUlnAPIRemotesRpmUlnListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesUlnAPIRemotesRpmUlnListRequest) ExcludeFields(excludeFields []string) RemotesUlnAPIRemotesRpmUlnListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesUlnAPIRemotesRpmUlnListRequest) Execute() (*PaginatedrpmUlnRemoteResponseList, *http.Response, error) { + return r.ApiService.RemotesRpmUlnListExecute(r) +} + +/* +RemotesRpmUlnList List uln remotes + +A ViewSet for UlnRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RemotesUlnAPIRemotesRpmUlnListRequest +*/ +func (a *RemotesUlnAPIService) RemotesRpmUlnList(ctx context.Context) RemotesUlnAPIRemotesRpmUlnListRequest { + return RemotesUlnAPIRemotesRpmUlnListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmUlnRemoteResponseList +func (a *RemotesUlnAPIService) RemotesRpmUlnListExecute(r RemotesUlnAPIRemotesRpmUlnListRequest) (*PaginatedrpmUlnRemoteResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmUlnRemoteResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesUlnAPIService.RemotesRpmUlnList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/remotes/rpm/uln/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpLastUpdated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated", r.pulpLastUpdated, "") + } + if r.pulpLastUpdatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gt", r.pulpLastUpdatedGt, "") + } + if r.pulpLastUpdatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__gte", r.pulpLastUpdatedGte, "") + } + if r.pulpLastUpdatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lt", r.pulpLastUpdatedLt, "") + } + if r.pulpLastUpdatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__lte", r.pulpLastUpdatedLte, "") + } + if r.pulpLastUpdatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_last_updated__range", r.pulpLastUpdatedRange, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesUlnAPIRemotesRpmUlnListRolesRequest struct { + ctx context.Context + ApiService *RemotesUlnAPIService + rpmUlnRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesUlnAPIRemotesRpmUlnListRolesRequest) Fields(fields []string) RemotesUlnAPIRemotesRpmUlnListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesUlnAPIRemotesRpmUlnListRolesRequest) ExcludeFields(excludeFields []string) RemotesUlnAPIRemotesRpmUlnListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesUlnAPIRemotesRpmUlnListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.RemotesRpmUlnListRolesExecute(r) +} + +/* +RemotesRpmUlnListRoles Method for RemotesRpmUlnListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmUlnRemoteHref + @return RemotesUlnAPIRemotesRpmUlnListRolesRequest +*/ +func (a *RemotesUlnAPIService) RemotesRpmUlnListRoles(ctx context.Context, rpmUlnRemoteHref string) RemotesUlnAPIRemotesRpmUlnListRolesRequest { + return RemotesUlnAPIRemotesRpmUlnListRolesRequest{ + ApiService: a, + ctx: ctx, + rpmUlnRemoteHref: rpmUlnRemoteHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *RemotesUlnAPIService) RemotesRpmUlnListRolesExecute(r RemotesUlnAPIRemotesRpmUlnListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesUlnAPIService.RemotesRpmUlnListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_uln_remote_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_uln_remote_href"+"}", parameterValueToString(r.rpmUlnRemoteHref, "rpmUlnRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesUlnAPIRemotesRpmUlnMyPermissionsRequest struct { + ctx context.Context + ApiService *RemotesUlnAPIService + rpmUlnRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesUlnAPIRemotesRpmUlnMyPermissionsRequest) Fields(fields []string) RemotesUlnAPIRemotesRpmUlnMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesUlnAPIRemotesRpmUlnMyPermissionsRequest) ExcludeFields(excludeFields []string) RemotesUlnAPIRemotesRpmUlnMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesUlnAPIRemotesRpmUlnMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.RemotesRpmUlnMyPermissionsExecute(r) +} + +/* +RemotesRpmUlnMyPermissions Method for RemotesRpmUlnMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmUlnRemoteHref + @return RemotesUlnAPIRemotesRpmUlnMyPermissionsRequest +*/ +func (a *RemotesUlnAPIService) RemotesRpmUlnMyPermissions(ctx context.Context, rpmUlnRemoteHref string) RemotesUlnAPIRemotesRpmUlnMyPermissionsRequest { + return RemotesUlnAPIRemotesRpmUlnMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + rpmUlnRemoteHref: rpmUlnRemoteHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *RemotesUlnAPIService) RemotesRpmUlnMyPermissionsExecute(r RemotesUlnAPIRemotesRpmUlnMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesUlnAPIService.RemotesRpmUlnMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_uln_remote_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_uln_remote_href"+"}", parameterValueToString(r.rpmUlnRemoteHref, "rpmUlnRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesUlnAPIRemotesRpmUlnPartialUpdateRequest struct { + ctx context.Context + ApiService *RemotesUlnAPIService + rpmUlnRemoteHref string + patchedrpmUlnRemote *PatchedrpmUlnRemote +} + +func (r RemotesUlnAPIRemotesRpmUlnPartialUpdateRequest) PatchedrpmUlnRemote(patchedrpmUlnRemote PatchedrpmUlnRemote) RemotesUlnAPIRemotesRpmUlnPartialUpdateRequest { + r.patchedrpmUlnRemote = &patchedrpmUlnRemote + return r +} + +func (r RemotesUlnAPIRemotesRpmUlnPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesRpmUlnPartialUpdateExecute(r) +} + +/* +RemotesRpmUlnPartialUpdate Update an uln remote + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmUlnRemoteHref + @return RemotesUlnAPIRemotesRpmUlnPartialUpdateRequest +*/ +func (a *RemotesUlnAPIService) RemotesRpmUlnPartialUpdate(ctx context.Context, rpmUlnRemoteHref string) RemotesUlnAPIRemotesRpmUlnPartialUpdateRequest { + return RemotesUlnAPIRemotesRpmUlnPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + rpmUlnRemoteHref: rpmUlnRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesUlnAPIService) RemotesRpmUlnPartialUpdateExecute(r RemotesUlnAPIRemotesRpmUlnPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesUlnAPIService.RemotesRpmUlnPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_uln_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_uln_remote_href"+"}", parameterValueToString(r.rpmUlnRemoteHref, "rpmUlnRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedrpmUlnRemote == nil { + return localVarReturnValue, nil, reportError("patchedrpmUlnRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedrpmUlnRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesUlnAPIRemotesRpmUlnReadRequest struct { + ctx context.Context + ApiService *RemotesUlnAPIService + rpmUlnRemoteHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RemotesUlnAPIRemotesRpmUlnReadRequest) Fields(fields []string) RemotesUlnAPIRemotesRpmUlnReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RemotesUlnAPIRemotesRpmUlnReadRequest) ExcludeFields(excludeFields []string) RemotesUlnAPIRemotesRpmUlnReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RemotesUlnAPIRemotesRpmUlnReadRequest) Execute() (*RpmUlnRemoteResponse, *http.Response, error) { + return r.ApiService.RemotesRpmUlnReadExecute(r) +} + +/* +RemotesRpmUlnRead Inspect an uln remote + +A ViewSet for UlnRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmUlnRemoteHref + @return RemotesUlnAPIRemotesRpmUlnReadRequest +*/ +func (a *RemotesUlnAPIService) RemotesRpmUlnRead(ctx context.Context, rpmUlnRemoteHref string) RemotesUlnAPIRemotesRpmUlnReadRequest { + return RemotesUlnAPIRemotesRpmUlnReadRequest{ + ApiService: a, + ctx: ctx, + rpmUlnRemoteHref: rpmUlnRemoteHref, + } +} + +// Execute executes the request +// @return RpmUlnRemoteResponse +func (a *RemotesUlnAPIService) RemotesRpmUlnReadExecute(r RemotesUlnAPIRemotesRpmUlnReadRequest) (*RpmUlnRemoteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmUlnRemoteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesUlnAPIService.RemotesRpmUlnRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_uln_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_uln_remote_href"+"}", parameterValueToString(r.rpmUlnRemoteHref, "rpmUlnRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesUlnAPIRemotesRpmUlnRemoveRoleRequest struct { + ctx context.Context + ApiService *RemotesUlnAPIService + rpmUlnRemoteHref string + nestedRole *NestedRole +} + +func (r RemotesUlnAPIRemotesRpmUlnRemoveRoleRequest) NestedRole(nestedRole NestedRole) RemotesUlnAPIRemotesRpmUlnRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RemotesUlnAPIRemotesRpmUlnRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RemotesRpmUlnRemoveRoleExecute(r) +} + +/* +RemotesRpmUlnRemoveRole Method for RemotesRpmUlnRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmUlnRemoteHref + @return RemotesUlnAPIRemotesRpmUlnRemoveRoleRequest +*/ +func (a *RemotesUlnAPIService) RemotesRpmUlnRemoveRole(ctx context.Context, rpmUlnRemoteHref string) RemotesUlnAPIRemotesRpmUlnRemoveRoleRequest { + return RemotesUlnAPIRemotesRpmUlnRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + rpmUlnRemoteHref: rpmUlnRemoteHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RemotesUlnAPIService) RemotesRpmUlnRemoveRoleExecute(r RemotesUlnAPIRemotesRpmUlnRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesUlnAPIService.RemotesRpmUlnRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_uln_remote_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_uln_remote_href"+"}", parameterValueToString(r.rpmUlnRemoteHref, "rpmUlnRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RemotesUlnAPIRemotesRpmUlnUpdateRequest struct { + ctx context.Context + ApiService *RemotesUlnAPIService + rpmUlnRemoteHref string + rpmUlnRemote *RpmUlnRemote +} + +func (r RemotesUlnAPIRemotesRpmUlnUpdateRequest) RpmUlnRemote(rpmUlnRemote RpmUlnRemote) RemotesUlnAPIRemotesRpmUlnUpdateRequest { + r.rpmUlnRemote = &rpmUlnRemote + return r +} + +func (r RemotesUlnAPIRemotesRpmUlnUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RemotesRpmUlnUpdateExecute(r) +} + +/* +RemotesRpmUlnUpdate Update an uln remote + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmUlnRemoteHref + @return RemotesUlnAPIRemotesRpmUlnUpdateRequest +*/ +func (a *RemotesUlnAPIService) RemotesRpmUlnUpdate(ctx context.Context, rpmUlnRemoteHref string) RemotesUlnAPIRemotesRpmUlnUpdateRequest { + return RemotesUlnAPIRemotesRpmUlnUpdateRequest{ + ApiService: a, + ctx: ctx, + rpmUlnRemoteHref: rpmUlnRemoteHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RemotesUlnAPIService) RemotesRpmUlnUpdateExecute(r RemotesUlnAPIRemotesRpmUlnUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RemotesUlnAPIService.RemotesRpmUlnUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_uln_remote_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_uln_remote_href"+"}", parameterValueToString(r.rpmUlnRemoteHref, "rpmUlnRemoteHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmUlnRemote == nil { + return localVarReturnValue, nil, reportError("rpmUlnRemote is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmUlnRemote + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repair.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repair.go new file mode 100644 index 0000000000..7ee3b91887 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repair.go @@ -0,0 +1,134 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// RepairAPIService RepairAPI service +type RepairAPIService service + +type RepairAPIRepairPostRequest struct { + ctx context.Context + ApiService *RepairAPIService + repair *Repair +} + +func (r RepairAPIRepairPostRequest) Repair(repair Repair) RepairAPIRepairPostRequest { + r.repair = &repair + return r +} + +func (r RepairAPIRepairPostRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepairPostExecute(r) +} + +/* +RepairPost Repair Artifact Storage + +Trigger an asynchronous task that checks for missing or corrupted artifacts, and attempts to redownload them. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepairAPIRepairPostRequest +*/ +func (a *RepairAPIService) RepairPost(ctx context.Context) RepairAPIRepairPostRequest { + return RepairAPIRepairPostRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepairAPIService) RepairPostExecute(r RepairAPIRepairPostRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepairAPIService.RepairPost") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repair/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repair == nil { + return localVarReturnValue, nil, reportError("repair is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repair + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories.go new file mode 100644 index 0000000000..73aeeb6cee --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories.go @@ -0,0 +1,390 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "reflect" +) + + +// RepositoriesAPIService RepositoriesAPI service +type RepositoriesAPIService service + +type RepositoriesAPIRepositoriesListRequest struct { + ctx context.Context + ApiService *RepositoriesAPIService + latestWithContent *string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + pulpTypeIn *[]string + remote *string + retainRepoVersions *int32 + retainRepoVersionsGt *int32 + retainRepoVersionsGte *int32 + retainRepoVersionsIsnull *bool + retainRepoVersionsLt *int32 + retainRepoVersionsLte *int32 + retainRepoVersionsNe *int32 + retainRepoVersionsRange *[]int32 + withContent *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesAPIRepositoriesListRequest) LatestWithContent(latestWithContent string) RepositoriesAPIRepositoriesListRequest { + r.latestWithContent = &latestWithContent + return r +} + +// Number of results to return per page. +func (r RepositoriesAPIRepositoriesListRequest) Limit(limit int32) RepositoriesAPIRepositoriesListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RepositoriesAPIRepositoriesListRequest) Name(name string) RepositoriesAPIRepositoriesListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RepositoriesAPIRepositoriesListRequest) NameContains(nameContains string) RepositoriesAPIRepositoriesListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RepositoriesAPIRepositoriesListRequest) NameIcontains(nameIcontains string) RepositoriesAPIRepositoriesListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RepositoriesAPIRepositoriesListRequest) NameIn(nameIn []string) RepositoriesAPIRepositoriesListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RepositoriesAPIRepositoriesListRequest) NameStartswith(nameStartswith string) RepositoriesAPIRepositoriesListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RepositoriesAPIRepositoriesListRequest) Offset(offset int32) RepositoriesAPIRepositoriesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesAPIRepositoriesListRequest) Ordering(ordering []string) RepositoriesAPIRepositoriesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesAPIRepositoriesListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesAPIRepositoriesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesAPIRepositoriesListRequest) PulpIdIn(pulpIdIn []string) RepositoriesAPIRepositoriesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RepositoriesAPIRepositoriesListRequest) PulpLabelSelect(pulpLabelSelect string) RepositoriesAPIRepositoriesListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Pulp type is in * `ansible.ansible` - ansible.ansible * `container.container` - container.container * `container.container-push` - container.container-push * `deb.deb` - deb.deb * `file.file` - file.file * `gem.gem` - gem.gem * `maven.maven` - maven.maven * `ostree.ostree` - ostree.ostree * `python.python` - python.python * `rpm.rpm` - rpm.rpm +func (r RepositoriesAPIRepositoriesListRequest) PulpTypeIn(pulpTypeIn []string) RepositoriesAPIRepositoriesListRequest { + r.pulpTypeIn = &pulpTypeIn + return r +} + +// Foreign Key referenced by HREF +func (r RepositoriesAPIRepositoriesListRequest) Remote(remote string) RepositoriesAPIRepositoriesListRequest { + r.remote = &remote + return r +} + +// Filter results where retain_repo_versions matches value +func (r RepositoriesAPIRepositoriesListRequest) RetainRepoVersions(retainRepoVersions int32) RepositoriesAPIRepositoriesListRequest { + r.retainRepoVersions = &retainRepoVersions + return r +} + +// Filter results where retain_repo_versions is greater than value +func (r RepositoriesAPIRepositoriesListRequest) RetainRepoVersionsGt(retainRepoVersionsGt int32) RepositoriesAPIRepositoriesListRequest { + r.retainRepoVersionsGt = &retainRepoVersionsGt + return r +} + +// Filter results where retain_repo_versions is greater than or equal to value +func (r RepositoriesAPIRepositoriesListRequest) RetainRepoVersionsGte(retainRepoVersionsGte int32) RepositoriesAPIRepositoriesListRequest { + r.retainRepoVersionsGte = &retainRepoVersionsGte + return r +} + +// Filter results where retain_repo_versions has a null value +func (r RepositoriesAPIRepositoriesListRequest) RetainRepoVersionsIsnull(retainRepoVersionsIsnull bool) RepositoriesAPIRepositoriesListRequest { + r.retainRepoVersionsIsnull = &retainRepoVersionsIsnull + return r +} + +// Filter results where retain_repo_versions is less than value +func (r RepositoriesAPIRepositoriesListRequest) RetainRepoVersionsLt(retainRepoVersionsLt int32) RepositoriesAPIRepositoriesListRequest { + r.retainRepoVersionsLt = &retainRepoVersionsLt + return r +} + +// Filter results where retain_repo_versions is less than or equal to value +func (r RepositoriesAPIRepositoriesListRequest) RetainRepoVersionsLte(retainRepoVersionsLte int32) RepositoriesAPIRepositoriesListRequest { + r.retainRepoVersionsLte = &retainRepoVersionsLte + return r +} + +// Filter results where retain_repo_versions not equal to value +func (r RepositoriesAPIRepositoriesListRequest) RetainRepoVersionsNe(retainRepoVersionsNe int32) RepositoriesAPIRepositoriesListRequest { + r.retainRepoVersionsNe = &retainRepoVersionsNe + return r +} + +// Filter results where retain_repo_versions is between two comma separated values +func (r RepositoriesAPIRepositoriesListRequest) RetainRepoVersionsRange(retainRepoVersionsRange []int32) RepositoriesAPIRepositoriesListRequest { + r.retainRepoVersionsRange = &retainRepoVersionsRange + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesAPIRepositoriesListRequest) WithContent(withContent string) RepositoriesAPIRepositoriesListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r RepositoriesAPIRepositoriesListRequest) Fields(fields []string) RepositoriesAPIRepositoriesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesAPIRepositoriesListRequest) ExcludeFields(excludeFields []string) RepositoriesAPIRepositoriesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesAPIRepositoriesListRequest) Execute() (*PaginatedRepositoryResponseList, *http.Response, error) { + return r.ApiService.RepositoriesListExecute(r) +} + +/* +RepositoriesList List repositories + +Endpoint to list all repositories. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesAPIRepositoriesListRequest +*/ +func (a *RepositoriesAPIService) RepositoriesList(ctx context.Context) RepositoriesAPIRepositoriesListRequest { + return RepositoriesAPIRepositoriesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedRepositoryResponseList +func (a *RepositoriesAPIService) RepositoriesListExecute(r RepositoriesAPIRepositoriesListRequest) (*PaginatedRepositoryResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRepositoryResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAPIService.RepositoriesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.latestWithContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "latest_with_content", r.latestWithContent, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.pulpTypeIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_type__in", r.pulpTypeIn, "csv") + } + if r.remote != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "remote", r.remote, "") + } + if r.retainRepoVersions != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions", r.retainRepoVersions, "") + } + if r.retainRepoVersionsGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gt", r.retainRepoVersionsGt, "") + } + if r.retainRepoVersionsGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gte", r.retainRepoVersionsGte, "") + } + if r.retainRepoVersionsIsnull != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__isnull", r.retainRepoVersionsIsnull, "") + } + if r.retainRepoVersionsLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lt", r.retainRepoVersionsLt, "") + } + if r.retainRepoVersionsLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lte", r.retainRepoVersionsLte, "") + } + if r.retainRepoVersionsNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__ne", r.retainRepoVersionsNe, "") + } + if r.retainRepoVersionsRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__range", r.retainRepoVersionsRange, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ansible.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ansible.go new file mode 100644 index 0000000000..effb319488 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ansible.go @@ -0,0 +1,2379 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// RepositoriesAnsibleAPIService RepositoriesAnsibleAPI service +type RepositoriesAnsibleAPIService service + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleAddRoleRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + nestedRole *NestedRole +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleAddRoleRequest) NestedRole(nestedRole NestedRole) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleAddRoleExecute(r) +} + +/* +RepositoriesAnsibleAnsibleAddRole Method for RepositoriesAnsibleAnsibleAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleAddRoleRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleAddRole(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleAddRoleRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleAddRoleRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleAddRoleExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCopyCollectionVersionRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + collectionVersionCopyMove *CollectionVersionCopyMove +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCopyCollectionVersionRequest) CollectionVersionCopyMove(collectionVersionCopyMove CollectionVersionCopyMove) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCopyCollectionVersionRequest { + r.collectionVersionCopyMove = &collectionVersionCopyMove + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCopyCollectionVersionRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleCopyCollectionVersionExecute(r) +} + +/* +RepositoriesAnsibleAnsibleCopyCollectionVersion Method for RepositoriesAnsibleAnsibleCopyCollectionVersion + +Trigger an asynchronous task to copy collection versions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCopyCollectionVersionRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleCopyCollectionVersion(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCopyCollectionVersionRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCopyCollectionVersionRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleCopyCollectionVersionExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCopyCollectionVersionRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleCopyCollectionVersion") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}copy_collection_version/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.collectionVersionCopyMove == nil { + return localVarReturnValue, nil, reportError("collectionVersionCopyMove is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.collectionVersionCopyMove + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCreateRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepository *AnsibleAnsibleRepository +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCreateRequest) AnsibleAnsibleRepository(ansibleAnsibleRepository AnsibleAnsibleRepository) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCreateRequest { + r.ansibleAnsibleRepository = &ansibleAnsibleRepository + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCreateRequest) Execute() (*AnsibleAnsibleRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleCreateExecute(r) +} + +/* +RepositoriesAnsibleAnsibleCreate Create an ansible repository + +ViewSet for Ansible Repositories. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCreateRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleCreate(ctx context.Context) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCreateRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AnsibleAnsibleRepositoryResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleCreateExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleCreateRequest) (*AnsibleAnsibleRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleAnsibleRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/ansible/ansible/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleAnsibleRepository == nil { + return localVarReturnValue, nil, reportError("ansibleAnsibleRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleAnsibleRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleDeleteExecute(r) +} + +/* +RepositoriesAnsibleAnsibleDelete Delete an ansible repository + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleDeleteRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleDelete(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleDeleteRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleDeleteRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleDeleteExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + latestWithContent *string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + remote *string + retainRepoVersions *int32 + retainRepoVersionsGt *int32 + retainRepoVersionsGte *int32 + retainRepoVersionsIsnull *bool + retainRepoVersionsLt *int32 + retainRepoVersionsLte *int32 + retainRepoVersionsNe *int32 + retainRepoVersionsRange *[]int32 + withContent *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) LatestWithContent(latestWithContent string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.latestWithContent = &latestWithContent + return r +} + +// Number of results to return per page. +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) Limit(limit int32) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) Name(name string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) NameContains(nameContains string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) NameIcontains(nameIcontains string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) NameIn(nameIn []string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) NameStartswith(nameStartswith string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) Offset(offset int32) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) Ordering(ordering []string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) PulpIdIn(pulpIdIn []string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) PulpLabelSelect(pulpLabelSelect string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Foreign Key referenced by HREF +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) Remote(remote string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.remote = &remote + return r +} + +// Filter results where retain_repo_versions matches value +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) RetainRepoVersions(retainRepoVersions int32) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.retainRepoVersions = &retainRepoVersions + return r +} + +// Filter results where retain_repo_versions is greater than value +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) RetainRepoVersionsGt(retainRepoVersionsGt int32) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.retainRepoVersionsGt = &retainRepoVersionsGt + return r +} + +// Filter results where retain_repo_versions is greater than or equal to value +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) RetainRepoVersionsGte(retainRepoVersionsGte int32) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.retainRepoVersionsGte = &retainRepoVersionsGte + return r +} + +// Filter results where retain_repo_versions has a null value +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) RetainRepoVersionsIsnull(retainRepoVersionsIsnull bool) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.retainRepoVersionsIsnull = &retainRepoVersionsIsnull + return r +} + +// Filter results where retain_repo_versions is less than value +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) RetainRepoVersionsLt(retainRepoVersionsLt int32) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.retainRepoVersionsLt = &retainRepoVersionsLt + return r +} + +// Filter results where retain_repo_versions is less than or equal to value +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) RetainRepoVersionsLte(retainRepoVersionsLte int32) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.retainRepoVersionsLte = &retainRepoVersionsLte + return r +} + +// Filter results where retain_repo_versions not equal to value +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) RetainRepoVersionsNe(retainRepoVersionsNe int32) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.retainRepoVersionsNe = &retainRepoVersionsNe + return r +} + +// Filter results where retain_repo_versions is between two comma separated values +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) RetainRepoVersionsRange(retainRepoVersionsRange []int32) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.retainRepoVersionsRange = &retainRepoVersionsRange + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) WithContent(withContent string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) Fields(fields []string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) ExcludeFields(excludeFields []string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) Execute() (*PaginatedansibleAnsibleRepositoryResponseList, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleListExecute(r) +} + +/* +RepositoriesAnsibleAnsibleList List ansible repositorys + +ViewSet for Ansible Repositories. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleList(ctx context.Context) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedansibleAnsibleRepositoryResponseList +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleListExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRequest) (*PaginatedansibleAnsibleRepositoryResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedansibleAnsibleRepositoryResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/ansible/ansible/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.latestWithContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "latest_with_content", r.latestWithContent, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.remote != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "remote", r.remote, "") + } + if r.retainRepoVersions != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions", r.retainRepoVersions, "") + } + if r.retainRepoVersionsGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gt", r.retainRepoVersionsGt, "") + } + if r.retainRepoVersionsGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gte", r.retainRepoVersionsGte, "") + } + if r.retainRepoVersionsIsnull != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__isnull", r.retainRepoVersionsIsnull, "") + } + if r.retainRepoVersionsLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lt", r.retainRepoVersionsLt, "") + } + if r.retainRepoVersionsLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lte", r.retainRepoVersionsLte, "") + } + if r.retainRepoVersionsNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__ne", r.retainRepoVersionsNe, "") + } + if r.retainRepoVersionsRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__range", r.retainRepoVersionsRange, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRolesRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRolesRequest) Fields(fields []string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRolesRequest) ExcludeFields(excludeFields []string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleListRolesExecute(r) +} + +/* +RepositoriesAnsibleAnsibleListRoles Method for RepositoriesAnsibleAnsibleListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRolesRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleListRoles(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRolesRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRolesRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleListRolesExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMarkRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + ansibleRepositoryMark *AnsibleRepositoryMark +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMarkRequest) AnsibleRepositoryMark(ansibleRepositoryMark AnsibleRepositoryMark) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMarkRequest { + r.ansibleRepositoryMark = &ansibleRepositoryMark + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMarkRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleMarkExecute(r) +} + +/* +RepositoriesAnsibleAnsibleMark Method for RepositoriesAnsibleAnsibleMark + +Trigger an asynchronous task to mark Ansible content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMarkRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleMark(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMarkRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMarkRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleMarkExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMarkRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleMark") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}mark/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleRepositoryMark == nil { + return localVarReturnValue, nil, reportError("ansibleRepositoryMark is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleRepositoryMark + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleModifyRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + repositoryAddRemoveContent *RepositoryAddRemoveContent +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleModifyRequest) RepositoryAddRemoveContent(repositoryAddRemoveContent RepositoryAddRemoveContent) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleModifyRequest { + r.repositoryAddRemoveContent = &repositoryAddRemoveContent + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleModifyRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleModifyExecute(r) +} + +/* +RepositoriesAnsibleAnsibleModify Modify Repository Content + +Trigger an asynchronous task to create a new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleModifyRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleModify(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleModifyRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleModifyRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleModifyExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleModifyRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleModify") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}modify/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositoryAddRemoveContent == nil { + return localVarReturnValue, nil, reportError("repositoryAddRemoveContent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositoryAddRemoveContent + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMoveCollectionVersionRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + collectionVersionCopyMove *CollectionVersionCopyMove +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMoveCollectionVersionRequest) CollectionVersionCopyMove(collectionVersionCopyMove CollectionVersionCopyMove) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMoveCollectionVersionRequest { + r.collectionVersionCopyMove = &collectionVersionCopyMove + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMoveCollectionVersionRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleMoveCollectionVersionExecute(r) +} + +/* +RepositoriesAnsibleAnsibleMoveCollectionVersion Method for RepositoriesAnsibleAnsibleMoveCollectionVersion + +Trigger an asynchronous task to move collection versions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMoveCollectionVersionRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleMoveCollectionVersion(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMoveCollectionVersionRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMoveCollectionVersionRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleMoveCollectionVersionExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMoveCollectionVersionRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleMoveCollectionVersion") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}move_collection_version/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.collectionVersionCopyMove == nil { + return localVarReturnValue, nil, reportError("collectionVersionCopyMove is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.collectionVersionCopyMove + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMyPermissionsRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMyPermissionsRequest) Fields(fields []string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMyPermissionsRequest) ExcludeFields(excludeFields []string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleMyPermissionsExecute(r) +} + +/* +RepositoriesAnsibleAnsibleMyPermissions Method for RepositoriesAnsibleAnsibleMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMyPermissionsRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleMyPermissions(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMyPermissionsRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleMyPermissionsExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsiblePartialUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + patchedansibleAnsibleRepository *PatchedansibleAnsibleRepository +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsiblePartialUpdateRequest) PatchedansibleAnsibleRepository(patchedansibleAnsibleRepository PatchedansibleAnsibleRepository) RepositoriesAnsibleAPIRepositoriesAnsibleAnsiblePartialUpdateRequest { + r.patchedansibleAnsibleRepository = &patchedansibleAnsibleRepository + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsiblePartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsiblePartialUpdateExecute(r) +} + +/* +RepositoriesAnsibleAnsiblePartialUpdate Update an ansible repository + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsiblePartialUpdateRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsiblePartialUpdate(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsiblePartialUpdateRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsiblePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsiblePartialUpdateExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsiblePartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsiblePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedansibleAnsibleRepository == nil { + return localVarReturnValue, nil, reportError("patchedansibleAnsibleRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedansibleAnsibleRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleReadRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleReadRequest) Fields(fields []string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleReadRequest) ExcludeFields(excludeFields []string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleReadRequest) Execute() (*AnsibleAnsibleRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleReadExecute(r) +} + +/* +RepositoriesAnsibleAnsibleRead Inspect an ansible repository + +ViewSet for Ansible Repositories. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleReadRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleRead(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleReadRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleReadRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return AnsibleAnsibleRepositoryResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleReadExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleReadRequest) (*AnsibleAnsibleRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AnsibleAnsibleRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRebuildMetadataRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + ansibleRepositoryRebuild *AnsibleRepositoryRebuild +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRebuildMetadataRequest) AnsibleRepositoryRebuild(ansibleRepositoryRebuild AnsibleRepositoryRebuild) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRebuildMetadataRequest { + r.ansibleRepositoryRebuild = &ansibleRepositoryRebuild + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRebuildMetadataRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleRebuildMetadataExecute(r) +} + +/* +RepositoriesAnsibleAnsibleRebuildMetadata Method for RepositoriesAnsibleAnsibleRebuildMetadata + +Trigger an asynchronous task to rebuild Ansible content meta. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRebuildMetadataRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleRebuildMetadata(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRebuildMetadataRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRebuildMetadataRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleRebuildMetadataExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRebuildMetadataRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleRebuildMetadata") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}rebuild_metadata/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleRepositoryRebuild == nil { + return localVarReturnValue, nil, reportError("ansibleRepositoryRebuild is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleRepositoryRebuild + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRemoveRoleRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + nestedRole *NestedRole +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRemoveRoleRequest) NestedRole(nestedRole NestedRole) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleRemoveRoleExecute(r) +} + +/* +RepositoriesAnsibleAnsibleRemoveRole Method for RepositoriesAnsibleAnsibleRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRemoveRoleRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleRemoveRole(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRemoveRoleRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleRemoveRoleExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSignRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + ansibleRepositorySignature *AnsibleRepositorySignature +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSignRequest) AnsibleRepositorySignature(ansibleRepositorySignature AnsibleRepositorySignature) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSignRequest { + r.ansibleRepositorySignature = &ansibleRepositorySignature + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSignRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleSignExecute(r) +} + +/* +RepositoriesAnsibleAnsibleSign Method for RepositoriesAnsibleAnsibleSign + +Trigger an asynchronous task to sign Ansible content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSignRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleSign(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSignRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSignRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleSignExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSignRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleSign") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}sign/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleRepositorySignature == nil { + return localVarReturnValue, nil, reportError("ansibleRepositorySignature is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleRepositorySignature + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSyncRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + ansibleRepositorySyncURL *AnsibleRepositorySyncURL +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSyncRequest) AnsibleRepositorySyncURL(ansibleRepositorySyncURL AnsibleRepositorySyncURL) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSyncRequest { + r.ansibleRepositorySyncURL = &ansibleRepositorySyncURL + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSyncRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleSyncExecute(r) +} + +/* +RepositoriesAnsibleAnsibleSync Method for RepositoriesAnsibleAnsibleSync + +Trigger an asynchronous task to sync Ansible content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSyncRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleSync(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSyncRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSyncRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleSyncExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleSyncRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleSync") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}sync/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleRepositorySyncURL == nil { + return localVarReturnValue, nil, reportError("ansibleRepositorySyncURL is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleRepositorySyncURL + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUnmarkRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + ansibleRepositoryMark *AnsibleRepositoryMark +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUnmarkRequest) AnsibleRepositoryMark(ansibleRepositoryMark AnsibleRepositoryMark) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUnmarkRequest { + r.ansibleRepositoryMark = &ansibleRepositoryMark + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUnmarkRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleUnmarkExecute(r) +} + +/* +RepositoriesAnsibleAnsibleUnmark Method for RepositoriesAnsibleAnsibleUnmark + +Trigger an asynchronous task to unmark Ansible content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUnmarkRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleUnmark(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUnmarkRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUnmarkRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleUnmarkExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUnmarkRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleUnmark") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}unmark/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleRepositoryMark == nil { + return localVarReturnValue, nil, reportError("ansibleRepositoryMark is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleRepositoryMark + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleAPIService + ansibleAnsibleRepositoryHref string + ansibleAnsibleRepository *AnsibleAnsibleRepository +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUpdateRequest) AnsibleAnsibleRepository(ansibleAnsibleRepository AnsibleAnsibleRepository) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUpdateRequest { + r.ansibleAnsibleRepository = &ansibleAnsibleRepository + return r +} + +func (r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleUpdateExecute(r) +} + +/* +RepositoriesAnsibleAnsibleUpdate Update an ansible repository + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUpdateRequest +*/ +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleUpdate(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUpdateRequest { + return RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUpdateRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleAPIService) RepositoriesAnsibleAnsibleUpdateExecute(r RepositoriesAnsibleAPIRepositoriesAnsibleAnsibleUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleAPIService.RepositoriesAnsibleAnsibleUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleAnsibleRepository == nil { + return localVarReturnValue, nil, reportError("ansibleAnsibleRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleAnsibleRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ansible_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ansible_versions.go new file mode 100644 index 0000000000..f2b196e18b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ansible_versions.go @@ -0,0 +1,816 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RepositoriesAnsibleVersionsAPIService RepositoriesAnsibleVersionsAPI service +type RepositoriesAnsibleVersionsAPIService service + +type RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleVersionsAPIService + ansibleAnsibleRepositoryVersionHref string +} + +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleVersionsDeleteExecute(r) +} + +/* +RepositoriesAnsibleAnsibleVersionsDelete Delete a repository version + +Trigger an asynchronous task to delete a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryVersionHref + @return RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsDeleteRequest +*/ +func (a *RepositoriesAnsibleVersionsAPIService) RepositoriesAnsibleAnsibleVersionsDelete(ctx context.Context, ansibleAnsibleRepositoryVersionHref string) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsDeleteRequest { + return RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryVersionHref: ansibleAnsibleRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleVersionsAPIService) RepositoriesAnsibleAnsibleVersionsDeleteExecute(r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleVersionsAPIService.RepositoriesAnsibleAnsibleVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_version_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryVersionHref, "ansibleAnsibleRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleVersionsAPIService + ansibleAnsibleRepositoryHref string + content *string + contentIn *string + limit *int32 + number *int32 + numberGt *int32 + numberGte *int32 + numberLt *int32 + numberLte *int32 + numberRange *[]int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) Content(content string) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) ContentIn(contentIn string) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) Limit(limit int32) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.limit = &limit + return r +} + +// Filter results where number matches value +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) Number(number int32) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.number = &number + return r +} + +// Filter results where number is greater than value +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) NumberGt(numberGt int32) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.numberGt = &numberGt + return r +} + +// Filter results where number is greater than or equal to value +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) NumberGte(numberGte int32) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.numberGte = &numberGte + return r +} + +// Filter results where number is less than value +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) NumberLt(numberLt int32) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.numberLt = &numberLt + return r +} + +// Filter results where number is less than or equal to value +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) NumberLte(numberLte int32) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.numberLte = &numberLte + return r +} + +// Filter results where number is between two comma separated values +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) NumberRange(numberRange []int32) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.numberRange = &numberRange + return r +} + +// The initial index from which to return the results. +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) Offset(offset int32) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) Ordering(ordering []string) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) PulpCreated(pulpCreated time.Time) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) PulpCreatedGt(pulpCreatedGt time.Time) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) PulpCreatedGte(pulpCreatedGte time.Time) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) PulpCreatedLt(pulpCreatedLt time.Time) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) PulpCreatedLte(pulpCreatedLte time.Time) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// A list of fields to include in the response. +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) Fields(fields []string) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) ExcludeFields(excludeFields []string) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) Execute() (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleVersionsListExecute(r) +} + +/* +RepositoriesAnsibleAnsibleVersionsList List repository versions + +AnsibleRepositoryVersion represents a single file repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryHref + @return RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest +*/ +func (a *RepositoriesAnsibleVersionsAPIService) RepositoriesAnsibleAnsibleVersionsList(ctx context.Context, ansibleAnsibleRepositoryHref string) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest { + return RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryHref: ansibleAnsibleRepositoryHref, + } +} + +// Execute executes the request +// @return PaginatedRepositoryVersionResponseList +func (a *RepositoriesAnsibleVersionsAPIService) RepositoriesAnsibleAnsibleVersionsListExecute(r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsListRequest) (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRepositoryVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleVersionsAPIService.RepositoriesAnsibleAnsibleVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_href}versions/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryHref, "ansibleAnsibleRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.number != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number", r.number, "") + } + if r.numberGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gt", r.numberGt, "") + } + if r.numberGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gte", r.numberGte, "") + } + if r.numberLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lt", r.numberLt, "") + } + if r.numberLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lte", r.numberLte, "") + } + if r.numberRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__range", r.numberRange, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsReadRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleVersionsAPIService + ansibleAnsibleRepositoryVersionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsReadRequest) Fields(fields []string) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsReadRequest) ExcludeFields(excludeFields []string) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsReadRequest) Execute() (*RepositoryVersionResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleVersionsReadExecute(r) +} + +/* +RepositoriesAnsibleAnsibleVersionsRead Inspect a repository version + +AnsibleRepositoryVersion represents a single file repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryVersionHref + @return RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsReadRequest +*/ +func (a *RepositoriesAnsibleVersionsAPIService) RepositoriesAnsibleAnsibleVersionsRead(ctx context.Context, ansibleAnsibleRepositoryVersionHref string) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsReadRequest { + return RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsReadRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryVersionHref: ansibleAnsibleRepositoryVersionHref, + } +} + +// Execute executes the request +// @return RepositoryVersionResponse +func (a *RepositoriesAnsibleVersionsAPIService) RepositoriesAnsibleAnsibleVersionsReadExecute(r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsReadRequest) (*RepositoryVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleVersionsAPIService.RepositoriesAnsibleAnsibleVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_version_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryVersionHref, "ansibleAnsibleRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRebuildMetadataRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleVersionsAPIService + ansibleAnsibleRepositoryVersionHref string + ansibleRepositoryRebuild *AnsibleRepositoryRebuild +} + +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRebuildMetadataRequest) AnsibleRepositoryRebuild(ansibleRepositoryRebuild AnsibleRepositoryRebuild) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRebuildMetadataRequest { + r.ansibleRepositoryRebuild = &ansibleRepositoryRebuild + return r +} + +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRebuildMetadataRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleVersionsRebuildMetadataExecute(r) +} + +/* +RepositoriesAnsibleAnsibleVersionsRebuildMetadata Method for RepositoriesAnsibleAnsibleVersionsRebuildMetadata + +Trigger an asynchronous task to rebuild Ansible content meta. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryVersionHref + @return RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRebuildMetadataRequest +*/ +func (a *RepositoriesAnsibleVersionsAPIService) RepositoriesAnsibleAnsibleVersionsRebuildMetadata(ctx context.Context, ansibleAnsibleRepositoryVersionHref string) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRebuildMetadataRequest { + return RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRebuildMetadataRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryVersionHref: ansibleAnsibleRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleVersionsAPIService) RepositoriesAnsibleAnsibleVersionsRebuildMetadataExecute(r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRebuildMetadataRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleVersionsAPIService.RepositoriesAnsibleAnsibleVersionsRebuildMetadata") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_version_href}rebuild_metadata/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_version_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryVersionHref, "ansibleAnsibleRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ansibleRepositoryRebuild == nil { + return localVarReturnValue, nil, reportError("ansibleRepositoryRebuild is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ansibleRepositoryRebuild + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRepairRequest struct { + ctx context.Context + ApiService *RepositoriesAnsibleVersionsAPIService + ansibleAnsibleRepositoryVersionHref string + repair *Repair +} + +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRepairRequest) Repair(repair Repair) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRepairRequest { + r.repair = &repair + return r +} + +func (r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRepairRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesAnsibleAnsibleVersionsRepairExecute(r) +} + +/* +RepositoriesAnsibleAnsibleVersionsRepair Method for RepositoriesAnsibleAnsibleVersionsRepair + +Trigger an asynchronous task to repair a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleAnsibleRepositoryVersionHref + @return RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRepairRequest +*/ +func (a *RepositoriesAnsibleVersionsAPIService) RepositoriesAnsibleAnsibleVersionsRepair(ctx context.Context, ansibleAnsibleRepositoryVersionHref string) RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRepairRequest { + return RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRepairRequest{ + ApiService: a, + ctx: ctx, + ansibleAnsibleRepositoryVersionHref: ansibleAnsibleRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAnsibleVersionsAPIService) RepositoriesAnsibleAnsibleVersionsRepairExecute(r RepositoriesAnsibleVersionsAPIRepositoriesAnsibleAnsibleVersionsRepairRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAnsibleVersionsAPIService.RepositoriesAnsibleAnsibleVersionsRepair") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_ansible_repository_version_href}repair/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_ansible_repository_version_href"+"}", parameterValueToString(r.ansibleAnsibleRepositoryVersionHref, "ansibleAnsibleRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repair == nil { + return localVarReturnValue, nil, reportError("repair is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repair + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_apt.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_apt.go new file mode 100644 index 0000000000..f4381af811 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_apt.go @@ -0,0 +1,1198 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// RepositoriesAptAPIService RepositoriesAptAPI service +type RepositoriesAptAPIService service + +type RepositoriesAptAPIRepositoriesDebAptCreateRequest struct { + ctx context.Context + ApiService *RepositoriesAptAPIService + debAptRepository *DebAptRepository +} + +func (r RepositoriesAptAPIRepositoriesDebAptCreateRequest) DebAptRepository(debAptRepository DebAptRepository) RepositoriesAptAPIRepositoriesDebAptCreateRequest { + r.debAptRepository = &debAptRepository + return r +} + +func (r RepositoriesAptAPIRepositoriesDebAptCreateRequest) Execute() (*DebAptRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesDebAptCreateExecute(r) +} + +/* +RepositoriesDebAptCreate Create an apt repository + +An AptRepository is the locally stored, Pulp-internal representation of a APT repository. + +It may be filled with content via synchronization or content upload to create an +AptRepositoryVersion. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesAptAPIRepositoriesDebAptCreateRequest +*/ +func (a *RepositoriesAptAPIService) RepositoriesDebAptCreate(ctx context.Context) RepositoriesAptAPIRepositoriesDebAptCreateRequest { + return RepositoriesAptAPIRepositoriesDebAptCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DebAptRepositoryResponse +func (a *RepositoriesAptAPIService) RepositoriesDebAptCreateExecute(r RepositoriesAptAPIRepositoriesDebAptCreateRequest) (*DebAptRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebAptRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAptAPIService.RepositoriesDebAptCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/deb/apt/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debAptRepository == nil { + return localVarReturnValue, nil, reportError("debAptRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debAptRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAptAPIRepositoriesDebAptDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesAptAPIService + debAptRepositoryHref string +} + +func (r RepositoriesAptAPIRepositoriesDebAptDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesDebAptDeleteExecute(r) +} + +/* +RepositoriesDebAptDelete Delete an apt repository + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRepositoryHref + @return RepositoriesAptAPIRepositoriesDebAptDeleteRequest +*/ +func (a *RepositoriesAptAPIService) RepositoriesDebAptDelete(ctx context.Context, debAptRepositoryHref string) RepositoriesAptAPIRepositoriesDebAptDeleteRequest { + return RepositoriesAptAPIRepositoriesDebAptDeleteRequest{ + ApiService: a, + ctx: ctx, + debAptRepositoryHref: debAptRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAptAPIService) RepositoriesDebAptDeleteExecute(r RepositoriesAptAPIRepositoriesDebAptDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAptAPIService.RepositoriesDebAptDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_repository_href"+"}", parameterValueToString(r.debAptRepositoryHref, "debAptRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAptAPIRepositoriesDebAptListRequest struct { + ctx context.Context + ApiService *RepositoriesAptAPIService + latestWithContent *string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + remote *string + retainRepoVersions *int32 + retainRepoVersionsGt *int32 + retainRepoVersionsGte *int32 + retainRepoVersionsIsnull *bool + retainRepoVersionsLt *int32 + retainRepoVersionsLte *int32 + retainRepoVersionsNe *int32 + retainRepoVersionsRange *[]int32 + withContent *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) LatestWithContent(latestWithContent string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.latestWithContent = &latestWithContent + return r +} + +// Number of results to return per page. +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) Limit(limit int32) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) Name(name string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) NameContains(nameContains string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) NameIcontains(nameIcontains string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) NameIn(nameIn []string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) NameStartswith(nameStartswith string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) Offset(offset int32) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) Ordering(ordering []string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) PulpIdIn(pulpIdIn []string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) PulpLabelSelect(pulpLabelSelect string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Foreign Key referenced by HREF +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) Remote(remote string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.remote = &remote + return r +} + +// Filter results where retain_repo_versions matches value +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) RetainRepoVersions(retainRepoVersions int32) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.retainRepoVersions = &retainRepoVersions + return r +} + +// Filter results where retain_repo_versions is greater than value +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) RetainRepoVersionsGt(retainRepoVersionsGt int32) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.retainRepoVersionsGt = &retainRepoVersionsGt + return r +} + +// Filter results where retain_repo_versions is greater than or equal to value +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) RetainRepoVersionsGte(retainRepoVersionsGte int32) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.retainRepoVersionsGte = &retainRepoVersionsGte + return r +} + +// Filter results where retain_repo_versions has a null value +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) RetainRepoVersionsIsnull(retainRepoVersionsIsnull bool) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.retainRepoVersionsIsnull = &retainRepoVersionsIsnull + return r +} + +// Filter results where retain_repo_versions is less than value +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) RetainRepoVersionsLt(retainRepoVersionsLt int32) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.retainRepoVersionsLt = &retainRepoVersionsLt + return r +} + +// Filter results where retain_repo_versions is less than or equal to value +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) RetainRepoVersionsLte(retainRepoVersionsLte int32) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.retainRepoVersionsLte = &retainRepoVersionsLte + return r +} + +// Filter results where retain_repo_versions not equal to value +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) RetainRepoVersionsNe(retainRepoVersionsNe int32) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.retainRepoVersionsNe = &retainRepoVersionsNe + return r +} + +// Filter results where retain_repo_versions is between two comma separated values +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) RetainRepoVersionsRange(retainRepoVersionsRange []int32) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.retainRepoVersionsRange = &retainRepoVersionsRange + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) WithContent(withContent string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) Fields(fields []string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) ExcludeFields(excludeFields []string) RepositoriesAptAPIRepositoriesDebAptListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesAptAPIRepositoriesDebAptListRequest) Execute() (*PaginateddebAptRepositoryResponseList, *http.Response, error) { + return r.ApiService.RepositoriesDebAptListExecute(r) +} + +/* +RepositoriesDebAptList List apt repositorys + +An AptRepository is the locally stored, Pulp-internal representation of a APT repository. + +It may be filled with content via synchronization or content upload to create an +AptRepositoryVersion. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesAptAPIRepositoriesDebAptListRequest +*/ +func (a *RepositoriesAptAPIService) RepositoriesDebAptList(ctx context.Context) RepositoriesAptAPIRepositoriesDebAptListRequest { + return RepositoriesAptAPIRepositoriesDebAptListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginateddebAptRepositoryResponseList +func (a *RepositoriesAptAPIService) RepositoriesDebAptListExecute(r RepositoriesAptAPIRepositoriesDebAptListRequest) (*PaginateddebAptRepositoryResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginateddebAptRepositoryResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAptAPIService.RepositoriesDebAptList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/deb/apt/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.latestWithContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "latest_with_content", r.latestWithContent, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.remote != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "remote", r.remote, "") + } + if r.retainRepoVersions != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions", r.retainRepoVersions, "") + } + if r.retainRepoVersionsGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gt", r.retainRepoVersionsGt, "") + } + if r.retainRepoVersionsGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gte", r.retainRepoVersionsGte, "") + } + if r.retainRepoVersionsIsnull != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__isnull", r.retainRepoVersionsIsnull, "") + } + if r.retainRepoVersionsLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lt", r.retainRepoVersionsLt, "") + } + if r.retainRepoVersionsLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lte", r.retainRepoVersionsLte, "") + } + if r.retainRepoVersionsNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__ne", r.retainRepoVersionsNe, "") + } + if r.retainRepoVersionsRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__range", r.retainRepoVersionsRange, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAptAPIRepositoriesDebAptModifyRequest struct { + ctx context.Context + ApiService *RepositoriesAptAPIService + debAptRepositoryHref string + repositoryAddRemoveContent *RepositoryAddRemoveContent +} + +func (r RepositoriesAptAPIRepositoriesDebAptModifyRequest) RepositoryAddRemoveContent(repositoryAddRemoveContent RepositoryAddRemoveContent) RepositoriesAptAPIRepositoriesDebAptModifyRequest { + r.repositoryAddRemoveContent = &repositoryAddRemoveContent + return r +} + +func (r RepositoriesAptAPIRepositoriesDebAptModifyRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesDebAptModifyExecute(r) +} + +/* +RepositoriesDebAptModify Modify Repository Content + +Trigger an asynchronous task to create a new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRepositoryHref + @return RepositoriesAptAPIRepositoriesDebAptModifyRequest +*/ +func (a *RepositoriesAptAPIService) RepositoriesDebAptModify(ctx context.Context, debAptRepositoryHref string) RepositoriesAptAPIRepositoriesDebAptModifyRequest { + return RepositoriesAptAPIRepositoriesDebAptModifyRequest{ + ApiService: a, + ctx: ctx, + debAptRepositoryHref: debAptRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAptAPIService) RepositoriesDebAptModifyExecute(r RepositoriesAptAPIRepositoriesDebAptModifyRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAptAPIService.RepositoriesDebAptModify") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_repository_href}modify/" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_repository_href"+"}", parameterValueToString(r.debAptRepositoryHref, "debAptRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositoryAddRemoveContent == nil { + return localVarReturnValue, nil, reportError("repositoryAddRemoveContent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositoryAddRemoveContent + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAptAPIRepositoriesDebAptPartialUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesAptAPIService + debAptRepositoryHref string + patcheddebAptRepository *PatcheddebAptRepository +} + +func (r RepositoriesAptAPIRepositoriesDebAptPartialUpdateRequest) PatcheddebAptRepository(patcheddebAptRepository PatcheddebAptRepository) RepositoriesAptAPIRepositoriesDebAptPartialUpdateRequest { + r.patcheddebAptRepository = &patcheddebAptRepository + return r +} + +func (r RepositoriesAptAPIRepositoriesDebAptPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesDebAptPartialUpdateExecute(r) +} + +/* +RepositoriesDebAptPartialUpdate Update an apt repository + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRepositoryHref + @return RepositoriesAptAPIRepositoriesDebAptPartialUpdateRequest +*/ +func (a *RepositoriesAptAPIService) RepositoriesDebAptPartialUpdate(ctx context.Context, debAptRepositoryHref string) RepositoriesAptAPIRepositoriesDebAptPartialUpdateRequest { + return RepositoriesAptAPIRepositoriesDebAptPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + debAptRepositoryHref: debAptRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAptAPIService) RepositoriesDebAptPartialUpdateExecute(r RepositoriesAptAPIRepositoriesDebAptPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAptAPIService.RepositoriesDebAptPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_repository_href"+"}", parameterValueToString(r.debAptRepositoryHref, "debAptRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patcheddebAptRepository == nil { + return localVarReturnValue, nil, reportError("patcheddebAptRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patcheddebAptRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAptAPIRepositoriesDebAptReadRequest struct { + ctx context.Context + ApiService *RepositoriesAptAPIService + debAptRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesAptAPIRepositoriesDebAptReadRequest) Fields(fields []string) RepositoriesAptAPIRepositoriesDebAptReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesAptAPIRepositoriesDebAptReadRequest) ExcludeFields(excludeFields []string) RepositoriesAptAPIRepositoriesDebAptReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesAptAPIRepositoriesDebAptReadRequest) Execute() (*DebAptRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesDebAptReadExecute(r) +} + +/* +RepositoriesDebAptRead Inspect an apt repository + +An AptRepository is the locally stored, Pulp-internal representation of a APT repository. + +It may be filled with content via synchronization or content upload to create an +AptRepositoryVersion. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRepositoryHref + @return RepositoriesAptAPIRepositoriesDebAptReadRequest +*/ +func (a *RepositoriesAptAPIService) RepositoriesDebAptRead(ctx context.Context, debAptRepositoryHref string) RepositoriesAptAPIRepositoriesDebAptReadRequest { + return RepositoriesAptAPIRepositoriesDebAptReadRequest{ + ApiService: a, + ctx: ctx, + debAptRepositoryHref: debAptRepositoryHref, + } +} + +// Execute executes the request +// @return DebAptRepositoryResponse +func (a *RepositoriesAptAPIService) RepositoriesDebAptReadExecute(r RepositoriesAptAPIRepositoriesDebAptReadRequest) (*DebAptRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DebAptRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAptAPIService.RepositoriesDebAptRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_repository_href"+"}", parameterValueToString(r.debAptRepositoryHref, "debAptRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAptAPIRepositoriesDebAptSyncRequest struct { + ctx context.Context + ApiService *RepositoriesAptAPIService + debAptRepositoryHref string + aptRepositorySyncURL *AptRepositorySyncURL +} + +func (r RepositoriesAptAPIRepositoriesDebAptSyncRequest) AptRepositorySyncURL(aptRepositorySyncURL AptRepositorySyncURL) RepositoriesAptAPIRepositoriesDebAptSyncRequest { + r.aptRepositorySyncURL = &aptRepositorySyncURL + return r +} + +func (r RepositoriesAptAPIRepositoriesDebAptSyncRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesDebAptSyncExecute(r) +} + +/* +RepositoriesDebAptSync Sync from remote + +Trigger an asynchronous task to sync content + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRepositoryHref + @return RepositoriesAptAPIRepositoriesDebAptSyncRequest +*/ +func (a *RepositoriesAptAPIService) RepositoriesDebAptSync(ctx context.Context, debAptRepositoryHref string) RepositoriesAptAPIRepositoriesDebAptSyncRequest { + return RepositoriesAptAPIRepositoriesDebAptSyncRequest{ + ApiService: a, + ctx: ctx, + debAptRepositoryHref: debAptRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAptAPIService) RepositoriesDebAptSyncExecute(r RepositoriesAptAPIRepositoriesDebAptSyncRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAptAPIService.RepositoriesDebAptSync") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_repository_href}sync/" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_repository_href"+"}", parameterValueToString(r.debAptRepositoryHref, "debAptRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.aptRepositorySyncURL == nil { + return localVarReturnValue, nil, reportError("aptRepositorySyncURL is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.aptRepositorySyncURL + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAptAPIRepositoriesDebAptUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesAptAPIService + debAptRepositoryHref string + debAptRepository *DebAptRepository +} + +func (r RepositoriesAptAPIRepositoriesDebAptUpdateRequest) DebAptRepository(debAptRepository DebAptRepository) RepositoriesAptAPIRepositoriesDebAptUpdateRequest { + r.debAptRepository = &debAptRepository + return r +} + +func (r RepositoriesAptAPIRepositoriesDebAptUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesDebAptUpdateExecute(r) +} + +/* +RepositoriesDebAptUpdate Update an apt repository + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRepositoryHref + @return RepositoriesAptAPIRepositoriesDebAptUpdateRequest +*/ +func (a *RepositoriesAptAPIService) RepositoriesDebAptUpdate(ctx context.Context, debAptRepositoryHref string) RepositoriesAptAPIRepositoriesDebAptUpdateRequest { + return RepositoriesAptAPIRepositoriesDebAptUpdateRequest{ + ApiService: a, + ctx: ctx, + debAptRepositoryHref: debAptRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAptAPIService) RepositoriesDebAptUpdateExecute(r RepositoriesAptAPIRepositoriesDebAptUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAptAPIService.RepositoriesDebAptUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_repository_href"+"}", parameterValueToString(r.debAptRepositoryHref, "debAptRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.debAptRepository == nil { + return localVarReturnValue, nil, reportError("debAptRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.debAptRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_apt_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_apt_versions.go new file mode 100644 index 0000000000..88dc1c14ae --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_apt_versions.go @@ -0,0 +1,708 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RepositoriesAptVersionsAPIService RepositoriesAptVersionsAPI service +type RepositoriesAptVersionsAPIService service + +type RepositoriesAptVersionsAPIRepositoriesDebAptVersionsDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesAptVersionsAPIService + debAptRepositoryVersionHref string +} + +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesDebAptVersionsDeleteExecute(r) +} + +/* +RepositoriesDebAptVersionsDelete Delete a repository version + +Trigger an asynchronous task to delete a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRepositoryVersionHref + @return RepositoriesAptVersionsAPIRepositoriesDebAptVersionsDeleteRequest +*/ +func (a *RepositoriesAptVersionsAPIService) RepositoriesDebAptVersionsDelete(ctx context.Context, debAptRepositoryVersionHref string) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsDeleteRequest { + return RepositoriesAptVersionsAPIRepositoriesDebAptVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + debAptRepositoryVersionHref: debAptRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAptVersionsAPIService) RepositoriesDebAptVersionsDeleteExecute(r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAptVersionsAPIService.RepositoriesDebAptVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_repository_version_href"+"}", parameterValueToString(r.debAptRepositoryVersionHref, "debAptRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest struct { + ctx context.Context + ApiService *RepositoriesAptVersionsAPIService + debAptRepositoryHref string + content *string + contentIn *string + limit *int32 + number *int32 + numberGt *int32 + numberGte *int32 + numberLt *int32 + numberLte *int32 + numberRange *[]int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) Content(content string) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) ContentIn(contentIn string) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) Limit(limit int32) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.limit = &limit + return r +} + +// Filter results where number matches value +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) Number(number int32) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.number = &number + return r +} + +// Filter results where number is greater than value +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) NumberGt(numberGt int32) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.numberGt = &numberGt + return r +} + +// Filter results where number is greater than or equal to value +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) NumberGte(numberGte int32) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.numberGte = &numberGte + return r +} + +// Filter results where number is less than value +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) NumberLt(numberLt int32) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.numberLt = &numberLt + return r +} + +// Filter results where number is less than or equal to value +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) NumberLte(numberLte int32) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.numberLte = &numberLte + return r +} + +// Filter results where number is between two comma separated values +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) NumberRange(numberRange []int32) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.numberRange = &numberRange + return r +} + +// The initial index from which to return the results. +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) Offset(offset int32) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) Ordering(ordering []string) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) PulpCreated(pulpCreated time.Time) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) PulpCreatedGt(pulpCreatedGt time.Time) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) PulpCreatedGte(pulpCreatedGte time.Time) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) PulpCreatedLt(pulpCreatedLt time.Time) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) PulpCreatedLte(pulpCreatedLte time.Time) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// A list of fields to include in the response. +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) Fields(fields []string) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) ExcludeFields(excludeFields []string) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) Execute() (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + return r.ApiService.RepositoriesDebAptVersionsListExecute(r) +} + +/* +RepositoriesDebAptVersionsList List repository versions + +An AptRepositoryVersion represents a single APT repository version as stored by Pulp. + +It may be used as the basis for the creation of Pulp distributions in order to actually serve +the content contained within the repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRepositoryHref + @return RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest +*/ +func (a *RepositoriesAptVersionsAPIService) RepositoriesDebAptVersionsList(ctx context.Context, debAptRepositoryHref string) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest { + return RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest{ + ApiService: a, + ctx: ctx, + debAptRepositoryHref: debAptRepositoryHref, + } +} + +// Execute executes the request +// @return PaginatedRepositoryVersionResponseList +func (a *RepositoriesAptVersionsAPIService) RepositoriesDebAptVersionsListExecute(r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsListRequest) (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRepositoryVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAptVersionsAPIService.RepositoriesDebAptVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_repository_href}versions/" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_repository_href"+"}", parameterValueToString(r.debAptRepositoryHref, "debAptRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.number != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number", r.number, "") + } + if r.numberGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gt", r.numberGt, "") + } + if r.numberGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gte", r.numberGte, "") + } + if r.numberLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lt", r.numberLt, "") + } + if r.numberLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lte", r.numberLte, "") + } + if r.numberRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__range", r.numberRange, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAptVersionsAPIRepositoriesDebAptVersionsReadRequest struct { + ctx context.Context + ApiService *RepositoriesAptVersionsAPIService + debAptRepositoryVersionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsReadRequest) Fields(fields []string) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsReadRequest) ExcludeFields(excludeFields []string) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsReadRequest) Execute() (*RepositoryVersionResponse, *http.Response, error) { + return r.ApiService.RepositoriesDebAptVersionsReadExecute(r) +} + +/* +RepositoriesDebAptVersionsRead Inspect a repository version + +An AptRepositoryVersion represents a single APT repository version as stored by Pulp. + +It may be used as the basis for the creation of Pulp distributions in order to actually serve +the content contained within the repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRepositoryVersionHref + @return RepositoriesAptVersionsAPIRepositoriesDebAptVersionsReadRequest +*/ +func (a *RepositoriesAptVersionsAPIService) RepositoriesDebAptVersionsRead(ctx context.Context, debAptRepositoryVersionHref string) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsReadRequest { + return RepositoriesAptVersionsAPIRepositoriesDebAptVersionsReadRequest{ + ApiService: a, + ctx: ctx, + debAptRepositoryVersionHref: debAptRepositoryVersionHref, + } +} + +// Execute executes the request +// @return RepositoryVersionResponse +func (a *RepositoriesAptVersionsAPIService) RepositoriesDebAptVersionsReadExecute(r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsReadRequest) (*RepositoryVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAptVersionsAPIService.RepositoriesDebAptVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_repository_version_href"+"}", parameterValueToString(r.debAptRepositoryVersionHref, "debAptRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesAptVersionsAPIRepositoriesDebAptVersionsRepairRequest struct { + ctx context.Context + ApiService *RepositoriesAptVersionsAPIService + debAptRepositoryVersionHref string + repair *Repair +} + +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsRepairRequest) Repair(repair Repair) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsRepairRequest { + r.repair = &repair + return r +} + +func (r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsRepairRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesDebAptVersionsRepairExecute(r) +} + +/* +RepositoriesDebAptVersionsRepair Method for RepositoriesDebAptVersionsRepair + +Trigger an asynchronous task to repair a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param debAptRepositoryVersionHref + @return RepositoriesAptVersionsAPIRepositoriesDebAptVersionsRepairRequest +*/ +func (a *RepositoriesAptVersionsAPIService) RepositoriesDebAptVersionsRepair(ctx context.Context, debAptRepositoryVersionHref string) RepositoriesAptVersionsAPIRepositoriesDebAptVersionsRepairRequest { + return RepositoriesAptVersionsAPIRepositoriesDebAptVersionsRepairRequest{ + ApiService: a, + ctx: ctx, + debAptRepositoryVersionHref: debAptRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesAptVersionsAPIService) RepositoriesDebAptVersionsRepairExecute(r RepositoriesAptVersionsAPIRepositoriesDebAptVersionsRepairRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesAptVersionsAPIService.RepositoriesDebAptVersionsRepair") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{deb_apt_repository_version_href}repair/" + localVarPath = strings.Replace(localVarPath, "{"+"deb_apt_repository_version_href"+"}", parameterValueToString(r.debAptRepositoryVersionHref, "debAptRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repair == nil { + return localVarReturnValue, nil, reportError("repair is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repair + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container.go new file mode 100644 index 0000000000..75d41a28ce --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container.go @@ -0,0 +1,2537 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "reflect" +) + + +// RepositoriesContainerAPIService RepositoriesContainerAPI service +type RepositoriesContainerAPIService service + +type RepositoriesContainerAPIRepositoriesContainerContainerAddRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + recursiveManage *RecursiveManage +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerAddRequest) RecursiveManage(recursiveManage RecursiveManage) RepositoriesContainerAPIRepositoriesContainerContainerAddRequest { + r.recursiveManage = &recursiveManage + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerAddRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerAddExecute(r) +} + +/* +RepositoriesContainerContainerAdd Add content + +Trigger an asynchronous task to recursively add container content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerAddRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerAdd(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerAddRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerAddRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerAddExecute(r RepositoriesContainerAPIRepositoriesContainerContainerAddRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerAdd") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}add/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.recursiveManage == nil { + return localVarReturnValue, nil, reportError("recursiveManage is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.recursiveManage + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerAddRoleRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + nestedRole *NestedRole +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerAddRoleRequest) NestedRole(nestedRole NestedRole) RepositoriesContainerAPIRepositoriesContainerContainerAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerAddRoleExecute(r) +} + +/* +RepositoriesContainerContainerAddRole Method for RepositoriesContainerContainerAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerAddRoleRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerAddRole(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerAddRoleRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerAddRoleRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerAddRoleExecute(r RepositoriesContainerAPIRepositoriesContainerContainerAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + containerfileArtifact *string + containerfile *os.File + tag *string + artifacts *map[string]interface{} +} + +// Artifact representing the Containerfile that should be used to run podman-build. +func (r RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest) ContainerfileArtifact(containerfileArtifact string) RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest { + r.containerfileArtifact = &containerfileArtifact + return r +} + +// An uploaded Containerfile that should be used to run podman-build. +func (r RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest) Containerfile(containerfile *os.File) RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest { + r.containerfile = containerfile + return r +} + +// A tag name for the new image being built. +func (r RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest) Tag(tag string) RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest { + r.tag = &tag + return r +} + +// A JSON string where each key is an artifact href and the value is it's relative path (name) inside the /pulp_working_directory of the build container executing the Containerfile. +func (r RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest) Artifacts(artifacts map[string]interface{}) RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest { + r.artifacts = &artifacts + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerBuildImageExecute(r) +} + +/* +RepositoriesContainerContainerBuildImage Build an Image + +Trigger an asynchronous task to build an OCI image from a Containerfile. A new repository version is created with the new image and tag. This API is in tech preview. Backwards compatibility when upgrading is not guaranteed. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerBuildImage(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerBuildImageExecute(r RepositoriesContainerAPIRepositoriesContainerContainerBuildImageRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerBuildImage") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}build_image/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.containerfileArtifact != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "containerfile_artifact", r.containerfileArtifact, "") + } + var containerfileLocalVarFormFileName string + var containerfileLocalVarFileName string + var containerfileLocalVarFileBytes []byte + + containerfileLocalVarFormFileName = "containerfile" + + + containerfileLocalVarFile := r.containerfile + + if containerfileLocalVarFile != nil { + fbs, _ := io.ReadAll(containerfileLocalVarFile) + + containerfileLocalVarFileBytes = fbs + containerfileLocalVarFileName = containerfileLocalVarFile.Name() + containerfileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: containerfileLocalVarFileBytes, fileName: containerfileLocalVarFileName, formFileName: containerfileLocalVarFormFileName}) + } + if r.tag != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "tag", r.tag, "") + } + if r.artifacts != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "artifacts", r.artifacts, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerCopyManifestsRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + manifestCopy *ManifestCopy +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerCopyManifestsRequest) ManifestCopy(manifestCopy ManifestCopy) RepositoriesContainerAPIRepositoriesContainerContainerCopyManifestsRequest { + r.manifestCopy = &manifestCopy + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerCopyManifestsRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerCopyManifestsExecute(r) +} + +/* +RepositoriesContainerContainerCopyManifests Copy manifests + +Trigger an asynchronous task to copy manifests + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerCopyManifestsRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerCopyManifests(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerCopyManifestsRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerCopyManifestsRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerCopyManifestsExecute(r RepositoriesContainerAPIRepositoriesContainerContainerCopyManifestsRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerCopyManifests") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}copy_manifests/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.manifestCopy == nil { + return localVarReturnValue, nil, reportError("manifestCopy is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.manifestCopy + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerCopyTagsRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + tagCopy *TagCopy +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerCopyTagsRequest) TagCopy(tagCopy TagCopy) RepositoriesContainerAPIRepositoriesContainerContainerCopyTagsRequest { + r.tagCopy = &tagCopy + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerCopyTagsRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerCopyTagsExecute(r) +} + +/* +RepositoriesContainerContainerCopyTags Copy tags + +Trigger an asynchronous task to copy tags + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerCopyTagsRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerCopyTags(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerCopyTagsRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerCopyTagsRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerCopyTagsExecute(r RepositoriesContainerAPIRepositoriesContainerContainerCopyTagsRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerCopyTags") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}copy_tags/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.tagCopy == nil { + return localVarReturnValue, nil, reportError("tagCopy is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.tagCopy + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerCreateRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepository *ContainerContainerRepository +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerCreateRequest) ContainerContainerRepository(containerContainerRepository ContainerContainerRepository) RepositoriesContainerAPIRepositoriesContainerContainerCreateRequest { + r.containerContainerRepository = &containerContainerRepository + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerCreateRequest) Execute() (*ContainerContainerRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerCreateExecute(r) +} + +/* +RepositoriesContainerContainerCreate Create a container repository + +ViewSet for container repo. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesContainerAPIRepositoriesContainerContainerCreateRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerCreate(ctx context.Context) RepositoriesContainerAPIRepositoriesContainerContainerCreateRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ContainerContainerRepositoryResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerCreateExecute(r RepositoriesContainerAPIRepositoriesContainerContainerCreateRequest) (*ContainerContainerRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContainerContainerRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/container/container/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.containerContainerRepository == nil { + return localVarReturnValue, nil, reportError("containerContainerRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.containerContainerRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerDeleteExecute(r) +} + +/* +RepositoriesContainerContainerDelete Delete a container repository + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerDeleteRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerDelete(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerDeleteRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerDeleteRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerDeleteExecute(r RepositoriesContainerAPIRepositoriesContainerContainerDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerListRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + latestWithContent *string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + remote *string + retainRepoVersions *int32 + retainRepoVersionsGt *int32 + retainRepoVersionsGte *int32 + retainRepoVersionsIsnull *bool + retainRepoVersionsLt *int32 + retainRepoVersionsLte *int32 + retainRepoVersionsNe *int32 + retainRepoVersionsRange *[]int32 + withContent *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) LatestWithContent(latestWithContent string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.latestWithContent = &latestWithContent + return r +} + +// Number of results to return per page. +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) Limit(limit int32) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) Name(name string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) NameContains(nameContains string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) NameIcontains(nameIcontains string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) NameIn(nameIn []string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) NameStartswith(nameStartswith string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) Offset(offset int32) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) Ordering(ordering []string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) PulpIdIn(pulpIdIn []string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) PulpLabelSelect(pulpLabelSelect string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Foreign Key referenced by HREF +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) Remote(remote string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.remote = &remote + return r +} + +// Filter results where retain_repo_versions matches value +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) RetainRepoVersions(retainRepoVersions int32) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.retainRepoVersions = &retainRepoVersions + return r +} + +// Filter results where retain_repo_versions is greater than value +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) RetainRepoVersionsGt(retainRepoVersionsGt int32) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.retainRepoVersionsGt = &retainRepoVersionsGt + return r +} + +// Filter results where retain_repo_versions is greater than or equal to value +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) RetainRepoVersionsGte(retainRepoVersionsGte int32) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.retainRepoVersionsGte = &retainRepoVersionsGte + return r +} + +// Filter results where retain_repo_versions has a null value +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) RetainRepoVersionsIsnull(retainRepoVersionsIsnull bool) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.retainRepoVersionsIsnull = &retainRepoVersionsIsnull + return r +} + +// Filter results where retain_repo_versions is less than value +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) RetainRepoVersionsLt(retainRepoVersionsLt int32) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.retainRepoVersionsLt = &retainRepoVersionsLt + return r +} + +// Filter results where retain_repo_versions is less than or equal to value +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) RetainRepoVersionsLte(retainRepoVersionsLte int32) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.retainRepoVersionsLte = &retainRepoVersionsLte + return r +} + +// Filter results where retain_repo_versions not equal to value +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) RetainRepoVersionsNe(retainRepoVersionsNe int32) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.retainRepoVersionsNe = &retainRepoVersionsNe + return r +} + +// Filter results where retain_repo_versions is between two comma separated values +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) RetainRepoVersionsRange(retainRepoVersionsRange []int32) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.retainRepoVersionsRange = &retainRepoVersionsRange + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) WithContent(withContent string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) Fields(fields []string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) ExcludeFields(excludeFields []string) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) Execute() (*PaginatedcontainerContainerRepositoryResponseList, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerListExecute(r) +} + +/* +RepositoriesContainerContainerList List container repositorys + +ViewSet for container repo. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesContainerAPIRepositoriesContainerContainerListRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerList(ctx context.Context) RepositoriesContainerAPIRepositoriesContainerContainerListRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedcontainerContainerRepositoryResponseList +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerListExecute(r RepositoriesContainerAPIRepositoriesContainerContainerListRequest) (*PaginatedcontainerContainerRepositoryResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedcontainerContainerRepositoryResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/container/container/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.latestWithContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "latest_with_content", r.latestWithContent, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.remote != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "remote", r.remote, "") + } + if r.retainRepoVersions != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions", r.retainRepoVersions, "") + } + if r.retainRepoVersionsGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gt", r.retainRepoVersionsGt, "") + } + if r.retainRepoVersionsGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gte", r.retainRepoVersionsGte, "") + } + if r.retainRepoVersionsIsnull != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__isnull", r.retainRepoVersionsIsnull, "") + } + if r.retainRepoVersionsLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lt", r.retainRepoVersionsLt, "") + } + if r.retainRepoVersionsLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lte", r.retainRepoVersionsLte, "") + } + if r.retainRepoVersionsNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__ne", r.retainRepoVersionsNe, "") + } + if r.retainRepoVersionsRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__range", r.retainRepoVersionsRange, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerListRolesRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRolesRequest) Fields(fields []string) RepositoriesContainerAPIRepositoriesContainerContainerListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRolesRequest) ExcludeFields(excludeFields []string) RepositoriesContainerAPIRepositoriesContainerContainerListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerListRolesExecute(r) +} + +/* +RepositoriesContainerContainerListRoles Method for RepositoriesContainerContainerListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerListRolesRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerListRoles(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerListRolesRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerListRolesRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerListRolesExecute(r RepositoriesContainerAPIRepositoriesContainerContainerListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerMyPermissionsRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesContainerAPIRepositoriesContainerContainerMyPermissionsRequest) Fields(fields []string) RepositoriesContainerAPIRepositoriesContainerContainerMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesContainerAPIRepositoriesContainerContainerMyPermissionsRequest) ExcludeFields(excludeFields []string) RepositoriesContainerAPIRepositoriesContainerContainerMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerMyPermissionsExecute(r) +} + +/* +RepositoriesContainerContainerMyPermissions Method for RepositoriesContainerContainerMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerMyPermissionsRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerMyPermissions(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerMyPermissionsRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerMyPermissionsExecute(r RepositoriesContainerAPIRepositoriesContainerContainerMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerPartialUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + patchedcontainerContainerRepository *PatchedcontainerContainerRepository +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerPartialUpdateRequest) PatchedcontainerContainerRepository(patchedcontainerContainerRepository PatchedcontainerContainerRepository) RepositoriesContainerAPIRepositoriesContainerContainerPartialUpdateRequest { + r.patchedcontainerContainerRepository = &patchedcontainerContainerRepository + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPartialUpdateExecute(r) +} + +/* +RepositoriesContainerContainerPartialUpdate Update a container repository + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerPartialUpdateRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerPartialUpdate(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerPartialUpdateRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerPartialUpdateExecute(r RepositoriesContainerAPIRepositoriesContainerContainerPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedcontainerContainerRepository == nil { + return localVarReturnValue, nil, reportError("patchedcontainerContainerRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedcontainerContainerRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerReadRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesContainerAPIRepositoriesContainerContainerReadRequest) Fields(fields []string) RepositoriesContainerAPIRepositoriesContainerContainerReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesContainerAPIRepositoriesContainerContainerReadRequest) ExcludeFields(excludeFields []string) RepositoriesContainerAPIRepositoriesContainerContainerReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerReadRequest) Execute() (*ContainerContainerRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerReadExecute(r) +} + +/* +RepositoriesContainerContainerRead Inspect a container repository + +ViewSet for container repo. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerReadRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerRead(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerReadRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerReadRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return ContainerContainerRepositoryResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerReadExecute(r RepositoriesContainerAPIRepositoriesContainerContainerReadRequest) (*ContainerContainerRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContainerContainerRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerRemoveRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + recursiveManage *RecursiveManage +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerRemoveRequest) RecursiveManage(recursiveManage RecursiveManage) RepositoriesContainerAPIRepositoriesContainerContainerRemoveRequest { + r.recursiveManage = &recursiveManage + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerRemoveRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerRemoveExecute(r) +} + +/* +RepositoriesContainerContainerRemove Remove content + +Trigger an async task to recursively remove container content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerRemoveRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerRemove(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerRemoveRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerRemoveRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerRemoveExecute(r RepositoriesContainerAPIRepositoriesContainerContainerRemoveRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerRemove") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}remove/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.recursiveManage == nil { + return localVarReturnValue, nil, reportError("recursiveManage is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.recursiveManage + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerRemoveRoleRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + nestedRole *NestedRole +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerRemoveRoleRequest) NestedRole(nestedRole NestedRole) RepositoriesContainerAPIRepositoriesContainerContainerRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerRemoveRoleExecute(r) +} + +/* +RepositoriesContainerContainerRemoveRole Method for RepositoriesContainerContainerRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerRemoveRoleRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerRemoveRole(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerRemoveRoleRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerRemoveRoleExecute(r RepositoriesContainerAPIRepositoriesContainerContainerRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerSignRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + repositorySign *RepositorySign +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerSignRequest) RepositorySign(repositorySign RepositorySign) RepositoriesContainerAPIRepositoriesContainerContainerSignRequest { + r.repositorySign = &repositorySign + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerSignRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerSignExecute(r) +} + +/* +RepositoriesContainerContainerSign Sign images in the repo + +Trigger an asynchronous task to sign content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerSignRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerSign(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerSignRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerSignRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerSignExecute(r RepositoriesContainerAPIRepositoriesContainerContainerSignRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerSign") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}sign/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositorySign == nil { + return localVarReturnValue, nil, reportError("repositorySign is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositorySign + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerSyncRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + containerRepositorySyncURL *ContainerRepositorySyncURL +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerSyncRequest) ContainerRepositorySyncURL(containerRepositorySyncURL ContainerRepositorySyncURL) RepositoriesContainerAPIRepositoriesContainerContainerSyncRequest { + r.containerRepositorySyncURL = &containerRepositorySyncURL + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerSyncRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerSyncExecute(r) +} + +/* +RepositoriesContainerContainerSync Sync from a remote + +Trigger an asynchronous task to sync content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerSyncRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerSync(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerSyncRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerSyncRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerSyncExecute(r RepositoriesContainerAPIRepositoriesContainerContainerSyncRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerSync") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}sync/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.containerRepositorySyncURL == nil { + return localVarReturnValue, nil, reportError("containerRepositorySyncURL is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.containerRepositorySyncURL + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerTagRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + tagImage *TagImage +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerTagRequest) TagImage(tagImage TagImage) RepositoriesContainerAPIRepositoriesContainerContainerTagRequest { + r.tagImage = &tagImage + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerTagRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerTagExecute(r) +} + +/* +RepositoriesContainerContainerTag Create a Tag + +Trigger an asynchronous task to tag an image in the repository + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerTagRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerTag(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerTagRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerTagRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerTagExecute(r RepositoriesContainerAPIRepositoriesContainerContainerTagRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerTag") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}tag/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.tagImage == nil { + return localVarReturnValue, nil, reportError("tagImage is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.tagImage + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerUntagRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + unTagImage *UnTagImage +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerUntagRequest) UnTagImage(unTagImage UnTagImage) RepositoriesContainerAPIRepositoriesContainerContainerUntagRequest { + r.unTagImage = &unTagImage + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerUntagRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerUntagExecute(r) +} + +/* +RepositoriesContainerContainerUntag Delete a tag + +Trigger an asynchronous task to untag an image in the repository + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerUntagRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerUntag(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerUntagRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerUntagRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerUntagExecute(r RepositoriesContainerAPIRepositoriesContainerContainerUntagRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerUntag") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}untag/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.unTagImage == nil { + return localVarReturnValue, nil, reportError("unTagImage is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.unTagImage + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerAPIRepositoriesContainerContainerUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesContainerAPIService + containerContainerRepositoryHref string + containerContainerRepository *ContainerContainerRepository +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerUpdateRequest) ContainerContainerRepository(containerContainerRepository ContainerContainerRepository) RepositoriesContainerAPIRepositoriesContainerContainerUpdateRequest { + r.containerContainerRepository = &containerContainerRepository + return r +} + +func (r RepositoriesContainerAPIRepositoriesContainerContainerUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerUpdateExecute(r) +} + +/* +RepositoriesContainerContainerUpdate Update a container repository + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerAPIRepositoriesContainerContainerUpdateRequest +*/ +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerUpdate(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerAPIRepositoriesContainerContainerUpdateRequest { + return RepositoriesContainerAPIRepositoriesContainerContainerUpdateRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerAPIService) RepositoriesContainerContainerUpdateExecute(r RepositoriesContainerAPIRepositoriesContainerContainerUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerAPIService.RepositoriesContainerContainerUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.containerContainerRepository == nil { + return localVarReturnValue, nil, reportError("containerContainerRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.containerContainerRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container_push.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container_push.go new file mode 100644 index 0000000000..71e6a8fff4 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container_push.go @@ -0,0 +1,1832 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// RepositoriesContainerPushAPIService RepositoriesContainerPushAPI service +type RepositoriesContainerPushAPIService service + +type RepositoriesContainerPushAPIRepositoriesContainerContainerPushAddRoleRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushAPIService + containerContainerPushRepositoryHref string + nestedRole *NestedRole +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushAddRoleRequest) NestedRole(nestedRole NestedRole) RepositoriesContainerPushAPIRepositoriesContainerContainerPushAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushAddRoleExecute(r) +} + +/* +RepositoriesContainerContainerPushAddRole Method for RepositoriesContainerContainerPushAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryHref + @return RepositoriesContainerPushAPIRepositoriesContainerContainerPushAddRoleRequest +*/ +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushAddRole(ctx context.Context, containerContainerPushRepositoryHref string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushAddRoleRequest { + return RepositoriesContainerPushAPIRepositoriesContainerContainerPushAddRoleRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryHref: containerContainerPushRepositoryHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushAddRoleExecute(r RepositoriesContainerPushAPIRepositoriesContainerContainerPushAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushAPIService.RepositoriesContainerContainerPushAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_href"+"}", parameterValueToString(r.containerContainerPushRepositoryHref, "containerContainerPushRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushAPIService + latestWithContent *string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + remote *string + retainRepoVersions *int32 + retainRepoVersionsGt *int32 + retainRepoVersionsGte *int32 + retainRepoVersionsIsnull *bool + retainRepoVersionsLt *int32 + retainRepoVersionsLte *int32 + retainRepoVersionsNe *int32 + retainRepoVersionsRange *[]int32 + withContent *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) LatestWithContent(latestWithContent string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.latestWithContent = &latestWithContent + return r +} + +// Number of results to return per page. +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) Limit(limit int32) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) Name(name string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) NameContains(nameContains string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) NameIcontains(nameIcontains string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) NameIn(nameIn []string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) NameStartswith(nameStartswith string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) Offset(offset int32) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) Ordering(ordering []string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) PulpIdIn(pulpIdIn []string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) PulpLabelSelect(pulpLabelSelect string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Foreign Key referenced by HREF +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) Remote(remote string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.remote = &remote + return r +} + +// Filter results where retain_repo_versions matches value +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) RetainRepoVersions(retainRepoVersions int32) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.retainRepoVersions = &retainRepoVersions + return r +} + +// Filter results where retain_repo_versions is greater than value +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) RetainRepoVersionsGt(retainRepoVersionsGt int32) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.retainRepoVersionsGt = &retainRepoVersionsGt + return r +} + +// Filter results where retain_repo_versions is greater than or equal to value +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) RetainRepoVersionsGte(retainRepoVersionsGte int32) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.retainRepoVersionsGte = &retainRepoVersionsGte + return r +} + +// Filter results where retain_repo_versions has a null value +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) RetainRepoVersionsIsnull(retainRepoVersionsIsnull bool) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.retainRepoVersionsIsnull = &retainRepoVersionsIsnull + return r +} + +// Filter results where retain_repo_versions is less than value +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) RetainRepoVersionsLt(retainRepoVersionsLt int32) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.retainRepoVersionsLt = &retainRepoVersionsLt + return r +} + +// Filter results where retain_repo_versions is less than or equal to value +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) RetainRepoVersionsLte(retainRepoVersionsLte int32) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.retainRepoVersionsLte = &retainRepoVersionsLte + return r +} + +// Filter results where retain_repo_versions not equal to value +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) RetainRepoVersionsNe(retainRepoVersionsNe int32) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.retainRepoVersionsNe = &retainRepoVersionsNe + return r +} + +// Filter results where retain_repo_versions is between two comma separated values +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) RetainRepoVersionsRange(retainRepoVersionsRange []int32) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.retainRepoVersionsRange = &retainRepoVersionsRange + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) WithContent(withContent string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) Fields(fields []string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) ExcludeFields(excludeFields []string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) Execute() (*PaginatedcontainerContainerPushRepositoryResponseList, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushListExecute(r) +} + +/* +RepositoriesContainerContainerPushList List container push repositorys + +ViewSet for a container push repository. + +POST and DELETE are disallowed because a push repository is tightly coupled with a +ContainerDistribution which handles it automatically. +Created - during push operation, removed - with ContainerDistribution removal. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest +*/ +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushList(ctx context.Context) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest { + return RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedcontainerContainerPushRepositoryResponseList +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushListExecute(r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRequest) (*PaginatedcontainerContainerPushRepositoryResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedcontainerContainerPushRepositoryResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushAPIService.RepositoriesContainerContainerPushList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/container/container-push/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.latestWithContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "latest_with_content", r.latestWithContent, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.remote != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "remote", r.remote, "") + } + if r.retainRepoVersions != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions", r.retainRepoVersions, "") + } + if r.retainRepoVersionsGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gt", r.retainRepoVersionsGt, "") + } + if r.retainRepoVersionsGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gte", r.retainRepoVersionsGte, "") + } + if r.retainRepoVersionsIsnull != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__isnull", r.retainRepoVersionsIsnull, "") + } + if r.retainRepoVersionsLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lt", r.retainRepoVersionsLt, "") + } + if r.retainRepoVersionsLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lte", r.retainRepoVersionsLte, "") + } + if r.retainRepoVersionsNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__ne", r.retainRepoVersionsNe, "") + } + if r.retainRepoVersionsRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__range", r.retainRepoVersionsRange, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRolesRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushAPIService + containerContainerPushRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRolesRequest) Fields(fields []string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRolesRequest) ExcludeFields(excludeFields []string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushListRolesExecute(r) +} + +/* +RepositoriesContainerContainerPushListRoles Method for RepositoriesContainerContainerPushListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryHref + @return RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRolesRequest +*/ +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushListRoles(ctx context.Context, containerContainerPushRepositoryHref string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRolesRequest { + return RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRolesRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryHref: containerContainerPushRepositoryHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushListRolesExecute(r RepositoriesContainerPushAPIRepositoriesContainerContainerPushListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushAPIService.RepositoriesContainerContainerPushListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_href"+"}", parameterValueToString(r.containerContainerPushRepositoryHref, "containerContainerPushRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushAPIRepositoriesContainerContainerPushMyPermissionsRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushAPIService + containerContainerPushRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushMyPermissionsRequest) Fields(fields []string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushMyPermissionsRequest) ExcludeFields(excludeFields []string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushMyPermissionsExecute(r) +} + +/* +RepositoriesContainerContainerPushMyPermissions Method for RepositoriesContainerContainerPushMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryHref + @return RepositoriesContainerPushAPIRepositoriesContainerContainerPushMyPermissionsRequest +*/ +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushMyPermissions(ctx context.Context, containerContainerPushRepositoryHref string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushMyPermissionsRequest { + return RepositoriesContainerPushAPIRepositoriesContainerContainerPushMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryHref: containerContainerPushRepositoryHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushMyPermissionsExecute(r RepositoriesContainerPushAPIRepositoriesContainerContainerPushMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushAPIService.RepositoriesContainerContainerPushMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_href"+"}", parameterValueToString(r.containerContainerPushRepositoryHref, "containerContainerPushRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushAPIRepositoriesContainerContainerPushPartialUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushAPIService + containerContainerPushRepositoryHref string + patchedcontainerContainerPushRepository *PatchedcontainerContainerPushRepository +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushPartialUpdateRequest) PatchedcontainerContainerPushRepository(patchedcontainerContainerPushRepository PatchedcontainerContainerPushRepository) RepositoriesContainerPushAPIRepositoriesContainerContainerPushPartialUpdateRequest { + r.patchedcontainerContainerPushRepository = &patchedcontainerContainerPushRepository + return r +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushPartialUpdateExecute(r) +} + +/* +RepositoriesContainerContainerPushPartialUpdate Update a container push repository + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryHref + @return RepositoriesContainerPushAPIRepositoriesContainerContainerPushPartialUpdateRequest +*/ +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushPartialUpdate(ctx context.Context, containerContainerPushRepositoryHref string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushPartialUpdateRequest { + return RepositoriesContainerPushAPIRepositoriesContainerContainerPushPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryHref: containerContainerPushRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushPartialUpdateExecute(r RepositoriesContainerPushAPIRepositoriesContainerContainerPushPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushAPIService.RepositoriesContainerContainerPushPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_href"+"}", parameterValueToString(r.containerContainerPushRepositoryHref, "containerContainerPushRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedcontainerContainerPushRepository == nil { + return localVarReturnValue, nil, reportError("patchedcontainerContainerPushRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedcontainerContainerPushRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushAPIRepositoriesContainerContainerPushReadRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushAPIService + containerContainerPushRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushReadRequest) Fields(fields []string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushReadRequest) ExcludeFields(excludeFields []string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushReadRequest) Execute() (*ContainerContainerPushRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushReadExecute(r) +} + +/* +RepositoriesContainerContainerPushRead Inspect a container push repository + +ViewSet for a container push repository. + +POST and DELETE are disallowed because a push repository is tightly coupled with a +ContainerDistribution which handles it automatically. +Created - during push operation, removed - with ContainerDistribution removal. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryHref + @return RepositoriesContainerPushAPIRepositoriesContainerContainerPushReadRequest +*/ +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushRead(ctx context.Context, containerContainerPushRepositoryHref string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushReadRequest { + return RepositoriesContainerPushAPIRepositoriesContainerContainerPushReadRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryHref: containerContainerPushRepositoryHref, + } +} + +// Execute executes the request +// @return ContainerContainerPushRepositoryResponse +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushReadExecute(r RepositoriesContainerPushAPIRepositoriesContainerContainerPushReadRequest) (*ContainerContainerPushRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ContainerContainerPushRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushAPIService.RepositoriesContainerContainerPushRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_href"+"}", parameterValueToString(r.containerContainerPushRepositoryHref, "containerContainerPushRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveImageRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushAPIService + containerContainerPushRepositoryHref string + removeImage *RemoveImage +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveImageRequest) RemoveImage(removeImage RemoveImage) RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveImageRequest { + r.removeImage = &removeImage + return r +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveImageRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushRemoveImageExecute(r) +} + +/* +RepositoriesContainerContainerPushRemoveImage Delete an image from a repository + +Trigger an asynchronous task to remove a manifest and all its associated data by a digest + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryHref + @return RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveImageRequest +*/ +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushRemoveImage(ctx context.Context, containerContainerPushRepositoryHref string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveImageRequest { + return RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveImageRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryHref: containerContainerPushRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushRemoveImageExecute(r RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveImageRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushAPIService.RepositoriesContainerContainerPushRemoveImage") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_href}remove_image/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_href"+"}", parameterValueToString(r.containerContainerPushRepositoryHref, "containerContainerPushRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.removeImage == nil { + return localVarReturnValue, nil, reportError("removeImage is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.removeImage + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveRoleRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushAPIService + containerContainerPushRepositoryHref string + nestedRole *NestedRole +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveRoleRequest) NestedRole(nestedRole NestedRole) RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushRemoveRoleExecute(r) +} + +/* +RepositoriesContainerContainerPushRemoveRole Method for RepositoriesContainerContainerPushRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryHref + @return RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveRoleRequest +*/ +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushRemoveRole(ctx context.Context, containerContainerPushRepositoryHref string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveRoleRequest { + return RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryHref: containerContainerPushRepositoryHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushRemoveRoleExecute(r RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushAPIService.RepositoriesContainerContainerPushRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_href"+"}", parameterValueToString(r.containerContainerPushRepositoryHref, "containerContainerPushRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveSignaturesRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushAPIService + containerContainerPushRepositoryHref string + removeSignatures *RemoveSignatures +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveSignaturesRequest) RemoveSignatures(removeSignatures RemoveSignatures) RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveSignaturesRequest { + r.removeSignatures = &removeSignatures + return r +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveSignaturesRequest) Execute() (*RemoveSignaturesResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushRemoveSignaturesExecute(r) +} + +/* +RepositoriesContainerContainerPushRemoveSignatures Method for RepositoriesContainerContainerPushRemoveSignatures + +Create a task which deletes signatures by the passed key_id. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryHref + @return RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveSignaturesRequest +*/ +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushRemoveSignatures(ctx context.Context, containerContainerPushRepositoryHref string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveSignaturesRequest { + return RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveSignaturesRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryHref: containerContainerPushRepositoryHref, + } +} + +// Execute executes the request +// @return RemoveSignaturesResponse +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushRemoveSignaturesExecute(r RepositoriesContainerPushAPIRepositoriesContainerContainerPushRemoveSignaturesRequest) (*RemoveSignaturesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RemoveSignaturesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushAPIService.RepositoriesContainerContainerPushRemoveSignatures") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_href}remove_signatures/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_href"+"}", parameterValueToString(r.containerContainerPushRepositoryHref, "containerContainerPushRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.removeSignatures == nil { + return localVarReturnValue, nil, reportError("removeSignatures is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.removeSignatures + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushAPIRepositoriesContainerContainerPushSignRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushAPIService + containerContainerPushRepositoryHref string + repositorySign *RepositorySign +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushSignRequest) RepositorySign(repositorySign RepositorySign) RepositoriesContainerPushAPIRepositoriesContainerContainerPushSignRequest { + r.repositorySign = &repositorySign + return r +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushSignRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushSignExecute(r) +} + +/* +RepositoriesContainerContainerPushSign Sign images in the repo + +Trigger an asynchronous task to sign content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryHref + @return RepositoriesContainerPushAPIRepositoriesContainerContainerPushSignRequest +*/ +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushSign(ctx context.Context, containerContainerPushRepositoryHref string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushSignRequest { + return RepositoriesContainerPushAPIRepositoriesContainerContainerPushSignRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryHref: containerContainerPushRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushSignExecute(r RepositoriesContainerPushAPIRepositoriesContainerContainerPushSignRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushAPIService.RepositoriesContainerContainerPushSign") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_href}sign/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_href"+"}", parameterValueToString(r.containerContainerPushRepositoryHref, "containerContainerPushRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositorySign == nil { + return localVarReturnValue, nil, reportError("repositorySign is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositorySign + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushAPIRepositoriesContainerContainerPushTagRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushAPIService + containerContainerPushRepositoryHref string + tagImage *TagImage +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushTagRequest) TagImage(tagImage TagImage) RepositoriesContainerPushAPIRepositoriesContainerContainerPushTagRequest { + r.tagImage = &tagImage + return r +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushTagRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushTagExecute(r) +} + +/* +RepositoriesContainerContainerPushTag Create a Tag + +Trigger an asynchronous task to tag an image in the repository + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryHref + @return RepositoriesContainerPushAPIRepositoriesContainerContainerPushTagRequest +*/ +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushTag(ctx context.Context, containerContainerPushRepositoryHref string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushTagRequest { + return RepositoriesContainerPushAPIRepositoriesContainerContainerPushTagRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryHref: containerContainerPushRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushTagExecute(r RepositoriesContainerPushAPIRepositoriesContainerContainerPushTagRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushAPIService.RepositoriesContainerContainerPushTag") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_href}tag/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_href"+"}", parameterValueToString(r.containerContainerPushRepositoryHref, "containerContainerPushRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.tagImage == nil { + return localVarReturnValue, nil, reportError("tagImage is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.tagImage + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushAPIRepositoriesContainerContainerPushUntagRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushAPIService + containerContainerPushRepositoryHref string + unTagImage *UnTagImage +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushUntagRequest) UnTagImage(unTagImage UnTagImage) RepositoriesContainerPushAPIRepositoriesContainerContainerPushUntagRequest { + r.unTagImage = &unTagImage + return r +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushUntagRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushUntagExecute(r) +} + +/* +RepositoriesContainerContainerPushUntag Delete a tag + +Trigger an asynchronous task to untag an image in the repository + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryHref + @return RepositoriesContainerPushAPIRepositoriesContainerContainerPushUntagRequest +*/ +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushUntag(ctx context.Context, containerContainerPushRepositoryHref string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushUntagRequest { + return RepositoriesContainerPushAPIRepositoriesContainerContainerPushUntagRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryHref: containerContainerPushRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushUntagExecute(r RepositoriesContainerPushAPIRepositoriesContainerContainerPushUntagRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushAPIService.RepositoriesContainerContainerPushUntag") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_href}untag/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_href"+"}", parameterValueToString(r.containerContainerPushRepositoryHref, "containerContainerPushRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.unTagImage == nil { + return localVarReturnValue, nil, reportError("unTagImage is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.unTagImage + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushAPIRepositoriesContainerContainerPushUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushAPIService + containerContainerPushRepositoryHref string + containerContainerPushRepository *ContainerContainerPushRepository +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushUpdateRequest) ContainerContainerPushRepository(containerContainerPushRepository ContainerContainerPushRepository) RepositoriesContainerPushAPIRepositoriesContainerContainerPushUpdateRequest { + r.containerContainerPushRepository = &containerContainerPushRepository + return r +} + +func (r RepositoriesContainerPushAPIRepositoriesContainerContainerPushUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushUpdateExecute(r) +} + +/* +RepositoriesContainerContainerPushUpdate Update a container push repository + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryHref + @return RepositoriesContainerPushAPIRepositoriesContainerContainerPushUpdateRequest +*/ +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushUpdate(ctx context.Context, containerContainerPushRepositoryHref string) RepositoriesContainerPushAPIRepositoriesContainerContainerPushUpdateRequest { + return RepositoriesContainerPushAPIRepositoriesContainerContainerPushUpdateRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryHref: containerContainerPushRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerPushAPIService) RepositoriesContainerContainerPushUpdateExecute(r RepositoriesContainerPushAPIRepositoriesContainerContainerPushUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushAPIService.RepositoriesContainerContainerPushUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_href"+"}", parameterValueToString(r.containerContainerPushRepositoryHref, "containerContainerPushRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.containerContainerPushRepository == nil { + return localVarReturnValue, nil, reportError("containerContainerPushRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.containerContainerPushRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container_push_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container_push_versions.go new file mode 100644 index 0000000000..862a70222e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container_push_versions.go @@ -0,0 +1,712 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RepositoriesContainerPushVersionsAPIService RepositoriesContainerPushVersionsAPI service +type RepositoriesContainerPushVersionsAPIService service + +type RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushVersionsAPIService + containerContainerPushRepositoryVersionHref string +} + +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushVersionsDeleteExecute(r) +} + +/* +RepositoriesContainerContainerPushVersionsDelete Delete a repository version + +Trigger an asynchronous task to delete a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryVersionHref + @return RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsDeleteRequest +*/ +func (a *RepositoriesContainerPushVersionsAPIService) RepositoriesContainerContainerPushVersionsDelete(ctx context.Context, containerContainerPushRepositoryVersionHref string) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsDeleteRequest { + return RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryVersionHref: containerContainerPushRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerPushVersionsAPIService) RepositoriesContainerContainerPushVersionsDeleteExecute(r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushVersionsAPIService.RepositoriesContainerContainerPushVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_version_href"+"}", parameterValueToString(r.containerContainerPushRepositoryVersionHref, "containerContainerPushRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushVersionsAPIService + containerContainerPushRepositoryHref string + content *string + contentIn *string + limit *int32 + number *int32 + numberGt *int32 + numberGte *int32 + numberLt *int32 + numberLte *int32 + numberRange *[]int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) Content(content string) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) ContentIn(contentIn string) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) Limit(limit int32) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.limit = &limit + return r +} + +// Filter results where number matches value +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) Number(number int32) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.number = &number + return r +} + +// Filter results where number is greater than value +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) NumberGt(numberGt int32) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.numberGt = &numberGt + return r +} + +// Filter results where number is greater than or equal to value +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) NumberGte(numberGte int32) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.numberGte = &numberGte + return r +} + +// Filter results where number is less than value +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) NumberLt(numberLt int32) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.numberLt = &numberLt + return r +} + +// Filter results where number is less than or equal to value +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) NumberLte(numberLte int32) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.numberLte = &numberLte + return r +} + +// Filter results where number is between two comma separated values +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) NumberRange(numberRange []int32) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.numberRange = &numberRange + return r +} + +// The initial index from which to return the results. +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) Offset(offset int32) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) Ordering(ordering []string) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) PulpCreated(pulpCreated time.Time) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) PulpCreatedGt(pulpCreatedGt time.Time) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) PulpCreatedGte(pulpCreatedGte time.Time) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) PulpCreatedLt(pulpCreatedLt time.Time) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) PulpCreatedLte(pulpCreatedLte time.Time) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// A list of fields to include in the response. +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) Fields(fields []string) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) ExcludeFields(excludeFields []string) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) Execute() (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushVersionsListExecute(r) +} + +/* +RepositoriesContainerContainerPushVersionsList List repository versions + +ContainerPushRepositoryVersion represents a single container push repository version. + +Repository versions of a push repository are not allowed to be deleted. Versioning of such +repositories, as well as creation/removal, happens automatically without explicit user actions. +Users could make a repository not functional by accident if allowed to delete repository +versions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryHref + @return RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest +*/ +func (a *RepositoriesContainerPushVersionsAPIService) RepositoriesContainerContainerPushVersionsList(ctx context.Context, containerContainerPushRepositoryHref string) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest { + return RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryHref: containerContainerPushRepositoryHref, + } +} + +// Execute executes the request +// @return PaginatedRepositoryVersionResponseList +func (a *RepositoriesContainerPushVersionsAPIService) RepositoriesContainerContainerPushVersionsListExecute(r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsListRequest) (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRepositoryVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushVersionsAPIService.RepositoriesContainerContainerPushVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_href}versions/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_href"+"}", parameterValueToString(r.containerContainerPushRepositoryHref, "containerContainerPushRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.number != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number", r.number, "") + } + if r.numberGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gt", r.numberGt, "") + } + if r.numberGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gte", r.numberGte, "") + } + if r.numberLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lt", r.numberLt, "") + } + if r.numberLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lte", r.numberLte, "") + } + if r.numberRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__range", r.numberRange, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsReadRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushVersionsAPIService + containerContainerPushRepositoryVersionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsReadRequest) Fields(fields []string) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsReadRequest) ExcludeFields(excludeFields []string) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsReadRequest) Execute() (*RepositoryVersionResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushVersionsReadExecute(r) +} + +/* +RepositoriesContainerContainerPushVersionsRead Inspect a repository version + +ContainerPushRepositoryVersion represents a single container push repository version. + +Repository versions of a push repository are not allowed to be deleted. Versioning of such +repositories, as well as creation/removal, happens automatically without explicit user actions. +Users could make a repository not functional by accident if allowed to delete repository +versions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryVersionHref + @return RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsReadRequest +*/ +func (a *RepositoriesContainerPushVersionsAPIService) RepositoriesContainerContainerPushVersionsRead(ctx context.Context, containerContainerPushRepositoryVersionHref string) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsReadRequest { + return RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsReadRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryVersionHref: containerContainerPushRepositoryVersionHref, + } +} + +// Execute executes the request +// @return RepositoryVersionResponse +func (a *RepositoriesContainerPushVersionsAPIService) RepositoriesContainerContainerPushVersionsReadExecute(r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsReadRequest) (*RepositoryVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushVersionsAPIService.RepositoriesContainerContainerPushVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_version_href"+"}", parameterValueToString(r.containerContainerPushRepositoryVersionHref, "containerContainerPushRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsRepairRequest struct { + ctx context.Context + ApiService *RepositoriesContainerPushVersionsAPIService + containerContainerPushRepositoryVersionHref string + repair *Repair +} + +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsRepairRequest) Repair(repair Repair) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsRepairRequest { + r.repair = &repair + return r +} + +func (r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsRepairRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerPushVersionsRepairExecute(r) +} + +/* +RepositoriesContainerContainerPushVersionsRepair Method for RepositoriesContainerContainerPushVersionsRepair + +Trigger an asynchronous task to repair a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerPushRepositoryVersionHref + @return RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsRepairRequest +*/ +func (a *RepositoriesContainerPushVersionsAPIService) RepositoriesContainerContainerPushVersionsRepair(ctx context.Context, containerContainerPushRepositoryVersionHref string) RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsRepairRequest { + return RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsRepairRequest{ + ApiService: a, + ctx: ctx, + containerContainerPushRepositoryVersionHref: containerContainerPushRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerPushVersionsAPIService) RepositoriesContainerContainerPushVersionsRepairExecute(r RepositoriesContainerPushVersionsAPIRepositoriesContainerContainerPushVersionsRepairRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerPushVersionsAPIService.RepositoriesContainerContainerPushVersionsRepair") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_push_repository_version_href}repair/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_push_repository_version_href"+"}", parameterValueToString(r.containerContainerPushRepositoryVersionHref, "containerContainerPushRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repair == nil { + return localVarReturnValue, nil, reportError("repair is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repair + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container_versions.go new file mode 100644 index 0000000000..4f37361c4f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_container_versions.go @@ -0,0 +1,702 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RepositoriesContainerVersionsAPIService RepositoriesContainerVersionsAPI service +type RepositoriesContainerVersionsAPIService service + +type RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesContainerVersionsAPIService + containerContainerRepositoryVersionHref string +} + +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerVersionsDeleteExecute(r) +} + +/* +RepositoriesContainerContainerVersionsDelete Delete a repository version + +Trigger an asynchronous task to delete a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryVersionHref + @return RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsDeleteRequest +*/ +func (a *RepositoriesContainerVersionsAPIService) RepositoriesContainerContainerVersionsDelete(ctx context.Context, containerContainerRepositoryVersionHref string) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsDeleteRequest { + return RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryVersionHref: containerContainerRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerVersionsAPIService) RepositoriesContainerContainerVersionsDeleteExecute(r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerVersionsAPIService.RepositoriesContainerContainerVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_version_href"+"}", parameterValueToString(r.containerContainerRepositoryVersionHref, "containerContainerRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest struct { + ctx context.Context + ApiService *RepositoriesContainerVersionsAPIService + containerContainerRepositoryHref string + content *string + contentIn *string + limit *int32 + number *int32 + numberGt *int32 + numberGte *int32 + numberLt *int32 + numberLte *int32 + numberRange *[]int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) Content(content string) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) ContentIn(contentIn string) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) Limit(limit int32) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.limit = &limit + return r +} + +// Filter results where number matches value +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) Number(number int32) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.number = &number + return r +} + +// Filter results where number is greater than value +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) NumberGt(numberGt int32) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.numberGt = &numberGt + return r +} + +// Filter results where number is greater than or equal to value +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) NumberGte(numberGte int32) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.numberGte = &numberGte + return r +} + +// Filter results where number is less than value +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) NumberLt(numberLt int32) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.numberLt = &numberLt + return r +} + +// Filter results where number is less than or equal to value +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) NumberLte(numberLte int32) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.numberLte = &numberLte + return r +} + +// Filter results where number is between two comma separated values +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) NumberRange(numberRange []int32) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.numberRange = &numberRange + return r +} + +// The initial index from which to return the results. +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) Offset(offset int32) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) Ordering(ordering []string) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) PulpCreated(pulpCreated time.Time) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) PulpCreatedGt(pulpCreatedGt time.Time) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) PulpCreatedGte(pulpCreatedGte time.Time) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) PulpCreatedLt(pulpCreatedLt time.Time) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) PulpCreatedLte(pulpCreatedLte time.Time) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// A list of fields to include in the response. +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) Fields(fields []string) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) ExcludeFields(excludeFields []string) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) Execute() (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerVersionsListExecute(r) +} + +/* +RepositoriesContainerContainerVersionsList List repository versions + +ContainerRepositoryVersion represents a single container repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryHref + @return RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest +*/ +func (a *RepositoriesContainerVersionsAPIService) RepositoriesContainerContainerVersionsList(ctx context.Context, containerContainerRepositoryHref string) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest { + return RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryHref: containerContainerRepositoryHref, + } +} + +// Execute executes the request +// @return PaginatedRepositoryVersionResponseList +func (a *RepositoriesContainerVersionsAPIService) RepositoriesContainerContainerVersionsListExecute(r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsListRequest) (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRepositoryVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerVersionsAPIService.RepositoriesContainerContainerVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_href}versions/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_href"+"}", parameterValueToString(r.containerContainerRepositoryHref, "containerContainerRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.number != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number", r.number, "") + } + if r.numberGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gt", r.numberGt, "") + } + if r.numberGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gte", r.numberGte, "") + } + if r.numberLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lt", r.numberLt, "") + } + if r.numberLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lte", r.numberLte, "") + } + if r.numberRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__range", r.numberRange, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsReadRequest struct { + ctx context.Context + ApiService *RepositoriesContainerVersionsAPIService + containerContainerRepositoryVersionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsReadRequest) Fields(fields []string) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsReadRequest) ExcludeFields(excludeFields []string) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsReadRequest) Execute() (*RepositoryVersionResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerVersionsReadExecute(r) +} + +/* +RepositoriesContainerContainerVersionsRead Inspect a repository version + +ContainerRepositoryVersion represents a single container repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryVersionHref + @return RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsReadRequest +*/ +func (a *RepositoriesContainerVersionsAPIService) RepositoriesContainerContainerVersionsRead(ctx context.Context, containerContainerRepositoryVersionHref string) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsReadRequest { + return RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsReadRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryVersionHref: containerContainerRepositoryVersionHref, + } +} + +// Execute executes the request +// @return RepositoryVersionResponse +func (a *RepositoriesContainerVersionsAPIService) RepositoriesContainerContainerVersionsReadExecute(r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsReadRequest) (*RepositoryVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerVersionsAPIService.RepositoriesContainerContainerVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_version_href"+"}", parameterValueToString(r.containerContainerRepositoryVersionHref, "containerContainerRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsRepairRequest struct { + ctx context.Context + ApiService *RepositoriesContainerVersionsAPIService + containerContainerRepositoryVersionHref string + repair *Repair +} + +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsRepairRequest) Repair(repair Repair) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsRepairRequest { + r.repair = &repair + return r +} + +func (r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsRepairRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesContainerContainerVersionsRepairExecute(r) +} + +/* +RepositoriesContainerContainerVersionsRepair Method for RepositoriesContainerContainerVersionsRepair + +Trigger an asynchronous task to repair a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerContainerRepositoryVersionHref + @return RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsRepairRequest +*/ +func (a *RepositoriesContainerVersionsAPIService) RepositoriesContainerContainerVersionsRepair(ctx context.Context, containerContainerRepositoryVersionHref string) RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsRepairRequest { + return RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsRepairRequest{ + ApiService: a, + ctx: ctx, + containerContainerRepositoryVersionHref: containerContainerRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesContainerVersionsAPIService) RepositoriesContainerContainerVersionsRepairExecute(r RepositoriesContainerVersionsAPIRepositoriesContainerContainerVersionsRepairRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesContainerVersionsAPIService.RepositoriesContainerContainerVersionsRepair") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{container_container_repository_version_href}repair/" + localVarPath = strings.Replace(localVarPath, "{"+"container_container_repository_version_href"+"}", parameterValueToString(r.containerContainerRepositoryVersionHref, "containerContainerRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repair == nil { + return localVarReturnValue, nil, reportError("repair is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repair + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_file.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_file.go new file mode 100644 index 0000000000..2030e2faf5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_file.go @@ -0,0 +1,1701 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// RepositoriesFileAPIService RepositoriesFileAPI service +type RepositoriesFileAPIService service + +type RepositoriesFileAPIRepositoriesFileFileAddRoleRequest struct { + ctx context.Context + ApiService *RepositoriesFileAPIService + fileFileRepositoryHref string + nestedRole *NestedRole +} + +func (r RepositoriesFileAPIRepositoriesFileFileAddRoleRequest) NestedRole(nestedRole NestedRole) RepositoriesFileAPIRepositoriesFileFileAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RepositoriesFileAPIRepositoriesFileFileAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFileAddRoleExecute(r) +} + +/* +RepositoriesFileFileAddRole Method for RepositoriesFileFileAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryHref + @return RepositoriesFileAPIRepositoriesFileFileAddRoleRequest +*/ +func (a *RepositoriesFileAPIService) RepositoriesFileFileAddRole(ctx context.Context, fileFileRepositoryHref string) RepositoriesFileAPIRepositoriesFileFileAddRoleRequest { + return RepositoriesFileAPIRepositoriesFileFileAddRoleRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryHref: fileFileRepositoryHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RepositoriesFileAPIService) RepositoriesFileFileAddRoleExecute(r RepositoriesFileAPIRepositoriesFileFileAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileAPIService.RepositoriesFileFileAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_href"+"}", parameterValueToString(r.fileFileRepositoryHref, "fileFileRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileAPIRepositoriesFileFileCreateRequest struct { + ctx context.Context + ApiService *RepositoriesFileAPIService + fileFileRepository *FileFileRepository +} + +func (r RepositoriesFileAPIRepositoriesFileFileCreateRequest) FileFileRepository(fileFileRepository FileFileRepository) RepositoriesFileAPIRepositoriesFileFileCreateRequest { + r.fileFileRepository = &fileFileRepository + return r +} + +func (r RepositoriesFileAPIRepositoriesFileFileCreateRequest) Execute() (*FileFileRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFileCreateExecute(r) +} + +/* +RepositoriesFileFileCreate Create a file repository + + +FileRepository represents a single file repository, to which content can be synced, added, +or removed. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesFileAPIRepositoriesFileFileCreateRequest +*/ +func (a *RepositoriesFileAPIService) RepositoriesFileFileCreate(ctx context.Context) RepositoriesFileAPIRepositoriesFileFileCreateRequest { + return RepositoriesFileAPIRepositoriesFileFileCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return FileFileRepositoryResponse +func (a *RepositoriesFileAPIService) RepositoriesFileFileCreateExecute(r RepositoriesFileAPIRepositoriesFileFileCreateRequest) (*FileFileRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FileFileRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileAPIService.RepositoriesFileFileCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/file/file/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.fileFileRepository == nil { + return localVarReturnValue, nil, reportError("fileFileRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.fileFileRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileAPIRepositoriesFileFileDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesFileAPIService + fileFileRepositoryHref string +} + +func (r RepositoriesFileAPIRepositoriesFileFileDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFileDeleteExecute(r) +} + +/* +RepositoriesFileFileDelete Delete a file repository + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryHref + @return RepositoriesFileAPIRepositoriesFileFileDeleteRequest +*/ +func (a *RepositoriesFileAPIService) RepositoriesFileFileDelete(ctx context.Context, fileFileRepositoryHref string) RepositoriesFileAPIRepositoriesFileFileDeleteRequest { + return RepositoriesFileAPIRepositoriesFileFileDeleteRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryHref: fileFileRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesFileAPIService) RepositoriesFileFileDeleteExecute(r RepositoriesFileAPIRepositoriesFileFileDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileAPIService.RepositoriesFileFileDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_href"+"}", parameterValueToString(r.fileFileRepositoryHref, "fileFileRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileAPIRepositoriesFileFileListRequest struct { + ctx context.Context + ApiService *RepositoriesFileAPIService + latestWithContent *string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + remote *string + retainRepoVersions *int32 + retainRepoVersionsGt *int32 + retainRepoVersionsGte *int32 + retainRepoVersionsIsnull *bool + retainRepoVersionsLt *int32 + retainRepoVersionsLte *int32 + retainRepoVersionsNe *int32 + retainRepoVersionsRange *[]int32 + withContent *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) LatestWithContent(latestWithContent string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.latestWithContent = &latestWithContent + return r +} + +// Number of results to return per page. +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) Limit(limit int32) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) Name(name string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) NameContains(nameContains string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) NameIcontains(nameIcontains string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) NameIn(nameIn []string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) NameStartswith(nameStartswith string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) Offset(offset int32) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) Ordering(ordering []string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) PulpIdIn(pulpIdIn []string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) PulpLabelSelect(pulpLabelSelect string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Foreign Key referenced by HREF +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) Remote(remote string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.remote = &remote + return r +} + +// Filter results where retain_repo_versions matches value +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) RetainRepoVersions(retainRepoVersions int32) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.retainRepoVersions = &retainRepoVersions + return r +} + +// Filter results where retain_repo_versions is greater than value +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) RetainRepoVersionsGt(retainRepoVersionsGt int32) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.retainRepoVersionsGt = &retainRepoVersionsGt + return r +} + +// Filter results where retain_repo_versions is greater than or equal to value +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) RetainRepoVersionsGte(retainRepoVersionsGte int32) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.retainRepoVersionsGte = &retainRepoVersionsGte + return r +} + +// Filter results where retain_repo_versions has a null value +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) RetainRepoVersionsIsnull(retainRepoVersionsIsnull bool) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.retainRepoVersionsIsnull = &retainRepoVersionsIsnull + return r +} + +// Filter results where retain_repo_versions is less than value +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) RetainRepoVersionsLt(retainRepoVersionsLt int32) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.retainRepoVersionsLt = &retainRepoVersionsLt + return r +} + +// Filter results where retain_repo_versions is less than or equal to value +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) RetainRepoVersionsLte(retainRepoVersionsLte int32) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.retainRepoVersionsLte = &retainRepoVersionsLte + return r +} + +// Filter results where retain_repo_versions not equal to value +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) RetainRepoVersionsNe(retainRepoVersionsNe int32) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.retainRepoVersionsNe = &retainRepoVersionsNe + return r +} + +// Filter results where retain_repo_versions is between two comma separated values +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) RetainRepoVersionsRange(retainRepoVersionsRange []int32) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.retainRepoVersionsRange = &retainRepoVersionsRange + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) WithContent(withContent string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) Fields(fields []string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) ExcludeFields(excludeFields []string) RepositoriesFileAPIRepositoriesFileFileListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesFileAPIRepositoriesFileFileListRequest) Execute() (*PaginatedfileFileRepositoryResponseList, *http.Response, error) { + return r.ApiService.RepositoriesFileFileListExecute(r) +} + +/* +RepositoriesFileFileList List file repositorys + + +FileRepository represents a single file repository, to which content can be synced, added, +or removed. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesFileAPIRepositoriesFileFileListRequest +*/ +func (a *RepositoriesFileAPIService) RepositoriesFileFileList(ctx context.Context) RepositoriesFileAPIRepositoriesFileFileListRequest { + return RepositoriesFileAPIRepositoriesFileFileListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedfileFileRepositoryResponseList +func (a *RepositoriesFileAPIService) RepositoriesFileFileListExecute(r RepositoriesFileAPIRepositoriesFileFileListRequest) (*PaginatedfileFileRepositoryResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedfileFileRepositoryResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileAPIService.RepositoriesFileFileList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/file/file/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.latestWithContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "latest_with_content", r.latestWithContent, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.remote != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "remote", r.remote, "") + } + if r.retainRepoVersions != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions", r.retainRepoVersions, "") + } + if r.retainRepoVersionsGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gt", r.retainRepoVersionsGt, "") + } + if r.retainRepoVersionsGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gte", r.retainRepoVersionsGte, "") + } + if r.retainRepoVersionsIsnull != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__isnull", r.retainRepoVersionsIsnull, "") + } + if r.retainRepoVersionsLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lt", r.retainRepoVersionsLt, "") + } + if r.retainRepoVersionsLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lte", r.retainRepoVersionsLte, "") + } + if r.retainRepoVersionsNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__ne", r.retainRepoVersionsNe, "") + } + if r.retainRepoVersionsRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__range", r.retainRepoVersionsRange, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileAPIRepositoriesFileFileListRolesRequest struct { + ctx context.Context + ApiService *RepositoriesFileAPIService + fileFileRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesFileAPIRepositoriesFileFileListRolesRequest) Fields(fields []string) RepositoriesFileAPIRepositoriesFileFileListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesFileAPIRepositoriesFileFileListRolesRequest) ExcludeFields(excludeFields []string) RepositoriesFileAPIRepositoriesFileFileListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesFileAPIRepositoriesFileFileListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFileListRolesExecute(r) +} + +/* +RepositoriesFileFileListRoles Method for RepositoriesFileFileListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryHref + @return RepositoriesFileAPIRepositoriesFileFileListRolesRequest +*/ +func (a *RepositoriesFileAPIService) RepositoriesFileFileListRoles(ctx context.Context, fileFileRepositoryHref string) RepositoriesFileAPIRepositoriesFileFileListRolesRequest { + return RepositoriesFileAPIRepositoriesFileFileListRolesRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryHref: fileFileRepositoryHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *RepositoriesFileAPIService) RepositoriesFileFileListRolesExecute(r RepositoriesFileAPIRepositoriesFileFileListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileAPIService.RepositoriesFileFileListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_href"+"}", parameterValueToString(r.fileFileRepositoryHref, "fileFileRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileAPIRepositoriesFileFileModifyRequest struct { + ctx context.Context + ApiService *RepositoriesFileAPIService + fileFileRepositoryHref string + repositoryAddRemoveContent *RepositoryAddRemoveContent +} + +func (r RepositoriesFileAPIRepositoriesFileFileModifyRequest) RepositoryAddRemoveContent(repositoryAddRemoveContent RepositoryAddRemoveContent) RepositoriesFileAPIRepositoriesFileFileModifyRequest { + r.repositoryAddRemoveContent = &repositoryAddRemoveContent + return r +} + +func (r RepositoriesFileAPIRepositoriesFileFileModifyRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFileModifyExecute(r) +} + +/* +RepositoriesFileFileModify Modify Repository Content + +Trigger an asynchronous task to create a new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryHref + @return RepositoriesFileAPIRepositoriesFileFileModifyRequest +*/ +func (a *RepositoriesFileAPIService) RepositoriesFileFileModify(ctx context.Context, fileFileRepositoryHref string) RepositoriesFileAPIRepositoriesFileFileModifyRequest { + return RepositoriesFileAPIRepositoriesFileFileModifyRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryHref: fileFileRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesFileAPIService) RepositoriesFileFileModifyExecute(r RepositoriesFileAPIRepositoriesFileFileModifyRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileAPIService.RepositoriesFileFileModify") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_href}modify/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_href"+"}", parameterValueToString(r.fileFileRepositoryHref, "fileFileRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositoryAddRemoveContent == nil { + return localVarReturnValue, nil, reportError("repositoryAddRemoveContent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositoryAddRemoveContent + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileAPIRepositoriesFileFileMyPermissionsRequest struct { + ctx context.Context + ApiService *RepositoriesFileAPIService + fileFileRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesFileAPIRepositoriesFileFileMyPermissionsRequest) Fields(fields []string) RepositoriesFileAPIRepositoriesFileFileMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesFileAPIRepositoriesFileFileMyPermissionsRequest) ExcludeFields(excludeFields []string) RepositoriesFileAPIRepositoriesFileFileMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesFileAPIRepositoriesFileFileMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFileMyPermissionsExecute(r) +} + +/* +RepositoriesFileFileMyPermissions Method for RepositoriesFileFileMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryHref + @return RepositoriesFileAPIRepositoriesFileFileMyPermissionsRequest +*/ +func (a *RepositoriesFileAPIService) RepositoriesFileFileMyPermissions(ctx context.Context, fileFileRepositoryHref string) RepositoriesFileAPIRepositoriesFileFileMyPermissionsRequest { + return RepositoriesFileAPIRepositoriesFileFileMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryHref: fileFileRepositoryHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *RepositoriesFileAPIService) RepositoriesFileFileMyPermissionsExecute(r RepositoriesFileAPIRepositoriesFileFileMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileAPIService.RepositoriesFileFileMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_href"+"}", parameterValueToString(r.fileFileRepositoryHref, "fileFileRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileAPIRepositoriesFileFilePartialUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesFileAPIService + fileFileRepositoryHref string + patchedfileFileRepository *PatchedfileFileRepository +} + +func (r RepositoriesFileAPIRepositoriesFileFilePartialUpdateRequest) PatchedfileFileRepository(patchedfileFileRepository PatchedfileFileRepository) RepositoriesFileAPIRepositoriesFileFilePartialUpdateRequest { + r.patchedfileFileRepository = &patchedfileFileRepository + return r +} + +func (r RepositoriesFileAPIRepositoriesFileFilePartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFilePartialUpdateExecute(r) +} + +/* +RepositoriesFileFilePartialUpdate Update a file repository + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryHref + @return RepositoriesFileAPIRepositoriesFileFilePartialUpdateRequest +*/ +func (a *RepositoriesFileAPIService) RepositoriesFileFilePartialUpdate(ctx context.Context, fileFileRepositoryHref string) RepositoriesFileAPIRepositoriesFileFilePartialUpdateRequest { + return RepositoriesFileAPIRepositoriesFileFilePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryHref: fileFileRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesFileAPIService) RepositoriesFileFilePartialUpdateExecute(r RepositoriesFileAPIRepositoriesFileFilePartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileAPIService.RepositoriesFileFilePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_href"+"}", parameterValueToString(r.fileFileRepositoryHref, "fileFileRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedfileFileRepository == nil { + return localVarReturnValue, nil, reportError("patchedfileFileRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedfileFileRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileAPIRepositoriesFileFileReadRequest struct { + ctx context.Context + ApiService *RepositoriesFileAPIService + fileFileRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesFileAPIRepositoriesFileFileReadRequest) Fields(fields []string) RepositoriesFileAPIRepositoriesFileFileReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesFileAPIRepositoriesFileFileReadRequest) ExcludeFields(excludeFields []string) RepositoriesFileAPIRepositoriesFileFileReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesFileAPIRepositoriesFileFileReadRequest) Execute() (*FileFileRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFileReadExecute(r) +} + +/* +RepositoriesFileFileRead Inspect a file repository + + +FileRepository represents a single file repository, to which content can be synced, added, +or removed. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryHref + @return RepositoriesFileAPIRepositoriesFileFileReadRequest +*/ +func (a *RepositoriesFileAPIService) RepositoriesFileFileRead(ctx context.Context, fileFileRepositoryHref string) RepositoriesFileAPIRepositoriesFileFileReadRequest { + return RepositoriesFileAPIRepositoriesFileFileReadRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryHref: fileFileRepositoryHref, + } +} + +// Execute executes the request +// @return FileFileRepositoryResponse +func (a *RepositoriesFileAPIService) RepositoriesFileFileReadExecute(r RepositoriesFileAPIRepositoriesFileFileReadRequest) (*FileFileRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FileFileRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileAPIService.RepositoriesFileFileRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_href"+"}", parameterValueToString(r.fileFileRepositoryHref, "fileFileRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileAPIRepositoriesFileFileRemoveRoleRequest struct { + ctx context.Context + ApiService *RepositoriesFileAPIService + fileFileRepositoryHref string + nestedRole *NestedRole +} + +func (r RepositoriesFileAPIRepositoriesFileFileRemoveRoleRequest) NestedRole(nestedRole NestedRole) RepositoriesFileAPIRepositoriesFileFileRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RepositoriesFileAPIRepositoriesFileFileRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFileRemoveRoleExecute(r) +} + +/* +RepositoriesFileFileRemoveRole Method for RepositoriesFileFileRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryHref + @return RepositoriesFileAPIRepositoriesFileFileRemoveRoleRequest +*/ +func (a *RepositoriesFileAPIService) RepositoriesFileFileRemoveRole(ctx context.Context, fileFileRepositoryHref string) RepositoriesFileAPIRepositoriesFileFileRemoveRoleRequest { + return RepositoriesFileAPIRepositoriesFileFileRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryHref: fileFileRepositoryHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RepositoriesFileAPIService) RepositoriesFileFileRemoveRoleExecute(r RepositoriesFileAPIRepositoriesFileFileRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileAPIService.RepositoriesFileFileRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_href"+"}", parameterValueToString(r.fileFileRepositoryHref, "fileFileRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileAPIRepositoriesFileFileSyncRequest struct { + ctx context.Context + ApiService *RepositoriesFileAPIService + fileFileRepositoryHref string + repositorySyncURL *RepositorySyncURL +} + +func (r RepositoriesFileAPIRepositoriesFileFileSyncRequest) RepositorySyncURL(repositorySyncURL RepositorySyncURL) RepositoriesFileAPIRepositoriesFileFileSyncRequest { + r.repositorySyncURL = &repositorySyncURL + return r +} + +func (r RepositoriesFileAPIRepositoriesFileFileSyncRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFileSyncExecute(r) +} + +/* +RepositoriesFileFileSync Sync from a remote + +Trigger an asynchronous task to sync file content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryHref + @return RepositoriesFileAPIRepositoriesFileFileSyncRequest +*/ +func (a *RepositoriesFileAPIService) RepositoriesFileFileSync(ctx context.Context, fileFileRepositoryHref string) RepositoriesFileAPIRepositoriesFileFileSyncRequest { + return RepositoriesFileAPIRepositoriesFileFileSyncRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryHref: fileFileRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesFileAPIService) RepositoriesFileFileSyncExecute(r RepositoriesFileAPIRepositoriesFileFileSyncRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileAPIService.RepositoriesFileFileSync") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_href}sync/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_href"+"}", parameterValueToString(r.fileFileRepositoryHref, "fileFileRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositorySyncURL == nil { + return localVarReturnValue, nil, reportError("repositorySyncURL is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositorySyncURL + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileAPIRepositoriesFileFileUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesFileAPIService + fileFileRepositoryHref string + fileFileRepository *FileFileRepository +} + +func (r RepositoriesFileAPIRepositoriesFileFileUpdateRequest) FileFileRepository(fileFileRepository FileFileRepository) RepositoriesFileAPIRepositoriesFileFileUpdateRequest { + r.fileFileRepository = &fileFileRepository + return r +} + +func (r RepositoriesFileAPIRepositoriesFileFileUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFileUpdateExecute(r) +} + +/* +RepositoriesFileFileUpdate Update a file repository + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryHref + @return RepositoriesFileAPIRepositoriesFileFileUpdateRequest +*/ +func (a *RepositoriesFileAPIService) RepositoriesFileFileUpdate(ctx context.Context, fileFileRepositoryHref string) RepositoriesFileAPIRepositoriesFileFileUpdateRequest { + return RepositoriesFileAPIRepositoriesFileFileUpdateRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryHref: fileFileRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesFileAPIService) RepositoriesFileFileUpdateExecute(r RepositoriesFileAPIRepositoriesFileFileUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileAPIService.RepositoriesFileFileUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_href"+"}", parameterValueToString(r.fileFileRepositoryHref, "fileFileRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.fileFileRepository == nil { + return localVarReturnValue, nil, reportError("fileFileRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.fileFileRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_file_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_file_versions.go new file mode 100644 index 0000000000..3dc2ecea10 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_file_versions.go @@ -0,0 +1,704 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RepositoriesFileVersionsAPIService RepositoriesFileVersionsAPI service +type RepositoriesFileVersionsAPIService service + +type RepositoriesFileVersionsAPIRepositoriesFileFileVersionsDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesFileVersionsAPIService + fileFileRepositoryVersionHref string +} + +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFileVersionsDeleteExecute(r) +} + +/* +RepositoriesFileFileVersionsDelete Delete a repository version + +Trigger an asynchronous task to delete a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryVersionHref + @return RepositoriesFileVersionsAPIRepositoriesFileFileVersionsDeleteRequest +*/ +func (a *RepositoriesFileVersionsAPIService) RepositoriesFileFileVersionsDelete(ctx context.Context, fileFileRepositoryVersionHref string) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsDeleteRequest { + return RepositoriesFileVersionsAPIRepositoriesFileFileVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryVersionHref: fileFileRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesFileVersionsAPIService) RepositoriesFileFileVersionsDeleteExecute(r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileVersionsAPIService.RepositoriesFileFileVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_version_href"+"}", parameterValueToString(r.fileFileRepositoryVersionHref, "fileFileRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest struct { + ctx context.Context + ApiService *RepositoriesFileVersionsAPIService + fileFileRepositoryHref string + content *string + contentIn *string + limit *int32 + number *int32 + numberGt *int32 + numberGte *int32 + numberLt *int32 + numberLte *int32 + numberRange *[]int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) Content(content string) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) ContentIn(contentIn string) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) Limit(limit int32) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.limit = &limit + return r +} + +// Filter results where number matches value +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) Number(number int32) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.number = &number + return r +} + +// Filter results where number is greater than value +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) NumberGt(numberGt int32) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.numberGt = &numberGt + return r +} + +// Filter results where number is greater than or equal to value +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) NumberGte(numberGte int32) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.numberGte = &numberGte + return r +} + +// Filter results where number is less than value +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) NumberLt(numberLt int32) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.numberLt = &numberLt + return r +} + +// Filter results where number is less than or equal to value +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) NumberLte(numberLte int32) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.numberLte = &numberLte + return r +} + +// Filter results where number is between two comma separated values +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) NumberRange(numberRange []int32) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.numberRange = &numberRange + return r +} + +// The initial index from which to return the results. +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) Offset(offset int32) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) Ordering(ordering []string) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) PulpCreated(pulpCreated time.Time) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) PulpCreatedGt(pulpCreatedGt time.Time) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) PulpCreatedGte(pulpCreatedGte time.Time) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) PulpCreatedLt(pulpCreatedLt time.Time) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) PulpCreatedLte(pulpCreatedLte time.Time) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// A list of fields to include in the response. +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) Fields(fields []string) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) ExcludeFields(excludeFields []string) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) Execute() (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + return r.ApiService.RepositoriesFileFileVersionsListExecute(r) +} + +/* +RepositoriesFileFileVersionsList List repository versions + + +FileRepositoryVersion represents a single file repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryHref + @return RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest +*/ +func (a *RepositoriesFileVersionsAPIService) RepositoriesFileFileVersionsList(ctx context.Context, fileFileRepositoryHref string) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest { + return RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryHref: fileFileRepositoryHref, + } +} + +// Execute executes the request +// @return PaginatedRepositoryVersionResponseList +func (a *RepositoriesFileVersionsAPIService) RepositoriesFileFileVersionsListExecute(r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsListRequest) (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRepositoryVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileVersionsAPIService.RepositoriesFileFileVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_href}versions/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_href"+"}", parameterValueToString(r.fileFileRepositoryHref, "fileFileRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.number != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number", r.number, "") + } + if r.numberGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gt", r.numberGt, "") + } + if r.numberGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gte", r.numberGte, "") + } + if r.numberLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lt", r.numberLt, "") + } + if r.numberLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lte", r.numberLte, "") + } + if r.numberRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__range", r.numberRange, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileVersionsAPIRepositoriesFileFileVersionsReadRequest struct { + ctx context.Context + ApiService *RepositoriesFileVersionsAPIService + fileFileRepositoryVersionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsReadRequest) Fields(fields []string) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsReadRequest) ExcludeFields(excludeFields []string) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsReadRequest) Execute() (*RepositoryVersionResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFileVersionsReadExecute(r) +} + +/* +RepositoriesFileFileVersionsRead Inspect a repository version + + +FileRepositoryVersion represents a single file repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryVersionHref + @return RepositoriesFileVersionsAPIRepositoriesFileFileVersionsReadRequest +*/ +func (a *RepositoriesFileVersionsAPIService) RepositoriesFileFileVersionsRead(ctx context.Context, fileFileRepositoryVersionHref string) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsReadRequest { + return RepositoriesFileVersionsAPIRepositoriesFileFileVersionsReadRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryVersionHref: fileFileRepositoryVersionHref, + } +} + +// Execute executes the request +// @return RepositoryVersionResponse +func (a *RepositoriesFileVersionsAPIService) RepositoriesFileFileVersionsReadExecute(r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsReadRequest) (*RepositoryVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileVersionsAPIService.RepositoriesFileFileVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_version_href"+"}", parameterValueToString(r.fileFileRepositoryVersionHref, "fileFileRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesFileVersionsAPIRepositoriesFileFileVersionsRepairRequest struct { + ctx context.Context + ApiService *RepositoriesFileVersionsAPIService + fileFileRepositoryVersionHref string + repair *Repair +} + +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsRepairRequest) Repair(repair Repair) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsRepairRequest { + r.repair = &repair + return r +} + +func (r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsRepairRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesFileFileVersionsRepairExecute(r) +} + +/* +RepositoriesFileFileVersionsRepair Method for RepositoriesFileFileVersionsRepair + +Trigger an asynchronous task to repair a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param fileFileRepositoryVersionHref + @return RepositoriesFileVersionsAPIRepositoriesFileFileVersionsRepairRequest +*/ +func (a *RepositoriesFileVersionsAPIService) RepositoriesFileFileVersionsRepair(ctx context.Context, fileFileRepositoryVersionHref string) RepositoriesFileVersionsAPIRepositoriesFileFileVersionsRepairRequest { + return RepositoriesFileVersionsAPIRepositoriesFileFileVersionsRepairRequest{ + ApiService: a, + ctx: ctx, + fileFileRepositoryVersionHref: fileFileRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesFileVersionsAPIService) RepositoriesFileFileVersionsRepairExecute(r RepositoriesFileVersionsAPIRepositoriesFileFileVersionsRepairRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesFileVersionsAPIService.RepositoriesFileFileVersionsRepair") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{file_file_repository_version_href}repair/" + localVarPath = strings.Replace(localVarPath, "{"+"file_file_repository_version_href"+"}", parameterValueToString(r.fileFileRepositoryVersionHref, "fileFileRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repair == nil { + return localVarReturnValue, nil, reportError("repair is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repair + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_gem.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_gem.go new file mode 100644 index 0000000000..9ff591ab32 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_gem.go @@ -0,0 +1,1189 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// RepositoriesGemAPIService RepositoriesGemAPI service +type RepositoriesGemAPIService service + +type RepositoriesGemAPIRepositoriesGemGemCreateRequest struct { + ctx context.Context + ApiService *RepositoriesGemAPIService + gemGemRepository *GemGemRepository +} + +func (r RepositoriesGemAPIRepositoriesGemGemCreateRequest) GemGemRepository(gemGemRepository GemGemRepository) RepositoriesGemAPIRepositoriesGemGemCreateRequest { + r.gemGemRepository = &gemGemRepository + return r +} + +func (r RepositoriesGemAPIRepositoriesGemGemCreateRequest) Execute() (*GemGemRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesGemGemCreateExecute(r) +} + +/* +RepositoriesGemGemCreate Create a gem repository + +A ViewSet for GemRepository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesGemAPIRepositoriesGemGemCreateRequest +*/ +func (a *RepositoriesGemAPIService) RepositoriesGemGemCreate(ctx context.Context) RepositoriesGemAPIRepositoriesGemGemCreateRequest { + return RepositoriesGemAPIRepositoriesGemGemCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GemGemRepositoryResponse +func (a *RepositoriesGemAPIService) RepositoriesGemGemCreateExecute(r RepositoriesGemAPIRepositoriesGemGemCreateRequest) (*GemGemRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GemGemRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesGemAPIService.RepositoriesGemGemCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/gem/gem/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.gemGemRepository == nil { + return localVarReturnValue, nil, reportError("gemGemRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.gemGemRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesGemAPIRepositoriesGemGemDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesGemAPIService + gemGemRepositoryHref string +} + +func (r RepositoriesGemAPIRepositoriesGemGemDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesGemGemDeleteExecute(r) +} + +/* +RepositoriesGemGemDelete Delete a gem repository + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRepositoryHref + @return RepositoriesGemAPIRepositoriesGemGemDeleteRequest +*/ +func (a *RepositoriesGemAPIService) RepositoriesGemGemDelete(ctx context.Context, gemGemRepositoryHref string) RepositoriesGemAPIRepositoriesGemGemDeleteRequest { + return RepositoriesGemAPIRepositoriesGemGemDeleteRequest{ + ApiService: a, + ctx: ctx, + gemGemRepositoryHref: gemGemRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesGemAPIService) RepositoriesGemGemDeleteExecute(r RepositoriesGemAPIRepositoriesGemGemDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesGemAPIService.RepositoriesGemGemDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_repository_href"+"}", parameterValueToString(r.gemGemRepositoryHref, "gemGemRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesGemAPIRepositoriesGemGemListRequest struct { + ctx context.Context + ApiService *RepositoriesGemAPIService + latestWithContent *string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + remote *string + retainRepoVersions *int32 + retainRepoVersionsGt *int32 + retainRepoVersionsGte *int32 + retainRepoVersionsIsnull *bool + retainRepoVersionsLt *int32 + retainRepoVersionsLte *int32 + retainRepoVersionsNe *int32 + retainRepoVersionsRange *[]int32 + withContent *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) LatestWithContent(latestWithContent string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.latestWithContent = &latestWithContent + return r +} + +// Number of results to return per page. +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) Limit(limit int32) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) Name(name string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) NameContains(nameContains string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) NameIcontains(nameIcontains string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) NameIn(nameIn []string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) NameStartswith(nameStartswith string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) Offset(offset int32) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) Ordering(ordering []string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) PulpIdIn(pulpIdIn []string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) PulpLabelSelect(pulpLabelSelect string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Foreign Key referenced by HREF +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) Remote(remote string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.remote = &remote + return r +} + +// Filter results where retain_repo_versions matches value +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) RetainRepoVersions(retainRepoVersions int32) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.retainRepoVersions = &retainRepoVersions + return r +} + +// Filter results where retain_repo_versions is greater than value +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) RetainRepoVersionsGt(retainRepoVersionsGt int32) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.retainRepoVersionsGt = &retainRepoVersionsGt + return r +} + +// Filter results where retain_repo_versions is greater than or equal to value +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) RetainRepoVersionsGte(retainRepoVersionsGte int32) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.retainRepoVersionsGte = &retainRepoVersionsGte + return r +} + +// Filter results where retain_repo_versions has a null value +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) RetainRepoVersionsIsnull(retainRepoVersionsIsnull bool) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.retainRepoVersionsIsnull = &retainRepoVersionsIsnull + return r +} + +// Filter results where retain_repo_versions is less than value +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) RetainRepoVersionsLt(retainRepoVersionsLt int32) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.retainRepoVersionsLt = &retainRepoVersionsLt + return r +} + +// Filter results where retain_repo_versions is less than or equal to value +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) RetainRepoVersionsLte(retainRepoVersionsLte int32) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.retainRepoVersionsLte = &retainRepoVersionsLte + return r +} + +// Filter results where retain_repo_versions not equal to value +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) RetainRepoVersionsNe(retainRepoVersionsNe int32) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.retainRepoVersionsNe = &retainRepoVersionsNe + return r +} + +// Filter results where retain_repo_versions is between two comma separated values +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) RetainRepoVersionsRange(retainRepoVersionsRange []int32) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.retainRepoVersionsRange = &retainRepoVersionsRange + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) WithContent(withContent string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) Fields(fields []string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) ExcludeFields(excludeFields []string) RepositoriesGemAPIRepositoriesGemGemListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesGemAPIRepositoriesGemGemListRequest) Execute() (*PaginatedgemGemRepositoryResponseList, *http.Response, error) { + return r.ApiService.RepositoriesGemGemListExecute(r) +} + +/* +RepositoriesGemGemList List gem repositorys + +A ViewSet for GemRepository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesGemAPIRepositoriesGemGemListRequest +*/ +func (a *RepositoriesGemAPIService) RepositoriesGemGemList(ctx context.Context) RepositoriesGemAPIRepositoriesGemGemListRequest { + return RepositoriesGemAPIRepositoriesGemGemListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedgemGemRepositoryResponseList +func (a *RepositoriesGemAPIService) RepositoriesGemGemListExecute(r RepositoriesGemAPIRepositoriesGemGemListRequest) (*PaginatedgemGemRepositoryResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedgemGemRepositoryResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesGemAPIService.RepositoriesGemGemList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/gem/gem/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.latestWithContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "latest_with_content", r.latestWithContent, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.remote != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "remote", r.remote, "") + } + if r.retainRepoVersions != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions", r.retainRepoVersions, "") + } + if r.retainRepoVersionsGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gt", r.retainRepoVersionsGt, "") + } + if r.retainRepoVersionsGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gte", r.retainRepoVersionsGte, "") + } + if r.retainRepoVersionsIsnull != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__isnull", r.retainRepoVersionsIsnull, "") + } + if r.retainRepoVersionsLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lt", r.retainRepoVersionsLt, "") + } + if r.retainRepoVersionsLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lte", r.retainRepoVersionsLte, "") + } + if r.retainRepoVersionsNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__ne", r.retainRepoVersionsNe, "") + } + if r.retainRepoVersionsRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__range", r.retainRepoVersionsRange, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesGemAPIRepositoriesGemGemModifyRequest struct { + ctx context.Context + ApiService *RepositoriesGemAPIService + gemGemRepositoryHref string + repositoryAddRemoveContent *RepositoryAddRemoveContent +} + +func (r RepositoriesGemAPIRepositoriesGemGemModifyRequest) RepositoryAddRemoveContent(repositoryAddRemoveContent RepositoryAddRemoveContent) RepositoriesGemAPIRepositoriesGemGemModifyRequest { + r.repositoryAddRemoveContent = &repositoryAddRemoveContent + return r +} + +func (r RepositoriesGemAPIRepositoriesGemGemModifyRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesGemGemModifyExecute(r) +} + +/* +RepositoriesGemGemModify Modify Repository Content + +Trigger an asynchronous task to create a new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRepositoryHref + @return RepositoriesGemAPIRepositoriesGemGemModifyRequest +*/ +func (a *RepositoriesGemAPIService) RepositoriesGemGemModify(ctx context.Context, gemGemRepositoryHref string) RepositoriesGemAPIRepositoriesGemGemModifyRequest { + return RepositoriesGemAPIRepositoriesGemGemModifyRequest{ + ApiService: a, + ctx: ctx, + gemGemRepositoryHref: gemGemRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesGemAPIService) RepositoriesGemGemModifyExecute(r RepositoriesGemAPIRepositoriesGemGemModifyRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesGemAPIService.RepositoriesGemGemModify") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_repository_href}modify/" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_repository_href"+"}", parameterValueToString(r.gemGemRepositoryHref, "gemGemRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositoryAddRemoveContent == nil { + return localVarReturnValue, nil, reportError("repositoryAddRemoveContent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositoryAddRemoveContent + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesGemAPIRepositoriesGemGemPartialUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesGemAPIService + gemGemRepositoryHref string + patchedgemGemRepository *PatchedgemGemRepository +} + +func (r RepositoriesGemAPIRepositoriesGemGemPartialUpdateRequest) PatchedgemGemRepository(patchedgemGemRepository PatchedgemGemRepository) RepositoriesGemAPIRepositoriesGemGemPartialUpdateRequest { + r.patchedgemGemRepository = &patchedgemGemRepository + return r +} + +func (r RepositoriesGemAPIRepositoriesGemGemPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesGemGemPartialUpdateExecute(r) +} + +/* +RepositoriesGemGemPartialUpdate Update a gem repository + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRepositoryHref + @return RepositoriesGemAPIRepositoriesGemGemPartialUpdateRequest +*/ +func (a *RepositoriesGemAPIService) RepositoriesGemGemPartialUpdate(ctx context.Context, gemGemRepositoryHref string) RepositoriesGemAPIRepositoriesGemGemPartialUpdateRequest { + return RepositoriesGemAPIRepositoriesGemGemPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + gemGemRepositoryHref: gemGemRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesGemAPIService) RepositoriesGemGemPartialUpdateExecute(r RepositoriesGemAPIRepositoriesGemGemPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesGemAPIService.RepositoriesGemGemPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_repository_href"+"}", parameterValueToString(r.gemGemRepositoryHref, "gemGemRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedgemGemRepository == nil { + return localVarReturnValue, nil, reportError("patchedgemGemRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedgemGemRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesGemAPIRepositoriesGemGemReadRequest struct { + ctx context.Context + ApiService *RepositoriesGemAPIService + gemGemRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesGemAPIRepositoriesGemGemReadRequest) Fields(fields []string) RepositoriesGemAPIRepositoriesGemGemReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesGemAPIRepositoriesGemGemReadRequest) ExcludeFields(excludeFields []string) RepositoriesGemAPIRepositoriesGemGemReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesGemAPIRepositoriesGemGemReadRequest) Execute() (*GemGemRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesGemGemReadExecute(r) +} + +/* +RepositoriesGemGemRead Inspect a gem repository + +A ViewSet for GemRepository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRepositoryHref + @return RepositoriesGemAPIRepositoriesGemGemReadRequest +*/ +func (a *RepositoriesGemAPIService) RepositoriesGemGemRead(ctx context.Context, gemGemRepositoryHref string) RepositoriesGemAPIRepositoriesGemGemReadRequest { + return RepositoriesGemAPIRepositoriesGemGemReadRequest{ + ApiService: a, + ctx: ctx, + gemGemRepositoryHref: gemGemRepositoryHref, + } +} + +// Execute executes the request +// @return GemGemRepositoryResponse +func (a *RepositoriesGemAPIService) RepositoriesGemGemReadExecute(r RepositoriesGemAPIRepositoriesGemGemReadRequest) (*GemGemRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GemGemRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesGemAPIService.RepositoriesGemGemRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_repository_href"+"}", parameterValueToString(r.gemGemRepositoryHref, "gemGemRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesGemAPIRepositoriesGemGemSyncRequest struct { + ctx context.Context + ApiService *RepositoriesGemAPIService + gemGemRepositoryHref string + repositorySyncURL *RepositorySyncURL +} + +func (r RepositoriesGemAPIRepositoriesGemGemSyncRequest) RepositorySyncURL(repositorySyncURL RepositorySyncURL) RepositoriesGemAPIRepositoriesGemGemSyncRequest { + r.repositorySyncURL = &repositorySyncURL + return r +} + +func (r RepositoriesGemAPIRepositoriesGemGemSyncRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesGemGemSyncExecute(r) +} + +/* +RepositoriesGemGemSync Sync from a remote + +Trigger an asynchronous task to sync gem content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRepositoryHref + @return RepositoriesGemAPIRepositoriesGemGemSyncRequest +*/ +func (a *RepositoriesGemAPIService) RepositoriesGemGemSync(ctx context.Context, gemGemRepositoryHref string) RepositoriesGemAPIRepositoriesGemGemSyncRequest { + return RepositoriesGemAPIRepositoriesGemGemSyncRequest{ + ApiService: a, + ctx: ctx, + gemGemRepositoryHref: gemGemRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesGemAPIService) RepositoriesGemGemSyncExecute(r RepositoriesGemAPIRepositoriesGemGemSyncRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesGemAPIService.RepositoriesGemGemSync") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_repository_href}sync/" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_repository_href"+"}", parameterValueToString(r.gemGemRepositoryHref, "gemGemRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositorySyncURL == nil { + return localVarReturnValue, nil, reportError("repositorySyncURL is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositorySyncURL + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesGemAPIRepositoriesGemGemUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesGemAPIService + gemGemRepositoryHref string + gemGemRepository *GemGemRepository +} + +func (r RepositoriesGemAPIRepositoriesGemGemUpdateRequest) GemGemRepository(gemGemRepository GemGemRepository) RepositoriesGemAPIRepositoriesGemGemUpdateRequest { + r.gemGemRepository = &gemGemRepository + return r +} + +func (r RepositoriesGemAPIRepositoriesGemGemUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesGemGemUpdateExecute(r) +} + +/* +RepositoriesGemGemUpdate Update a gem repository + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRepositoryHref + @return RepositoriesGemAPIRepositoriesGemGemUpdateRequest +*/ +func (a *RepositoriesGemAPIService) RepositoriesGemGemUpdate(ctx context.Context, gemGemRepositoryHref string) RepositoriesGemAPIRepositoriesGemGemUpdateRequest { + return RepositoriesGemAPIRepositoriesGemGemUpdateRequest{ + ApiService: a, + ctx: ctx, + gemGemRepositoryHref: gemGemRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesGemAPIService) RepositoriesGemGemUpdateExecute(r RepositoriesGemAPIRepositoriesGemGemUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesGemAPIService.RepositoriesGemGemUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_repository_href"+"}", parameterValueToString(r.gemGemRepositoryHref, "gemGemRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.gemGemRepository == nil { + return localVarReturnValue, nil, reportError("gemGemRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.gemGemRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_gem_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_gem_versions.go new file mode 100644 index 0000000000..7d8ad1099b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_gem_versions.go @@ -0,0 +1,702 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RepositoriesGemVersionsAPIService RepositoriesGemVersionsAPI service +type RepositoriesGemVersionsAPIService service + +type RepositoriesGemVersionsAPIRepositoriesGemGemVersionsDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesGemVersionsAPIService + gemGemRepositoryVersionHref string +} + +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesGemGemVersionsDeleteExecute(r) +} + +/* +RepositoriesGemGemVersionsDelete Delete a repository version + +Trigger an asynchronous task to delete a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRepositoryVersionHref + @return RepositoriesGemVersionsAPIRepositoriesGemGemVersionsDeleteRequest +*/ +func (a *RepositoriesGemVersionsAPIService) RepositoriesGemGemVersionsDelete(ctx context.Context, gemGemRepositoryVersionHref string) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsDeleteRequest { + return RepositoriesGemVersionsAPIRepositoriesGemGemVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + gemGemRepositoryVersionHref: gemGemRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesGemVersionsAPIService) RepositoriesGemGemVersionsDeleteExecute(r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesGemVersionsAPIService.RepositoriesGemGemVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_repository_version_href"+"}", parameterValueToString(r.gemGemRepositoryVersionHref, "gemGemRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest struct { + ctx context.Context + ApiService *RepositoriesGemVersionsAPIService + gemGemRepositoryHref string + content *string + contentIn *string + limit *int32 + number *int32 + numberGt *int32 + numberGte *int32 + numberLt *int32 + numberLte *int32 + numberRange *[]int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) Content(content string) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) ContentIn(contentIn string) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) Limit(limit int32) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.limit = &limit + return r +} + +// Filter results where number matches value +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) Number(number int32) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.number = &number + return r +} + +// Filter results where number is greater than value +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) NumberGt(numberGt int32) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.numberGt = &numberGt + return r +} + +// Filter results where number is greater than or equal to value +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) NumberGte(numberGte int32) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.numberGte = &numberGte + return r +} + +// Filter results where number is less than value +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) NumberLt(numberLt int32) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.numberLt = &numberLt + return r +} + +// Filter results where number is less than or equal to value +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) NumberLte(numberLte int32) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.numberLte = &numberLte + return r +} + +// Filter results where number is between two comma separated values +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) NumberRange(numberRange []int32) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.numberRange = &numberRange + return r +} + +// The initial index from which to return the results. +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) Offset(offset int32) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) Ordering(ordering []string) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) PulpCreated(pulpCreated time.Time) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) PulpCreatedGt(pulpCreatedGt time.Time) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) PulpCreatedGte(pulpCreatedGte time.Time) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) PulpCreatedLt(pulpCreatedLt time.Time) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) PulpCreatedLte(pulpCreatedLte time.Time) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// A list of fields to include in the response. +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) Fields(fields []string) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) ExcludeFields(excludeFields []string) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) Execute() (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + return r.ApiService.RepositoriesGemGemVersionsListExecute(r) +} + +/* +RepositoriesGemGemVersionsList List repository versions + +A ViewSet for a GemRepositoryVersion represents a single Gem repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRepositoryHref + @return RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest +*/ +func (a *RepositoriesGemVersionsAPIService) RepositoriesGemGemVersionsList(ctx context.Context, gemGemRepositoryHref string) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest { + return RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest{ + ApiService: a, + ctx: ctx, + gemGemRepositoryHref: gemGemRepositoryHref, + } +} + +// Execute executes the request +// @return PaginatedRepositoryVersionResponseList +func (a *RepositoriesGemVersionsAPIService) RepositoriesGemGemVersionsListExecute(r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsListRequest) (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRepositoryVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesGemVersionsAPIService.RepositoriesGemGemVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_repository_href}versions/" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_repository_href"+"}", parameterValueToString(r.gemGemRepositoryHref, "gemGemRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.number != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number", r.number, "") + } + if r.numberGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gt", r.numberGt, "") + } + if r.numberGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gte", r.numberGte, "") + } + if r.numberLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lt", r.numberLt, "") + } + if r.numberLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lte", r.numberLte, "") + } + if r.numberRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__range", r.numberRange, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesGemVersionsAPIRepositoriesGemGemVersionsReadRequest struct { + ctx context.Context + ApiService *RepositoriesGemVersionsAPIService + gemGemRepositoryVersionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsReadRequest) Fields(fields []string) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsReadRequest) ExcludeFields(excludeFields []string) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsReadRequest) Execute() (*RepositoryVersionResponse, *http.Response, error) { + return r.ApiService.RepositoriesGemGemVersionsReadExecute(r) +} + +/* +RepositoriesGemGemVersionsRead Inspect a repository version + +A ViewSet for a GemRepositoryVersion represents a single Gem repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRepositoryVersionHref + @return RepositoriesGemVersionsAPIRepositoriesGemGemVersionsReadRequest +*/ +func (a *RepositoriesGemVersionsAPIService) RepositoriesGemGemVersionsRead(ctx context.Context, gemGemRepositoryVersionHref string) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsReadRequest { + return RepositoriesGemVersionsAPIRepositoriesGemGemVersionsReadRequest{ + ApiService: a, + ctx: ctx, + gemGemRepositoryVersionHref: gemGemRepositoryVersionHref, + } +} + +// Execute executes the request +// @return RepositoryVersionResponse +func (a *RepositoriesGemVersionsAPIService) RepositoriesGemGemVersionsReadExecute(r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsReadRequest) (*RepositoryVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesGemVersionsAPIService.RepositoriesGemGemVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_repository_version_href"+"}", parameterValueToString(r.gemGemRepositoryVersionHref, "gemGemRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesGemVersionsAPIRepositoriesGemGemVersionsRepairRequest struct { + ctx context.Context + ApiService *RepositoriesGemVersionsAPIService + gemGemRepositoryVersionHref string + repair *Repair +} + +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsRepairRequest) Repair(repair Repair) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsRepairRequest { + r.repair = &repair + return r +} + +func (r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsRepairRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesGemGemVersionsRepairExecute(r) +} + +/* +RepositoriesGemGemVersionsRepair Method for RepositoriesGemGemVersionsRepair + +Trigger an asynchronous task to repair a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param gemGemRepositoryVersionHref + @return RepositoriesGemVersionsAPIRepositoriesGemGemVersionsRepairRequest +*/ +func (a *RepositoriesGemVersionsAPIService) RepositoriesGemGemVersionsRepair(ctx context.Context, gemGemRepositoryVersionHref string) RepositoriesGemVersionsAPIRepositoriesGemGemVersionsRepairRequest { + return RepositoriesGemVersionsAPIRepositoriesGemGemVersionsRepairRequest{ + ApiService: a, + ctx: ctx, + gemGemRepositoryVersionHref: gemGemRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesGemVersionsAPIService) RepositoriesGemGemVersionsRepairExecute(r RepositoriesGemVersionsAPIRepositoriesGemGemVersionsRepairRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesGemVersionsAPIService.RepositoriesGemGemVersionsRepair") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{gem_gem_repository_version_href}repair/" + localVarPath = strings.Replace(localVarPath, "{"+"gem_gem_repository_version_href"+"}", parameterValueToString(r.gemGemRepositoryVersionHref, "gemGemRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repair == nil { + return localVarReturnValue, nil, reportError("repair is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repair + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_maven.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_maven.go new file mode 100644 index 0000000000..413a86d914 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_maven.go @@ -0,0 +1,1075 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// RepositoriesMavenAPIService RepositoriesMavenAPI service +type RepositoriesMavenAPIService service + +type RepositoriesMavenAPIRepositoriesMavenMavenAddCachedContentRequest struct { + ctx context.Context + ApiService *RepositoriesMavenAPIService + mavenMavenRepositoryHref string + repositoryAddCachedContent *RepositoryAddCachedContent +} + +func (r RepositoriesMavenAPIRepositoriesMavenMavenAddCachedContentRequest) RepositoryAddCachedContent(repositoryAddCachedContent RepositoryAddCachedContent) RepositoriesMavenAPIRepositoriesMavenMavenAddCachedContentRequest { + r.repositoryAddCachedContent = &repositoryAddCachedContent + return r +} + +func (r RepositoriesMavenAPIRepositoriesMavenMavenAddCachedContentRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesMavenMavenAddCachedContentExecute(r) +} + +/* +RepositoriesMavenMavenAddCachedContent Add cached content + +Trigger an asynchronous task to add cached content to a repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenRepositoryHref + @return RepositoriesMavenAPIRepositoriesMavenMavenAddCachedContentRequest +*/ +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenAddCachedContent(ctx context.Context, mavenMavenRepositoryHref string) RepositoriesMavenAPIRepositoriesMavenMavenAddCachedContentRequest { + return RepositoriesMavenAPIRepositoriesMavenMavenAddCachedContentRequest{ + ApiService: a, + ctx: ctx, + mavenMavenRepositoryHref: mavenMavenRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenAddCachedContentExecute(r RepositoriesMavenAPIRepositoriesMavenMavenAddCachedContentRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesMavenAPIService.RepositoriesMavenMavenAddCachedContent") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_repository_href}add_cached_content/" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_repository_href"+"}", parameterValueToString(r.mavenMavenRepositoryHref, "mavenMavenRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositoryAddCachedContent == nil { + return localVarReturnValue, nil, reportError("repositoryAddCachedContent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositoryAddCachedContent + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesMavenAPIRepositoriesMavenMavenCreateRequest struct { + ctx context.Context + ApiService *RepositoriesMavenAPIService + mavenMavenRepository *MavenMavenRepository +} + +func (r RepositoriesMavenAPIRepositoriesMavenMavenCreateRequest) MavenMavenRepository(mavenMavenRepository MavenMavenRepository) RepositoriesMavenAPIRepositoriesMavenMavenCreateRequest { + r.mavenMavenRepository = &mavenMavenRepository + return r +} + +func (r RepositoriesMavenAPIRepositoriesMavenMavenCreateRequest) Execute() (*MavenMavenRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesMavenMavenCreateExecute(r) +} + +/* +RepositoriesMavenMavenCreate Create a maven repository + +A ViewSet for MavenRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesMavenAPIRepositoriesMavenMavenCreateRequest +*/ +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenCreate(ctx context.Context) RepositoriesMavenAPIRepositoriesMavenMavenCreateRequest { + return RepositoriesMavenAPIRepositoriesMavenMavenCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return MavenMavenRepositoryResponse +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenCreateExecute(r RepositoriesMavenAPIRepositoriesMavenMavenCreateRequest) (*MavenMavenRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MavenMavenRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesMavenAPIService.RepositoriesMavenMavenCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/maven/maven/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.mavenMavenRepository == nil { + return localVarReturnValue, nil, reportError("mavenMavenRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.mavenMavenRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesMavenAPIRepositoriesMavenMavenDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesMavenAPIService + mavenMavenRepositoryHref string +} + +func (r RepositoriesMavenAPIRepositoriesMavenMavenDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesMavenMavenDeleteExecute(r) +} + +/* +RepositoriesMavenMavenDelete Delete a maven repository + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenRepositoryHref + @return RepositoriesMavenAPIRepositoriesMavenMavenDeleteRequest +*/ +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenDelete(ctx context.Context, mavenMavenRepositoryHref string) RepositoriesMavenAPIRepositoriesMavenMavenDeleteRequest { + return RepositoriesMavenAPIRepositoriesMavenMavenDeleteRequest{ + ApiService: a, + ctx: ctx, + mavenMavenRepositoryHref: mavenMavenRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenDeleteExecute(r RepositoriesMavenAPIRepositoriesMavenMavenDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesMavenAPIService.RepositoriesMavenMavenDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_repository_href"+"}", parameterValueToString(r.mavenMavenRepositoryHref, "mavenMavenRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesMavenAPIRepositoriesMavenMavenListRequest struct { + ctx context.Context + ApiService *RepositoriesMavenAPIService + latestWithContent *string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + remote *string + retainRepoVersions *int32 + retainRepoVersionsGt *int32 + retainRepoVersionsGte *int32 + retainRepoVersionsIsnull *bool + retainRepoVersionsLt *int32 + retainRepoVersionsLte *int32 + retainRepoVersionsNe *int32 + retainRepoVersionsRange *[]int32 + withContent *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) LatestWithContent(latestWithContent string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.latestWithContent = &latestWithContent + return r +} + +// Number of results to return per page. +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) Limit(limit int32) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) Name(name string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) NameContains(nameContains string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) NameIcontains(nameIcontains string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) NameIn(nameIn []string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) NameStartswith(nameStartswith string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) Offset(offset int32) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) Ordering(ordering []string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) PulpIdIn(pulpIdIn []string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) PulpLabelSelect(pulpLabelSelect string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Foreign Key referenced by HREF +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) Remote(remote string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.remote = &remote + return r +} + +// Filter results where retain_repo_versions matches value +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) RetainRepoVersions(retainRepoVersions int32) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.retainRepoVersions = &retainRepoVersions + return r +} + +// Filter results where retain_repo_versions is greater than value +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) RetainRepoVersionsGt(retainRepoVersionsGt int32) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.retainRepoVersionsGt = &retainRepoVersionsGt + return r +} + +// Filter results where retain_repo_versions is greater than or equal to value +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) RetainRepoVersionsGte(retainRepoVersionsGte int32) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.retainRepoVersionsGte = &retainRepoVersionsGte + return r +} + +// Filter results where retain_repo_versions has a null value +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) RetainRepoVersionsIsnull(retainRepoVersionsIsnull bool) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.retainRepoVersionsIsnull = &retainRepoVersionsIsnull + return r +} + +// Filter results where retain_repo_versions is less than value +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) RetainRepoVersionsLt(retainRepoVersionsLt int32) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.retainRepoVersionsLt = &retainRepoVersionsLt + return r +} + +// Filter results where retain_repo_versions is less than or equal to value +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) RetainRepoVersionsLte(retainRepoVersionsLte int32) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.retainRepoVersionsLte = &retainRepoVersionsLte + return r +} + +// Filter results where retain_repo_versions not equal to value +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) RetainRepoVersionsNe(retainRepoVersionsNe int32) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.retainRepoVersionsNe = &retainRepoVersionsNe + return r +} + +// Filter results where retain_repo_versions is between two comma separated values +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) RetainRepoVersionsRange(retainRepoVersionsRange []int32) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.retainRepoVersionsRange = &retainRepoVersionsRange + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) WithContent(withContent string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) Fields(fields []string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) ExcludeFields(excludeFields []string) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) Execute() (*PaginatedmavenMavenRepositoryResponseList, *http.Response, error) { + return r.ApiService.RepositoriesMavenMavenListExecute(r) +} + +/* +RepositoriesMavenMavenList List maven repositorys + +A ViewSet for MavenRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesMavenAPIRepositoriesMavenMavenListRequest +*/ +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenList(ctx context.Context) RepositoriesMavenAPIRepositoriesMavenMavenListRequest { + return RepositoriesMavenAPIRepositoriesMavenMavenListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedmavenMavenRepositoryResponseList +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenListExecute(r RepositoriesMavenAPIRepositoriesMavenMavenListRequest) (*PaginatedmavenMavenRepositoryResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedmavenMavenRepositoryResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesMavenAPIService.RepositoriesMavenMavenList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/maven/maven/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.latestWithContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "latest_with_content", r.latestWithContent, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.remote != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "remote", r.remote, "") + } + if r.retainRepoVersions != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions", r.retainRepoVersions, "") + } + if r.retainRepoVersionsGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gt", r.retainRepoVersionsGt, "") + } + if r.retainRepoVersionsGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gte", r.retainRepoVersionsGte, "") + } + if r.retainRepoVersionsIsnull != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__isnull", r.retainRepoVersionsIsnull, "") + } + if r.retainRepoVersionsLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lt", r.retainRepoVersionsLt, "") + } + if r.retainRepoVersionsLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lte", r.retainRepoVersionsLte, "") + } + if r.retainRepoVersionsNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__ne", r.retainRepoVersionsNe, "") + } + if r.retainRepoVersionsRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__range", r.retainRepoVersionsRange, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesMavenAPIRepositoriesMavenMavenPartialUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesMavenAPIService + mavenMavenRepositoryHref string + patchedmavenMavenRepository *PatchedmavenMavenRepository +} + +func (r RepositoriesMavenAPIRepositoriesMavenMavenPartialUpdateRequest) PatchedmavenMavenRepository(patchedmavenMavenRepository PatchedmavenMavenRepository) RepositoriesMavenAPIRepositoriesMavenMavenPartialUpdateRequest { + r.patchedmavenMavenRepository = &patchedmavenMavenRepository + return r +} + +func (r RepositoriesMavenAPIRepositoriesMavenMavenPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesMavenMavenPartialUpdateExecute(r) +} + +/* +RepositoriesMavenMavenPartialUpdate Update a maven repository + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenRepositoryHref + @return RepositoriesMavenAPIRepositoriesMavenMavenPartialUpdateRequest +*/ +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenPartialUpdate(ctx context.Context, mavenMavenRepositoryHref string) RepositoriesMavenAPIRepositoriesMavenMavenPartialUpdateRequest { + return RepositoriesMavenAPIRepositoriesMavenMavenPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + mavenMavenRepositoryHref: mavenMavenRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenPartialUpdateExecute(r RepositoriesMavenAPIRepositoriesMavenMavenPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesMavenAPIService.RepositoriesMavenMavenPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_repository_href"+"}", parameterValueToString(r.mavenMavenRepositoryHref, "mavenMavenRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedmavenMavenRepository == nil { + return localVarReturnValue, nil, reportError("patchedmavenMavenRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedmavenMavenRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesMavenAPIRepositoriesMavenMavenReadRequest struct { + ctx context.Context + ApiService *RepositoriesMavenAPIService + mavenMavenRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesMavenAPIRepositoriesMavenMavenReadRequest) Fields(fields []string) RepositoriesMavenAPIRepositoriesMavenMavenReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesMavenAPIRepositoriesMavenMavenReadRequest) ExcludeFields(excludeFields []string) RepositoriesMavenAPIRepositoriesMavenMavenReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesMavenAPIRepositoriesMavenMavenReadRequest) Execute() (*MavenMavenRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesMavenMavenReadExecute(r) +} + +/* +RepositoriesMavenMavenRead Inspect a maven repository + +A ViewSet for MavenRemote. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenRepositoryHref + @return RepositoriesMavenAPIRepositoriesMavenMavenReadRequest +*/ +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenRead(ctx context.Context, mavenMavenRepositoryHref string) RepositoriesMavenAPIRepositoriesMavenMavenReadRequest { + return RepositoriesMavenAPIRepositoriesMavenMavenReadRequest{ + ApiService: a, + ctx: ctx, + mavenMavenRepositoryHref: mavenMavenRepositoryHref, + } +} + +// Execute executes the request +// @return MavenMavenRepositoryResponse +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenReadExecute(r RepositoriesMavenAPIRepositoriesMavenMavenReadRequest) (*MavenMavenRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MavenMavenRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesMavenAPIService.RepositoriesMavenMavenRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_repository_href"+"}", parameterValueToString(r.mavenMavenRepositoryHref, "mavenMavenRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesMavenAPIRepositoriesMavenMavenUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesMavenAPIService + mavenMavenRepositoryHref string + mavenMavenRepository *MavenMavenRepository +} + +func (r RepositoriesMavenAPIRepositoriesMavenMavenUpdateRequest) MavenMavenRepository(mavenMavenRepository MavenMavenRepository) RepositoriesMavenAPIRepositoriesMavenMavenUpdateRequest { + r.mavenMavenRepository = &mavenMavenRepository + return r +} + +func (r RepositoriesMavenAPIRepositoriesMavenMavenUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesMavenMavenUpdateExecute(r) +} + +/* +RepositoriesMavenMavenUpdate Update a maven repository + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenRepositoryHref + @return RepositoriesMavenAPIRepositoriesMavenMavenUpdateRequest +*/ +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenUpdate(ctx context.Context, mavenMavenRepositoryHref string) RepositoriesMavenAPIRepositoriesMavenMavenUpdateRequest { + return RepositoriesMavenAPIRepositoriesMavenMavenUpdateRequest{ + ApiService: a, + ctx: ctx, + mavenMavenRepositoryHref: mavenMavenRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesMavenAPIService) RepositoriesMavenMavenUpdateExecute(r RepositoriesMavenAPIRepositoriesMavenMavenUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesMavenAPIService.RepositoriesMavenMavenUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_repository_href"+"}", parameterValueToString(r.mavenMavenRepositoryHref, "mavenMavenRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.mavenMavenRepository == nil { + return localVarReturnValue, nil, reportError("mavenMavenRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.mavenMavenRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_maven_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_maven_versions.go new file mode 100644 index 0000000000..b82c8c8069 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_maven_versions.go @@ -0,0 +1,702 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RepositoriesMavenVersionsAPIService RepositoriesMavenVersionsAPI service +type RepositoriesMavenVersionsAPIService service + +type RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesMavenVersionsAPIService + mavenMavenRepositoryVersionHref string +} + +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesMavenMavenVersionsDeleteExecute(r) +} + +/* +RepositoriesMavenMavenVersionsDelete Delete a repository version + +Trigger an asynchronous task to delete a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenRepositoryVersionHref + @return RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsDeleteRequest +*/ +func (a *RepositoriesMavenVersionsAPIService) RepositoriesMavenMavenVersionsDelete(ctx context.Context, mavenMavenRepositoryVersionHref string) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsDeleteRequest { + return RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + mavenMavenRepositoryVersionHref: mavenMavenRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesMavenVersionsAPIService) RepositoriesMavenMavenVersionsDeleteExecute(r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesMavenVersionsAPIService.RepositoriesMavenMavenVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_repository_version_href"+"}", parameterValueToString(r.mavenMavenRepositoryVersionHref, "mavenMavenRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest struct { + ctx context.Context + ApiService *RepositoriesMavenVersionsAPIService + mavenMavenRepositoryHref string + content *string + contentIn *string + limit *int32 + number *int32 + numberGt *int32 + numberGte *int32 + numberLt *int32 + numberLte *int32 + numberRange *[]int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) Content(content string) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) ContentIn(contentIn string) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) Limit(limit int32) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.limit = &limit + return r +} + +// Filter results where number matches value +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) Number(number int32) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.number = &number + return r +} + +// Filter results where number is greater than value +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) NumberGt(numberGt int32) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.numberGt = &numberGt + return r +} + +// Filter results where number is greater than or equal to value +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) NumberGte(numberGte int32) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.numberGte = &numberGte + return r +} + +// Filter results where number is less than value +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) NumberLt(numberLt int32) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.numberLt = &numberLt + return r +} + +// Filter results where number is less than or equal to value +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) NumberLte(numberLte int32) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.numberLte = &numberLte + return r +} + +// Filter results where number is between two comma separated values +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) NumberRange(numberRange []int32) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.numberRange = &numberRange + return r +} + +// The initial index from which to return the results. +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) Offset(offset int32) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) Ordering(ordering []string) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) PulpCreated(pulpCreated time.Time) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) PulpCreatedGt(pulpCreatedGt time.Time) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) PulpCreatedGte(pulpCreatedGte time.Time) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) PulpCreatedLt(pulpCreatedLt time.Time) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) PulpCreatedLte(pulpCreatedLte time.Time) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// A list of fields to include in the response. +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) Fields(fields []string) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) ExcludeFields(excludeFields []string) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) Execute() (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + return r.ApiService.RepositoriesMavenMavenVersionsListExecute(r) +} + +/* +RepositoriesMavenMavenVersionsList List repository versions + +MavenRepositoryVersion represents a single Maven repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenRepositoryHref + @return RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest +*/ +func (a *RepositoriesMavenVersionsAPIService) RepositoriesMavenMavenVersionsList(ctx context.Context, mavenMavenRepositoryHref string) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest { + return RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest{ + ApiService: a, + ctx: ctx, + mavenMavenRepositoryHref: mavenMavenRepositoryHref, + } +} + +// Execute executes the request +// @return PaginatedRepositoryVersionResponseList +func (a *RepositoriesMavenVersionsAPIService) RepositoriesMavenMavenVersionsListExecute(r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsListRequest) (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRepositoryVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesMavenVersionsAPIService.RepositoriesMavenMavenVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_repository_href}versions/" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_repository_href"+"}", parameterValueToString(r.mavenMavenRepositoryHref, "mavenMavenRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.number != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number", r.number, "") + } + if r.numberGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gt", r.numberGt, "") + } + if r.numberGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gte", r.numberGte, "") + } + if r.numberLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lt", r.numberLt, "") + } + if r.numberLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lte", r.numberLte, "") + } + if r.numberRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__range", r.numberRange, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsReadRequest struct { + ctx context.Context + ApiService *RepositoriesMavenVersionsAPIService + mavenMavenRepositoryVersionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsReadRequest) Fields(fields []string) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsReadRequest) ExcludeFields(excludeFields []string) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsReadRequest) Execute() (*RepositoryVersionResponse, *http.Response, error) { + return r.ApiService.RepositoriesMavenMavenVersionsReadExecute(r) +} + +/* +RepositoriesMavenMavenVersionsRead Inspect a repository version + +MavenRepositoryVersion represents a single Maven repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenRepositoryVersionHref + @return RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsReadRequest +*/ +func (a *RepositoriesMavenVersionsAPIService) RepositoriesMavenMavenVersionsRead(ctx context.Context, mavenMavenRepositoryVersionHref string) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsReadRequest { + return RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsReadRequest{ + ApiService: a, + ctx: ctx, + mavenMavenRepositoryVersionHref: mavenMavenRepositoryVersionHref, + } +} + +// Execute executes the request +// @return RepositoryVersionResponse +func (a *RepositoriesMavenVersionsAPIService) RepositoriesMavenMavenVersionsReadExecute(r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsReadRequest) (*RepositoryVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesMavenVersionsAPIService.RepositoriesMavenMavenVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_repository_version_href"+"}", parameterValueToString(r.mavenMavenRepositoryVersionHref, "mavenMavenRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsRepairRequest struct { + ctx context.Context + ApiService *RepositoriesMavenVersionsAPIService + mavenMavenRepositoryVersionHref string + repair *Repair +} + +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsRepairRequest) Repair(repair Repair) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsRepairRequest { + r.repair = &repair + return r +} + +func (r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsRepairRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesMavenMavenVersionsRepairExecute(r) +} + +/* +RepositoriesMavenMavenVersionsRepair Method for RepositoriesMavenMavenVersionsRepair + +Trigger an asynchronous task to repair a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mavenMavenRepositoryVersionHref + @return RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsRepairRequest +*/ +func (a *RepositoriesMavenVersionsAPIService) RepositoriesMavenMavenVersionsRepair(ctx context.Context, mavenMavenRepositoryVersionHref string) RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsRepairRequest { + return RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsRepairRequest{ + ApiService: a, + ctx: ctx, + mavenMavenRepositoryVersionHref: mavenMavenRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesMavenVersionsAPIService) RepositoriesMavenMavenVersionsRepairExecute(r RepositoriesMavenVersionsAPIRepositoriesMavenMavenVersionsRepairRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesMavenVersionsAPIService.RepositoriesMavenMavenVersionsRepair") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{maven_maven_repository_version_href}repair/" + localVarPath = strings.Replace(localVarPath, "{"+"maven_maven_repository_version_href"+"}", parameterValueToString(r.mavenMavenRepositoryVersionHref, "mavenMavenRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repair == nil { + return localVarReturnValue, nil, reportError("repair is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repair + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ostree.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ostree.go new file mode 100644 index 0000000000..765c0e09e5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ostree.go @@ -0,0 +1,1417 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// RepositoriesOstreeAPIService RepositoriesOstreeAPI service +type RepositoriesOstreeAPIService service + +type RepositoriesOstreeAPIRepositoriesOstreeOstreeCreateRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeAPIService + ostreeOstreeRepository *OstreeOstreeRepository +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeCreateRequest) OstreeOstreeRepository(ostreeOstreeRepository OstreeOstreeRepository) RepositoriesOstreeAPIRepositoriesOstreeOstreeCreateRequest { + r.ostreeOstreeRepository = &ostreeOstreeRepository + return r +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeCreateRequest) Execute() (*OstreeOstreeRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreeCreateExecute(r) +} + +/* +RepositoriesOstreeOstreeCreate Create an ostree repository + +A ViewSet class for OSTree repositories. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesOstreeAPIRepositoriesOstreeOstreeCreateRequest +*/ +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeCreate(ctx context.Context) RepositoriesOstreeAPIRepositoriesOstreeOstreeCreateRequest { + return RepositoriesOstreeAPIRepositoriesOstreeOstreeCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OstreeOstreeRepositoryResponse +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeCreateExecute(r RepositoriesOstreeAPIRepositoriesOstreeOstreeCreateRequest) (*OstreeOstreeRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OstreeOstreeRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeAPIService.RepositoriesOstreeOstreeCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/ostree/ostree/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ostreeOstreeRepository == nil { + return localVarReturnValue, nil, reportError("ostreeOstreeRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ostreeOstreeRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesOstreeAPIRepositoriesOstreeOstreeDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeAPIService + ostreeOstreeRepositoryHref string +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreeDeleteExecute(r) +} + +/* +RepositoriesOstreeOstreeDelete Delete an ostree repository + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRepositoryHref + @return RepositoriesOstreeAPIRepositoriesOstreeOstreeDeleteRequest +*/ +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeDelete(ctx context.Context, ostreeOstreeRepositoryHref string) RepositoriesOstreeAPIRepositoriesOstreeOstreeDeleteRequest { + return RepositoriesOstreeAPIRepositoriesOstreeOstreeDeleteRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRepositoryHref: ostreeOstreeRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeDeleteExecute(r RepositoriesOstreeAPIRepositoriesOstreeOstreeDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeAPIService.RepositoriesOstreeOstreeDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_repository_href"+"}", parameterValueToString(r.ostreeOstreeRepositoryHref, "ostreeOstreeRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesOstreeAPIRepositoriesOstreeOstreeImportAllRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeAPIService + ostreeOstreeRepositoryHref string + ostreeImportAll *OstreeImportAll +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeImportAllRequest) OstreeImportAll(ostreeImportAll OstreeImportAll) RepositoriesOstreeAPIRepositoriesOstreeOstreeImportAllRequest { + r.ostreeImportAll = &ostreeImportAll + return r +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeImportAllRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreeImportAllExecute(r) +} + +/* +RepositoriesOstreeOstreeImportAll Import refs and commits to a repository + +Trigger an asynchronous task to import all refs and commits to a repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRepositoryHref + @return RepositoriesOstreeAPIRepositoriesOstreeOstreeImportAllRequest +*/ +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeImportAll(ctx context.Context, ostreeOstreeRepositoryHref string) RepositoriesOstreeAPIRepositoriesOstreeOstreeImportAllRequest { + return RepositoriesOstreeAPIRepositoriesOstreeOstreeImportAllRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRepositoryHref: ostreeOstreeRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeImportAllExecute(r RepositoriesOstreeAPIRepositoriesOstreeOstreeImportAllRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeAPIService.RepositoriesOstreeOstreeImportAll") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_repository_href}import_all/" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_repository_href"+"}", parameterValueToString(r.ostreeOstreeRepositoryHref, "ostreeOstreeRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ostreeImportAll == nil { + return localVarReturnValue, nil, reportError("ostreeImportAll is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ostreeImportAll + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesOstreeAPIRepositoriesOstreeOstreeImportCommitsRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeAPIService + ostreeOstreeRepositoryHref string + ostreeImportCommitsToRef *OstreeImportCommitsToRef +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeImportCommitsRequest) OstreeImportCommitsToRef(ostreeImportCommitsToRef OstreeImportCommitsToRef) RepositoriesOstreeAPIRepositoriesOstreeOstreeImportCommitsRequest { + r.ostreeImportCommitsToRef = &ostreeImportCommitsToRef + return r +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeImportCommitsRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreeImportCommitsExecute(r) +} + +/* +RepositoriesOstreeOstreeImportCommits Append child commits to a repository + +Trigger an asynchronous task to append child commits to a repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRepositoryHref + @return RepositoriesOstreeAPIRepositoriesOstreeOstreeImportCommitsRequest +*/ +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeImportCommits(ctx context.Context, ostreeOstreeRepositoryHref string) RepositoriesOstreeAPIRepositoriesOstreeOstreeImportCommitsRequest { + return RepositoriesOstreeAPIRepositoriesOstreeOstreeImportCommitsRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRepositoryHref: ostreeOstreeRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeImportCommitsExecute(r RepositoriesOstreeAPIRepositoriesOstreeOstreeImportCommitsRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeAPIService.RepositoriesOstreeOstreeImportCommits") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_repository_href}import_commits/" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_repository_href"+"}", parameterValueToString(r.ostreeOstreeRepositoryHref, "ostreeOstreeRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ostreeImportCommitsToRef == nil { + return localVarReturnValue, nil, reportError("ostreeImportCommitsToRef is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ostreeImportCommitsToRef + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeAPIService + latestWithContent *string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + remote *string + retainRepoVersions *int32 + retainRepoVersionsGt *int32 + retainRepoVersionsGte *int32 + retainRepoVersionsIsnull *bool + retainRepoVersionsLt *int32 + retainRepoVersionsLte *int32 + retainRepoVersionsNe *int32 + retainRepoVersionsRange *[]int32 + withContent *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) LatestWithContent(latestWithContent string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.latestWithContent = &latestWithContent + return r +} + +// Number of results to return per page. +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) Limit(limit int32) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) Name(name string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) NameContains(nameContains string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) NameIcontains(nameIcontains string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) NameIn(nameIn []string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) NameStartswith(nameStartswith string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) Offset(offset int32) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) Ordering(ordering []string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) PulpIdIn(pulpIdIn []string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) PulpLabelSelect(pulpLabelSelect string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Foreign Key referenced by HREF +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) Remote(remote string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.remote = &remote + return r +} + +// Filter results where retain_repo_versions matches value +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) RetainRepoVersions(retainRepoVersions int32) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.retainRepoVersions = &retainRepoVersions + return r +} + +// Filter results where retain_repo_versions is greater than value +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) RetainRepoVersionsGt(retainRepoVersionsGt int32) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.retainRepoVersionsGt = &retainRepoVersionsGt + return r +} + +// Filter results where retain_repo_versions is greater than or equal to value +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) RetainRepoVersionsGte(retainRepoVersionsGte int32) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.retainRepoVersionsGte = &retainRepoVersionsGte + return r +} + +// Filter results where retain_repo_versions has a null value +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) RetainRepoVersionsIsnull(retainRepoVersionsIsnull bool) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.retainRepoVersionsIsnull = &retainRepoVersionsIsnull + return r +} + +// Filter results where retain_repo_versions is less than value +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) RetainRepoVersionsLt(retainRepoVersionsLt int32) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.retainRepoVersionsLt = &retainRepoVersionsLt + return r +} + +// Filter results where retain_repo_versions is less than or equal to value +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) RetainRepoVersionsLte(retainRepoVersionsLte int32) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.retainRepoVersionsLte = &retainRepoVersionsLte + return r +} + +// Filter results where retain_repo_versions not equal to value +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) RetainRepoVersionsNe(retainRepoVersionsNe int32) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.retainRepoVersionsNe = &retainRepoVersionsNe + return r +} + +// Filter results where retain_repo_versions is between two comma separated values +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) RetainRepoVersionsRange(retainRepoVersionsRange []int32) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.retainRepoVersionsRange = &retainRepoVersionsRange + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) WithContent(withContent string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) Fields(fields []string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) ExcludeFields(excludeFields []string) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) Execute() (*PaginatedostreeOstreeRepositoryResponseList, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreeListExecute(r) +} + +/* +RepositoriesOstreeOstreeList List ostree repositorys + +A ViewSet class for OSTree repositories. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest +*/ +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeList(ctx context.Context) RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest { + return RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedostreeOstreeRepositoryResponseList +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeListExecute(r RepositoriesOstreeAPIRepositoriesOstreeOstreeListRequest) (*PaginatedostreeOstreeRepositoryResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedostreeOstreeRepositoryResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeAPIService.RepositoriesOstreeOstreeList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/ostree/ostree/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.latestWithContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "latest_with_content", r.latestWithContent, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.remote != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "remote", r.remote, "") + } + if r.retainRepoVersions != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions", r.retainRepoVersions, "") + } + if r.retainRepoVersionsGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gt", r.retainRepoVersionsGt, "") + } + if r.retainRepoVersionsGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gte", r.retainRepoVersionsGte, "") + } + if r.retainRepoVersionsIsnull != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__isnull", r.retainRepoVersionsIsnull, "") + } + if r.retainRepoVersionsLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lt", r.retainRepoVersionsLt, "") + } + if r.retainRepoVersionsLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lte", r.retainRepoVersionsLte, "") + } + if r.retainRepoVersionsNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__ne", r.retainRepoVersionsNe, "") + } + if r.retainRepoVersionsRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__range", r.retainRepoVersionsRange, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesOstreeAPIRepositoriesOstreeOstreeModifyRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeAPIService + ostreeOstreeRepositoryHref string + repositoryAddRemoveContent *RepositoryAddRemoveContent +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeModifyRequest) RepositoryAddRemoveContent(repositoryAddRemoveContent RepositoryAddRemoveContent) RepositoriesOstreeAPIRepositoriesOstreeOstreeModifyRequest { + r.repositoryAddRemoveContent = &repositoryAddRemoveContent + return r +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeModifyRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreeModifyExecute(r) +} + +/* +RepositoriesOstreeOstreeModify Modify repository + +Trigger an asynchronous task to modify content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRepositoryHref + @return RepositoriesOstreeAPIRepositoriesOstreeOstreeModifyRequest +*/ +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeModify(ctx context.Context, ostreeOstreeRepositoryHref string) RepositoriesOstreeAPIRepositoriesOstreeOstreeModifyRequest { + return RepositoriesOstreeAPIRepositoriesOstreeOstreeModifyRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRepositoryHref: ostreeOstreeRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeModifyExecute(r RepositoriesOstreeAPIRepositoriesOstreeOstreeModifyRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeAPIService.RepositoriesOstreeOstreeModify") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_repository_href}modify/" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_repository_href"+"}", parameterValueToString(r.ostreeOstreeRepositoryHref, "ostreeOstreeRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositoryAddRemoveContent == nil { + return localVarReturnValue, nil, reportError("repositoryAddRemoveContent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositoryAddRemoveContent + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesOstreeAPIRepositoriesOstreeOstreePartialUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeAPIService + ostreeOstreeRepositoryHref string + patchedostreeOstreeRepository *PatchedostreeOstreeRepository +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreePartialUpdateRequest) PatchedostreeOstreeRepository(patchedostreeOstreeRepository PatchedostreeOstreeRepository) RepositoriesOstreeAPIRepositoriesOstreeOstreePartialUpdateRequest { + r.patchedostreeOstreeRepository = &patchedostreeOstreeRepository + return r +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreePartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreePartialUpdateExecute(r) +} + +/* +RepositoriesOstreeOstreePartialUpdate Update an ostree repository + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRepositoryHref + @return RepositoriesOstreeAPIRepositoriesOstreeOstreePartialUpdateRequest +*/ +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreePartialUpdate(ctx context.Context, ostreeOstreeRepositoryHref string) RepositoriesOstreeAPIRepositoriesOstreeOstreePartialUpdateRequest { + return RepositoriesOstreeAPIRepositoriesOstreeOstreePartialUpdateRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRepositoryHref: ostreeOstreeRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreePartialUpdateExecute(r RepositoriesOstreeAPIRepositoriesOstreeOstreePartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeAPIService.RepositoriesOstreeOstreePartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_repository_href"+"}", parameterValueToString(r.ostreeOstreeRepositoryHref, "ostreeOstreeRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedostreeOstreeRepository == nil { + return localVarReturnValue, nil, reportError("patchedostreeOstreeRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedostreeOstreeRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesOstreeAPIRepositoriesOstreeOstreeReadRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeAPIService + ostreeOstreeRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeReadRequest) Fields(fields []string) RepositoriesOstreeAPIRepositoriesOstreeOstreeReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeReadRequest) ExcludeFields(excludeFields []string) RepositoriesOstreeAPIRepositoriesOstreeOstreeReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeReadRequest) Execute() (*OstreeOstreeRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreeReadExecute(r) +} + +/* +RepositoriesOstreeOstreeRead Inspect an ostree repository + +A ViewSet class for OSTree repositories. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRepositoryHref + @return RepositoriesOstreeAPIRepositoriesOstreeOstreeReadRequest +*/ +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeRead(ctx context.Context, ostreeOstreeRepositoryHref string) RepositoriesOstreeAPIRepositoriesOstreeOstreeReadRequest { + return RepositoriesOstreeAPIRepositoriesOstreeOstreeReadRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRepositoryHref: ostreeOstreeRepositoryHref, + } +} + +// Execute executes the request +// @return OstreeOstreeRepositoryResponse +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeReadExecute(r RepositoriesOstreeAPIRepositoriesOstreeOstreeReadRequest) (*OstreeOstreeRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OstreeOstreeRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeAPIService.RepositoriesOstreeOstreeRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_repository_href"+"}", parameterValueToString(r.ostreeOstreeRepositoryHref, "ostreeOstreeRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesOstreeAPIRepositoriesOstreeOstreeSyncRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeAPIService + ostreeOstreeRepositoryHref string + repositorySyncURL *RepositorySyncURL +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeSyncRequest) RepositorySyncURL(repositorySyncURL RepositorySyncURL) RepositoriesOstreeAPIRepositoriesOstreeOstreeSyncRequest { + r.repositorySyncURL = &repositorySyncURL + return r +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeSyncRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreeSyncExecute(r) +} + +/* +RepositoriesOstreeOstreeSync Sync from remote + +Trigger an asynchronous task to sync content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRepositoryHref + @return RepositoriesOstreeAPIRepositoriesOstreeOstreeSyncRequest +*/ +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeSync(ctx context.Context, ostreeOstreeRepositoryHref string) RepositoriesOstreeAPIRepositoriesOstreeOstreeSyncRequest { + return RepositoriesOstreeAPIRepositoriesOstreeOstreeSyncRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRepositoryHref: ostreeOstreeRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeSyncExecute(r RepositoriesOstreeAPIRepositoriesOstreeOstreeSyncRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeAPIService.RepositoriesOstreeOstreeSync") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_repository_href}sync/" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_repository_href"+"}", parameterValueToString(r.ostreeOstreeRepositoryHref, "ostreeOstreeRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositorySyncURL == nil { + return localVarReturnValue, nil, reportError("repositorySyncURL is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositorySyncURL + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesOstreeAPIRepositoriesOstreeOstreeUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeAPIService + ostreeOstreeRepositoryHref string + ostreeOstreeRepository *OstreeOstreeRepository +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeUpdateRequest) OstreeOstreeRepository(ostreeOstreeRepository OstreeOstreeRepository) RepositoriesOstreeAPIRepositoriesOstreeOstreeUpdateRequest { + r.ostreeOstreeRepository = &ostreeOstreeRepository + return r +} + +func (r RepositoriesOstreeAPIRepositoriesOstreeOstreeUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreeUpdateExecute(r) +} + +/* +RepositoriesOstreeOstreeUpdate Update an ostree repository + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRepositoryHref + @return RepositoriesOstreeAPIRepositoriesOstreeOstreeUpdateRequest +*/ +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeUpdate(ctx context.Context, ostreeOstreeRepositoryHref string) RepositoriesOstreeAPIRepositoriesOstreeOstreeUpdateRequest { + return RepositoriesOstreeAPIRepositoriesOstreeOstreeUpdateRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRepositoryHref: ostreeOstreeRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesOstreeAPIService) RepositoriesOstreeOstreeUpdateExecute(r RepositoriesOstreeAPIRepositoriesOstreeOstreeUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeAPIService.RepositoriesOstreeOstreeUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_repository_href"+"}", parameterValueToString(r.ostreeOstreeRepositoryHref, "ostreeOstreeRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ostreeOstreeRepository == nil { + return localVarReturnValue, nil, reportError("ostreeOstreeRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ostreeOstreeRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ostree_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ostree_versions.go new file mode 100644 index 0000000000..7c4b476998 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_ostree_versions.go @@ -0,0 +1,702 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RepositoriesOstreeVersionsAPIService RepositoriesOstreeVersionsAPI service +type RepositoriesOstreeVersionsAPIService service + +type RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeVersionsAPIService + ostreeOstreeRepositoryVersionHref string +} + +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreeVersionsDeleteExecute(r) +} + +/* +RepositoriesOstreeOstreeVersionsDelete Delete a repository version + +Trigger an asynchronous task to delete a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRepositoryVersionHref + @return RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsDeleteRequest +*/ +func (a *RepositoriesOstreeVersionsAPIService) RepositoriesOstreeOstreeVersionsDelete(ctx context.Context, ostreeOstreeRepositoryVersionHref string) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsDeleteRequest { + return RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRepositoryVersionHref: ostreeOstreeRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesOstreeVersionsAPIService) RepositoriesOstreeOstreeVersionsDeleteExecute(r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeVersionsAPIService.RepositoriesOstreeOstreeVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_repository_version_href"+"}", parameterValueToString(r.ostreeOstreeRepositoryVersionHref, "ostreeOstreeRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeVersionsAPIService + ostreeOstreeRepositoryHref string + content *string + contentIn *string + limit *int32 + number *int32 + numberGt *int32 + numberGte *int32 + numberLt *int32 + numberLte *int32 + numberRange *[]int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) Content(content string) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) ContentIn(contentIn string) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) Limit(limit int32) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.limit = &limit + return r +} + +// Filter results where number matches value +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) Number(number int32) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.number = &number + return r +} + +// Filter results where number is greater than value +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) NumberGt(numberGt int32) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.numberGt = &numberGt + return r +} + +// Filter results where number is greater than or equal to value +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) NumberGte(numberGte int32) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.numberGte = &numberGte + return r +} + +// Filter results where number is less than value +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) NumberLt(numberLt int32) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.numberLt = &numberLt + return r +} + +// Filter results where number is less than or equal to value +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) NumberLte(numberLte int32) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.numberLte = &numberLte + return r +} + +// Filter results where number is between two comma separated values +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) NumberRange(numberRange []int32) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.numberRange = &numberRange + return r +} + +// The initial index from which to return the results. +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) Offset(offset int32) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) Ordering(ordering []string) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) PulpCreated(pulpCreated time.Time) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) PulpCreatedGt(pulpCreatedGt time.Time) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) PulpCreatedGte(pulpCreatedGte time.Time) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) PulpCreatedLt(pulpCreatedLt time.Time) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) PulpCreatedLte(pulpCreatedLte time.Time) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// A list of fields to include in the response. +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) Fields(fields []string) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) ExcludeFields(excludeFields []string) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) Execute() (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreeVersionsListExecute(r) +} + +/* +RepositoriesOstreeOstreeVersionsList List repository versions + +A ViewSet class that represents a single OSTree repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRepositoryHref + @return RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest +*/ +func (a *RepositoriesOstreeVersionsAPIService) RepositoriesOstreeOstreeVersionsList(ctx context.Context, ostreeOstreeRepositoryHref string) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest { + return RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRepositoryHref: ostreeOstreeRepositoryHref, + } +} + +// Execute executes the request +// @return PaginatedRepositoryVersionResponseList +func (a *RepositoriesOstreeVersionsAPIService) RepositoriesOstreeOstreeVersionsListExecute(r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsListRequest) (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRepositoryVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeVersionsAPIService.RepositoriesOstreeOstreeVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_repository_href}versions/" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_repository_href"+"}", parameterValueToString(r.ostreeOstreeRepositoryHref, "ostreeOstreeRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.number != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number", r.number, "") + } + if r.numberGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gt", r.numberGt, "") + } + if r.numberGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gte", r.numberGte, "") + } + if r.numberLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lt", r.numberLt, "") + } + if r.numberLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lte", r.numberLte, "") + } + if r.numberRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__range", r.numberRange, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsReadRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeVersionsAPIService + ostreeOstreeRepositoryVersionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsReadRequest) Fields(fields []string) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsReadRequest) ExcludeFields(excludeFields []string) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsReadRequest) Execute() (*RepositoryVersionResponse, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreeVersionsReadExecute(r) +} + +/* +RepositoriesOstreeOstreeVersionsRead Inspect a repository version + +A ViewSet class that represents a single OSTree repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRepositoryVersionHref + @return RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsReadRequest +*/ +func (a *RepositoriesOstreeVersionsAPIService) RepositoriesOstreeOstreeVersionsRead(ctx context.Context, ostreeOstreeRepositoryVersionHref string) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsReadRequest { + return RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsReadRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRepositoryVersionHref: ostreeOstreeRepositoryVersionHref, + } +} + +// Execute executes the request +// @return RepositoryVersionResponse +func (a *RepositoriesOstreeVersionsAPIService) RepositoriesOstreeOstreeVersionsReadExecute(r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsReadRequest) (*RepositoryVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeVersionsAPIService.RepositoriesOstreeOstreeVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_repository_version_href"+"}", parameterValueToString(r.ostreeOstreeRepositoryVersionHref, "ostreeOstreeRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsRepairRequest struct { + ctx context.Context + ApiService *RepositoriesOstreeVersionsAPIService + ostreeOstreeRepositoryVersionHref string + repair *Repair +} + +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsRepairRequest) Repair(repair Repair) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsRepairRequest { + r.repair = &repair + return r +} + +func (r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsRepairRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesOstreeOstreeVersionsRepairExecute(r) +} + +/* +RepositoriesOstreeOstreeVersionsRepair Method for RepositoriesOstreeOstreeVersionsRepair + +Trigger an asynchronous task to repair a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ostreeOstreeRepositoryVersionHref + @return RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsRepairRequest +*/ +func (a *RepositoriesOstreeVersionsAPIService) RepositoriesOstreeOstreeVersionsRepair(ctx context.Context, ostreeOstreeRepositoryVersionHref string) RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsRepairRequest { + return RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsRepairRequest{ + ApiService: a, + ctx: ctx, + ostreeOstreeRepositoryVersionHref: ostreeOstreeRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesOstreeVersionsAPIService) RepositoriesOstreeOstreeVersionsRepairExecute(r RepositoriesOstreeVersionsAPIRepositoriesOstreeOstreeVersionsRepairRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesOstreeVersionsAPIService.RepositoriesOstreeOstreeVersionsRepair") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ostree_ostree_repository_version_href}repair/" + localVarPath = strings.Replace(localVarPath, "{"+"ostree_ostree_repository_version_href"+"}", parameterValueToString(r.ostreeOstreeRepositoryVersionHref, "ostreeOstreeRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repair == nil { + return localVarReturnValue, nil, reportError("repair is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repair + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_python.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_python.go new file mode 100644 index 0000000000..8d145b3559 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_python.go @@ -0,0 +1,1195 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// RepositoriesPythonAPIService RepositoriesPythonAPI service +type RepositoriesPythonAPIService service + +type RepositoriesPythonAPIRepositoriesPythonPythonCreateRequest struct { + ctx context.Context + ApiService *RepositoriesPythonAPIService + pythonPythonRepository *PythonPythonRepository +} + +func (r RepositoriesPythonAPIRepositoriesPythonPythonCreateRequest) PythonPythonRepository(pythonPythonRepository PythonPythonRepository) RepositoriesPythonAPIRepositoriesPythonPythonCreateRequest { + r.pythonPythonRepository = &pythonPythonRepository + return r +} + +func (r RepositoriesPythonAPIRepositoriesPythonPythonCreateRequest) Execute() (*PythonPythonRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesPythonPythonCreateExecute(r) +} + +/* +RepositoriesPythonPythonCreate Create a python repository + +PythonRepository represents a single Python repository, to which content can be +synced, added, or removed. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesPythonAPIRepositoriesPythonPythonCreateRequest +*/ +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonCreate(ctx context.Context) RepositoriesPythonAPIRepositoriesPythonPythonCreateRequest { + return RepositoriesPythonAPIRepositoriesPythonPythonCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PythonPythonRepositoryResponse +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonCreateExecute(r RepositoriesPythonAPIRepositoriesPythonPythonCreateRequest) (*PythonPythonRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PythonPythonRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesPythonAPIService.RepositoriesPythonPythonCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/python/python/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pythonPythonRepository == nil { + return localVarReturnValue, nil, reportError("pythonPythonRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pythonPythonRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesPythonAPIRepositoriesPythonPythonDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesPythonAPIService + pythonPythonRepositoryHref string +} + +func (r RepositoriesPythonAPIRepositoriesPythonPythonDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesPythonPythonDeleteExecute(r) +} + +/* +RepositoriesPythonPythonDelete Delete a python repository + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRepositoryHref + @return RepositoriesPythonAPIRepositoriesPythonPythonDeleteRequest +*/ +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonDelete(ctx context.Context, pythonPythonRepositoryHref string) RepositoriesPythonAPIRepositoriesPythonPythonDeleteRequest { + return RepositoriesPythonAPIRepositoriesPythonPythonDeleteRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRepositoryHref: pythonPythonRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonDeleteExecute(r RepositoriesPythonAPIRepositoriesPythonPythonDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesPythonAPIService.RepositoriesPythonPythonDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_repository_href"+"}", parameterValueToString(r.pythonPythonRepositoryHref, "pythonPythonRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesPythonAPIRepositoriesPythonPythonListRequest struct { + ctx context.Context + ApiService *RepositoriesPythonAPIService + latestWithContent *string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + remote *string + retainRepoVersions *int32 + retainRepoVersionsGt *int32 + retainRepoVersionsGte *int32 + retainRepoVersionsIsnull *bool + retainRepoVersionsLt *int32 + retainRepoVersionsLte *int32 + retainRepoVersionsNe *int32 + retainRepoVersionsRange *[]int32 + withContent *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) LatestWithContent(latestWithContent string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.latestWithContent = &latestWithContent + return r +} + +// Number of results to return per page. +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) Limit(limit int32) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) Name(name string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) NameContains(nameContains string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) NameIcontains(nameIcontains string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) NameIn(nameIn []string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) NameStartswith(nameStartswith string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) Offset(offset int32) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) Ordering(ordering []string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) PulpIdIn(pulpIdIn []string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) PulpLabelSelect(pulpLabelSelect string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Foreign Key referenced by HREF +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) Remote(remote string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.remote = &remote + return r +} + +// Filter results where retain_repo_versions matches value +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) RetainRepoVersions(retainRepoVersions int32) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.retainRepoVersions = &retainRepoVersions + return r +} + +// Filter results where retain_repo_versions is greater than value +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) RetainRepoVersionsGt(retainRepoVersionsGt int32) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.retainRepoVersionsGt = &retainRepoVersionsGt + return r +} + +// Filter results where retain_repo_versions is greater than or equal to value +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) RetainRepoVersionsGte(retainRepoVersionsGte int32) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.retainRepoVersionsGte = &retainRepoVersionsGte + return r +} + +// Filter results where retain_repo_versions has a null value +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) RetainRepoVersionsIsnull(retainRepoVersionsIsnull bool) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.retainRepoVersionsIsnull = &retainRepoVersionsIsnull + return r +} + +// Filter results where retain_repo_versions is less than value +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) RetainRepoVersionsLt(retainRepoVersionsLt int32) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.retainRepoVersionsLt = &retainRepoVersionsLt + return r +} + +// Filter results where retain_repo_versions is less than or equal to value +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) RetainRepoVersionsLte(retainRepoVersionsLte int32) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.retainRepoVersionsLte = &retainRepoVersionsLte + return r +} + +// Filter results where retain_repo_versions not equal to value +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) RetainRepoVersionsNe(retainRepoVersionsNe int32) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.retainRepoVersionsNe = &retainRepoVersionsNe + return r +} + +// Filter results where retain_repo_versions is between two comma separated values +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) RetainRepoVersionsRange(retainRepoVersionsRange []int32) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.retainRepoVersionsRange = &retainRepoVersionsRange + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) WithContent(withContent string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) Fields(fields []string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) ExcludeFields(excludeFields []string) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) Execute() (*PaginatedpythonPythonRepositoryResponseList, *http.Response, error) { + return r.ApiService.RepositoriesPythonPythonListExecute(r) +} + +/* +RepositoriesPythonPythonList List python repositorys + +PythonRepository represents a single Python repository, to which content can be +synced, added, or removed. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesPythonAPIRepositoriesPythonPythonListRequest +*/ +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonList(ctx context.Context) RepositoriesPythonAPIRepositoriesPythonPythonListRequest { + return RepositoriesPythonAPIRepositoriesPythonPythonListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedpythonPythonRepositoryResponseList +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonListExecute(r RepositoriesPythonAPIRepositoriesPythonPythonListRequest) (*PaginatedpythonPythonRepositoryResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedpythonPythonRepositoryResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesPythonAPIService.RepositoriesPythonPythonList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/python/python/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.latestWithContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "latest_with_content", r.latestWithContent, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.remote != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "remote", r.remote, "") + } + if r.retainRepoVersions != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions", r.retainRepoVersions, "") + } + if r.retainRepoVersionsGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gt", r.retainRepoVersionsGt, "") + } + if r.retainRepoVersionsGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gte", r.retainRepoVersionsGte, "") + } + if r.retainRepoVersionsIsnull != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__isnull", r.retainRepoVersionsIsnull, "") + } + if r.retainRepoVersionsLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lt", r.retainRepoVersionsLt, "") + } + if r.retainRepoVersionsLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lte", r.retainRepoVersionsLte, "") + } + if r.retainRepoVersionsNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__ne", r.retainRepoVersionsNe, "") + } + if r.retainRepoVersionsRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__range", r.retainRepoVersionsRange, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesPythonAPIRepositoriesPythonPythonModifyRequest struct { + ctx context.Context + ApiService *RepositoriesPythonAPIService + pythonPythonRepositoryHref string + repositoryAddRemoveContent *RepositoryAddRemoveContent +} + +func (r RepositoriesPythonAPIRepositoriesPythonPythonModifyRequest) RepositoryAddRemoveContent(repositoryAddRemoveContent RepositoryAddRemoveContent) RepositoriesPythonAPIRepositoriesPythonPythonModifyRequest { + r.repositoryAddRemoveContent = &repositoryAddRemoveContent + return r +} + +func (r RepositoriesPythonAPIRepositoriesPythonPythonModifyRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesPythonPythonModifyExecute(r) +} + +/* +RepositoriesPythonPythonModify Modify Repository Content + +Trigger an asynchronous task to create a new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRepositoryHref + @return RepositoriesPythonAPIRepositoriesPythonPythonModifyRequest +*/ +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonModify(ctx context.Context, pythonPythonRepositoryHref string) RepositoriesPythonAPIRepositoriesPythonPythonModifyRequest { + return RepositoriesPythonAPIRepositoriesPythonPythonModifyRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRepositoryHref: pythonPythonRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonModifyExecute(r RepositoriesPythonAPIRepositoriesPythonPythonModifyRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesPythonAPIService.RepositoriesPythonPythonModify") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_repository_href}modify/" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_repository_href"+"}", parameterValueToString(r.pythonPythonRepositoryHref, "pythonPythonRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositoryAddRemoveContent == nil { + return localVarReturnValue, nil, reportError("repositoryAddRemoveContent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositoryAddRemoveContent + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesPythonAPIRepositoriesPythonPythonPartialUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesPythonAPIService + pythonPythonRepositoryHref string + patchedpythonPythonRepository *PatchedpythonPythonRepository +} + +func (r RepositoriesPythonAPIRepositoriesPythonPythonPartialUpdateRequest) PatchedpythonPythonRepository(patchedpythonPythonRepository PatchedpythonPythonRepository) RepositoriesPythonAPIRepositoriesPythonPythonPartialUpdateRequest { + r.patchedpythonPythonRepository = &patchedpythonPythonRepository + return r +} + +func (r RepositoriesPythonAPIRepositoriesPythonPythonPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesPythonPythonPartialUpdateExecute(r) +} + +/* +RepositoriesPythonPythonPartialUpdate Update a python repository + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRepositoryHref + @return RepositoriesPythonAPIRepositoriesPythonPythonPartialUpdateRequest +*/ +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonPartialUpdate(ctx context.Context, pythonPythonRepositoryHref string) RepositoriesPythonAPIRepositoriesPythonPythonPartialUpdateRequest { + return RepositoriesPythonAPIRepositoriesPythonPythonPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRepositoryHref: pythonPythonRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonPartialUpdateExecute(r RepositoriesPythonAPIRepositoriesPythonPythonPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesPythonAPIService.RepositoriesPythonPythonPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_repository_href"+"}", parameterValueToString(r.pythonPythonRepositoryHref, "pythonPythonRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedpythonPythonRepository == nil { + return localVarReturnValue, nil, reportError("patchedpythonPythonRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedpythonPythonRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesPythonAPIRepositoriesPythonPythonReadRequest struct { + ctx context.Context + ApiService *RepositoriesPythonAPIService + pythonPythonRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesPythonAPIRepositoriesPythonPythonReadRequest) Fields(fields []string) RepositoriesPythonAPIRepositoriesPythonPythonReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesPythonAPIRepositoriesPythonPythonReadRequest) ExcludeFields(excludeFields []string) RepositoriesPythonAPIRepositoriesPythonPythonReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesPythonAPIRepositoriesPythonPythonReadRequest) Execute() (*PythonPythonRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesPythonPythonReadExecute(r) +} + +/* +RepositoriesPythonPythonRead Inspect a python repository + +PythonRepository represents a single Python repository, to which content can be +synced, added, or removed. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRepositoryHref + @return RepositoriesPythonAPIRepositoriesPythonPythonReadRequest +*/ +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonRead(ctx context.Context, pythonPythonRepositoryHref string) RepositoriesPythonAPIRepositoriesPythonPythonReadRequest { + return RepositoriesPythonAPIRepositoriesPythonPythonReadRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRepositoryHref: pythonPythonRepositoryHref, + } +} + +// Execute executes the request +// @return PythonPythonRepositoryResponse +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonReadExecute(r RepositoriesPythonAPIRepositoriesPythonPythonReadRequest) (*PythonPythonRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PythonPythonRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesPythonAPIService.RepositoriesPythonPythonRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_repository_href"+"}", parameterValueToString(r.pythonPythonRepositoryHref, "pythonPythonRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesPythonAPIRepositoriesPythonPythonSyncRequest struct { + ctx context.Context + ApiService *RepositoriesPythonAPIService + pythonPythonRepositoryHref string + repositorySyncURL *RepositorySyncURL +} + +func (r RepositoriesPythonAPIRepositoriesPythonPythonSyncRequest) RepositorySyncURL(repositorySyncURL RepositorySyncURL) RepositoriesPythonAPIRepositoriesPythonPythonSyncRequest { + r.repositorySyncURL = &repositorySyncURL + return r +} + +func (r RepositoriesPythonAPIRepositoriesPythonPythonSyncRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesPythonPythonSyncExecute(r) +} + +/* +RepositoriesPythonPythonSync Sync from remote + + +Trigger an asynchronous task to sync python content. The sync task will retrieve Python +content from the specified `Remote` and update the specified `Respository`, creating a +new `RepositoryVersion`. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRepositoryHref + @return RepositoriesPythonAPIRepositoriesPythonPythonSyncRequest +*/ +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonSync(ctx context.Context, pythonPythonRepositoryHref string) RepositoriesPythonAPIRepositoriesPythonPythonSyncRequest { + return RepositoriesPythonAPIRepositoriesPythonPythonSyncRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRepositoryHref: pythonPythonRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonSyncExecute(r RepositoriesPythonAPIRepositoriesPythonPythonSyncRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesPythonAPIService.RepositoriesPythonPythonSync") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_repository_href}sync/" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_repository_href"+"}", parameterValueToString(r.pythonPythonRepositoryHref, "pythonPythonRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositorySyncURL == nil { + return localVarReturnValue, nil, reportError("repositorySyncURL is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositorySyncURL + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesPythonAPIRepositoriesPythonPythonUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesPythonAPIService + pythonPythonRepositoryHref string + pythonPythonRepository *PythonPythonRepository +} + +func (r RepositoriesPythonAPIRepositoriesPythonPythonUpdateRequest) PythonPythonRepository(pythonPythonRepository PythonPythonRepository) RepositoriesPythonAPIRepositoriesPythonPythonUpdateRequest { + r.pythonPythonRepository = &pythonPythonRepository + return r +} + +func (r RepositoriesPythonAPIRepositoriesPythonPythonUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesPythonPythonUpdateExecute(r) +} + +/* +RepositoriesPythonPythonUpdate Update a python repository + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRepositoryHref + @return RepositoriesPythonAPIRepositoriesPythonPythonUpdateRequest +*/ +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonUpdate(ctx context.Context, pythonPythonRepositoryHref string) RepositoriesPythonAPIRepositoriesPythonPythonUpdateRequest { + return RepositoriesPythonAPIRepositoriesPythonPythonUpdateRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRepositoryHref: pythonPythonRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesPythonAPIService) RepositoriesPythonPythonUpdateExecute(r RepositoriesPythonAPIRepositoriesPythonPythonUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesPythonAPIService.RepositoriesPythonPythonUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_repository_href"+"}", parameterValueToString(r.pythonPythonRepositoryHref, "pythonPythonRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.pythonPythonRepository == nil { + return localVarReturnValue, nil, reportError("pythonPythonRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pythonPythonRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_python_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_python_versions.go new file mode 100644 index 0000000000..1f0b5cd30c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_python_versions.go @@ -0,0 +1,702 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RepositoriesPythonVersionsAPIService RepositoriesPythonVersionsAPI service +type RepositoriesPythonVersionsAPIService service + +type RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesPythonVersionsAPIService + pythonPythonRepositoryVersionHref string +} + +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesPythonPythonVersionsDeleteExecute(r) +} + +/* +RepositoriesPythonPythonVersionsDelete Delete a repository version + +Trigger an asynchronous task to delete a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRepositoryVersionHref + @return RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsDeleteRequest +*/ +func (a *RepositoriesPythonVersionsAPIService) RepositoriesPythonPythonVersionsDelete(ctx context.Context, pythonPythonRepositoryVersionHref string) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsDeleteRequest { + return RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRepositoryVersionHref: pythonPythonRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesPythonVersionsAPIService) RepositoriesPythonPythonVersionsDeleteExecute(r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesPythonVersionsAPIService.RepositoriesPythonPythonVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_repository_version_href"+"}", parameterValueToString(r.pythonPythonRepositoryVersionHref, "pythonPythonRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest struct { + ctx context.Context + ApiService *RepositoriesPythonVersionsAPIService + pythonPythonRepositoryHref string + content *string + contentIn *string + limit *int32 + number *int32 + numberGt *int32 + numberGte *int32 + numberLt *int32 + numberLte *int32 + numberRange *[]int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) Content(content string) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) ContentIn(contentIn string) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) Limit(limit int32) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.limit = &limit + return r +} + +// Filter results where number matches value +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) Number(number int32) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.number = &number + return r +} + +// Filter results where number is greater than value +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) NumberGt(numberGt int32) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.numberGt = &numberGt + return r +} + +// Filter results where number is greater than or equal to value +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) NumberGte(numberGte int32) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.numberGte = &numberGte + return r +} + +// Filter results where number is less than value +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) NumberLt(numberLt int32) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.numberLt = &numberLt + return r +} + +// Filter results where number is less than or equal to value +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) NumberLte(numberLte int32) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.numberLte = &numberLte + return r +} + +// Filter results where number is between two comma separated values +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) NumberRange(numberRange []int32) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.numberRange = &numberRange + return r +} + +// The initial index from which to return the results. +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) Offset(offset int32) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) Ordering(ordering []string) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) PulpCreated(pulpCreated time.Time) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) PulpCreatedGt(pulpCreatedGt time.Time) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) PulpCreatedGte(pulpCreatedGte time.Time) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) PulpCreatedLt(pulpCreatedLt time.Time) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) PulpCreatedLte(pulpCreatedLte time.Time) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// A list of fields to include in the response. +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) Fields(fields []string) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) ExcludeFields(excludeFields []string) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) Execute() (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + return r.ApiService.RepositoriesPythonPythonVersionsListExecute(r) +} + +/* +RepositoriesPythonPythonVersionsList List repository versions + +PythonRepositoryVersion represents a single Python repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRepositoryHref + @return RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest +*/ +func (a *RepositoriesPythonVersionsAPIService) RepositoriesPythonPythonVersionsList(ctx context.Context, pythonPythonRepositoryHref string) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest { + return RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRepositoryHref: pythonPythonRepositoryHref, + } +} + +// Execute executes the request +// @return PaginatedRepositoryVersionResponseList +func (a *RepositoriesPythonVersionsAPIService) RepositoriesPythonPythonVersionsListExecute(r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsListRequest) (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRepositoryVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesPythonVersionsAPIService.RepositoriesPythonPythonVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_repository_href}versions/" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_repository_href"+"}", parameterValueToString(r.pythonPythonRepositoryHref, "pythonPythonRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.number != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number", r.number, "") + } + if r.numberGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gt", r.numberGt, "") + } + if r.numberGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gte", r.numberGte, "") + } + if r.numberLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lt", r.numberLt, "") + } + if r.numberLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lte", r.numberLte, "") + } + if r.numberRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__range", r.numberRange, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsReadRequest struct { + ctx context.Context + ApiService *RepositoriesPythonVersionsAPIService + pythonPythonRepositoryVersionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsReadRequest) Fields(fields []string) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsReadRequest) ExcludeFields(excludeFields []string) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsReadRequest) Execute() (*RepositoryVersionResponse, *http.Response, error) { + return r.ApiService.RepositoriesPythonPythonVersionsReadExecute(r) +} + +/* +RepositoriesPythonPythonVersionsRead Inspect a repository version + +PythonRepositoryVersion represents a single Python repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRepositoryVersionHref + @return RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsReadRequest +*/ +func (a *RepositoriesPythonVersionsAPIService) RepositoriesPythonPythonVersionsRead(ctx context.Context, pythonPythonRepositoryVersionHref string) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsReadRequest { + return RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsReadRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRepositoryVersionHref: pythonPythonRepositoryVersionHref, + } +} + +// Execute executes the request +// @return RepositoryVersionResponse +func (a *RepositoriesPythonVersionsAPIService) RepositoriesPythonPythonVersionsReadExecute(r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsReadRequest) (*RepositoryVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesPythonVersionsAPIService.RepositoriesPythonPythonVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_repository_version_href"+"}", parameterValueToString(r.pythonPythonRepositoryVersionHref, "pythonPythonRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsRepairRequest struct { + ctx context.Context + ApiService *RepositoriesPythonVersionsAPIService + pythonPythonRepositoryVersionHref string + repair *Repair +} + +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsRepairRequest) Repair(repair Repair) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsRepairRequest { + r.repair = &repair + return r +} + +func (r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsRepairRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesPythonPythonVersionsRepairExecute(r) +} + +/* +RepositoriesPythonPythonVersionsRepair Method for RepositoriesPythonPythonVersionsRepair + +Trigger an asynchronous task to repair a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pythonPythonRepositoryVersionHref + @return RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsRepairRequest +*/ +func (a *RepositoriesPythonVersionsAPIService) RepositoriesPythonPythonVersionsRepair(ctx context.Context, pythonPythonRepositoryVersionHref string) RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsRepairRequest { + return RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsRepairRequest{ + ApiService: a, + ctx: ctx, + pythonPythonRepositoryVersionHref: pythonPythonRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesPythonVersionsAPIService) RepositoriesPythonPythonVersionsRepairExecute(r RepositoriesPythonVersionsAPIRepositoriesPythonPythonVersionsRepairRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesPythonVersionsAPIService.RepositoriesPythonPythonVersionsRepair") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{python_python_repository_version_href}repair/" + localVarPath = strings.Replace(localVarPath, "{"+"python_python_repository_version_href"+"}", parameterValueToString(r.pythonPythonRepositoryVersionHref, "pythonPythonRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repair == nil { + return localVarReturnValue, nil, reportError("repair is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repair + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_reclaim_space.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_reclaim_space.go new file mode 100644 index 0000000000..6721d7849e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_reclaim_space.go @@ -0,0 +1,134 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// RepositoriesReclaimSpaceAPIService RepositoriesReclaimSpaceAPI service +type RepositoriesReclaimSpaceAPIService service + +type RepositoriesReclaimSpaceAPIRepositoriesReclaimSpaceReclaimRequest struct { + ctx context.Context + ApiService *RepositoriesReclaimSpaceAPIService + reclaimSpace *ReclaimSpace +} + +func (r RepositoriesReclaimSpaceAPIRepositoriesReclaimSpaceReclaimRequest) ReclaimSpace(reclaimSpace ReclaimSpace) RepositoriesReclaimSpaceAPIRepositoriesReclaimSpaceReclaimRequest { + r.reclaimSpace = &reclaimSpace + return r +} + +func (r RepositoriesReclaimSpaceAPIRepositoriesReclaimSpaceReclaimRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesReclaimSpaceReclaimExecute(r) +} + +/* +RepositoriesReclaimSpaceReclaim Method for RepositoriesReclaimSpaceReclaim + +Trigger an asynchronous space reclaim operation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesReclaimSpaceAPIRepositoriesReclaimSpaceReclaimRequest +*/ +func (a *RepositoriesReclaimSpaceAPIService) RepositoriesReclaimSpaceReclaim(ctx context.Context) RepositoriesReclaimSpaceAPIRepositoriesReclaimSpaceReclaimRequest { + return RepositoriesReclaimSpaceAPIRepositoriesReclaimSpaceReclaimRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesReclaimSpaceAPIService) RepositoriesReclaimSpaceReclaimExecute(r RepositoriesReclaimSpaceAPIRepositoriesReclaimSpaceReclaimRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesReclaimSpaceAPIService.RepositoriesReclaimSpaceReclaim") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/reclaim_space/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.reclaimSpace == nil { + return localVarReturnValue, nil, reportError("reclaimSpace is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.reclaimSpace + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_rpm.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_rpm.go new file mode 100644 index 0000000000..22b0b046ea --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_rpm.go @@ -0,0 +1,1695 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// RepositoriesRpmAPIService RepositoriesRpmAPI service +type RepositoriesRpmAPIService service + +type RepositoriesRpmAPIRepositoriesRpmRpmAddRoleRequest struct { + ctx context.Context + ApiService *RepositoriesRpmAPIService + rpmRpmRepositoryHref string + nestedRole *NestedRole +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmAddRoleRequest) NestedRole(nestedRole NestedRole) RepositoriesRpmAPIRepositoriesRpmRpmAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmAddRoleExecute(r) +} + +/* +RepositoriesRpmRpmAddRole Method for RepositoriesRpmRpmAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryHref + @return RepositoriesRpmAPIRepositoriesRpmRpmAddRoleRequest +*/ +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmAddRole(ctx context.Context, rpmRpmRepositoryHref string) RepositoriesRpmAPIRepositoriesRpmRpmAddRoleRequest { + return RepositoriesRpmAPIRepositoriesRpmRpmAddRoleRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryHref: rpmRpmRepositoryHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmAddRoleExecute(r RepositoriesRpmAPIRepositoriesRpmRpmAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmAPIService.RepositoriesRpmRpmAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_href"+"}", parameterValueToString(r.rpmRpmRepositoryHref, "rpmRpmRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmAPIRepositoriesRpmRpmCreateRequest struct { + ctx context.Context + ApiService *RepositoriesRpmAPIService + rpmRpmRepository *RpmRpmRepository +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmCreateRequest) RpmRpmRepository(rpmRpmRepository RpmRpmRepository) RepositoriesRpmAPIRepositoriesRpmRpmCreateRequest { + r.rpmRpmRepository = &rpmRpmRepository + return r +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmCreateRequest) Execute() (*RpmRpmRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmCreateExecute(r) +} + +/* +RepositoriesRpmRpmCreate Create a rpm repository + +A ViewSet for RpmRepository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesRpmAPIRepositoriesRpmRpmCreateRequest +*/ +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmCreate(ctx context.Context) RepositoriesRpmAPIRepositoriesRpmRpmCreateRequest { + return RepositoriesRpmAPIRepositoriesRpmRpmCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return RpmRpmRepositoryResponse +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmCreateExecute(r RepositoriesRpmAPIRepositoriesRpmRpmCreateRequest) (*RpmRpmRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmRpmRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmAPIService.RepositoriesRpmRpmCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/rpm/rpm/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmRpmRepository == nil { + return localVarReturnValue, nil, reportError("rpmRpmRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmRpmRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmAPIRepositoriesRpmRpmDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesRpmAPIService + rpmRpmRepositoryHref string +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmDeleteExecute(r) +} + +/* +RepositoriesRpmRpmDelete Delete a rpm repository + +Trigger an asynchronous delete task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryHref + @return RepositoriesRpmAPIRepositoriesRpmRpmDeleteRequest +*/ +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmDelete(ctx context.Context, rpmRpmRepositoryHref string) RepositoriesRpmAPIRepositoriesRpmRpmDeleteRequest { + return RepositoriesRpmAPIRepositoriesRpmRpmDeleteRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryHref: rpmRpmRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmDeleteExecute(r RepositoriesRpmAPIRepositoriesRpmRpmDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmAPIService.RepositoriesRpmRpmDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_href"+"}", parameterValueToString(r.rpmRpmRepositoryHref, "rpmRpmRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmAPIRepositoriesRpmRpmListRequest struct { + ctx context.Context + ApiService *RepositoriesRpmAPIService + latestWithContent *string + limit *int32 + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + pulpLabelSelect *string + remote *string + retainRepoVersions *int32 + retainRepoVersionsGt *int32 + retainRepoVersionsGte *int32 + retainRepoVersionsIsnull *bool + retainRepoVersionsLt *int32 + retainRepoVersionsLte *int32 + retainRepoVersionsNe *int32 + retainRepoVersionsRange *[]int32 + withContent *string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) LatestWithContent(latestWithContent string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.latestWithContent = &latestWithContent + return r +} + +// Number of results to return per page. +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) Limit(limit int32) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) Name(name string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) NameContains(nameContains string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) NameIcontains(nameIcontains string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) NameIn(nameIn []string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) NameStartswith(nameStartswith string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) Offset(offset int32) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) Ordering(ordering []string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) PulpIdIn(pulpIdIn []string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter labels by search string +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) PulpLabelSelect(pulpLabelSelect string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.pulpLabelSelect = &pulpLabelSelect + return r +} + +// Foreign Key referenced by HREF +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) Remote(remote string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.remote = &remote + return r +} + +// Filter results where retain_repo_versions matches value +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) RetainRepoVersions(retainRepoVersions int32) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.retainRepoVersions = &retainRepoVersions + return r +} + +// Filter results where retain_repo_versions is greater than value +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) RetainRepoVersionsGt(retainRepoVersionsGt int32) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.retainRepoVersionsGt = &retainRepoVersionsGt + return r +} + +// Filter results where retain_repo_versions is greater than or equal to value +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) RetainRepoVersionsGte(retainRepoVersionsGte int32) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.retainRepoVersionsGte = &retainRepoVersionsGte + return r +} + +// Filter results where retain_repo_versions has a null value +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) RetainRepoVersionsIsnull(retainRepoVersionsIsnull bool) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.retainRepoVersionsIsnull = &retainRepoVersionsIsnull + return r +} + +// Filter results where retain_repo_versions is less than value +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) RetainRepoVersionsLt(retainRepoVersionsLt int32) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.retainRepoVersionsLt = &retainRepoVersionsLt + return r +} + +// Filter results where retain_repo_versions is less than or equal to value +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) RetainRepoVersionsLte(retainRepoVersionsLte int32) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.retainRepoVersionsLte = &retainRepoVersionsLte + return r +} + +// Filter results where retain_repo_versions not equal to value +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) RetainRepoVersionsNe(retainRepoVersionsNe int32) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.retainRepoVersionsNe = &retainRepoVersionsNe + return r +} + +// Filter results where retain_repo_versions is between two comma separated values +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) RetainRepoVersionsRange(retainRepoVersionsRange []int32) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.retainRepoVersionsRange = &retainRepoVersionsRange + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) WithContent(withContent string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.withContent = &withContent + return r +} + +// A list of fields to include in the response. +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) Fields(fields []string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) ExcludeFields(excludeFields []string) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) Execute() (*PaginatedrpmRpmRepositoryResponseList, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmListExecute(r) +} + +/* +RepositoriesRpmRpmList List rpm repositorys + +A ViewSet for RpmRepository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoriesRpmAPIRepositoriesRpmRpmListRequest +*/ +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmList(ctx context.Context) RepositoriesRpmAPIRepositoriesRpmRpmListRequest { + return RepositoriesRpmAPIRepositoriesRpmRpmListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedrpmRpmRepositoryResponseList +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmListExecute(r RepositoriesRpmAPIRepositoriesRpmRpmListRequest) (*PaginatedrpmRpmRepositoryResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedrpmRpmRepositoryResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmAPIService.RepositoriesRpmRpmList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repositories/rpm/rpm/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.latestWithContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "latest_with_content", r.latestWithContent, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.pulpLabelSelect != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_label_select", r.pulpLabelSelect, "") + } + if r.remote != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "remote", r.remote, "") + } + if r.retainRepoVersions != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions", r.retainRepoVersions, "") + } + if r.retainRepoVersionsGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gt", r.retainRepoVersionsGt, "") + } + if r.retainRepoVersionsGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__gte", r.retainRepoVersionsGte, "") + } + if r.retainRepoVersionsIsnull != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__isnull", r.retainRepoVersionsIsnull, "") + } + if r.retainRepoVersionsLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lt", r.retainRepoVersionsLt, "") + } + if r.retainRepoVersionsLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__lte", r.retainRepoVersionsLte, "") + } + if r.retainRepoVersionsNe != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__ne", r.retainRepoVersionsNe, "") + } + if r.retainRepoVersionsRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "retain_repo_versions__range", r.retainRepoVersionsRange, "csv") + } + if r.withContent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "with_content", r.withContent, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmAPIRepositoriesRpmRpmListRolesRequest struct { + ctx context.Context + ApiService *RepositoriesRpmAPIService + rpmRpmRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRolesRequest) Fields(fields []string) RepositoriesRpmAPIRepositoriesRpmRpmListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRolesRequest) ExcludeFields(excludeFields []string) RepositoriesRpmAPIRepositoriesRpmRpmListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmListRolesExecute(r) +} + +/* +RepositoriesRpmRpmListRoles Method for RepositoriesRpmRpmListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryHref + @return RepositoriesRpmAPIRepositoriesRpmRpmListRolesRequest +*/ +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmListRoles(ctx context.Context, rpmRpmRepositoryHref string) RepositoriesRpmAPIRepositoriesRpmRpmListRolesRequest { + return RepositoriesRpmAPIRepositoriesRpmRpmListRolesRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryHref: rpmRpmRepositoryHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmListRolesExecute(r RepositoriesRpmAPIRepositoriesRpmRpmListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmAPIService.RepositoriesRpmRpmListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_href"+"}", parameterValueToString(r.rpmRpmRepositoryHref, "rpmRpmRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmAPIRepositoriesRpmRpmModifyRequest struct { + ctx context.Context + ApiService *RepositoriesRpmAPIService + rpmRpmRepositoryHref string + repositoryAddRemoveContent *RepositoryAddRemoveContent +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmModifyRequest) RepositoryAddRemoveContent(repositoryAddRemoveContent RepositoryAddRemoveContent) RepositoriesRpmAPIRepositoriesRpmRpmModifyRequest { + r.repositoryAddRemoveContent = &repositoryAddRemoveContent + return r +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmModifyRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmModifyExecute(r) +} + +/* +RepositoriesRpmRpmModify Modify Repository Content + +Trigger an asynchronous task to create a new repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryHref + @return RepositoriesRpmAPIRepositoriesRpmRpmModifyRequest +*/ +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmModify(ctx context.Context, rpmRpmRepositoryHref string) RepositoriesRpmAPIRepositoriesRpmRpmModifyRequest { + return RepositoriesRpmAPIRepositoriesRpmRpmModifyRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryHref: rpmRpmRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmModifyExecute(r RepositoriesRpmAPIRepositoriesRpmRpmModifyRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmAPIService.RepositoriesRpmRpmModify") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_href}modify/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_href"+"}", parameterValueToString(r.rpmRpmRepositoryHref, "rpmRpmRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositoryAddRemoveContent == nil { + return localVarReturnValue, nil, reportError("repositoryAddRemoveContent is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositoryAddRemoveContent + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmAPIRepositoriesRpmRpmMyPermissionsRequest struct { + ctx context.Context + ApiService *RepositoriesRpmAPIService + rpmRpmRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesRpmAPIRepositoriesRpmRpmMyPermissionsRequest) Fields(fields []string) RepositoriesRpmAPIRepositoriesRpmRpmMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesRpmAPIRepositoriesRpmRpmMyPermissionsRequest) ExcludeFields(excludeFields []string) RepositoriesRpmAPIRepositoriesRpmRpmMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmMyPermissionsExecute(r) +} + +/* +RepositoriesRpmRpmMyPermissions Method for RepositoriesRpmRpmMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryHref + @return RepositoriesRpmAPIRepositoriesRpmRpmMyPermissionsRequest +*/ +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmMyPermissions(ctx context.Context, rpmRpmRepositoryHref string) RepositoriesRpmAPIRepositoriesRpmRpmMyPermissionsRequest { + return RepositoriesRpmAPIRepositoriesRpmRpmMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryHref: rpmRpmRepositoryHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmMyPermissionsExecute(r RepositoriesRpmAPIRepositoriesRpmRpmMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmAPIService.RepositoriesRpmRpmMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_href"+"}", parameterValueToString(r.rpmRpmRepositoryHref, "rpmRpmRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmAPIRepositoriesRpmRpmPartialUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesRpmAPIService + rpmRpmRepositoryHref string + patchedrpmRpmRepository *PatchedrpmRpmRepository +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmPartialUpdateRequest) PatchedrpmRpmRepository(patchedrpmRpmRepository PatchedrpmRpmRepository) RepositoriesRpmAPIRepositoriesRpmRpmPartialUpdateRequest { + r.patchedrpmRpmRepository = &patchedrpmRpmRepository + return r +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmPartialUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmPartialUpdateExecute(r) +} + +/* +RepositoriesRpmRpmPartialUpdate Update a rpm repository + +Trigger an asynchronous partial update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryHref + @return RepositoriesRpmAPIRepositoriesRpmRpmPartialUpdateRequest +*/ +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmPartialUpdate(ctx context.Context, rpmRpmRepositoryHref string) RepositoriesRpmAPIRepositoriesRpmRpmPartialUpdateRequest { + return RepositoriesRpmAPIRepositoriesRpmRpmPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryHref: rpmRpmRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmPartialUpdateExecute(r RepositoriesRpmAPIRepositoriesRpmRpmPartialUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmAPIService.RepositoriesRpmRpmPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_href"+"}", parameterValueToString(r.rpmRpmRepositoryHref, "rpmRpmRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedrpmRpmRepository == nil { + return localVarReturnValue, nil, reportError("patchedrpmRpmRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedrpmRpmRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmAPIRepositoriesRpmRpmReadRequest struct { + ctx context.Context + ApiService *RepositoriesRpmAPIService + rpmRpmRepositoryHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesRpmAPIRepositoriesRpmRpmReadRequest) Fields(fields []string) RepositoriesRpmAPIRepositoriesRpmRpmReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesRpmAPIRepositoriesRpmRpmReadRequest) ExcludeFields(excludeFields []string) RepositoriesRpmAPIRepositoriesRpmRpmReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmReadRequest) Execute() (*RpmRpmRepositoryResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmReadExecute(r) +} + +/* +RepositoriesRpmRpmRead Inspect a rpm repository + +A ViewSet for RpmRepository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryHref + @return RepositoriesRpmAPIRepositoriesRpmRpmReadRequest +*/ +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmRead(ctx context.Context, rpmRpmRepositoryHref string) RepositoriesRpmAPIRepositoriesRpmRpmReadRequest { + return RepositoriesRpmAPIRepositoriesRpmRpmReadRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryHref: rpmRpmRepositoryHref, + } +} + +// Execute executes the request +// @return RpmRpmRepositoryResponse +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmReadExecute(r RepositoriesRpmAPIRepositoriesRpmRpmReadRequest) (*RpmRpmRepositoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RpmRpmRepositoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmAPIService.RepositoriesRpmRpmRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_href"+"}", parameterValueToString(r.rpmRpmRepositoryHref, "rpmRpmRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmAPIRepositoriesRpmRpmRemoveRoleRequest struct { + ctx context.Context + ApiService *RepositoriesRpmAPIService + rpmRpmRepositoryHref string + nestedRole *NestedRole +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmRemoveRoleRequest) NestedRole(nestedRole NestedRole) RepositoriesRpmAPIRepositoriesRpmRpmRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmRemoveRoleExecute(r) +} + +/* +RepositoriesRpmRpmRemoveRole Method for RepositoriesRpmRpmRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryHref + @return RepositoriesRpmAPIRepositoriesRpmRpmRemoveRoleRequest +*/ +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmRemoveRole(ctx context.Context, rpmRpmRepositoryHref string) RepositoriesRpmAPIRepositoriesRpmRpmRemoveRoleRequest { + return RepositoriesRpmAPIRepositoriesRpmRpmRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryHref: rpmRpmRepositoryHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmRemoveRoleExecute(r RepositoriesRpmAPIRepositoriesRpmRpmRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmAPIService.RepositoriesRpmRpmRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_href"+"}", parameterValueToString(r.rpmRpmRepositoryHref, "rpmRpmRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmAPIRepositoriesRpmRpmSyncRequest struct { + ctx context.Context + ApiService *RepositoriesRpmAPIService + rpmRpmRepositoryHref string + rpmRepositorySyncURL *RpmRepositorySyncURL +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmSyncRequest) RpmRepositorySyncURL(rpmRepositorySyncURL RpmRepositorySyncURL) RepositoriesRpmAPIRepositoriesRpmRpmSyncRequest { + r.rpmRepositorySyncURL = &rpmRepositorySyncURL + return r +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmSyncRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmSyncExecute(r) +} + +/* +RepositoriesRpmRpmSync Sync from remote + +Trigger an asynchronous task to sync RPM content. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryHref + @return RepositoriesRpmAPIRepositoriesRpmRpmSyncRequest +*/ +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmSync(ctx context.Context, rpmRpmRepositoryHref string) RepositoriesRpmAPIRepositoriesRpmRpmSyncRequest { + return RepositoriesRpmAPIRepositoriesRpmRpmSyncRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryHref: rpmRpmRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmSyncExecute(r RepositoriesRpmAPIRepositoriesRpmRpmSyncRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmAPIService.RepositoriesRpmRpmSync") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_href}sync/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_href"+"}", parameterValueToString(r.rpmRpmRepositoryHref, "rpmRpmRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmRepositorySyncURL == nil { + return localVarReturnValue, nil, reportError("rpmRepositorySyncURL is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmRepositorySyncURL + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmAPIRepositoriesRpmRpmUpdateRequest struct { + ctx context.Context + ApiService *RepositoriesRpmAPIService + rpmRpmRepositoryHref string + rpmRpmRepository *RpmRpmRepository +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmUpdateRequest) RpmRpmRepository(rpmRpmRepository RpmRpmRepository) RepositoriesRpmAPIRepositoriesRpmRpmUpdateRequest { + r.rpmRpmRepository = &rpmRpmRepository + return r +} + +func (r RepositoriesRpmAPIRepositoriesRpmRpmUpdateRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmUpdateExecute(r) +} + +/* +RepositoriesRpmRpmUpdate Update a rpm repository + +Trigger an asynchronous update task + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryHref + @return RepositoriesRpmAPIRepositoriesRpmRpmUpdateRequest +*/ +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmUpdate(ctx context.Context, rpmRpmRepositoryHref string) RepositoriesRpmAPIRepositoriesRpmRpmUpdateRequest { + return RepositoriesRpmAPIRepositoriesRpmRpmUpdateRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryHref: rpmRpmRepositoryHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesRpmAPIService) RepositoriesRpmRpmUpdateExecute(r RepositoriesRpmAPIRepositoriesRpmRpmUpdateRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmAPIService.RepositoriesRpmRpmUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_href"+"}", parameterValueToString(r.rpmRpmRepositoryHref, "rpmRpmRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.rpmRpmRepository == nil { + return localVarReturnValue, nil, reportError("rpmRpmRepository is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rpmRpmRepository + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_rpm_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_rpm_versions.go new file mode 100644 index 0000000000..4362feab5f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repositories_rpm_versions.go @@ -0,0 +1,702 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// RepositoriesRpmVersionsAPIService RepositoriesRpmVersionsAPI service +type RepositoriesRpmVersionsAPIService service + +type RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsDeleteRequest struct { + ctx context.Context + ApiService *RepositoriesRpmVersionsAPIService + rpmRpmRepositoryVersionHref string +} + +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsDeleteRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmVersionsDeleteExecute(r) +} + +/* +RepositoriesRpmRpmVersionsDelete Delete a repository version + +Trigger an asynchronous task to delete a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryVersionHref + @return RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsDeleteRequest +*/ +func (a *RepositoriesRpmVersionsAPIService) RepositoriesRpmRpmVersionsDelete(ctx context.Context, rpmRpmRepositoryVersionHref string) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsDeleteRequest { + return RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsDeleteRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryVersionHref: rpmRpmRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesRpmVersionsAPIService) RepositoriesRpmRpmVersionsDeleteExecute(r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsDeleteRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmVersionsAPIService.RepositoriesRpmRpmVersionsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_version_href"+"}", parameterValueToString(r.rpmRpmRepositoryVersionHref, "rpmRpmRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest struct { + ctx context.Context + ApiService *RepositoriesRpmVersionsAPIService + rpmRpmRepositoryHref string + content *string + contentIn *string + limit *int32 + number *int32 + numberGt *int32 + numberGte *int32 + numberLt *int32 + numberLte *int32 + numberRange *[]int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) Content(content string) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) ContentIn(contentIn string) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) Limit(limit int32) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.limit = &limit + return r +} + +// Filter results where number matches value +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) Number(number int32) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.number = &number + return r +} + +// Filter results where number is greater than value +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) NumberGt(numberGt int32) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.numberGt = &numberGt + return r +} + +// Filter results where number is greater than or equal to value +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) NumberGte(numberGte int32) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.numberGte = &numberGte + return r +} + +// Filter results where number is less than value +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) NumberLt(numberLt int32) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.numberLt = &numberLt + return r +} + +// Filter results where number is less than or equal to value +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) NumberLte(numberLte int32) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.numberLte = &numberLte + return r +} + +// Filter results where number is between two comma separated values +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) NumberRange(numberRange []int32) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.numberRange = &numberRange + return r +} + +// The initial index from which to return the results. +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) Offset(offset int32) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) Ordering(ordering []string) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) PulpCreated(pulpCreated time.Time) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) PulpCreatedGt(pulpCreatedGt time.Time) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) PulpCreatedGte(pulpCreatedGte time.Time) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) PulpCreatedLt(pulpCreatedLt time.Time) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) PulpCreatedLte(pulpCreatedLte time.Time) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) PulpHrefIn(pulpHrefIn []string) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// A list of fields to include in the response. +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) Fields(fields []string) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) ExcludeFields(excludeFields []string) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) Execute() (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmVersionsListExecute(r) +} + +/* +RepositoriesRpmRpmVersionsList List repository versions + +RpmRepositoryVersion represents a single rpm repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryHref + @return RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest +*/ +func (a *RepositoriesRpmVersionsAPIService) RepositoriesRpmRpmVersionsList(ctx context.Context, rpmRpmRepositoryHref string) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest { + return RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryHref: rpmRpmRepositoryHref, + } +} + +// Execute executes the request +// @return PaginatedRepositoryVersionResponseList +func (a *RepositoriesRpmVersionsAPIService) RepositoriesRpmRpmVersionsListExecute(r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsListRequest) (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRepositoryVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmVersionsAPIService.RepositoriesRpmRpmVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_href}versions/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_href"+"}", parameterValueToString(r.rpmRpmRepositoryHref, "rpmRpmRepositoryHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.number != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number", r.number, "") + } + if r.numberGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gt", r.numberGt, "") + } + if r.numberGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gte", r.numberGte, "") + } + if r.numberLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lt", r.numberLt, "") + } + if r.numberLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lte", r.numberLte, "") + } + if r.numberRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__range", r.numberRange, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsReadRequest struct { + ctx context.Context + ApiService *RepositoriesRpmVersionsAPIService + rpmRpmRepositoryVersionHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsReadRequest) Fields(fields []string) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsReadRequest) ExcludeFields(excludeFields []string) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsReadRequest) Execute() (*RepositoryVersionResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmVersionsReadExecute(r) +} + +/* +RepositoriesRpmRpmVersionsRead Inspect a repository version + +RpmRepositoryVersion represents a single rpm repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryVersionHref + @return RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsReadRequest +*/ +func (a *RepositoriesRpmVersionsAPIService) RepositoriesRpmRpmVersionsRead(ctx context.Context, rpmRpmRepositoryVersionHref string) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsReadRequest { + return RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsReadRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryVersionHref: rpmRpmRepositoryVersionHref, + } +} + +// Execute executes the request +// @return RepositoryVersionResponse +func (a *RepositoriesRpmVersionsAPIService) RepositoriesRpmRpmVersionsReadExecute(r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsReadRequest) (*RepositoryVersionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryVersionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmVersionsAPIService.RepositoriesRpmRpmVersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_version_href}" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_version_href"+"}", parameterValueToString(r.rpmRpmRepositoryVersionHref, "rpmRpmRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsRepairRequest struct { + ctx context.Context + ApiService *RepositoriesRpmVersionsAPIService + rpmRpmRepositoryVersionHref string + repair *Repair +} + +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsRepairRequest) Repair(repair Repair) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsRepairRequest { + r.repair = &repair + return r +} + +func (r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsRepairRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RepositoriesRpmRpmVersionsRepairExecute(r) +} + +/* +RepositoriesRpmRpmVersionsRepair Method for RepositoriesRpmRpmVersionsRepair + +Trigger an asynchronous task to repair a repository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param rpmRpmRepositoryVersionHref + @return RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsRepairRequest +*/ +func (a *RepositoriesRpmVersionsAPIService) RepositoriesRpmRpmVersionsRepair(ctx context.Context, rpmRpmRepositoryVersionHref string) RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsRepairRequest { + return RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsRepairRequest{ + ApiService: a, + ctx: ctx, + rpmRpmRepositoryVersionHref: rpmRpmRepositoryVersionHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RepositoriesRpmVersionsAPIService) RepositoriesRpmRpmVersionsRepairExecute(r RepositoriesRpmVersionsAPIRepositoriesRpmRpmVersionsRepairRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoriesRpmVersionsAPIService.RepositoriesRpmRpmVersionsRepair") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{rpm_rpm_repository_version_href}repair/" + localVarPath = strings.Replace(localVarPath, "{"+"rpm_rpm_repository_version_href"+"}", parameterValueToString(r.rpmRpmRepositoryVersionHref, "rpmRpmRepositoryVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repair == nil { + return localVarReturnValue, nil, reportError("repair is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repair + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_repository_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repository_versions.go new file mode 100644 index 0000000000..34ec50fabd --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_repository_versions.go @@ -0,0 +1,341 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "time" + "reflect" +) + + +// RepositoryVersionsAPIService RepositoryVersionsAPI service +type RepositoryVersionsAPIService service + +type RepositoryVersionsAPIRepositoryVersionsListRequest struct { + ctx context.Context + ApiService *RepositoryVersionsAPIService + content *string + contentIn *string + limit *int32 + number *int32 + numberGt *int32 + numberGte *int32 + numberLt *int32 + numberLte *int32 + numberRange *[]int32 + offset *int32 + ordering *[]string + pulpCreated *time.Time + pulpCreatedGt *time.Time + pulpCreatedGte *time.Time + pulpCreatedLt *time.Time + pulpCreatedLte *time.Time + pulpCreatedRange *[]time.Time + pulpHrefIn *[]string + fields *[]string + excludeFields *[]string +} + +// Content Unit referenced by HREF +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) Content(content string) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.content = &content + return r +} + +// Content Unit referenced by HREF +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) ContentIn(contentIn string) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.contentIn = &contentIn + return r +} + +// Number of results to return per page. +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) Limit(limit int32) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.limit = &limit + return r +} + +// Filter results where number matches value +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) Number(number int32) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.number = &number + return r +} + +// Filter results where number is greater than value +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) NumberGt(numberGt int32) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.numberGt = &numberGt + return r +} + +// Filter results where number is greater than or equal to value +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) NumberGte(numberGte int32) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.numberGte = &numberGte + return r +} + +// Filter results where number is less than value +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) NumberLt(numberLt int32) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.numberLt = &numberLt + return r +} + +// Filter results where number is less than or equal to value +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) NumberLte(numberLte int32) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.numberLte = &numberLte + return r +} + +// Filter results where number is between two comma separated values +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) NumberRange(numberRange []int32) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.numberRange = &numberRange + return r +} + +// The initial index from which to return the results. +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) Offset(offset int32) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) Ordering(ordering []string) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.ordering = &ordering + return r +} + +// Filter results where pulp_created matches value +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) PulpCreated(pulpCreated time.Time) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.pulpCreated = &pulpCreated + return r +} + +// Filter results where pulp_created is greater than value +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) PulpCreatedGt(pulpCreatedGt time.Time) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.pulpCreatedGt = &pulpCreatedGt + return r +} + +// Filter results where pulp_created is greater than or equal to value +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) PulpCreatedGte(pulpCreatedGte time.Time) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.pulpCreatedGte = &pulpCreatedGte + return r +} + +// Filter results where pulp_created is less than value +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) PulpCreatedLt(pulpCreatedLt time.Time) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.pulpCreatedLt = &pulpCreatedLt + return r +} + +// Filter results where pulp_created is less than or equal to value +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) PulpCreatedLte(pulpCreatedLte time.Time) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.pulpCreatedLte = &pulpCreatedLte + return r +} + +// Filter results where pulp_created is between two comma separated values +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) PulpCreatedRange(pulpCreatedRange []time.Time) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.pulpCreatedRange = &pulpCreatedRange + return r +} + +// Multiple values may be separated by commas. +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) PulpHrefIn(pulpHrefIn []string) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// A list of fields to include in the response. +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) Fields(fields []string) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) ExcludeFields(excludeFields []string) RepositoryVersionsAPIRepositoryVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RepositoryVersionsAPIRepositoryVersionsListRequest) Execute() (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + return r.ApiService.RepositoryVersionsListExecute(r) +} + +/* +RepositoryVersionsList List repository versions + +A mixin to hold the shared get_queryset logic used by RepositoryVersionViewSets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RepositoryVersionsAPIRepositoryVersionsListRequest +*/ +func (a *RepositoryVersionsAPIService) RepositoryVersionsList(ctx context.Context) RepositoryVersionsAPIRepositoryVersionsListRequest { + return RepositoryVersionsAPIRepositoryVersionsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedRepositoryVersionResponseList +func (a *RepositoryVersionsAPIService) RepositoryVersionsListExecute(r RepositoryVersionsAPIRepositoryVersionsListRequest) (*PaginatedRepositoryVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRepositoryVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoryVersionsAPIService.RepositoryVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/repository_versions/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.content != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content", r.content, "") + } + if r.contentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content__in", r.contentIn, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.number != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number", r.number, "") + } + if r.numberGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gt", r.numberGt, "") + } + if r.numberGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__gte", r.numberGte, "") + } + if r.numberLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lt", r.numberLt, "") + } + if r.numberLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__lte", r.numberLte, "") + } + if r.numberRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "number__range", r.numberRange, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpCreated != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created", r.pulpCreated, "") + } + if r.pulpCreatedGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gt", r.pulpCreatedGt, "") + } + if r.pulpCreatedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__gte", r.pulpCreatedGte, "") + } + if r.pulpCreatedLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lt", r.pulpCreatedLt, "") + } + if r.pulpCreatedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__lte", r.pulpCreatedLte, "") + } + if r.pulpCreatedRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_created__range", r.pulpCreatedRange, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_roles.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_roles.go new file mode 100644 index 0000000000..c312984324 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_roles.go @@ -0,0 +1,908 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// RolesAPIService RolesAPI service +type RolesAPIService service + +type RolesAPIRolesCreateRequest struct { + ctx context.Context + ApiService *RolesAPIService + role *Role +} + +func (r RolesAPIRolesCreateRequest) Role(role Role) RolesAPIRolesCreateRequest { + r.role = &role + return r +} + +func (r RolesAPIRolesCreateRequest) Execute() (*RoleResponse, *http.Response, error) { + return r.ApiService.RolesCreateExecute(r) +} + +/* +RolesCreate Create a role + +ViewSet for Role. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RolesAPIRolesCreateRequest +*/ +func (a *RolesAPIService) RolesCreate(ctx context.Context) RolesAPIRolesCreateRequest { + return RolesAPIRolesCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return RoleResponse +func (a *RolesAPIService) RolesCreateExecute(r RolesAPIRolesCreateRequest) (*RoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesAPIService.RolesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/roles/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.role == nil { + return localVarReturnValue, nil, reportError("role is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.role + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RolesAPIRolesDeleteRequest struct { + ctx context.Context + ApiService *RolesAPIService + roleHref string +} + +func (r RolesAPIRolesDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.RolesDeleteExecute(r) +} + +/* +RolesDelete Delete a role + +ViewSet for Role. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleHref + @return RolesAPIRolesDeleteRequest +*/ +func (a *RolesAPIService) RolesDelete(ctx context.Context, roleHref string) RolesAPIRolesDeleteRequest { + return RolesAPIRolesDeleteRequest{ + ApiService: a, + ctx: ctx, + roleHref: roleHref, + } +} + +// Execute executes the request +func (a *RolesAPIService) RolesDeleteExecute(r RolesAPIRolesDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesAPIService.RolesDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{role_href}" + localVarPath = strings.Replace(localVarPath, "{"+"role_href"+"}", parameterValueToString(r.roleHref, "roleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type RolesAPIRolesListRequest struct { + ctx context.Context + ApiService *RolesAPIService + containsPermission *[]string + description *string + descriptionContains *string + descriptionIcontains *string + descriptionIexact *string + forObjectType *string + limit *int32 + locked *bool + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Filter roles that have any of the permissions in the list. +func (r RolesAPIRolesListRequest) ContainsPermission(containsPermission []string) RolesAPIRolesListRequest { + r.containsPermission = &containsPermission + return r +} + +// Filter results where description matches value +func (r RolesAPIRolesListRequest) Description(description string) RolesAPIRolesListRequest { + r.description = &description + return r +} + +// Filter results where description contains value +func (r RolesAPIRolesListRequest) DescriptionContains(descriptionContains string) RolesAPIRolesListRequest { + r.descriptionContains = &descriptionContains + return r +} + +// Filter results where description contains value +func (r RolesAPIRolesListRequest) DescriptionIcontains(descriptionIcontains string) RolesAPIRolesListRequest { + r.descriptionIcontains = &descriptionIcontains + return r +} + +// Filter results where description matches value +func (r RolesAPIRolesListRequest) DescriptionIexact(descriptionIexact string) RolesAPIRolesListRequest { + r.descriptionIexact = &descriptionIexact + return r +} + +// Filter roles that only have permissions for the specified object HREF. +func (r RolesAPIRolesListRequest) ForObjectType(forObjectType string) RolesAPIRolesListRequest { + r.forObjectType = &forObjectType + return r +} + +// Number of results to return per page. +func (r RolesAPIRolesListRequest) Limit(limit int32) RolesAPIRolesListRequest { + r.limit = &limit + return r +} + +// Filter results where locked matches value +func (r RolesAPIRolesListRequest) Locked(locked bool) RolesAPIRolesListRequest { + r.locked = &locked + return r +} + +// Filter results where name matches value +func (r RolesAPIRolesListRequest) Name(name string) RolesAPIRolesListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r RolesAPIRolesListRequest) NameContains(nameContains string) RolesAPIRolesListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r RolesAPIRolesListRequest) NameIcontains(nameIcontains string) RolesAPIRolesListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r RolesAPIRolesListRequest) NameIn(nameIn []string) RolesAPIRolesListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r RolesAPIRolesListRequest) NameStartswith(nameStartswith string) RolesAPIRolesListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r RolesAPIRolesListRequest) Offset(offset int32) RolesAPIRolesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `locked` - Locked * `-locked` - Locked (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r RolesAPIRolesListRequest) Ordering(ordering []string) RolesAPIRolesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r RolesAPIRolesListRequest) PulpHrefIn(pulpHrefIn []string) RolesAPIRolesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r RolesAPIRolesListRequest) PulpIdIn(pulpIdIn []string) RolesAPIRolesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r RolesAPIRolesListRequest) Fields(fields []string) RolesAPIRolesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RolesAPIRolesListRequest) ExcludeFields(excludeFields []string) RolesAPIRolesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RolesAPIRolesListRequest) Execute() (*PaginatedRoleResponseList, *http.Response, error) { + return r.ApiService.RolesListExecute(r) +} + +/* +RolesList List roles + +ViewSet for Role. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RolesAPIRolesListRequest +*/ +func (a *RolesAPIService) RolesList(ctx context.Context) RolesAPIRolesListRequest { + return RolesAPIRolesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedRoleResponseList +func (a *RolesAPIService) RolesListExecute(r RolesAPIRolesListRequest) (*PaginatedRoleResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRoleResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesAPIService.RolesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/roles/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.containsPermission != nil { + t := *r.containsPermission + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "contains_permission", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "contains_permission", t, "multi") + } + } + if r.description != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "description", r.description, "") + } + if r.descriptionContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "description__contains", r.descriptionContains, "") + } + if r.descriptionIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "description__icontains", r.descriptionIcontains, "") + } + if r.descriptionIexact != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "description__iexact", r.descriptionIexact, "") + } + if r.forObjectType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "for_object_type", r.forObjectType, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.locked != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "locked", r.locked, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RolesAPIRolesPartialUpdateRequest struct { + ctx context.Context + ApiService *RolesAPIService + roleHref string + patchedRole *PatchedRole +} + +func (r RolesAPIRolesPartialUpdateRequest) PatchedRole(patchedRole PatchedRole) RolesAPIRolesPartialUpdateRequest { + r.patchedRole = &patchedRole + return r +} + +func (r RolesAPIRolesPartialUpdateRequest) Execute() (*RoleResponse, *http.Response, error) { + return r.ApiService.RolesPartialUpdateExecute(r) +} + +/* +RolesPartialUpdate Update a role + +ViewSet for Role. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleHref + @return RolesAPIRolesPartialUpdateRequest +*/ +func (a *RolesAPIService) RolesPartialUpdate(ctx context.Context, roleHref string) RolesAPIRolesPartialUpdateRequest { + return RolesAPIRolesPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + roleHref: roleHref, + } +} + +// Execute executes the request +// @return RoleResponse +func (a *RolesAPIService) RolesPartialUpdateExecute(r RolesAPIRolesPartialUpdateRequest) (*RoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesAPIService.RolesPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{role_href}" + localVarPath = strings.Replace(localVarPath, "{"+"role_href"+"}", parameterValueToString(r.roleHref, "roleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedRole == nil { + return localVarReturnValue, nil, reportError("patchedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RolesAPIRolesReadRequest struct { + ctx context.Context + ApiService *RolesAPIService + roleHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r RolesAPIRolesReadRequest) Fields(fields []string) RolesAPIRolesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r RolesAPIRolesReadRequest) ExcludeFields(excludeFields []string) RolesAPIRolesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r RolesAPIRolesReadRequest) Execute() (*RoleResponse, *http.Response, error) { + return r.ApiService.RolesReadExecute(r) +} + +/* +RolesRead Inspect a role + +ViewSet for Role. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleHref + @return RolesAPIRolesReadRequest +*/ +func (a *RolesAPIService) RolesRead(ctx context.Context, roleHref string) RolesAPIRolesReadRequest { + return RolesAPIRolesReadRequest{ + ApiService: a, + ctx: ctx, + roleHref: roleHref, + } +} + +// Execute executes the request +// @return RoleResponse +func (a *RolesAPIService) RolesReadExecute(r RolesAPIRolesReadRequest) (*RoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesAPIService.RolesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{role_href}" + localVarPath = strings.Replace(localVarPath, "{"+"role_href"+"}", parameterValueToString(r.roleHref, "roleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type RolesAPIRolesUpdateRequest struct { + ctx context.Context + ApiService *RolesAPIService + roleHref string + role *Role +} + +func (r RolesAPIRolesUpdateRequest) Role(role Role) RolesAPIRolesUpdateRequest { + r.role = &role + return r +} + +func (r RolesAPIRolesUpdateRequest) Execute() (*RoleResponse, *http.Response, error) { + return r.ApiService.RolesUpdateExecute(r) +} + +/* +RolesUpdate Update a role + +ViewSet for Role. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleHref + @return RolesAPIRolesUpdateRequest +*/ +func (a *RolesAPIService) RolesUpdate(ctx context.Context, roleHref string) RolesAPIRolesUpdateRequest { + return RolesAPIRolesUpdateRequest{ + ApiService: a, + ctx: ctx, + roleHref: roleHref, + } +} + +// Execute executes the request +// @return RoleResponse +func (a *RolesAPIService) RolesUpdateExecute(r RolesAPIRolesUpdateRequest) (*RoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesAPIService.RolesUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{role_href}" + localVarPath = strings.Replace(localVarPath, "{"+"role_href"+"}", parameterValueToString(r.roleHref, "roleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.role == nil { + return localVarReturnValue, nil, reportError("role is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.role + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_rpm_comps.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_rpm_comps.go new file mode 100644 index 0000000000..9241f5c81d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_rpm_comps.go @@ -0,0 +1,171 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "os" +) + + +// RpmCompsAPIService RpmCompsAPI service +type RpmCompsAPIService service + +type RpmCompsAPIRpmCompsUploadRequest struct { + ctx context.Context + ApiService *RpmCompsAPIService + file *os.File + repository *string + replace *bool +} + +// Full path of a comps.xml file that may be parsed into comps.xml Content units. +func (r RpmCompsAPIRpmCompsUploadRequest) File(file *os.File) RpmCompsAPIRpmCompsUploadRequest { + r.file = file + return r +} + +// URI of an RPM repository the comps.xml content units should be associated to. +func (r RpmCompsAPIRpmCompsUploadRequest) Repository(repository string) RpmCompsAPIRpmCompsUploadRequest { + r.repository = &repository + return r +} + +// If true, incoming comps.xml replaces existing comps-related ContentUnits in the specified repository. +func (r RpmCompsAPIRpmCompsUploadRequest) Replace(replace bool) RpmCompsAPIRpmCompsUploadRequest { + r.replace = &replace + return r +} + +func (r RpmCompsAPIRpmCompsUploadRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.RpmCompsUploadExecute(r) +} + +/* +RpmCompsUpload Upload comps.xml + +Trigger an asynchronous task to upload a comps.xml file. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RpmCompsAPIRpmCompsUploadRequest +*/ +func (a *RpmCompsAPIService) RpmCompsUpload(ctx context.Context) RpmCompsAPIRpmCompsUploadRequest { + return RpmCompsAPIRpmCompsUploadRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RpmCompsAPIService) RpmCompsUploadExecute(r RpmCompsAPIRpmCompsUploadRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RpmCompsAPIService.RpmCompsUpload") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/rpm/comps/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.file == nil { + return localVarReturnValue, nil, reportError("file is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "repository", r.repository, "") + } + if r.replace != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "replace", r.replace, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_rpm_copy.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_rpm_copy.go new file mode 100644 index 0000000000..1127e2ce73 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_rpm_copy.go @@ -0,0 +1,134 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// RpmCopyAPIService RpmCopyAPI service +type RpmCopyAPIService service + +type RpmCopyAPICopyContentRequest struct { + ctx context.Context + ApiService *RpmCopyAPIService + copy *Copy +} + +func (r RpmCopyAPICopyContentRequest) Copy(copy Copy) RpmCopyAPICopyContentRequest { + r.copy = © + return r +} + +func (r RpmCopyAPICopyContentRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.CopyContentExecute(r) +} + +/* +CopyContent Copy content + +Trigger an asynchronous task to copy RPM contentfrom one repository into another, creating a newrepository version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return RpmCopyAPICopyContentRequest +*/ +func (a *RpmCopyAPIService) CopyContent(ctx context.Context) RpmCopyAPICopyContentRequest { + return RpmCopyAPICopyContentRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *RpmCopyAPIService) CopyContentExecute(r RpmCopyAPICopyContentRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RpmCopyAPIService.CopyContent") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/rpm/copy/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.copy == nil { + return localVarReturnValue, nil, reportError("copy is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.copy + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_signing_services.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_signing_services.go new file mode 100644 index 0000000000..787e4d1cc1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_signing_services.go @@ -0,0 +1,360 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// SigningServicesAPIService SigningServicesAPI service +type SigningServicesAPIService service + +type SigningServicesAPISigningServicesListRequest struct { + ctx context.Context + ApiService *SigningServicesAPIService + limit *int32 + name *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r SigningServicesAPISigningServicesListRequest) Limit(limit int32) SigningServicesAPISigningServicesListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r SigningServicesAPISigningServicesListRequest) Name(name string) SigningServicesAPISigningServicesListRequest { + r.name = &name + return r +} + +// The initial index from which to return the results. +func (r SigningServicesAPISigningServicesListRequest) Offset(offset int32) SigningServicesAPISigningServicesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `name` - Name * `-name` - Name (descending) * `public_key` - Public key * `-public_key` - Public key (descending) * `pubkey_fingerprint` - Pubkey fingerprint * `-pubkey_fingerprint` - Pubkey fingerprint (descending) * `script` - Script * `-script` - Script (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r SigningServicesAPISigningServicesListRequest) Ordering(ordering []string) SigningServicesAPISigningServicesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r SigningServicesAPISigningServicesListRequest) PulpHrefIn(pulpHrefIn []string) SigningServicesAPISigningServicesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r SigningServicesAPISigningServicesListRequest) PulpIdIn(pulpIdIn []string) SigningServicesAPISigningServicesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r SigningServicesAPISigningServicesListRequest) Fields(fields []string) SigningServicesAPISigningServicesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r SigningServicesAPISigningServicesListRequest) ExcludeFields(excludeFields []string) SigningServicesAPISigningServicesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r SigningServicesAPISigningServicesListRequest) Execute() (*PaginatedSigningServiceResponseList, *http.Response, error) { + return r.ApiService.SigningServicesListExecute(r) +} + +/* +SigningServicesList List signing services + +A ViewSet that supports browsing of existing signing services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return SigningServicesAPISigningServicesListRequest +*/ +func (a *SigningServicesAPIService) SigningServicesList(ctx context.Context) SigningServicesAPISigningServicesListRequest { + return SigningServicesAPISigningServicesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedSigningServiceResponseList +func (a *SigningServicesAPIService) SigningServicesListExecute(r SigningServicesAPISigningServicesListRequest) (*PaginatedSigningServiceResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedSigningServiceResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SigningServicesAPIService.SigningServicesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/signing-services/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type SigningServicesAPISigningServicesReadRequest struct { + ctx context.Context + ApiService *SigningServicesAPIService + signingServiceHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r SigningServicesAPISigningServicesReadRequest) Fields(fields []string) SigningServicesAPISigningServicesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r SigningServicesAPISigningServicesReadRequest) ExcludeFields(excludeFields []string) SigningServicesAPISigningServicesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r SigningServicesAPISigningServicesReadRequest) Execute() (*SigningServiceResponse, *http.Response, error) { + return r.ApiService.SigningServicesReadExecute(r) +} + +/* +SigningServicesRead Inspect a signing service + +A ViewSet that supports browsing of existing signing services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param signingServiceHref + @return SigningServicesAPISigningServicesReadRequest +*/ +func (a *SigningServicesAPIService) SigningServicesRead(ctx context.Context, signingServiceHref string) SigningServicesAPISigningServicesReadRequest { + return SigningServicesAPISigningServicesReadRequest{ + ApiService: a, + ctx: ctx, + signingServiceHref: signingServiceHref, + } +} + +// Execute executes the request +// @return SigningServiceResponse +func (a *SigningServicesAPIService) SigningServicesReadExecute(r SigningServicesAPISigningServicesReadRequest) (*SigningServiceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SigningServiceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SigningServicesAPIService.SigningServicesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{signing_service_href}" + localVarPath = strings.Replace(localVarPath, "{"+"signing_service_href"+"}", parameterValueToString(r.signingServiceHref, "signingServiceHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_status.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_status.go new file mode 100644 index 0000000000..cc472cfeb2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_status.go @@ -0,0 +1,131 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// StatusAPIService StatusAPI service +type StatusAPIService service + +type StatusAPIStatusReadRequest struct { + ctx context.Context + ApiService *StatusAPIService +} + +func (r StatusAPIStatusReadRequest) Execute() (*StatusResponse, *http.Response, error) { + return r.ApiService.StatusReadExecute(r) +} + +/* +StatusRead Inspect status of Pulp + +Returns status and app information about Pulp. + +Information includes: + * version of pulpcore and loaded pulp plugins + * known workers + * known content apps + * database connection status + * redis connection status + * disk usage information + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return StatusAPIStatusReadRequest +*/ +func (a *StatusAPIService) StatusRead(ctx context.Context) StatusAPIStatusReadRequest { + return StatusAPIStatusReadRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return StatusResponse +func (a *StatusAPIService) StatusReadExecute(r StatusAPIStatusReadRequest) (*StatusResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *StatusResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StatusAPIService.StatusRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/status/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_task_groups.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_task_groups.go new file mode 100644 index 0000000000..086313007f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_task_groups.go @@ -0,0 +1,354 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// TaskGroupsAPIService TaskGroupsAPI service +type TaskGroupsAPIService service + +type TaskGroupsAPITaskGroupsListRequest struct { + ctx context.Context + ApiService *TaskGroupsAPIService + limit *int32 + offset *int32 + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r TaskGroupsAPITaskGroupsListRequest) Limit(limit int32) TaskGroupsAPITaskGroupsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r TaskGroupsAPITaskGroupsListRequest) Offset(offset int32) TaskGroupsAPITaskGroupsListRequest { + r.offset = &offset + return r +} + +// A list of fields to include in the response. +func (r TaskGroupsAPITaskGroupsListRequest) Fields(fields []string) TaskGroupsAPITaskGroupsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r TaskGroupsAPITaskGroupsListRequest) ExcludeFields(excludeFields []string) TaskGroupsAPITaskGroupsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r TaskGroupsAPITaskGroupsListRequest) Execute() (*PaginatedTaskGroupResponseList, *http.Response, error) { + return r.ApiService.TaskGroupsListExecute(r) +} + +/* +TaskGroupsList List task groups + +A customized named ModelViewSet that knows how to register itself with the Pulp API router. + +This viewset is discoverable by its name. +"Normal" Django Models and Master/Detail models are supported by the ``register_with`` method. + +Attributes: + lookup_field (str): The name of the field by which an object should be looked up, in + addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' + endpoint_name (str): The name of the final path segment that should identify the ViewSet's + collection endpoint. + nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must + correspond to the "parent_prefix" of a router with rest_framework_nested.NestedMixin. + None indicates this ViewSet should not be nested. + parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs + to django model filter expressions that can be used with the corresponding value from + self.kwargs, used only by a nested ViewSet to filter based on the parent object's + identity. + schema (DefaultSchema): The schema class to use by default in a viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return TaskGroupsAPITaskGroupsListRequest +*/ +func (a *TaskGroupsAPIService) TaskGroupsList(ctx context.Context) TaskGroupsAPITaskGroupsListRequest { + return TaskGroupsAPITaskGroupsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedTaskGroupResponseList +func (a *TaskGroupsAPIService) TaskGroupsListExecute(r TaskGroupsAPITaskGroupsListRequest) (*PaginatedTaskGroupResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedTaskGroupResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaskGroupsAPIService.TaskGroupsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/task-groups/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TaskGroupsAPITaskGroupsReadRequest struct { + ctx context.Context + ApiService *TaskGroupsAPIService + taskGroupHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r TaskGroupsAPITaskGroupsReadRequest) Fields(fields []string) TaskGroupsAPITaskGroupsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r TaskGroupsAPITaskGroupsReadRequest) ExcludeFields(excludeFields []string) TaskGroupsAPITaskGroupsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r TaskGroupsAPITaskGroupsReadRequest) Execute() (*TaskGroupResponse, *http.Response, error) { + return r.ApiService.TaskGroupsReadExecute(r) +} + +/* +TaskGroupsRead Inspect a task group + +A customized named ModelViewSet that knows how to register itself with the Pulp API router. + +This viewset is discoverable by its name. +"Normal" Django Models and Master/Detail models are supported by the ``register_with`` method. + +Attributes: + lookup_field (str): The name of the field by which an object should be looked up, in + addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' + endpoint_name (str): The name of the final path segment that should identify the ViewSet's + collection endpoint. + nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must + correspond to the "parent_prefix" of a router with rest_framework_nested.NestedMixin. + None indicates this ViewSet should not be nested. + parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs + to django model filter expressions that can be used with the corresponding value from + self.kwargs, used only by a nested ViewSet to filter based on the parent object's + identity. + schema (DefaultSchema): The schema class to use by default in a viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskGroupHref + @return TaskGroupsAPITaskGroupsReadRequest +*/ +func (a *TaskGroupsAPIService) TaskGroupsRead(ctx context.Context, taskGroupHref string) TaskGroupsAPITaskGroupsReadRequest { + return TaskGroupsAPITaskGroupsReadRequest{ + ApiService: a, + ctx: ctx, + taskGroupHref: taskGroupHref, + } +} + +// Execute executes the request +// @return TaskGroupResponse +func (a *TaskGroupsAPIService) TaskGroupsReadExecute(r TaskGroupsAPITaskGroupsReadRequest) (*TaskGroupResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TaskGroupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaskGroupsAPIService.TaskGroupsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{task_group_href}" + localVarPath = strings.Replace(localVarPath, "{"+"task_group_href"+"}", parameterValueToString(r.taskGroupHref, "taskGroupHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_task_schedules.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_task_schedules.go new file mode 100644 index 0000000000..519784011a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_task_schedules.go @@ -0,0 +1,896 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// TaskSchedulesAPIService TaskSchedulesAPI service +type TaskSchedulesAPIService service + +type TaskSchedulesAPITaskSchedulesAddRoleRequest struct { + ctx context.Context + ApiService *TaskSchedulesAPIService + taskScheduleHref string + nestedRole *NestedRole +} + +func (r TaskSchedulesAPITaskSchedulesAddRoleRequest) NestedRole(nestedRole NestedRole) TaskSchedulesAPITaskSchedulesAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r TaskSchedulesAPITaskSchedulesAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.TaskSchedulesAddRoleExecute(r) +} + +/* +TaskSchedulesAddRole Method for TaskSchedulesAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskScheduleHref + @return TaskSchedulesAPITaskSchedulesAddRoleRequest +*/ +func (a *TaskSchedulesAPIService) TaskSchedulesAddRole(ctx context.Context, taskScheduleHref string) TaskSchedulesAPITaskSchedulesAddRoleRequest { + return TaskSchedulesAPITaskSchedulesAddRoleRequest{ + ApiService: a, + ctx: ctx, + taskScheduleHref: taskScheduleHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *TaskSchedulesAPIService) TaskSchedulesAddRoleExecute(r TaskSchedulesAPITaskSchedulesAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaskSchedulesAPIService.TaskSchedulesAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{task_schedule_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"task_schedule_href"+"}", parameterValueToString(r.taskScheduleHref, "taskScheduleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TaskSchedulesAPITaskSchedulesListRequest struct { + ctx context.Context + ApiService *TaskSchedulesAPIService + limit *int32 + name *string + nameContains *string + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + taskName *string + taskNameContains *string + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r TaskSchedulesAPITaskSchedulesListRequest) Limit(limit int32) TaskSchedulesAPITaskSchedulesListRequest { + r.limit = &limit + return r +} + +// Filter results where name matches value +func (r TaskSchedulesAPITaskSchedulesListRequest) Name(name string) TaskSchedulesAPITaskSchedulesListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r TaskSchedulesAPITaskSchedulesListRequest) NameContains(nameContains string) TaskSchedulesAPITaskSchedulesListRequest { + r.nameContains = &nameContains + return r +} + +// The initial index from which to return the results. +func (r TaskSchedulesAPITaskSchedulesListRequest) Offset(offset int32) TaskSchedulesAPITaskSchedulesListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `name` - Name * `-name` - Name (descending) * `next_dispatch` - Next dispatch * `-next_dispatch` - Next dispatch (descending) * `dispatch_interval` - Dispatch interval * `-dispatch_interval` - Dispatch interval (descending) * `task_name` - Task name * `-task_name` - Task name (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r TaskSchedulesAPITaskSchedulesListRequest) Ordering(ordering []string) TaskSchedulesAPITaskSchedulesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r TaskSchedulesAPITaskSchedulesListRequest) PulpHrefIn(pulpHrefIn []string) TaskSchedulesAPITaskSchedulesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r TaskSchedulesAPITaskSchedulesListRequest) PulpIdIn(pulpIdIn []string) TaskSchedulesAPITaskSchedulesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter results where task_name matches value +func (r TaskSchedulesAPITaskSchedulesListRequest) TaskName(taskName string) TaskSchedulesAPITaskSchedulesListRequest { + r.taskName = &taskName + return r +} + +// Filter results where task_name contains value +func (r TaskSchedulesAPITaskSchedulesListRequest) TaskNameContains(taskNameContains string) TaskSchedulesAPITaskSchedulesListRequest { + r.taskNameContains = &taskNameContains + return r +} + +// A list of fields to include in the response. +func (r TaskSchedulesAPITaskSchedulesListRequest) Fields(fields []string) TaskSchedulesAPITaskSchedulesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r TaskSchedulesAPITaskSchedulesListRequest) ExcludeFields(excludeFields []string) TaskSchedulesAPITaskSchedulesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r TaskSchedulesAPITaskSchedulesListRequest) Execute() (*PaginatedTaskScheduleResponseList, *http.Response, error) { + return r.ApiService.TaskSchedulesListExecute(r) +} + +/* +TaskSchedulesList List task schedules + +ViewSet to monitor task schedules. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return TaskSchedulesAPITaskSchedulesListRequest +*/ +func (a *TaskSchedulesAPIService) TaskSchedulesList(ctx context.Context) TaskSchedulesAPITaskSchedulesListRequest { + return TaskSchedulesAPITaskSchedulesListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedTaskScheduleResponseList +func (a *TaskSchedulesAPIService) TaskSchedulesListExecute(r TaskSchedulesAPITaskSchedulesListRequest) (*PaginatedTaskScheduleResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedTaskScheduleResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaskSchedulesAPIService.TaskSchedulesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/task-schedules/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.taskName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "task_name", r.taskName, "") + } + if r.taskNameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "task_name__contains", r.taskNameContains, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TaskSchedulesAPITaskSchedulesListRolesRequest struct { + ctx context.Context + ApiService *TaskSchedulesAPIService + taskScheduleHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r TaskSchedulesAPITaskSchedulesListRolesRequest) Fields(fields []string) TaskSchedulesAPITaskSchedulesListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r TaskSchedulesAPITaskSchedulesListRolesRequest) ExcludeFields(excludeFields []string) TaskSchedulesAPITaskSchedulesListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r TaskSchedulesAPITaskSchedulesListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.TaskSchedulesListRolesExecute(r) +} + +/* +TaskSchedulesListRoles Method for TaskSchedulesListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskScheduleHref + @return TaskSchedulesAPITaskSchedulesListRolesRequest +*/ +func (a *TaskSchedulesAPIService) TaskSchedulesListRoles(ctx context.Context, taskScheduleHref string) TaskSchedulesAPITaskSchedulesListRolesRequest { + return TaskSchedulesAPITaskSchedulesListRolesRequest{ + ApiService: a, + ctx: ctx, + taskScheduleHref: taskScheduleHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *TaskSchedulesAPIService) TaskSchedulesListRolesExecute(r TaskSchedulesAPITaskSchedulesListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaskSchedulesAPIService.TaskSchedulesListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{task_schedule_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"task_schedule_href"+"}", parameterValueToString(r.taskScheduleHref, "taskScheduleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TaskSchedulesAPITaskSchedulesMyPermissionsRequest struct { + ctx context.Context + ApiService *TaskSchedulesAPIService + taskScheduleHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r TaskSchedulesAPITaskSchedulesMyPermissionsRequest) Fields(fields []string) TaskSchedulesAPITaskSchedulesMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r TaskSchedulesAPITaskSchedulesMyPermissionsRequest) ExcludeFields(excludeFields []string) TaskSchedulesAPITaskSchedulesMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r TaskSchedulesAPITaskSchedulesMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.TaskSchedulesMyPermissionsExecute(r) +} + +/* +TaskSchedulesMyPermissions Method for TaskSchedulesMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskScheduleHref + @return TaskSchedulesAPITaskSchedulesMyPermissionsRequest +*/ +func (a *TaskSchedulesAPIService) TaskSchedulesMyPermissions(ctx context.Context, taskScheduleHref string) TaskSchedulesAPITaskSchedulesMyPermissionsRequest { + return TaskSchedulesAPITaskSchedulesMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + taskScheduleHref: taskScheduleHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *TaskSchedulesAPIService) TaskSchedulesMyPermissionsExecute(r TaskSchedulesAPITaskSchedulesMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaskSchedulesAPIService.TaskSchedulesMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{task_schedule_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"task_schedule_href"+"}", parameterValueToString(r.taskScheduleHref, "taskScheduleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TaskSchedulesAPITaskSchedulesReadRequest struct { + ctx context.Context + ApiService *TaskSchedulesAPIService + taskScheduleHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r TaskSchedulesAPITaskSchedulesReadRequest) Fields(fields []string) TaskSchedulesAPITaskSchedulesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r TaskSchedulesAPITaskSchedulesReadRequest) ExcludeFields(excludeFields []string) TaskSchedulesAPITaskSchedulesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r TaskSchedulesAPITaskSchedulesReadRequest) Execute() (*TaskScheduleResponse, *http.Response, error) { + return r.ApiService.TaskSchedulesReadExecute(r) +} + +/* +TaskSchedulesRead Inspect a task schedule + +ViewSet to monitor task schedules. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskScheduleHref + @return TaskSchedulesAPITaskSchedulesReadRequest +*/ +func (a *TaskSchedulesAPIService) TaskSchedulesRead(ctx context.Context, taskScheduleHref string) TaskSchedulesAPITaskSchedulesReadRequest { + return TaskSchedulesAPITaskSchedulesReadRequest{ + ApiService: a, + ctx: ctx, + taskScheduleHref: taskScheduleHref, + } +} + +// Execute executes the request +// @return TaskScheduleResponse +func (a *TaskSchedulesAPIService) TaskSchedulesReadExecute(r TaskSchedulesAPITaskSchedulesReadRequest) (*TaskScheduleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TaskScheduleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaskSchedulesAPIService.TaskSchedulesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{task_schedule_href}" + localVarPath = strings.Replace(localVarPath, "{"+"task_schedule_href"+"}", parameterValueToString(r.taskScheduleHref, "taskScheduleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TaskSchedulesAPITaskSchedulesRemoveRoleRequest struct { + ctx context.Context + ApiService *TaskSchedulesAPIService + taskScheduleHref string + nestedRole *NestedRole +} + +func (r TaskSchedulesAPITaskSchedulesRemoveRoleRequest) NestedRole(nestedRole NestedRole) TaskSchedulesAPITaskSchedulesRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r TaskSchedulesAPITaskSchedulesRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.TaskSchedulesRemoveRoleExecute(r) +} + +/* +TaskSchedulesRemoveRole Method for TaskSchedulesRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskScheduleHref + @return TaskSchedulesAPITaskSchedulesRemoveRoleRequest +*/ +func (a *TaskSchedulesAPIService) TaskSchedulesRemoveRole(ctx context.Context, taskScheduleHref string) TaskSchedulesAPITaskSchedulesRemoveRoleRequest { + return TaskSchedulesAPITaskSchedulesRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + taskScheduleHref: taskScheduleHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *TaskSchedulesAPIService) TaskSchedulesRemoveRoleExecute(r TaskSchedulesAPITaskSchedulesRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaskSchedulesAPIService.TaskSchedulesRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{task_schedule_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"task_schedule_href"+"}", parameterValueToString(r.taskScheduleHref, "taskScheduleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_tasks.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_tasks.go new file mode 100644 index 0000000000..34adbf0cae --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_tasks.go @@ -0,0 +1,1557 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// TasksAPIService TasksAPI service +type TasksAPIService service + +type TasksAPITasksAddRoleRequest struct { + ctx context.Context + ApiService *TasksAPIService + taskHref string + nestedRole *NestedRole +} + +func (r TasksAPITasksAddRoleRequest) NestedRole(nestedRole NestedRole) TasksAPITasksAddRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r TasksAPITasksAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.TasksAddRoleExecute(r) +} + +/* +TasksAddRole Method for TasksAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskHref + @return TasksAPITasksAddRoleRequest +*/ +func (a *TasksAPIService) TasksAddRole(ctx context.Context, taskHref string) TasksAPITasksAddRoleRequest { + return TasksAPITasksAddRoleRequest{ + ApiService: a, + ctx: ctx, + taskHref: taskHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *TasksAPIService) TasksAddRoleExecute(r TasksAPITasksAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.TasksAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{task_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"task_href"+"}", parameterValueToString(r.taskHref, "taskHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TasksAPITasksCancelRequest struct { + ctx context.Context + ApiService *TasksAPIService + taskHref string + patchedTaskCancel *PatchedTaskCancel +} + +func (r TasksAPITasksCancelRequest) PatchedTaskCancel(patchedTaskCancel PatchedTaskCancel) TasksAPITasksCancelRequest { + r.patchedTaskCancel = &patchedTaskCancel + return r +} + +func (r TasksAPITasksCancelRequest) Execute() (*TaskResponse, *http.Response, error) { + return r.ApiService.TasksCancelExecute(r) +} + +/* +TasksCancel Cancel a task + +This operation cancels a task. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskHref + @return TasksAPITasksCancelRequest +*/ +func (a *TasksAPIService) TasksCancel(ctx context.Context, taskHref string) TasksAPITasksCancelRequest { + return TasksAPITasksCancelRequest{ + ApiService: a, + ctx: ctx, + taskHref: taskHref, + } +} + +// Execute executes the request +// @return TaskResponse +func (a *TasksAPIService) TasksCancelExecute(r TasksAPITasksCancelRequest) (*TaskResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TaskResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.TasksCancel") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{task_href}" + localVarPath = strings.Replace(localVarPath, "{"+"task_href"+"}", parameterValueToString(r.taskHref, "taskHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedTaskCancel == nil { + return localVarReturnValue, nil, reportError("patchedTaskCancel is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedTaskCancel + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 409 { + var v TaskResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TasksAPITasksDeleteRequest struct { + ctx context.Context + ApiService *TasksAPIService + taskHref string +} + +func (r TasksAPITasksDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.TasksDeleteExecute(r) +} + +/* +TasksDelete Delete a task + +A customized named ModelViewSet that knows how to register itself with the Pulp API router. + +This viewset is discoverable by its name. +"Normal" Django Models and Master/Detail models are supported by the ``register_with`` method. + +Attributes: + lookup_field (str): The name of the field by which an object should be looked up, in + addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' + endpoint_name (str): The name of the final path segment that should identify the ViewSet's + collection endpoint. + nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must + correspond to the "parent_prefix" of a router with rest_framework_nested.NestedMixin. + None indicates this ViewSet should not be nested. + parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs + to django model filter expressions that can be used with the corresponding value from + self.kwargs, used only by a nested ViewSet to filter based on the parent object's + identity. + schema (DefaultSchema): The schema class to use by default in a viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskHref + @return TasksAPITasksDeleteRequest +*/ +func (a *TasksAPIService) TasksDelete(ctx context.Context, taskHref string) TasksAPITasksDeleteRequest { + return TasksAPITasksDeleteRequest{ + ApiService: a, + ctx: ctx, + taskHref: taskHref, + } +} + +// Execute executes the request +func (a *TasksAPIService) TasksDeleteExecute(r TasksAPITasksDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.TasksDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{task_href}" + localVarPath = strings.Replace(localVarPath, "{"+"task_href"+"}", parameterValueToString(r.taskHref, "taskHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type TasksAPITasksListRequest struct { + ctx context.Context + ApiService *TasksAPIService + childTasks *string + createdResources *string + exclusiveResources *string + exclusiveResourcesIn *[]string + finishedAt *time.Time + finishedAtGt *time.Time + finishedAtGte *time.Time + finishedAtLt *time.Time + finishedAtLte *time.Time + finishedAtRange *[]time.Time + limit *int32 + loggingCid *string + loggingCidContains *string + name *string + nameContains *string + nameIn *[]string + offset *int32 + ordering *[]string + parentTask *string + pulpHrefIn *[]string + pulpIdIn *[]string + reservedResources *string + reservedResourcesIn *[]string + reservedResourcesRecord *[]string + sharedResources *string + sharedResourcesIn *[]string + startedAt *time.Time + startedAtGt *time.Time + startedAtGte *time.Time + startedAtLt *time.Time + startedAtLte *time.Time + startedAtRange *[]time.Time + state *string + stateIn *[]string + taskGroup *string + worker *string + workerIn *[]string + fields *[]string + excludeFields *[]string +} + +// Filter results where child_tasks matches value +func (r TasksAPITasksListRequest) ChildTasks(childTasks string) TasksAPITasksListRequest { + r.childTasks = &childTasks + return r +} + +func (r TasksAPITasksListRequest) CreatedResources(createdResources string) TasksAPITasksListRequest { + r.createdResources = &createdResources + return r +} + +func (r TasksAPITasksListRequest) ExclusiveResources(exclusiveResources string) TasksAPITasksListRequest { + r.exclusiveResources = &exclusiveResources + return r +} + +// Multiple values may be separated by commas. +func (r TasksAPITasksListRequest) ExclusiveResourcesIn(exclusiveResourcesIn []string) TasksAPITasksListRequest { + r.exclusiveResourcesIn = &exclusiveResourcesIn + return r +} + +// Filter results where finished_at matches value +func (r TasksAPITasksListRequest) FinishedAt(finishedAt time.Time) TasksAPITasksListRequest { + r.finishedAt = &finishedAt + return r +} + +// Filter results where finished_at is greater than value +func (r TasksAPITasksListRequest) FinishedAtGt(finishedAtGt time.Time) TasksAPITasksListRequest { + r.finishedAtGt = &finishedAtGt + return r +} + +// Filter results where finished_at is greater than or equal to value +func (r TasksAPITasksListRequest) FinishedAtGte(finishedAtGte time.Time) TasksAPITasksListRequest { + r.finishedAtGte = &finishedAtGte + return r +} + +// Filter results where finished_at is less than value +func (r TasksAPITasksListRequest) FinishedAtLt(finishedAtLt time.Time) TasksAPITasksListRequest { + r.finishedAtLt = &finishedAtLt + return r +} + +// Filter results where finished_at is less than or equal to value +func (r TasksAPITasksListRequest) FinishedAtLte(finishedAtLte time.Time) TasksAPITasksListRequest { + r.finishedAtLte = &finishedAtLte + return r +} + +// Filter results where finished_at is between two comma separated values +func (r TasksAPITasksListRequest) FinishedAtRange(finishedAtRange []time.Time) TasksAPITasksListRequest { + r.finishedAtRange = &finishedAtRange + return r +} + +// Number of results to return per page. +func (r TasksAPITasksListRequest) Limit(limit int32) TasksAPITasksListRequest { + r.limit = &limit + return r +} + +// Filter results where logging_cid matches value +func (r TasksAPITasksListRequest) LoggingCid(loggingCid string) TasksAPITasksListRequest { + r.loggingCid = &loggingCid + return r +} + +// Filter results where logging_cid contains value +func (r TasksAPITasksListRequest) LoggingCidContains(loggingCidContains string) TasksAPITasksListRequest { + r.loggingCidContains = &loggingCidContains + return r +} + +// Filter results where name matches value +func (r TasksAPITasksListRequest) Name(name string) TasksAPITasksListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r TasksAPITasksListRequest) NameContains(nameContains string) TasksAPITasksListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r TasksAPITasksListRequest) NameIn(nameIn []string) TasksAPITasksListRequest { + r.nameIn = &nameIn + return r +} + +// The initial index from which to return the results. +func (r TasksAPITasksListRequest) Offset(offset int32) TasksAPITasksListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `state` - State * `-state` - State (descending) * `name` - Name * `-name` - Name (descending) * `logging_cid` - Logging cid * `-logging_cid` - Logging cid (descending) * `started_at` - Started at * `-started_at` - Started at (descending) * `finished_at` - Finished at * `-finished_at` - Finished at (descending) * `error` - Error * `-error` - Error (descending) * `args` - Args * `-args` - Args (descending) * `kwargs` - Kwargs * `-kwargs` - Kwargs (descending) * `reserved_resources_record` - Reserved resources record * `-reserved_resources_record` - Reserved resources record (descending) * `versions` - Versions * `-versions` - Versions (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r TasksAPITasksListRequest) Ordering(ordering []string) TasksAPITasksListRequest { + r.ordering = &ordering + return r +} + +// Filter results where parent_task matches value +func (r TasksAPITasksListRequest) ParentTask(parentTask string) TasksAPITasksListRequest { + r.parentTask = &parentTask + return r +} + +// Multiple values may be separated by commas. +func (r TasksAPITasksListRequest) PulpHrefIn(pulpHrefIn []string) TasksAPITasksListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r TasksAPITasksListRequest) PulpIdIn(pulpIdIn []string) TasksAPITasksListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +func (r TasksAPITasksListRequest) ReservedResources(reservedResources string) TasksAPITasksListRequest { + r.reservedResources = &reservedResources + return r +} + +// Multiple values may be separated by commas. +func (r TasksAPITasksListRequest) ReservedResourcesIn(reservedResourcesIn []string) TasksAPITasksListRequest { + r.reservedResourcesIn = &reservedResourcesIn + return r +} + +func (r TasksAPITasksListRequest) ReservedResourcesRecord(reservedResourcesRecord []string) TasksAPITasksListRequest { + r.reservedResourcesRecord = &reservedResourcesRecord + return r +} + +func (r TasksAPITasksListRequest) SharedResources(sharedResources string) TasksAPITasksListRequest { + r.sharedResources = &sharedResources + return r +} + +// Multiple values may be separated by commas. +func (r TasksAPITasksListRequest) SharedResourcesIn(sharedResourcesIn []string) TasksAPITasksListRequest { + r.sharedResourcesIn = &sharedResourcesIn + return r +} + +// Filter results where started_at matches value +func (r TasksAPITasksListRequest) StartedAt(startedAt time.Time) TasksAPITasksListRequest { + r.startedAt = &startedAt + return r +} + +// Filter results where started_at is greater than value +func (r TasksAPITasksListRequest) StartedAtGt(startedAtGt time.Time) TasksAPITasksListRequest { + r.startedAtGt = &startedAtGt + return r +} + +// Filter results where started_at is greater than or equal to value +func (r TasksAPITasksListRequest) StartedAtGte(startedAtGte time.Time) TasksAPITasksListRequest { + r.startedAtGte = &startedAtGte + return r +} + +// Filter results where started_at is less than value +func (r TasksAPITasksListRequest) StartedAtLt(startedAtLt time.Time) TasksAPITasksListRequest { + r.startedAtLt = &startedAtLt + return r +} + +// Filter results where started_at is less than or equal to value +func (r TasksAPITasksListRequest) StartedAtLte(startedAtLte time.Time) TasksAPITasksListRequest { + r.startedAtLte = &startedAtLte + return r +} + +// Filter results where started_at is between two comma separated values +func (r TasksAPITasksListRequest) StartedAtRange(startedAtRange []time.Time) TasksAPITasksListRequest { + r.startedAtRange = &startedAtRange + return r +} + +// Filter results where state matches value * `waiting` - Waiting * `skipped` - Skipped * `running` - Running * `completed` - Completed * `failed` - Failed * `canceled` - Canceled * `canceling` - Canceling +func (r TasksAPITasksListRequest) State(state string) TasksAPITasksListRequest { + r.state = &state + return r +} + +// Filter results where state is in a comma-separated list of values +func (r TasksAPITasksListRequest) StateIn(stateIn []string) TasksAPITasksListRequest { + r.stateIn = &stateIn + return r +} + +// Filter results where task_group matches value +func (r TasksAPITasksListRequest) TaskGroup(taskGroup string) TasksAPITasksListRequest { + r.taskGroup = &taskGroup + return r +} + +// Filter results where worker matches value +func (r TasksAPITasksListRequest) Worker(worker string) TasksAPITasksListRequest { + r.worker = &worker + return r +} + +// Filter results where worker is in a comma-separated list of values +func (r TasksAPITasksListRequest) WorkerIn(workerIn []string) TasksAPITasksListRequest { + r.workerIn = &workerIn + return r +} + +// A list of fields to include in the response. +func (r TasksAPITasksListRequest) Fields(fields []string) TasksAPITasksListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r TasksAPITasksListRequest) ExcludeFields(excludeFields []string) TasksAPITasksListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r TasksAPITasksListRequest) Execute() (*PaginatedTaskResponseList, *http.Response, error) { + return r.ApiService.TasksListExecute(r) +} + +/* +TasksList List tasks + +A customized named ModelViewSet that knows how to register itself with the Pulp API router. + +This viewset is discoverable by its name. +"Normal" Django Models and Master/Detail models are supported by the ``register_with`` method. + +Attributes: + lookup_field (str): The name of the field by which an object should be looked up, in + addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' + endpoint_name (str): The name of the final path segment that should identify the ViewSet's + collection endpoint. + nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must + correspond to the "parent_prefix" of a router with rest_framework_nested.NestedMixin. + None indicates this ViewSet should not be nested. + parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs + to django model filter expressions that can be used with the corresponding value from + self.kwargs, used only by a nested ViewSet to filter based on the parent object's + identity. + schema (DefaultSchema): The schema class to use by default in a viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return TasksAPITasksListRequest +*/ +func (a *TasksAPIService) TasksList(ctx context.Context) TasksAPITasksListRequest { + return TasksAPITasksListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedTaskResponseList +func (a *TasksAPIService) TasksListExecute(r TasksAPITasksListRequest) (*PaginatedTaskResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedTaskResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.TasksList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/tasks/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.childTasks != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "child_tasks", r.childTasks, "") + } + if r.createdResources != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created_resources", r.createdResources, "") + } + if r.exclusiveResources != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclusive_resources", r.exclusiveResources, "") + } + if r.exclusiveResourcesIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclusive_resources__in", r.exclusiveResourcesIn, "csv") + } + if r.finishedAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "finished_at", r.finishedAt, "") + } + if r.finishedAtGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "finished_at__gt", r.finishedAtGt, "") + } + if r.finishedAtGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "finished_at__gte", r.finishedAtGte, "") + } + if r.finishedAtLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "finished_at__lt", r.finishedAtLt, "") + } + if r.finishedAtLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "finished_at__lte", r.finishedAtLte, "") + } + if r.finishedAtRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "finished_at__range", r.finishedAtRange, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.loggingCid != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "logging_cid", r.loggingCid, "") + } + if r.loggingCidContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "logging_cid__contains", r.loggingCidContains, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.parentTask != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "parent_task", r.parentTask, "") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.reservedResources != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "reserved_resources", r.reservedResources, "") + } + if r.reservedResourcesIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "reserved_resources__in", r.reservedResourcesIn, "csv") + } + if r.reservedResourcesRecord != nil { + t := *r.reservedResourcesRecord + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "reserved_resources_record", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "reserved_resources_record", t, "multi") + } + } + if r.sharedResources != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "shared_resources", r.sharedResources, "") + } + if r.sharedResourcesIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "shared_resources__in", r.sharedResourcesIn, "csv") + } + if r.startedAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "started_at", r.startedAt, "") + } + if r.startedAtGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "started_at__gt", r.startedAtGt, "") + } + if r.startedAtGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "started_at__gte", r.startedAtGte, "") + } + if r.startedAtLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "started_at__lt", r.startedAtLt, "") + } + if r.startedAtLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "started_at__lte", r.startedAtLte, "") + } + if r.startedAtRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "started_at__range", r.startedAtRange, "csv") + } + if r.state != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "state", r.state, "") + } + if r.stateIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "state__in", r.stateIn, "csv") + } + if r.taskGroup != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "task_group", r.taskGroup, "") + } + if r.worker != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "worker", r.worker, "") + } + if r.workerIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "worker__in", r.workerIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TasksAPITasksListRolesRequest struct { + ctx context.Context + ApiService *TasksAPIService + taskHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r TasksAPITasksListRolesRequest) Fields(fields []string) TasksAPITasksListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r TasksAPITasksListRolesRequest) ExcludeFields(excludeFields []string) TasksAPITasksListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r TasksAPITasksListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.TasksListRolesExecute(r) +} + +/* +TasksListRoles Method for TasksListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskHref + @return TasksAPITasksListRolesRequest +*/ +func (a *TasksAPIService) TasksListRoles(ctx context.Context, taskHref string) TasksAPITasksListRolesRequest { + return TasksAPITasksListRolesRequest{ + ApiService: a, + ctx: ctx, + taskHref: taskHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *TasksAPIService) TasksListRolesExecute(r TasksAPITasksListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.TasksListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{task_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"task_href"+"}", parameterValueToString(r.taskHref, "taskHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TasksAPITasksMyPermissionsRequest struct { + ctx context.Context + ApiService *TasksAPIService + taskHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r TasksAPITasksMyPermissionsRequest) Fields(fields []string) TasksAPITasksMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r TasksAPITasksMyPermissionsRequest) ExcludeFields(excludeFields []string) TasksAPITasksMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r TasksAPITasksMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.TasksMyPermissionsExecute(r) +} + +/* +TasksMyPermissions Method for TasksMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskHref + @return TasksAPITasksMyPermissionsRequest +*/ +func (a *TasksAPIService) TasksMyPermissions(ctx context.Context, taskHref string) TasksAPITasksMyPermissionsRequest { + return TasksAPITasksMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + taskHref: taskHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *TasksAPIService) TasksMyPermissionsExecute(r TasksAPITasksMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.TasksMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{task_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"task_href"+"}", parameterValueToString(r.taskHref, "taskHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TasksAPITasksPurgeRequest struct { + ctx context.Context + ApiService *TasksAPIService + purge *Purge +} + +func (r TasksAPITasksPurgeRequest) Purge(purge Purge) TasksAPITasksPurgeRequest { + r.purge = &purge + return r +} + +func (r TasksAPITasksPurgeRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.TasksPurgeExecute(r) +} + +/* +TasksPurge Purge Completed Tasks + +Trigger an asynchronous task that deletes completed tasks that finished prior to a specified timestamp. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return TasksAPITasksPurgeRequest +*/ +func (a *TasksAPIService) TasksPurge(ctx context.Context) TasksAPITasksPurgeRequest { + return TasksAPITasksPurgeRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *TasksAPIService) TasksPurgeExecute(r TasksAPITasksPurgeRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.TasksPurge") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/tasks/purge/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.purge == nil { + return localVarReturnValue, nil, reportError("purge is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.purge + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TasksAPITasksReadRequest struct { + ctx context.Context + ApiService *TasksAPIService + taskHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r TasksAPITasksReadRequest) Fields(fields []string) TasksAPITasksReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r TasksAPITasksReadRequest) ExcludeFields(excludeFields []string) TasksAPITasksReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r TasksAPITasksReadRequest) Execute() (*TaskResponse, *http.Response, error) { + return r.ApiService.TasksReadExecute(r) +} + +/* +TasksRead Inspect a task + +A customized named ModelViewSet that knows how to register itself with the Pulp API router. + +This viewset is discoverable by its name. +"Normal" Django Models and Master/Detail models are supported by the ``register_with`` method. + +Attributes: + lookup_field (str): The name of the field by which an object should be looked up, in + addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' + endpoint_name (str): The name of the final path segment that should identify the ViewSet's + collection endpoint. + nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must + correspond to the "parent_prefix" of a router with rest_framework_nested.NestedMixin. + None indicates this ViewSet should not be nested. + parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs + to django model filter expressions that can be used with the corresponding value from + self.kwargs, used only by a nested ViewSet to filter based on the parent object's + identity. + schema (DefaultSchema): The schema class to use by default in a viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskHref + @return TasksAPITasksReadRequest +*/ +func (a *TasksAPIService) TasksRead(ctx context.Context, taskHref string) TasksAPITasksReadRequest { + return TasksAPITasksReadRequest{ + ApiService: a, + ctx: ctx, + taskHref: taskHref, + } +} + +// Execute executes the request +// @return TaskResponse +func (a *TasksAPIService) TasksReadExecute(r TasksAPITasksReadRequest) (*TaskResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TaskResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.TasksRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{task_href}" + localVarPath = strings.Replace(localVarPath, "{"+"task_href"+"}", parameterValueToString(r.taskHref, "taskHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type TasksAPITasksRemoveRoleRequest struct { + ctx context.Context + ApiService *TasksAPIService + taskHref string + nestedRole *NestedRole +} + +func (r TasksAPITasksRemoveRoleRequest) NestedRole(nestedRole NestedRole) TasksAPITasksRemoveRoleRequest { + r.nestedRole = &nestedRole + return r +} + +func (r TasksAPITasksRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.TasksRemoveRoleExecute(r) +} + +/* +TasksRemoveRole Method for TasksRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param taskHref + @return TasksAPITasksRemoveRoleRequest +*/ +func (a *TasksAPIService) TasksRemoveRole(ctx context.Context, taskHref string) TasksAPITasksRemoveRoleRequest { + return TasksAPITasksRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + taskHref: taskHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *TasksAPIService) TasksRemoveRoleExecute(r TasksAPITasksRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TasksAPIService.TasksRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{task_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"task_href"+"}", parameterValueToString(r.taskHref, "taskHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nestedRole == nil { + return localVarReturnValue, nil, reportError("nestedRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nestedRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_token.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_token.go new file mode 100644 index 0000000000..cfb699186e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_token.go @@ -0,0 +1,112 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// TokenAPIService TokenAPI service +type TokenAPIService service + +type TokenAPITokenGetRequest struct { + ctx context.Context + ApiService *TokenAPIService +} + +func (r TokenAPITokenGetRequest) Execute() (*http.Response, error) { + return r.ApiService.TokenGetExecute(r) +} + +/* +TokenGet Method for TokenGet + +Handles GET requests for the /token/ endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return TokenAPITokenGetRequest +*/ +func (a *TokenAPIService) TokenGet(ctx context.Context) TokenAPITokenGetRequest { + return TokenAPITokenGetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *TokenAPIService) TokenGetExecute(r TokenAPITokenGetRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TokenAPIService.TokenGet") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/token/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_uploads.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_uploads.go new file mode 100644 index 0000000000..a4d9aa1769 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_uploads.go @@ -0,0 +1,1364 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" + "os" +) + + +// UploadsAPIService UploadsAPI service +type UploadsAPIService service + +type UploadsAPIUploadsAddRoleRequest struct { + ctx context.Context + ApiService *UploadsAPIService + uploadHref string + upload *Upload +} + +func (r UploadsAPIUploadsAddRoleRequest) Upload(upload Upload) UploadsAPIUploadsAddRoleRequest { + r.upload = &upload + return r +} + +func (r UploadsAPIUploadsAddRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.UploadsAddRoleExecute(r) +} + +/* +UploadsAddRole Method for UploadsAddRole + +Add a role for this object to users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uploadHref + @return UploadsAPIUploadsAddRoleRequest +*/ +func (a *UploadsAPIService) UploadsAddRole(ctx context.Context, uploadHref string) UploadsAPIUploadsAddRoleRequest { + return UploadsAPIUploadsAddRoleRequest{ + ApiService: a, + ctx: ctx, + uploadHref: uploadHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *UploadsAPIService) UploadsAddRoleExecute(r UploadsAPIUploadsAddRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsAPIService.UploadsAddRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{upload_href}add_role/" + localVarPath = strings.Replace(localVarPath, "{"+"upload_href"+"}", parameterValueToString(r.uploadHref, "uploadHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.upload == nil { + return localVarReturnValue, nil, reportError("upload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.upload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UploadsAPIUploadsCommitRequest struct { + ctx context.Context + ApiService *UploadsAPIService + uploadHref string + uploadCommit *UploadCommit +} + +func (r UploadsAPIUploadsCommitRequest) UploadCommit(uploadCommit UploadCommit) UploadsAPIUploadsCommitRequest { + r.uploadCommit = &uploadCommit + return r +} + +func (r UploadsAPIUploadsCommitRequest) Execute() (*AsyncOperationResponse, *http.Response, error) { + return r.ApiService.UploadsCommitExecute(r) +} + +/* +UploadsCommit Finish an Upload + +Queues a Task that creates an Artifact, and the Upload gets deleted and cannot be re-used. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uploadHref + @return UploadsAPIUploadsCommitRequest +*/ +func (a *UploadsAPIService) UploadsCommit(ctx context.Context, uploadHref string) UploadsAPIUploadsCommitRequest { + return UploadsAPIUploadsCommitRequest{ + ApiService: a, + ctx: ctx, + uploadHref: uploadHref, + } +} + +// Execute executes the request +// @return AsyncOperationResponse +func (a *UploadsAPIService) UploadsCommitExecute(r UploadsAPIUploadsCommitRequest) (*AsyncOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AsyncOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsAPIService.UploadsCommit") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{upload_href}commit/" + localVarPath = strings.Replace(localVarPath, "{"+"upload_href"+"}", parameterValueToString(r.uploadHref, "uploadHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.uploadCommit == nil { + return localVarReturnValue, nil, reportError("uploadCommit is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.uploadCommit + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UploadsAPIUploadsCreateRequest struct { + ctx context.Context + ApiService *UploadsAPIService + upload *Upload +} + +func (r UploadsAPIUploadsCreateRequest) Upload(upload Upload) UploadsAPIUploadsCreateRequest { + r.upload = &upload + return r +} + +func (r UploadsAPIUploadsCreateRequest) Execute() (*UploadResponse, *http.Response, error) { + return r.ApiService.UploadsCreateExecute(r) +} + +/* +UploadsCreate Create an upload + +View for chunked uploads. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UploadsAPIUploadsCreateRequest +*/ +func (a *UploadsAPIService) UploadsCreate(ctx context.Context) UploadsAPIUploadsCreateRequest { + return UploadsAPIUploadsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return UploadResponse +func (a *UploadsAPIService) UploadsCreateExecute(r UploadsAPIUploadsCreateRequest) (*UploadResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UploadResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsAPIService.UploadsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/uploads/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.upload == nil { + return localVarReturnValue, nil, reportError("upload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.upload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UploadsAPIUploadsDeleteRequest struct { + ctx context.Context + ApiService *UploadsAPIService + uploadHref string +} + +func (r UploadsAPIUploadsDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.UploadsDeleteExecute(r) +} + +/* +UploadsDelete Delete an upload + +View for chunked uploads. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uploadHref + @return UploadsAPIUploadsDeleteRequest +*/ +func (a *UploadsAPIService) UploadsDelete(ctx context.Context, uploadHref string) UploadsAPIUploadsDeleteRequest { + return UploadsAPIUploadsDeleteRequest{ + ApiService: a, + ctx: ctx, + uploadHref: uploadHref, + } +} + +// Execute executes the request +func (a *UploadsAPIService) UploadsDeleteExecute(r UploadsAPIUploadsDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsAPIService.UploadsDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{upload_href}" + localVarPath = strings.Replace(localVarPath, "{"+"upload_href"+"}", parameterValueToString(r.uploadHref, "uploadHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type UploadsAPIUploadsListRequest struct { + ctx context.Context + ApiService *UploadsAPIService + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + size *int32 + sizeGt *int32 + sizeLt *int32 + sizeRange *[]int32 + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r UploadsAPIUploadsListRequest) Limit(limit int32) UploadsAPIUploadsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r UploadsAPIUploadsListRequest) Offset(offset int32) UploadsAPIUploadsListRequest { + r.offset = &offset + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `size` - Size * `-size` - Size (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r UploadsAPIUploadsListRequest) Ordering(ordering []string) UploadsAPIUploadsListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r UploadsAPIUploadsListRequest) PulpHrefIn(pulpHrefIn []string) UploadsAPIUploadsListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r UploadsAPIUploadsListRequest) PulpIdIn(pulpIdIn []string) UploadsAPIUploadsListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter results where size matches value +func (r UploadsAPIUploadsListRequest) Size(size int32) UploadsAPIUploadsListRequest { + r.size = &size + return r +} + +// Filter results where size is greater than value +func (r UploadsAPIUploadsListRequest) SizeGt(sizeGt int32) UploadsAPIUploadsListRequest { + r.sizeGt = &sizeGt + return r +} + +// Filter results where size is less than value +func (r UploadsAPIUploadsListRequest) SizeLt(sizeLt int32) UploadsAPIUploadsListRequest { + r.sizeLt = &sizeLt + return r +} + +// Filter results where size is between two comma separated values +func (r UploadsAPIUploadsListRequest) SizeRange(sizeRange []int32) UploadsAPIUploadsListRequest { + r.sizeRange = &sizeRange + return r +} + +// A list of fields to include in the response. +func (r UploadsAPIUploadsListRequest) Fields(fields []string) UploadsAPIUploadsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r UploadsAPIUploadsListRequest) ExcludeFields(excludeFields []string) UploadsAPIUploadsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r UploadsAPIUploadsListRequest) Execute() (*PaginatedUploadResponseList, *http.Response, error) { + return r.ApiService.UploadsListExecute(r) +} + +/* +UploadsList List uploads + +View for chunked uploads. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UploadsAPIUploadsListRequest +*/ +func (a *UploadsAPIService) UploadsList(ctx context.Context) UploadsAPIUploadsListRequest { + return UploadsAPIUploadsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedUploadResponseList +func (a *UploadsAPIService) UploadsListExecute(r UploadsAPIUploadsListRequest) (*PaginatedUploadResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedUploadResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsAPIService.UploadsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/uploads/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "") + } + if r.sizeGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size__gt", r.sizeGt, "") + } + if r.sizeLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size__lt", r.sizeLt, "") + } + if r.sizeRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size__range", r.sizeRange, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UploadsAPIUploadsListRolesRequest struct { + ctx context.Context + ApiService *UploadsAPIService + uploadHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r UploadsAPIUploadsListRolesRequest) Fields(fields []string) UploadsAPIUploadsListRolesRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r UploadsAPIUploadsListRolesRequest) ExcludeFields(excludeFields []string) UploadsAPIUploadsListRolesRequest { + r.excludeFields = &excludeFields + return r +} + +func (r UploadsAPIUploadsListRolesRequest) Execute() (*ObjectRolesResponse, *http.Response, error) { + return r.ApiService.UploadsListRolesExecute(r) +} + +/* +UploadsListRoles Method for UploadsListRoles + +List roles assigned to this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uploadHref + @return UploadsAPIUploadsListRolesRequest +*/ +func (a *UploadsAPIService) UploadsListRoles(ctx context.Context, uploadHref string) UploadsAPIUploadsListRolesRequest { + return UploadsAPIUploadsListRolesRequest{ + ApiService: a, + ctx: ctx, + uploadHref: uploadHref, + } +} + +// Execute executes the request +// @return ObjectRolesResponse +func (a *UploadsAPIService) UploadsListRolesExecute(r UploadsAPIUploadsListRolesRequest) (*ObjectRolesResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ObjectRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsAPIService.UploadsListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{upload_href}list_roles/" + localVarPath = strings.Replace(localVarPath, "{"+"upload_href"+"}", parameterValueToString(r.uploadHref, "uploadHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UploadsAPIUploadsMyPermissionsRequest struct { + ctx context.Context + ApiService *UploadsAPIService + uploadHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r UploadsAPIUploadsMyPermissionsRequest) Fields(fields []string) UploadsAPIUploadsMyPermissionsRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r UploadsAPIUploadsMyPermissionsRequest) ExcludeFields(excludeFields []string) UploadsAPIUploadsMyPermissionsRequest { + r.excludeFields = &excludeFields + return r +} + +func (r UploadsAPIUploadsMyPermissionsRequest) Execute() (*MyPermissionsResponse, *http.Response, error) { + return r.ApiService.UploadsMyPermissionsExecute(r) +} + +/* +UploadsMyPermissions Method for UploadsMyPermissions + +List permissions available to the current user on this object. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uploadHref + @return UploadsAPIUploadsMyPermissionsRequest +*/ +func (a *UploadsAPIService) UploadsMyPermissions(ctx context.Context, uploadHref string) UploadsAPIUploadsMyPermissionsRequest { + return UploadsAPIUploadsMyPermissionsRequest{ + ApiService: a, + ctx: ctx, + uploadHref: uploadHref, + } +} + +// Execute executes the request +// @return MyPermissionsResponse +func (a *UploadsAPIService) UploadsMyPermissionsExecute(r UploadsAPIUploadsMyPermissionsRequest) (*MyPermissionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MyPermissionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsAPIService.UploadsMyPermissions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{upload_href}my_permissions/" + localVarPath = strings.Replace(localVarPath, "{"+"upload_href"+"}", parameterValueToString(r.uploadHref, "uploadHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UploadsAPIUploadsReadRequest struct { + ctx context.Context + ApiService *UploadsAPIService + uploadHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r UploadsAPIUploadsReadRequest) Fields(fields []string) UploadsAPIUploadsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r UploadsAPIUploadsReadRequest) ExcludeFields(excludeFields []string) UploadsAPIUploadsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r UploadsAPIUploadsReadRequest) Execute() (*UploadDetailResponse, *http.Response, error) { + return r.ApiService.UploadsReadExecute(r) +} + +/* +UploadsRead Inspect an upload + +View for chunked uploads. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uploadHref + @return UploadsAPIUploadsReadRequest +*/ +func (a *UploadsAPIService) UploadsRead(ctx context.Context, uploadHref string) UploadsAPIUploadsReadRequest { + return UploadsAPIUploadsReadRequest{ + ApiService: a, + ctx: ctx, + uploadHref: uploadHref, + } +} + +// Execute executes the request +// @return UploadDetailResponse +func (a *UploadsAPIService) UploadsReadExecute(r UploadsAPIUploadsReadRequest) (*UploadDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UploadDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsAPIService.UploadsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{upload_href}" + localVarPath = strings.Replace(localVarPath, "{"+"upload_href"+"}", parameterValueToString(r.uploadHref, "uploadHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UploadsAPIUploadsRemoveRoleRequest struct { + ctx context.Context + ApiService *UploadsAPIService + uploadHref string + upload *Upload +} + +func (r UploadsAPIUploadsRemoveRoleRequest) Upload(upload Upload) UploadsAPIUploadsRemoveRoleRequest { + r.upload = &upload + return r +} + +func (r UploadsAPIUploadsRemoveRoleRequest) Execute() (*NestedRoleResponse, *http.Response, error) { + return r.ApiService.UploadsRemoveRoleExecute(r) +} + +/* +UploadsRemoveRole Method for UploadsRemoveRole + +Remove a role for this object from users/groups. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uploadHref + @return UploadsAPIUploadsRemoveRoleRequest +*/ +func (a *UploadsAPIService) UploadsRemoveRole(ctx context.Context, uploadHref string) UploadsAPIUploadsRemoveRoleRequest { + return UploadsAPIUploadsRemoveRoleRequest{ + ApiService: a, + ctx: ctx, + uploadHref: uploadHref, + } +} + +// Execute executes the request +// @return NestedRoleResponse +func (a *UploadsAPIService) UploadsRemoveRoleExecute(r UploadsAPIUploadsRemoveRoleRequest) (*NestedRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NestedRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsAPIService.UploadsRemoveRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{upload_href}remove_role/" + localVarPath = strings.Replace(localVarPath, "{"+"upload_href"+"}", parameterValueToString(r.uploadHref, "uploadHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.upload == nil { + return localVarReturnValue, nil, reportError("upload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.upload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UploadsAPIUploadsUpdateRequest struct { + ctx context.Context + ApiService *UploadsAPIService + contentRange *string + uploadHref string + file *os.File + sha256 *string +} + +// The Content-Range header specifies the location of the file chunk within the file. +func (r UploadsAPIUploadsUpdateRequest) ContentRange(contentRange string) UploadsAPIUploadsUpdateRequest { + r.contentRange = &contentRange + return r +} + +// A chunk of the uploaded file. +func (r UploadsAPIUploadsUpdateRequest) File(file *os.File) UploadsAPIUploadsUpdateRequest { + r.file = file + return r +} + +// The SHA-256 checksum of the chunk if available. +func (r UploadsAPIUploadsUpdateRequest) Sha256(sha256 string) UploadsAPIUploadsUpdateRequest { + r.sha256 = &sha256 + return r +} + +func (r UploadsAPIUploadsUpdateRequest) Execute() (*UploadResponse, *http.Response, error) { + return r.ApiService.UploadsUpdateExecute(r) +} + +/* +UploadsUpdate Upload a file chunk + +Upload a chunk for an upload. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uploadHref + @return UploadsAPIUploadsUpdateRequest +*/ +func (a *UploadsAPIService) UploadsUpdate(ctx context.Context, uploadHref string) UploadsAPIUploadsUpdateRequest { + return UploadsAPIUploadsUpdateRequest{ + ApiService: a, + ctx: ctx, + uploadHref: uploadHref, + } +} + +// Execute executes the request +// @return UploadResponse +func (a *UploadsAPIService) UploadsUpdateExecute(r UploadsAPIUploadsUpdateRequest) (*UploadResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UploadResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsAPIService.UploadsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{upload_href}" + localVarPath = strings.Replace(localVarPath, "{"+"upload_href"+"}", parameterValueToString(r.uploadHref, "uploadHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.contentRange == nil { + return localVarReturnValue, nil, reportError("contentRange is required and must be specified") + } + if r.file == nil { + return localVarReturnValue, nil, reportError("file is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Range", r.contentRange, "") + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha256", r.sha256, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_upstream_pulps.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_upstream_pulps.go new file mode 100644 index 0000000000..d8e68a3cc0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_upstream_pulps.go @@ -0,0 +1,853 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// UpstreamPulpsAPIService UpstreamPulpsAPI service +type UpstreamPulpsAPIService service + +type UpstreamPulpsAPIUpstreamPulpsCreateRequest struct { + ctx context.Context + ApiService *UpstreamPulpsAPIService + upstreamPulp *UpstreamPulp +} + +func (r UpstreamPulpsAPIUpstreamPulpsCreateRequest) UpstreamPulp(upstreamPulp UpstreamPulp) UpstreamPulpsAPIUpstreamPulpsCreateRequest { + r.upstreamPulp = &upstreamPulp + return r +} + +func (r UpstreamPulpsAPIUpstreamPulpsCreateRequest) Execute() (*UpstreamPulpResponse, *http.Response, error) { + return r.ApiService.UpstreamPulpsCreateExecute(r) +} + +/* +UpstreamPulpsCreate Create an upstream pulp + +API for configuring an upstream Pulp to replicate. This API is provided as a tech preview. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UpstreamPulpsAPIUpstreamPulpsCreateRequest +*/ +func (a *UpstreamPulpsAPIService) UpstreamPulpsCreate(ctx context.Context) UpstreamPulpsAPIUpstreamPulpsCreateRequest { + return UpstreamPulpsAPIUpstreamPulpsCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return UpstreamPulpResponse +func (a *UpstreamPulpsAPIService) UpstreamPulpsCreateExecute(r UpstreamPulpsAPIUpstreamPulpsCreateRequest) (*UpstreamPulpResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpstreamPulpResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UpstreamPulpsAPIService.UpstreamPulpsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/upstream-pulps/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.upstreamPulp == nil { + return localVarReturnValue, nil, reportError("upstreamPulp is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.upstreamPulp + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UpstreamPulpsAPIUpstreamPulpsDeleteRequest struct { + ctx context.Context + ApiService *UpstreamPulpsAPIService + upstreamPulpHref string +} + +func (r UpstreamPulpsAPIUpstreamPulpsDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.UpstreamPulpsDeleteExecute(r) +} + +/* +UpstreamPulpsDelete Delete an upstream pulp + +API for configuring an upstream Pulp to replicate. This API is provided as a tech preview. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param upstreamPulpHref + @return UpstreamPulpsAPIUpstreamPulpsDeleteRequest +*/ +func (a *UpstreamPulpsAPIService) UpstreamPulpsDelete(ctx context.Context, upstreamPulpHref string) UpstreamPulpsAPIUpstreamPulpsDeleteRequest { + return UpstreamPulpsAPIUpstreamPulpsDeleteRequest{ + ApiService: a, + ctx: ctx, + upstreamPulpHref: upstreamPulpHref, + } +} + +// Execute executes the request +func (a *UpstreamPulpsAPIService) UpstreamPulpsDeleteExecute(r UpstreamPulpsAPIUpstreamPulpsDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UpstreamPulpsAPIService.UpstreamPulpsDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{upstream_pulp_href}" + localVarPath = strings.Replace(localVarPath, "{"+"upstream_pulp_href"+"}", parameterValueToString(r.upstreamPulpHref, "upstreamPulpHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type UpstreamPulpsAPIUpstreamPulpsListRequest struct { + ctx context.Context + ApiService *UpstreamPulpsAPIService + limit *int32 + offset *int32 + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r UpstreamPulpsAPIUpstreamPulpsListRequest) Limit(limit int32) UpstreamPulpsAPIUpstreamPulpsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r UpstreamPulpsAPIUpstreamPulpsListRequest) Offset(offset int32) UpstreamPulpsAPIUpstreamPulpsListRequest { + r.offset = &offset + return r +} + +// A list of fields to include in the response. +func (r UpstreamPulpsAPIUpstreamPulpsListRequest) Fields(fields []string) UpstreamPulpsAPIUpstreamPulpsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r UpstreamPulpsAPIUpstreamPulpsListRequest) ExcludeFields(excludeFields []string) UpstreamPulpsAPIUpstreamPulpsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r UpstreamPulpsAPIUpstreamPulpsListRequest) Execute() (*PaginatedUpstreamPulpResponseList, *http.Response, error) { + return r.ApiService.UpstreamPulpsListExecute(r) +} + +/* +UpstreamPulpsList List upstream pulps + +API for configuring an upstream Pulp to replicate. This API is provided as a tech preview. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UpstreamPulpsAPIUpstreamPulpsListRequest +*/ +func (a *UpstreamPulpsAPIService) UpstreamPulpsList(ctx context.Context) UpstreamPulpsAPIUpstreamPulpsListRequest { + return UpstreamPulpsAPIUpstreamPulpsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedUpstreamPulpResponseList +func (a *UpstreamPulpsAPIService) UpstreamPulpsListExecute(r UpstreamPulpsAPIUpstreamPulpsListRequest) (*PaginatedUpstreamPulpResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedUpstreamPulpResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UpstreamPulpsAPIService.UpstreamPulpsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/upstream-pulps/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UpstreamPulpsAPIUpstreamPulpsPartialUpdateRequest struct { + ctx context.Context + ApiService *UpstreamPulpsAPIService + upstreamPulpHref string + patchedUpstreamPulp *PatchedUpstreamPulp +} + +func (r UpstreamPulpsAPIUpstreamPulpsPartialUpdateRequest) PatchedUpstreamPulp(patchedUpstreamPulp PatchedUpstreamPulp) UpstreamPulpsAPIUpstreamPulpsPartialUpdateRequest { + r.patchedUpstreamPulp = &patchedUpstreamPulp + return r +} + +func (r UpstreamPulpsAPIUpstreamPulpsPartialUpdateRequest) Execute() (*UpstreamPulpResponse, *http.Response, error) { + return r.ApiService.UpstreamPulpsPartialUpdateExecute(r) +} + +/* +UpstreamPulpsPartialUpdate Update an upstream pulp + +API for configuring an upstream Pulp to replicate. This API is provided as a tech preview. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param upstreamPulpHref + @return UpstreamPulpsAPIUpstreamPulpsPartialUpdateRequest +*/ +func (a *UpstreamPulpsAPIService) UpstreamPulpsPartialUpdate(ctx context.Context, upstreamPulpHref string) UpstreamPulpsAPIUpstreamPulpsPartialUpdateRequest { + return UpstreamPulpsAPIUpstreamPulpsPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + upstreamPulpHref: upstreamPulpHref, + } +} + +// Execute executes the request +// @return UpstreamPulpResponse +func (a *UpstreamPulpsAPIService) UpstreamPulpsPartialUpdateExecute(r UpstreamPulpsAPIUpstreamPulpsPartialUpdateRequest) (*UpstreamPulpResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpstreamPulpResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UpstreamPulpsAPIService.UpstreamPulpsPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{upstream_pulp_href}" + localVarPath = strings.Replace(localVarPath, "{"+"upstream_pulp_href"+"}", parameterValueToString(r.upstreamPulpHref, "upstreamPulpHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedUpstreamPulp == nil { + return localVarReturnValue, nil, reportError("patchedUpstreamPulp is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedUpstreamPulp + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UpstreamPulpsAPIUpstreamPulpsReadRequest struct { + ctx context.Context + ApiService *UpstreamPulpsAPIService + upstreamPulpHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r UpstreamPulpsAPIUpstreamPulpsReadRequest) Fields(fields []string) UpstreamPulpsAPIUpstreamPulpsReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r UpstreamPulpsAPIUpstreamPulpsReadRequest) ExcludeFields(excludeFields []string) UpstreamPulpsAPIUpstreamPulpsReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r UpstreamPulpsAPIUpstreamPulpsReadRequest) Execute() (*UpstreamPulpResponse, *http.Response, error) { + return r.ApiService.UpstreamPulpsReadExecute(r) +} + +/* +UpstreamPulpsRead Inspect an upstream pulp + +API for configuring an upstream Pulp to replicate. This API is provided as a tech preview. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param upstreamPulpHref + @return UpstreamPulpsAPIUpstreamPulpsReadRequest +*/ +func (a *UpstreamPulpsAPIService) UpstreamPulpsRead(ctx context.Context, upstreamPulpHref string) UpstreamPulpsAPIUpstreamPulpsReadRequest { + return UpstreamPulpsAPIUpstreamPulpsReadRequest{ + ApiService: a, + ctx: ctx, + upstreamPulpHref: upstreamPulpHref, + } +} + +// Execute executes the request +// @return UpstreamPulpResponse +func (a *UpstreamPulpsAPIService) UpstreamPulpsReadExecute(r UpstreamPulpsAPIUpstreamPulpsReadRequest) (*UpstreamPulpResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpstreamPulpResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UpstreamPulpsAPIService.UpstreamPulpsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{upstream_pulp_href}" + localVarPath = strings.Replace(localVarPath, "{"+"upstream_pulp_href"+"}", parameterValueToString(r.upstreamPulpHref, "upstreamPulpHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UpstreamPulpsAPIUpstreamPulpsReplicateRequest struct { + ctx context.Context + ApiService *UpstreamPulpsAPIService + upstreamPulpHref string +} + +func (r UpstreamPulpsAPIUpstreamPulpsReplicateRequest) Execute() (*TaskGroupOperationResponse, *http.Response, error) { + return r.ApiService.UpstreamPulpsReplicateExecute(r) +} + +/* +UpstreamPulpsReplicate Replicate + +Trigger an asynchronous repository replication task group. This API is provided as a tech preview. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param upstreamPulpHref + @return UpstreamPulpsAPIUpstreamPulpsReplicateRequest +*/ +func (a *UpstreamPulpsAPIService) UpstreamPulpsReplicate(ctx context.Context, upstreamPulpHref string) UpstreamPulpsAPIUpstreamPulpsReplicateRequest { + return UpstreamPulpsAPIUpstreamPulpsReplicateRequest{ + ApiService: a, + ctx: ctx, + upstreamPulpHref: upstreamPulpHref, + } +} + +// Execute executes the request +// @return TaskGroupOperationResponse +func (a *UpstreamPulpsAPIService) UpstreamPulpsReplicateExecute(r UpstreamPulpsAPIUpstreamPulpsReplicateRequest) (*TaskGroupOperationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TaskGroupOperationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UpstreamPulpsAPIService.UpstreamPulpsReplicate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{upstream_pulp_href}replicate/" + localVarPath = strings.Replace(localVarPath, "{"+"upstream_pulp_href"+"}", parameterValueToString(r.upstreamPulpHref, "upstreamPulpHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UpstreamPulpsAPIUpstreamPulpsUpdateRequest struct { + ctx context.Context + ApiService *UpstreamPulpsAPIService + upstreamPulpHref string + upstreamPulp *UpstreamPulp +} + +func (r UpstreamPulpsAPIUpstreamPulpsUpdateRequest) UpstreamPulp(upstreamPulp UpstreamPulp) UpstreamPulpsAPIUpstreamPulpsUpdateRequest { + r.upstreamPulp = &upstreamPulp + return r +} + +func (r UpstreamPulpsAPIUpstreamPulpsUpdateRequest) Execute() (*UpstreamPulpResponse, *http.Response, error) { + return r.ApiService.UpstreamPulpsUpdateExecute(r) +} + +/* +UpstreamPulpsUpdate Update an upstream pulp + +API for configuring an upstream Pulp to replicate. This API is provided as a tech preview. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param upstreamPulpHref + @return UpstreamPulpsAPIUpstreamPulpsUpdateRequest +*/ +func (a *UpstreamPulpsAPIService) UpstreamPulpsUpdate(ctx context.Context, upstreamPulpHref string) UpstreamPulpsAPIUpstreamPulpsUpdateRequest { + return UpstreamPulpsAPIUpstreamPulpsUpdateRequest{ + ApiService: a, + ctx: ctx, + upstreamPulpHref: upstreamPulpHref, + } +} + +// Execute executes the request +// @return UpstreamPulpResponse +func (a *UpstreamPulpsAPIService) UpstreamPulpsUpdateExecute(r UpstreamPulpsAPIUpstreamPulpsUpdateRequest) (*UpstreamPulpResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpstreamPulpResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UpstreamPulpsAPIService.UpstreamPulpsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{upstream_pulp_href}" + localVarPath = strings.Replace(localVarPath, "{"+"upstream_pulp_href"+"}", parameterValueToString(r.upstreamPulpHref, "upstreamPulpHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.upstreamPulp == nil { + return localVarReturnValue, nil, reportError("upstreamPulp is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.upstreamPulp + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_users.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_users.go new file mode 100644 index 0000000000..f03c34c0fd --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_users.go @@ -0,0 +1,1000 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// UsersAPIService UsersAPI service +type UsersAPIService service + +type UsersAPIUsersCreateRequest struct { + ctx context.Context + ApiService *UsersAPIService + user *User +} + +func (r UsersAPIUsersCreateRequest) User(user User) UsersAPIUsersCreateRequest { + r.user = &user + return r +} + +func (r UsersAPIUsersCreateRequest) Execute() (*UserResponse, *http.Response, error) { + return r.ApiService.UsersCreateExecute(r) +} + +/* +UsersCreate Create an user + +ViewSet for User. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UsersAPIUsersCreateRequest +*/ +func (a *UsersAPIService) UsersCreate(ctx context.Context) UsersAPIUsersCreateRequest { + return UsersAPIUsersCreateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return UserResponse +func (a *UsersAPIService) UsersCreateExecute(r UsersAPIUsersCreateRequest) (*UserResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.UsersCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/users/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.user == nil { + return localVarReturnValue, nil, reportError("user is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.user + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UsersAPIUsersDeleteRequest struct { + ctx context.Context + ApiService *UsersAPIService + authUserHref string +} + +func (r UsersAPIUsersDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.UsersDeleteExecute(r) +} + +/* +UsersDelete Delete an user + +ViewSet for User. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param authUserHref + @return UsersAPIUsersDeleteRequest +*/ +func (a *UsersAPIService) UsersDelete(ctx context.Context, authUserHref string) UsersAPIUsersDeleteRequest { + return UsersAPIUsersDeleteRequest{ + ApiService: a, + ctx: ctx, + authUserHref: authUserHref, + } +} + +// Execute executes the request +func (a *UsersAPIService) UsersDeleteExecute(r UsersAPIUsersDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.UsersDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{auth_user_href}" + localVarPath = strings.Replace(localVarPath, "{"+"auth_user_href"+"}", parameterValueToString(r.authUserHref, "authUserHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type UsersAPIUsersListRequest struct { + ctx context.Context + ApiService *UsersAPIService + email *string + emailContains *string + emailIcontains *string + emailIexact *string + emailIn *[]string + firstName *string + firstNameContains *string + firstNameIcontains *string + firstNameIexact *string + firstNameIn *[]string + isActive *bool + isStaff *bool + lastName *string + lastNameContains *string + lastNameIcontains *string + lastNameIexact *string + lastNameIn *[]string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + username *string + usernameContains *string + usernameIcontains *string + usernameIexact *string + usernameIn *[]string + fields *[]string + excludeFields *[]string +} + +// Filter results where email matches value +func (r UsersAPIUsersListRequest) Email(email string) UsersAPIUsersListRequest { + r.email = &email + return r +} + +// Filter results where email contains value +func (r UsersAPIUsersListRequest) EmailContains(emailContains string) UsersAPIUsersListRequest { + r.emailContains = &emailContains + return r +} + +// Filter results where email contains value +func (r UsersAPIUsersListRequest) EmailIcontains(emailIcontains string) UsersAPIUsersListRequest { + r.emailIcontains = &emailIcontains + return r +} + +// Filter results where email matches value +func (r UsersAPIUsersListRequest) EmailIexact(emailIexact string) UsersAPIUsersListRequest { + r.emailIexact = &emailIexact + return r +} + +// Filter results where email is in a comma-separated list of values +func (r UsersAPIUsersListRequest) EmailIn(emailIn []string) UsersAPIUsersListRequest { + r.emailIn = &emailIn + return r +} + +// Filter results where first_name matches value +func (r UsersAPIUsersListRequest) FirstName(firstName string) UsersAPIUsersListRequest { + r.firstName = &firstName + return r +} + +// Filter results where first_name contains value +func (r UsersAPIUsersListRequest) FirstNameContains(firstNameContains string) UsersAPIUsersListRequest { + r.firstNameContains = &firstNameContains + return r +} + +// Filter results where first_name contains value +func (r UsersAPIUsersListRequest) FirstNameIcontains(firstNameIcontains string) UsersAPIUsersListRequest { + r.firstNameIcontains = &firstNameIcontains + return r +} + +// Filter results where first_name matches value +func (r UsersAPIUsersListRequest) FirstNameIexact(firstNameIexact string) UsersAPIUsersListRequest { + r.firstNameIexact = &firstNameIexact + return r +} + +// Filter results where first_name is in a comma-separated list of values +func (r UsersAPIUsersListRequest) FirstNameIn(firstNameIn []string) UsersAPIUsersListRequest { + r.firstNameIn = &firstNameIn + return r +} + +// Filter results where is_active matches value +func (r UsersAPIUsersListRequest) IsActive(isActive bool) UsersAPIUsersListRequest { + r.isActive = &isActive + return r +} + +// Filter results where is_staff matches value +func (r UsersAPIUsersListRequest) IsStaff(isStaff bool) UsersAPIUsersListRequest { + r.isStaff = &isStaff + return r +} + +// Filter results where last_name matches value +func (r UsersAPIUsersListRequest) LastName(lastName string) UsersAPIUsersListRequest { + r.lastName = &lastName + return r +} + +// Filter results where last_name contains value +func (r UsersAPIUsersListRequest) LastNameContains(lastNameContains string) UsersAPIUsersListRequest { + r.lastNameContains = &lastNameContains + return r +} + +// Filter results where last_name contains value +func (r UsersAPIUsersListRequest) LastNameIcontains(lastNameIcontains string) UsersAPIUsersListRequest { + r.lastNameIcontains = &lastNameIcontains + return r +} + +// Filter results where last_name matches value +func (r UsersAPIUsersListRequest) LastNameIexact(lastNameIexact string) UsersAPIUsersListRequest { + r.lastNameIexact = &lastNameIexact + return r +} + +// Filter results where last_name is in a comma-separated list of values +func (r UsersAPIUsersListRequest) LastNameIn(lastNameIn []string) UsersAPIUsersListRequest { + r.lastNameIn = &lastNameIn + return r +} + +// Number of results to return per page. +func (r UsersAPIUsersListRequest) Limit(limit int32) UsersAPIUsersListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r UsersAPIUsersListRequest) Offset(offset int32) UsersAPIUsersListRequest { + r.offset = &offset + return r +} + +// Ordering * `id` - Id * `-id` - Id (descending) * `password` - Password * `-password` - Password (descending) * `last_login` - Last login * `-last_login` - Last login (descending) * `is_superuser` - Is superuser * `-is_superuser` - Is superuser (descending) * `username` - Username * `-username` - Username (descending) * `first_name` - First name * `-first_name` - First name (descending) * `last_name` - Last name * `-last_name` - Last name (descending) * `email` - Email * `-email` - Email (descending) * `is_staff` - Is staff * `-is_staff` - Is staff (descending) * `is_active` - Is active * `-is_active` - Is active (descending) * `date_joined` - Date joined * `-date_joined` - Date joined (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r UsersAPIUsersListRequest) Ordering(ordering []string) UsersAPIUsersListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r UsersAPIUsersListRequest) PulpHrefIn(pulpHrefIn []string) UsersAPIUsersListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r UsersAPIUsersListRequest) PulpIdIn(pulpIdIn []string) UsersAPIUsersListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// Filter results where username matches value +func (r UsersAPIUsersListRequest) Username(username string) UsersAPIUsersListRequest { + r.username = &username + return r +} + +// Filter results where username contains value +func (r UsersAPIUsersListRequest) UsernameContains(usernameContains string) UsersAPIUsersListRequest { + r.usernameContains = &usernameContains + return r +} + +// Filter results where username contains value +func (r UsersAPIUsersListRequest) UsernameIcontains(usernameIcontains string) UsersAPIUsersListRequest { + r.usernameIcontains = &usernameIcontains + return r +} + +// Filter results where username matches value +func (r UsersAPIUsersListRequest) UsernameIexact(usernameIexact string) UsersAPIUsersListRequest { + r.usernameIexact = &usernameIexact + return r +} + +// Filter results where username is in a comma-separated list of values +func (r UsersAPIUsersListRequest) UsernameIn(usernameIn []string) UsersAPIUsersListRequest { + r.usernameIn = &usernameIn + return r +} + +// A list of fields to include in the response. +func (r UsersAPIUsersListRequest) Fields(fields []string) UsersAPIUsersListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r UsersAPIUsersListRequest) ExcludeFields(excludeFields []string) UsersAPIUsersListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r UsersAPIUsersListRequest) Execute() (*PaginatedUserResponseList, *http.Response, error) { + return r.ApiService.UsersListExecute(r) +} + +/* +UsersList List users + +ViewSet for User. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return UsersAPIUsersListRequest +*/ +func (a *UsersAPIService) UsersList(ctx context.Context) UsersAPIUsersListRequest { + return UsersAPIUsersListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedUserResponseList +func (a *UsersAPIService) UsersListExecute(r UsersAPIUsersListRequest) (*PaginatedUserResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedUserResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.UsersList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/users/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.email != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "email", r.email, "") + } + if r.emailContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "email__contains", r.emailContains, "") + } + if r.emailIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "email__icontains", r.emailIcontains, "") + } + if r.emailIexact != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "email__iexact", r.emailIexact, "") + } + if r.emailIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "email__in", r.emailIn, "csv") + } + if r.firstName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "first_name", r.firstName, "") + } + if r.firstNameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "first_name__contains", r.firstNameContains, "") + } + if r.firstNameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "first_name__icontains", r.firstNameIcontains, "") + } + if r.firstNameIexact != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "first_name__iexact", r.firstNameIexact, "") + } + if r.firstNameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "first_name__in", r.firstNameIn, "csv") + } + if r.isActive != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "is_active", r.isActive, "") + } + if r.isStaff != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "is_staff", r.isStaff, "") + } + if r.lastName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_name", r.lastName, "") + } + if r.lastNameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_name__contains", r.lastNameContains, "") + } + if r.lastNameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_name__icontains", r.lastNameIcontains, "") + } + if r.lastNameIexact != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_name__iexact", r.lastNameIexact, "") + } + if r.lastNameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_name__in", r.lastNameIn, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.username != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "username", r.username, "") + } + if r.usernameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "username__contains", r.usernameContains, "") + } + if r.usernameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "username__icontains", r.usernameIcontains, "") + } + if r.usernameIexact != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "username__iexact", r.usernameIexact, "") + } + if r.usernameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "username__in", r.usernameIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UsersAPIUsersPartialUpdateRequest struct { + ctx context.Context + ApiService *UsersAPIService + authUserHref string + patchedUser *PatchedUser +} + +func (r UsersAPIUsersPartialUpdateRequest) PatchedUser(patchedUser PatchedUser) UsersAPIUsersPartialUpdateRequest { + r.patchedUser = &patchedUser + return r +} + +func (r UsersAPIUsersPartialUpdateRequest) Execute() (*UserResponse, *http.Response, error) { + return r.ApiService.UsersPartialUpdateExecute(r) +} + +/* +UsersPartialUpdate Update an user + +ViewSet for User. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param authUserHref + @return UsersAPIUsersPartialUpdateRequest +*/ +func (a *UsersAPIService) UsersPartialUpdate(ctx context.Context, authUserHref string) UsersAPIUsersPartialUpdateRequest { + return UsersAPIUsersPartialUpdateRequest{ + ApiService: a, + ctx: ctx, + authUserHref: authUserHref, + } +} + +// Execute executes the request +// @return UserResponse +func (a *UsersAPIService) UsersPartialUpdateExecute(r UsersAPIUsersPartialUpdateRequest) (*UserResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.UsersPartialUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{auth_user_href}" + localVarPath = strings.Replace(localVarPath, "{"+"auth_user_href"+"}", parameterValueToString(r.authUserHref, "authUserHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.patchedUser == nil { + return localVarReturnValue, nil, reportError("patchedUser is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedUser + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UsersAPIUsersReadRequest struct { + ctx context.Context + ApiService *UsersAPIService + authUserHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r UsersAPIUsersReadRequest) Fields(fields []string) UsersAPIUsersReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r UsersAPIUsersReadRequest) ExcludeFields(excludeFields []string) UsersAPIUsersReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r UsersAPIUsersReadRequest) Execute() (*UserResponse, *http.Response, error) { + return r.ApiService.UsersReadExecute(r) +} + +/* +UsersRead Inspect an user + +ViewSet for User. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param authUserHref + @return UsersAPIUsersReadRequest +*/ +func (a *UsersAPIService) UsersRead(ctx context.Context, authUserHref string) UsersAPIUsersReadRequest { + return UsersAPIUsersReadRequest{ + ApiService: a, + ctx: ctx, + authUserHref: authUserHref, + } +} + +// Execute executes the request +// @return UserResponse +func (a *UsersAPIService) UsersReadExecute(r UsersAPIUsersReadRequest) (*UserResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.UsersRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{auth_user_href}" + localVarPath = strings.Replace(localVarPath, "{"+"auth_user_href"+"}", parameterValueToString(r.authUserHref, "authUserHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UsersAPIUsersUpdateRequest struct { + ctx context.Context + ApiService *UsersAPIService + authUserHref string + user *User +} + +func (r UsersAPIUsersUpdateRequest) User(user User) UsersAPIUsersUpdateRequest { + r.user = &user + return r +} + +func (r UsersAPIUsersUpdateRequest) Execute() (*UserResponse, *http.Response, error) { + return r.ApiService.UsersUpdateExecute(r) +} + +/* +UsersUpdate Update an user + +ViewSet for User. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param authUserHref + @return UsersAPIUsersUpdateRequest +*/ +func (a *UsersAPIService) UsersUpdate(ctx context.Context, authUserHref string) UsersAPIUsersUpdateRequest { + return UsersAPIUsersUpdateRequest{ + ApiService: a, + ctx: ctx, + authUserHref: authUserHref, + } +} + +// Execute executes the request +// @return UserResponse +func (a *UsersAPIService) UsersUpdateExecute(r UsersAPIUsersUpdateRequest) (*UserResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersAPIService.UsersUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{auth_user_href}" + localVarPath = strings.Replace(localVarPath, "{"+"auth_user_href"+"}", parameterValueToString(r.authUserHref, "authUserHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.user == nil { + return localVarReturnValue, nil, reportError("user is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.user + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_users_roles.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_users_roles.go new file mode 100644 index 0000000000..dd3dbf0747 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_users_roles.go @@ -0,0 +1,626 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// UsersRolesAPIService UsersRolesAPI service +type UsersRolesAPIService service + +type UsersRolesAPIUsersRolesCreateRequest struct { + ctx context.Context + ApiService *UsersRolesAPIService + authUserHref string + userRole *UserRole +} + +func (r UsersRolesAPIUsersRolesCreateRequest) UserRole(userRole UserRole) UsersRolesAPIUsersRolesCreateRequest { + r.userRole = &userRole + return r +} + +func (r UsersRolesAPIUsersRolesCreateRequest) Execute() (*UserRoleResponse, *http.Response, error) { + return r.ApiService.UsersRolesCreateExecute(r) +} + +/* +UsersRolesCreate Create an user role + +ViewSet for UserRole. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param authUserHref + @return UsersRolesAPIUsersRolesCreateRequest +*/ +func (a *UsersRolesAPIService) UsersRolesCreate(ctx context.Context, authUserHref string) UsersRolesAPIUsersRolesCreateRequest { + return UsersRolesAPIUsersRolesCreateRequest{ + ApiService: a, + ctx: ctx, + authUserHref: authUserHref, + } +} + +// Execute executes the request +// @return UserRoleResponse +func (a *UsersRolesAPIService) UsersRolesCreateExecute(r UsersRolesAPIUsersRolesCreateRequest) (*UserRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersRolesAPIService.UsersRolesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{auth_user_href}roles/" + localVarPath = strings.Replace(localVarPath, "{"+"auth_user_href"+"}", parameterValueToString(r.authUserHref, "authUserHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userRole == nil { + return localVarReturnValue, nil, reportError("userRole is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userRole + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UsersRolesAPIUsersRolesDeleteRequest struct { + ctx context.Context + ApiService *UsersRolesAPIService + authUsersUserRoleHref string +} + +func (r UsersRolesAPIUsersRolesDeleteRequest) Execute() (*http.Response, error) { + return r.ApiService.UsersRolesDeleteExecute(r) +} + +/* +UsersRolesDelete Delete an user role + +ViewSet for UserRole. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param authUsersUserRoleHref + @return UsersRolesAPIUsersRolesDeleteRequest +*/ +func (a *UsersRolesAPIService) UsersRolesDelete(ctx context.Context, authUsersUserRoleHref string) UsersRolesAPIUsersRolesDeleteRequest { + return UsersRolesAPIUsersRolesDeleteRequest{ + ApiService: a, + ctx: ctx, + authUsersUserRoleHref: authUsersUserRoleHref, + } +} + +// Execute executes the request +func (a *UsersRolesAPIService) UsersRolesDeleteExecute(r UsersRolesAPIUsersRolesDeleteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersRolesAPIService.UsersRolesDelete") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{auth_users_user_role_href}" + localVarPath = strings.Replace(localVarPath, "{"+"auth_users_user_role_href"+"}", parameterValueToString(r.authUsersUserRoleHref, "authUsersUserRoleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type UsersRolesAPIUsersRolesListRequest struct { + ctx context.Context + ApiService *UsersRolesAPIService + authUserHref string + contentObject *string + domain *string + limit *int32 + offset *int32 + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + role *string + roleContains *string + roleIcontains *string + roleIn *[]string + roleStartswith *string + fields *[]string + excludeFields *[]string +} + +// content_object +func (r UsersRolesAPIUsersRolesListRequest) ContentObject(contentObject string) UsersRolesAPIUsersRolesListRequest { + r.contentObject = &contentObject + return r +} + +// Foreign Key referenced by HREF +func (r UsersRolesAPIUsersRolesListRequest) Domain(domain string) UsersRolesAPIUsersRolesListRequest { + r.domain = &domain + return r +} + +// Number of results to return per page. +func (r UsersRolesAPIUsersRolesListRequest) Limit(limit int32) UsersRolesAPIUsersRolesListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r UsersRolesAPIUsersRolesListRequest) Offset(offset int32) UsersRolesAPIUsersRolesListRequest { + r.offset = &offset + return r +} + +// Ordering * `role` - Role * `-role` - Role (descending) * `description` - Description * `-description` - Description (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r UsersRolesAPIUsersRolesListRequest) Ordering(ordering []string) UsersRolesAPIUsersRolesListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r UsersRolesAPIUsersRolesListRequest) PulpHrefIn(pulpHrefIn []string) UsersRolesAPIUsersRolesListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r UsersRolesAPIUsersRolesListRequest) PulpIdIn(pulpIdIn []string) UsersRolesAPIUsersRolesListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +func (r UsersRolesAPIUsersRolesListRequest) Role(role string) UsersRolesAPIUsersRolesListRequest { + r.role = &role + return r +} + +func (r UsersRolesAPIUsersRolesListRequest) RoleContains(roleContains string) UsersRolesAPIUsersRolesListRequest { + r.roleContains = &roleContains + return r +} + +func (r UsersRolesAPIUsersRolesListRequest) RoleIcontains(roleIcontains string) UsersRolesAPIUsersRolesListRequest { + r.roleIcontains = &roleIcontains + return r +} + +// Multiple values may be separated by commas. +func (r UsersRolesAPIUsersRolesListRequest) RoleIn(roleIn []string) UsersRolesAPIUsersRolesListRequest { + r.roleIn = &roleIn + return r +} + +func (r UsersRolesAPIUsersRolesListRequest) RoleStartswith(roleStartswith string) UsersRolesAPIUsersRolesListRequest { + r.roleStartswith = &roleStartswith + return r +} + +// A list of fields to include in the response. +func (r UsersRolesAPIUsersRolesListRequest) Fields(fields []string) UsersRolesAPIUsersRolesListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r UsersRolesAPIUsersRolesListRequest) ExcludeFields(excludeFields []string) UsersRolesAPIUsersRolesListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r UsersRolesAPIUsersRolesListRequest) Execute() (*PaginatedUserRoleResponseList, *http.Response, error) { + return r.ApiService.UsersRolesListExecute(r) +} + +/* +UsersRolesList List user roles + +ViewSet for UserRole. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param authUserHref + @return UsersRolesAPIUsersRolesListRequest +*/ +func (a *UsersRolesAPIService) UsersRolesList(ctx context.Context, authUserHref string) UsersRolesAPIUsersRolesListRequest { + return UsersRolesAPIUsersRolesListRequest{ + ApiService: a, + ctx: ctx, + authUserHref: authUserHref, + } +} + +// Execute executes the request +// @return PaginatedUserRoleResponseList +func (a *UsersRolesAPIService) UsersRolesListExecute(r UsersRolesAPIUsersRolesListRequest) (*PaginatedUserRoleResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedUserRoleResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersRolesAPIService.UsersRolesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{auth_user_href}roles/" + localVarPath = strings.Replace(localVarPath, "{"+"auth_user_href"+"}", parameterValueToString(r.authUserHref, "authUserHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.contentObject != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content_object", r.contentObject, "") + } + if r.domain != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "domain", r.domain, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.role != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "role", r.role, "") + } + if r.roleContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "role__contains", r.roleContains, "") + } + if r.roleIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "role__icontains", r.roleIcontains, "") + } + if r.roleIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "role__in", r.roleIn, "csv") + } + if r.roleStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "role__startswith", r.roleStartswith, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type UsersRolesAPIUsersRolesReadRequest struct { + ctx context.Context + ApiService *UsersRolesAPIService + authUsersUserRoleHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r UsersRolesAPIUsersRolesReadRequest) Fields(fields []string) UsersRolesAPIUsersRolesReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r UsersRolesAPIUsersRolesReadRequest) ExcludeFields(excludeFields []string) UsersRolesAPIUsersRolesReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r UsersRolesAPIUsersRolesReadRequest) Execute() (*UserRoleResponse, *http.Response, error) { + return r.ApiService.UsersRolesReadExecute(r) +} + +/* +UsersRolesRead Inspect an user role + +ViewSet for UserRole. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param authUsersUserRoleHref + @return UsersRolesAPIUsersRolesReadRequest +*/ +func (a *UsersRolesAPIService) UsersRolesRead(ctx context.Context, authUsersUserRoleHref string) UsersRolesAPIUsersRolesReadRequest { + return UsersRolesAPIUsersRolesReadRequest{ + ApiService: a, + ctx: ctx, + authUsersUserRoleHref: authUsersUserRoleHref, + } +} + +// Execute executes the request +// @return UserRoleResponse +func (a *UsersRolesAPIService) UsersRolesReadExecute(r UsersRolesAPIUsersRolesReadRequest) (*UserRoleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserRoleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersRolesAPIService.UsersRolesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{auth_users_user_role_href}" + localVarPath = strings.Replace(localVarPath, "{"+"auth_users_user_role_href"+"}", parameterValueToString(r.authUsersUserRoleHref, "authUsersUserRoleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_versions.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_versions.go new file mode 100644 index 0000000000..0da40e6f41 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_versions.go @@ -0,0 +1,334 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// VersionsAPIService VersionsAPI service +type VersionsAPIService service + +type VersionsAPIApiV1RolesVersionsListRequest struct { + ctx context.Context + ApiService *VersionsAPIService + ansibleRoleHref string + limit *int32 + offset *int32 + fields *[]string + excludeFields *[]string +} + +// Number of results to return per page. +func (r VersionsAPIApiV1RolesVersionsListRequest) Limit(limit int32) VersionsAPIApiV1RolesVersionsListRequest { + r.limit = &limit + return r +} + +// The initial index from which to return the results. +func (r VersionsAPIApiV1RolesVersionsListRequest) Offset(offset int32) VersionsAPIApiV1RolesVersionsListRequest { + r.offset = &offset + return r +} + +// A list of fields to include in the response. +func (r VersionsAPIApiV1RolesVersionsListRequest) Fields(fields []string) VersionsAPIApiV1RolesVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r VersionsAPIApiV1RolesVersionsListRequest) ExcludeFields(excludeFields []string) VersionsAPIApiV1RolesVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r VersionsAPIApiV1RolesVersionsListRequest) Execute() (*PaginatedGalaxyRoleVersionResponseList, *http.Response, error) { + return r.ApiService.ApiV1RolesVersionsListExecute(r) +} + +/* +ApiV1RolesVersionsList Method for ApiV1RolesVersionsList + +APIView for Role Versions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleRoleHref + @return VersionsAPIApiV1RolesVersionsListRequest +*/ +func (a *VersionsAPIService) ApiV1RolesVersionsList(ctx context.Context, ansibleRoleHref string) VersionsAPIApiV1RolesVersionsListRequest { + return VersionsAPIApiV1RolesVersionsListRequest{ + ApiService: a, + ctx: ctx, + ansibleRoleHref: ansibleRoleHref, + } +} + +// Execute executes the request +// @return PaginatedGalaxyRoleVersionResponseList +func (a *VersionsAPIService) ApiV1RolesVersionsListExecute(r VersionsAPIApiV1RolesVersionsListRequest) (*PaginatedGalaxyRoleVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedGalaxyRoleVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VersionsAPIService.ApiV1RolesVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_role_href}versions/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_role_href"+"}", parameterValueToString(r.ansibleRoleHref, "ansibleRoleHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type VersionsAPIApiV2CollectionVersionsListRequest struct { + ctx context.Context + ApiService *VersionsAPIService + ansibleCollectionVersionHref string + page *int32 + fields *[]string + excludeFields *[]string +} + +// A page number within the paginated result set. +func (r VersionsAPIApiV2CollectionVersionsListRequest) Page(page int32) VersionsAPIApiV2CollectionVersionsListRequest { + r.page = &page + return r +} + +// A list of fields to include in the response. +func (r VersionsAPIApiV2CollectionVersionsListRequest) Fields(fields []string) VersionsAPIApiV2CollectionVersionsListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r VersionsAPIApiV2CollectionVersionsListRequest) ExcludeFields(excludeFields []string) VersionsAPIApiV2CollectionVersionsListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r VersionsAPIApiV2CollectionVersionsListRequest) Execute() (*PaginatedGalaxyCollectionVersionResponseList, *http.Response, error) { + return r.ApiService.ApiV2CollectionVersionsListExecute(r) +} + +/* +ApiV2CollectionVersionsList Method for ApiV2CollectionVersionsList + +APIView for Collections by namespace/name. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ansibleCollectionVersionHref + @return VersionsAPIApiV2CollectionVersionsListRequest +*/ +func (a *VersionsAPIService) ApiV2CollectionVersionsList(ctx context.Context, ansibleCollectionVersionHref string) VersionsAPIApiV2CollectionVersionsListRequest { + return VersionsAPIApiV2CollectionVersionsListRequest{ + ApiService: a, + ctx: ctx, + ansibleCollectionVersionHref: ansibleCollectionVersionHref, + } +} + +// Execute executes the request +// @return PaginatedGalaxyCollectionVersionResponseList +func (a *VersionsAPIService) ApiV2CollectionVersionsListExecute(r VersionsAPIApiV2CollectionVersionsListRequest) (*PaginatedGalaxyCollectionVersionResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedGalaxyCollectionVersionResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VersionsAPIService.ApiV2CollectionVersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{ansible_collection_version_href}versions/" + localVarPath = strings.Replace(localVarPath, "{"+"ansible_collection_version_href"+"}", parameterValueToString(r.ansibleCollectionVersionHref, "ansibleCollectionVersionHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/api_workers.go b/vendor/github.com/osbuild/pulp-client/pulpclient/api_workers.go new file mode 100644 index 0000000000..82499f7df5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/api_workers.go @@ -0,0 +1,513 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" + "reflect" +) + + +// WorkersAPIService WorkersAPI service +type WorkersAPIService service + +type WorkersAPIWorkersListRequest struct { + ctx context.Context + ApiService *WorkersAPIService + lastHeartbeat *time.Time + lastHeartbeatGt *time.Time + lastHeartbeatGte *time.Time + lastHeartbeatLt *time.Time + lastHeartbeatLte *time.Time + lastHeartbeatRange *[]time.Time + limit *int32 + missing *bool + name *string + nameContains *string + nameIcontains *string + nameIn *[]string + nameStartswith *string + offset *int32 + online *bool + ordering *[]string + pulpHrefIn *[]string + pulpIdIn *[]string + fields *[]string + excludeFields *[]string +} + +// Filter results where last_heartbeat matches value +func (r WorkersAPIWorkersListRequest) LastHeartbeat(lastHeartbeat time.Time) WorkersAPIWorkersListRequest { + r.lastHeartbeat = &lastHeartbeat + return r +} + +// Filter results where last_heartbeat is greater than value +func (r WorkersAPIWorkersListRequest) LastHeartbeatGt(lastHeartbeatGt time.Time) WorkersAPIWorkersListRequest { + r.lastHeartbeatGt = &lastHeartbeatGt + return r +} + +// Filter results where last_heartbeat is greater than or equal to value +func (r WorkersAPIWorkersListRequest) LastHeartbeatGte(lastHeartbeatGte time.Time) WorkersAPIWorkersListRequest { + r.lastHeartbeatGte = &lastHeartbeatGte + return r +} + +// Filter results where last_heartbeat is less than value +func (r WorkersAPIWorkersListRequest) LastHeartbeatLt(lastHeartbeatLt time.Time) WorkersAPIWorkersListRequest { + r.lastHeartbeatLt = &lastHeartbeatLt + return r +} + +// Filter results where last_heartbeat is less than or equal to value +func (r WorkersAPIWorkersListRequest) LastHeartbeatLte(lastHeartbeatLte time.Time) WorkersAPIWorkersListRequest { + r.lastHeartbeatLte = &lastHeartbeatLte + return r +} + +// Filter results where last_heartbeat is between two comma separated values +func (r WorkersAPIWorkersListRequest) LastHeartbeatRange(lastHeartbeatRange []time.Time) WorkersAPIWorkersListRequest { + r.lastHeartbeatRange = &lastHeartbeatRange + return r +} + +// Number of results to return per page. +func (r WorkersAPIWorkersListRequest) Limit(limit int32) WorkersAPIWorkersListRequest { + r.limit = &limit + return r +} + +func (r WorkersAPIWorkersListRequest) Missing(missing bool) WorkersAPIWorkersListRequest { + r.missing = &missing + return r +} + +// Filter results where name matches value +func (r WorkersAPIWorkersListRequest) Name(name string) WorkersAPIWorkersListRequest { + r.name = &name + return r +} + +// Filter results where name contains value +func (r WorkersAPIWorkersListRequest) NameContains(nameContains string) WorkersAPIWorkersListRequest { + r.nameContains = &nameContains + return r +} + +// Filter results where name contains value +func (r WorkersAPIWorkersListRequest) NameIcontains(nameIcontains string) WorkersAPIWorkersListRequest { + r.nameIcontains = &nameIcontains + return r +} + +// Filter results where name is in a comma-separated list of values +func (r WorkersAPIWorkersListRequest) NameIn(nameIn []string) WorkersAPIWorkersListRequest { + r.nameIn = &nameIn + return r +} + +// Filter results where name starts with value +func (r WorkersAPIWorkersListRequest) NameStartswith(nameStartswith string) WorkersAPIWorkersListRequest { + r.nameStartswith = &nameStartswith + return r +} + +// The initial index from which to return the results. +func (r WorkersAPIWorkersListRequest) Offset(offset int32) WorkersAPIWorkersListRequest { + r.offset = &offset + return r +} + +func (r WorkersAPIWorkersListRequest) Online(online bool) WorkersAPIWorkersListRequest { + r.online = &online + return r +} + +// Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `name` - Name * `-name` - Name (descending) * `last_heartbeat` - Last heartbeat * `-last_heartbeat` - Last heartbeat (descending) * `versions` - Versions * `-versions` - Versions (descending) * `pk` - Pk * `-pk` - Pk (descending) +func (r WorkersAPIWorkersListRequest) Ordering(ordering []string) WorkersAPIWorkersListRequest { + r.ordering = &ordering + return r +} + +// Multiple values may be separated by commas. +func (r WorkersAPIWorkersListRequest) PulpHrefIn(pulpHrefIn []string) WorkersAPIWorkersListRequest { + r.pulpHrefIn = &pulpHrefIn + return r +} + +// Multiple values may be separated by commas. +func (r WorkersAPIWorkersListRequest) PulpIdIn(pulpIdIn []string) WorkersAPIWorkersListRequest { + r.pulpIdIn = &pulpIdIn + return r +} + +// A list of fields to include in the response. +func (r WorkersAPIWorkersListRequest) Fields(fields []string) WorkersAPIWorkersListRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r WorkersAPIWorkersListRequest) ExcludeFields(excludeFields []string) WorkersAPIWorkersListRequest { + r.excludeFields = &excludeFields + return r +} + +func (r WorkersAPIWorkersListRequest) Execute() (*PaginatedWorkerResponseList, *http.Response, error) { + return r.ApiService.WorkersListExecute(r) +} + +/* +WorkersList List workers + +A customized named ModelViewSet that knows how to register itself with the Pulp API router. + +This viewset is discoverable by its name. +"Normal" Django Models and Master/Detail models are supported by the ``register_with`` method. + +Attributes: + lookup_field (str): The name of the field by which an object should be looked up, in + addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' + endpoint_name (str): The name of the final path segment that should identify the ViewSet's + collection endpoint. + nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must + correspond to the "parent_prefix" of a router with rest_framework_nested.NestedMixin. + None indicates this ViewSet should not be nested. + parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs + to django model filter expressions that can be used with the corresponding value from + self.kwargs, used only by a nested ViewSet to filter based on the parent object's + identity. + schema (DefaultSchema): The schema class to use by default in a viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return WorkersAPIWorkersListRequest +*/ +func (a *WorkersAPIService) WorkersList(ctx context.Context) WorkersAPIWorkersListRequest { + return WorkersAPIWorkersListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedWorkerResponseList +func (a *WorkersAPIService) WorkersListExecute(r WorkersAPIWorkersListRequest) (*PaginatedWorkerResponseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedWorkerResponseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkersAPIService.WorkersList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/pulp/api/v3/workers/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.lastHeartbeat != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_heartbeat", r.lastHeartbeat, "") + } + if r.lastHeartbeatGt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_heartbeat__gt", r.lastHeartbeatGt, "") + } + if r.lastHeartbeatGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_heartbeat__gte", r.lastHeartbeatGte, "") + } + if r.lastHeartbeatLt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_heartbeat__lt", r.lastHeartbeatLt, "") + } + if r.lastHeartbeatLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_heartbeat__lte", r.lastHeartbeatLte, "") + } + if r.lastHeartbeatRange != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_heartbeat__range", r.lastHeartbeatRange, "csv") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.missing != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "missing", r.missing, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + if r.nameContains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__contains", r.nameContains, "") + } + if r.nameIcontains != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__icontains", r.nameIcontains, "") + } + if r.nameIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__in", r.nameIn, "csv") + } + if r.nameStartswith != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name__startswith", r.nameStartswith, "") + } + if r.offset != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "") + } + if r.online != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "online", r.online, "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "csv") + } + if r.pulpHrefIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_href__in", r.pulpHrefIn, "csv") + } + if r.pulpIdIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pulp_id__in", r.pulpIdIn, "csv") + } + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type WorkersAPIWorkersReadRequest struct { + ctx context.Context + ApiService *WorkersAPIService + workerHref string + fields *[]string + excludeFields *[]string +} + +// A list of fields to include in the response. +func (r WorkersAPIWorkersReadRequest) Fields(fields []string) WorkersAPIWorkersReadRequest { + r.fields = &fields + return r +} + +// A list of fields to exclude from the response. +func (r WorkersAPIWorkersReadRequest) ExcludeFields(excludeFields []string) WorkersAPIWorkersReadRequest { + r.excludeFields = &excludeFields + return r +} + +func (r WorkersAPIWorkersReadRequest) Execute() (*WorkerResponse, *http.Response, error) { + return r.ApiService.WorkersReadExecute(r) +} + +/* +WorkersRead Inspect a worker + +A customized named ModelViewSet that knows how to register itself with the Pulp API router. + +This viewset is discoverable by its name. +"Normal" Django Models and Master/Detail models are supported by the ``register_with`` method. + +Attributes: + lookup_field (str): The name of the field by which an object should be looked up, in + addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' + endpoint_name (str): The name of the final path segment that should identify the ViewSet's + collection endpoint. + nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must + correspond to the "parent_prefix" of a router with rest_framework_nested.NestedMixin. + None indicates this ViewSet should not be nested. + parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs + to django model filter expressions that can be used with the corresponding value from + self.kwargs, used only by a nested ViewSet to filter based on the parent object's + identity. + schema (DefaultSchema): The schema class to use by default in a viewset. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param workerHref + @return WorkersAPIWorkersReadRequest +*/ +func (a *WorkersAPIService) WorkersRead(ctx context.Context, workerHref string) WorkersAPIWorkersReadRequest { + return WorkersAPIWorkersReadRequest{ + ApiService: a, + ctx: ctx, + workerHref: workerHref, + } +} + +// Execute executes the request +// @return WorkerResponse +func (a *WorkersAPIService) WorkersReadExecute(r WorkersAPIWorkersReadRequest) (*WorkerResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkerResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkersAPIService.WorkersRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "{worker_href}" + localVarPath = strings.Replace(localVarPath, "{"+"worker_href"+"}", parameterValueToString(r.workerHref, "workerHref"), -1) // NOTE: paths aren't escaped because Pulp uses hrefs as path parameters + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + t := *r.fields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi") + } + } + if r.excludeFields != nil { + t := *r.excludeFields + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "exclude_fields", t, "multi") + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/client.go b/vendor/github.com/osbuild/pulp-client/pulpclient/client.go new file mode 100644 index 0000000000..49c7926e63 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/client.go @@ -0,0 +1,1227 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) +) + +// APIClient manages communication with the Pulp 3 API API vv3 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + AccessPoliciesAPI *AccessPoliciesAPIService + + AcsFileAPI *AcsFileAPIService + + AcsRpmAPI *AcsRpmAPIService + + AnsibleCollectionsAPI *AnsibleCollectionsAPIService + + AnsibleCopyAPI *AnsibleCopyAPIService + + ApiCollectionsAPI *ApiCollectionsAPIService + + ApiRolesAPI *ApiRolesAPIService + + ArtifactsAPI *ArtifactsAPIService + + CollectionImportAPI *CollectionImportAPIService + + ContentAPI *ContentAPIService + + ContentAdvisoriesAPI *ContentAdvisoriesAPIService + + ContentArtifactAPI *ContentArtifactAPIService + + ContentBlobsAPI *ContentBlobsAPIService + + ContentCollectionDeprecationsAPI *ContentCollectionDeprecationsAPIService + + ContentCollectionMarksAPI *ContentCollectionMarksAPIService + + ContentCollectionSignaturesAPI *ContentCollectionSignaturesAPIService + + ContentCollectionVersionsAPI *ContentCollectionVersionsAPIService + + ContentCommitsAPI *ContentCommitsAPIService + + ContentConfigsAPI *ContentConfigsAPIService + + ContentContentAPI *ContentContentAPIService + + ContentDistributionTreesAPI *ContentDistributionTreesAPIService + + ContentFilesAPI *ContentFilesAPIService + + ContentGemAPI *ContentGemAPIService + + ContentGenericContentsAPI *ContentGenericContentsAPIService + + ContentInstallerFileIndicesAPI *ContentInstallerFileIndicesAPIService + + ContentInstallerPackagesAPI *ContentInstallerPackagesAPIService + + ContentManifestsAPI *ContentManifestsAPIService + + ContentModulemdDefaultsAPI *ContentModulemdDefaultsAPIService + + ContentModulemdObsoletesAPI *ContentModulemdObsoletesAPIService + + ContentModulemdsAPI *ContentModulemdsAPIService + + ContentNamespacesAPI *ContentNamespacesAPIService + + ContentObjectsAPI *ContentObjectsAPIService + + ContentPackageIndicesAPI *ContentPackageIndicesAPIService + + ContentPackageReleaseComponentsAPI *ContentPackageReleaseComponentsAPIService + + ContentPackagecategoriesAPI *ContentPackagecategoriesAPIService + + ContentPackageenvironmentsAPI *ContentPackageenvironmentsAPIService + + ContentPackagegroupsAPI *ContentPackagegroupsAPIService + + ContentPackagelangpacksAPI *ContentPackagelangpacksAPIService + + ContentPackagesAPI *ContentPackagesAPIService + + ContentRefsAPI *ContentRefsAPIService + + ContentReleaseArchitecturesAPI *ContentReleaseArchitecturesAPIService + + ContentReleaseComponentsAPI *ContentReleaseComponentsAPIService + + ContentReleaseFilesAPI *ContentReleaseFilesAPIService + + ContentReleasesAPI *ContentReleasesAPIService + + ContentRepoMetadataFilesAPI *ContentRepoMetadataFilesAPIService + + ContentRolesAPI *ContentRolesAPIService + + ContentSignaturesAPI *ContentSignaturesAPIService + + ContentSummariesAPI *ContentSummariesAPIService + + ContentTagsAPI *ContentTagsAPIService + + ContentguardsAPI *ContentguardsAPIService + + ContentguardsContentRedirectAPI *ContentguardsContentRedirectAPIService + + ContentguardsRbacAPI *ContentguardsRbacAPIService + + ContentguardsRhsmAPI *ContentguardsRhsmAPIService + + ContentguardsX509API *ContentguardsX509APIService + + DebCopyAPI *DebCopyAPIService + + DistributionsAPI *DistributionsAPIService + + DistributionsAnsibleAPI *DistributionsAnsibleAPIService + + DistributionsAptAPI *DistributionsAptAPIService + + DistributionsArtifactsAPI *DistributionsArtifactsAPIService + + DistributionsContainerAPI *DistributionsContainerAPIService + + DistributionsFileAPI *DistributionsFileAPIService + + DistributionsGemAPI *DistributionsGemAPIService + + DistributionsMavenAPI *DistributionsMavenAPIService + + DistributionsOstreeAPI *DistributionsOstreeAPIService + + DistributionsPypiAPI *DistributionsPypiAPIService + + DistributionsRpmAPI *DistributionsRpmAPIService + + DocsApiJsonAPI *DocsApiJsonAPIService + + DocsApiYamlAPI *DocsApiYamlAPIService + + DomainsAPI *DomainsAPIService + + ExportersFilesystemAPI *ExportersFilesystemAPIService + + ExportersFilesystemExportsAPI *ExportersFilesystemExportsAPIService + + ExportersPulpAPI *ExportersPulpAPIService + + ExportersPulpExportsAPI *ExportersPulpExportsAPIService + + GalaxyDetailAPI *GalaxyDetailAPIService + + GroupsAPI *GroupsAPIService + + GroupsRolesAPI *GroupsRolesAPIService + + GroupsUsersAPI *GroupsUsersAPIService + + ImportersPulpAPI *ImportersPulpAPIService + + ImportersPulpImportCheckAPI *ImportersPulpImportCheckAPIService + + ImportersPulpImportsAPI *ImportersPulpImportsAPIService + + OrphansAPI *OrphansAPIService + + OrphansCleanupAPI *OrphansCleanupAPIService + + PublicationsAPI *PublicationsAPIService + + PublicationsAptAPI *PublicationsAptAPIService + + PublicationsFileAPI *PublicationsFileAPIService + + PublicationsGemAPI *PublicationsGemAPIService + + PublicationsPypiAPI *PublicationsPypiAPIService + + PublicationsRpmAPI *PublicationsRpmAPIService + + PublicationsVerbatimAPI *PublicationsVerbatimAPIService + + PulpAnsibleApiAPI *PulpAnsibleApiAPIService + + PulpAnsibleApiV2CollectionsVersionsAPI *PulpAnsibleApiV2CollectionsVersionsAPIService + + PulpAnsibleApiV3API *PulpAnsibleApiV3APIService + + PulpAnsibleApiV3ArtifactsCollectionsAPI *PulpAnsibleApiV3ArtifactsCollectionsAPIService + + PulpAnsibleApiV3CollectionVersionsAllAPI *PulpAnsibleApiV3CollectionVersionsAllAPIService + + PulpAnsibleApiV3CollectionsAPI *PulpAnsibleApiV3CollectionsAPIService + + PulpAnsibleApiV3CollectionsAllAPI *PulpAnsibleApiV3CollectionsAllAPIService + + PulpAnsibleApiV3CollectionsVersionsAPI *PulpAnsibleApiV3CollectionsVersionsAPIService + + PulpAnsibleApiV3CollectionsVersionsDocsBlobAPI *PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIService + + PulpAnsibleApiV3NamespacesAPI *PulpAnsibleApiV3NamespacesAPIService + + PulpAnsibleApiV3PluginAnsibleClientConfigurationAPI *PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIService + + PulpAnsibleApiV3PluginAnsibleContentCollectionsAPI *PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIService + + PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPI *PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService + + PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPI *PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIService + + PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPI *PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIService + + PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPI *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService + + PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPI *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService + + PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPI *PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService + + PulpAnsibleApiV3PluginAnsibleContentNamespacesAPI *PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService + + PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPI *PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIService + + PulpAnsibleArtifactsCollectionsV3API *PulpAnsibleArtifactsCollectionsV3APIService + + PulpAnsibleDefaultApiAPI *PulpAnsibleDefaultApiAPIService + + PulpAnsibleDefaultApiV3API *PulpAnsibleDefaultApiV3APIService + + PulpAnsibleDefaultApiV3ArtifactsCollectionsAPI *PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIService + + PulpAnsibleDefaultApiV3CollectionVersionsAllAPI *PulpAnsibleDefaultApiV3CollectionVersionsAllAPIService + + PulpAnsibleDefaultApiV3CollectionsAPI *PulpAnsibleDefaultApiV3CollectionsAPIService + + PulpAnsibleDefaultApiV3CollectionsAllAPI *PulpAnsibleDefaultApiV3CollectionsAllAPIService + + PulpAnsibleDefaultApiV3CollectionsVersionsAPI *PulpAnsibleDefaultApiV3CollectionsVersionsAPIService + + PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPI *PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIService + + PulpAnsibleDefaultApiV3NamespacesAPI *PulpAnsibleDefaultApiV3NamespacesAPIService + + PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPI *PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIService + + PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPI *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIService + + PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPI *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService + + PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPI *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIService + + PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPI *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIService + + PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPI *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService + + PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPI *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService + + PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPI *PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService + + PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPI *PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService + + PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPI *PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIService + + PulpAnsibleTagsAPI *PulpAnsibleTagsAPIService + + PulpContainerNamespacesAPI *PulpContainerNamespacesAPIService + + PulpMavenAPI *PulpMavenAPIService + + PypiAPI *PypiAPIService + + PypiLegacyAPI *PypiLegacyAPIService + + PypiMetadataAPI *PypiMetadataAPIService + + PypiSimpleAPI *PypiSimpleAPIService + + RemotesAPI *RemotesAPIService + + RemotesAptAPI *RemotesAptAPIService + + RemotesCollectionAPI *RemotesCollectionAPIService + + RemotesContainerAPI *RemotesContainerAPIService + + RemotesFileAPI *RemotesFileAPIService + + RemotesGemAPI *RemotesGemAPIService + + RemotesGitAPI *RemotesGitAPIService + + RemotesMavenAPI *RemotesMavenAPIService + + RemotesOstreeAPI *RemotesOstreeAPIService + + RemotesPythonAPI *RemotesPythonAPIService + + RemotesRoleAPI *RemotesRoleAPIService + + RemotesRpmAPI *RemotesRpmAPIService + + RemotesUlnAPI *RemotesUlnAPIService + + RepairAPI *RepairAPIService + + RepositoriesAPI *RepositoriesAPIService + + RepositoriesAnsibleAPI *RepositoriesAnsibleAPIService + + RepositoriesAnsibleVersionsAPI *RepositoriesAnsibleVersionsAPIService + + RepositoriesAptAPI *RepositoriesAptAPIService + + RepositoriesAptVersionsAPI *RepositoriesAptVersionsAPIService + + RepositoriesContainerAPI *RepositoriesContainerAPIService + + RepositoriesContainerPushAPI *RepositoriesContainerPushAPIService + + RepositoriesContainerPushVersionsAPI *RepositoriesContainerPushVersionsAPIService + + RepositoriesContainerVersionsAPI *RepositoriesContainerVersionsAPIService + + RepositoriesFileAPI *RepositoriesFileAPIService + + RepositoriesFileVersionsAPI *RepositoriesFileVersionsAPIService + + RepositoriesGemAPI *RepositoriesGemAPIService + + RepositoriesGemVersionsAPI *RepositoriesGemVersionsAPIService + + RepositoriesMavenAPI *RepositoriesMavenAPIService + + RepositoriesMavenVersionsAPI *RepositoriesMavenVersionsAPIService + + RepositoriesOstreeAPI *RepositoriesOstreeAPIService + + RepositoriesOstreeVersionsAPI *RepositoriesOstreeVersionsAPIService + + RepositoriesPythonAPI *RepositoriesPythonAPIService + + RepositoriesPythonVersionsAPI *RepositoriesPythonVersionsAPIService + + RepositoriesReclaimSpaceAPI *RepositoriesReclaimSpaceAPIService + + RepositoriesRpmAPI *RepositoriesRpmAPIService + + RepositoriesRpmVersionsAPI *RepositoriesRpmVersionsAPIService + + RepositoryVersionsAPI *RepositoryVersionsAPIService + + RolesAPI *RolesAPIService + + RpmCompsAPI *RpmCompsAPIService + + RpmCopyAPI *RpmCopyAPIService + + SigningServicesAPI *SigningServicesAPIService + + StatusAPI *StatusAPIService + + TaskGroupsAPI *TaskGroupsAPIService + + TaskSchedulesAPI *TaskSchedulesAPIService + + TasksAPI *TasksAPIService + + TokenAPI *TokenAPIService + + UploadsAPI *UploadsAPIService + + UpstreamPulpsAPI *UpstreamPulpsAPIService + + UsersAPI *UsersAPIService + + UsersRolesAPI *UsersRolesAPIService + + VersionsAPI *VersionsAPIService + + WorkersAPI *WorkersAPIService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.AccessPoliciesAPI = (*AccessPoliciesAPIService)(&c.common) + c.AcsFileAPI = (*AcsFileAPIService)(&c.common) + c.AcsRpmAPI = (*AcsRpmAPIService)(&c.common) + c.AnsibleCollectionsAPI = (*AnsibleCollectionsAPIService)(&c.common) + c.AnsibleCopyAPI = (*AnsibleCopyAPIService)(&c.common) + c.ApiCollectionsAPI = (*ApiCollectionsAPIService)(&c.common) + c.ApiRolesAPI = (*ApiRolesAPIService)(&c.common) + c.ArtifactsAPI = (*ArtifactsAPIService)(&c.common) + c.CollectionImportAPI = (*CollectionImportAPIService)(&c.common) + c.ContentAPI = (*ContentAPIService)(&c.common) + c.ContentAdvisoriesAPI = (*ContentAdvisoriesAPIService)(&c.common) + c.ContentArtifactAPI = (*ContentArtifactAPIService)(&c.common) + c.ContentBlobsAPI = (*ContentBlobsAPIService)(&c.common) + c.ContentCollectionDeprecationsAPI = (*ContentCollectionDeprecationsAPIService)(&c.common) + c.ContentCollectionMarksAPI = (*ContentCollectionMarksAPIService)(&c.common) + c.ContentCollectionSignaturesAPI = (*ContentCollectionSignaturesAPIService)(&c.common) + c.ContentCollectionVersionsAPI = (*ContentCollectionVersionsAPIService)(&c.common) + c.ContentCommitsAPI = (*ContentCommitsAPIService)(&c.common) + c.ContentConfigsAPI = (*ContentConfigsAPIService)(&c.common) + c.ContentContentAPI = (*ContentContentAPIService)(&c.common) + c.ContentDistributionTreesAPI = (*ContentDistributionTreesAPIService)(&c.common) + c.ContentFilesAPI = (*ContentFilesAPIService)(&c.common) + c.ContentGemAPI = (*ContentGemAPIService)(&c.common) + c.ContentGenericContentsAPI = (*ContentGenericContentsAPIService)(&c.common) + c.ContentInstallerFileIndicesAPI = (*ContentInstallerFileIndicesAPIService)(&c.common) + c.ContentInstallerPackagesAPI = (*ContentInstallerPackagesAPIService)(&c.common) + c.ContentManifestsAPI = (*ContentManifestsAPIService)(&c.common) + c.ContentModulemdDefaultsAPI = (*ContentModulemdDefaultsAPIService)(&c.common) + c.ContentModulemdObsoletesAPI = (*ContentModulemdObsoletesAPIService)(&c.common) + c.ContentModulemdsAPI = (*ContentModulemdsAPIService)(&c.common) + c.ContentNamespacesAPI = (*ContentNamespacesAPIService)(&c.common) + c.ContentObjectsAPI = (*ContentObjectsAPIService)(&c.common) + c.ContentPackageIndicesAPI = (*ContentPackageIndicesAPIService)(&c.common) + c.ContentPackageReleaseComponentsAPI = (*ContentPackageReleaseComponentsAPIService)(&c.common) + c.ContentPackagecategoriesAPI = (*ContentPackagecategoriesAPIService)(&c.common) + c.ContentPackageenvironmentsAPI = (*ContentPackageenvironmentsAPIService)(&c.common) + c.ContentPackagegroupsAPI = (*ContentPackagegroupsAPIService)(&c.common) + c.ContentPackagelangpacksAPI = (*ContentPackagelangpacksAPIService)(&c.common) + c.ContentPackagesAPI = (*ContentPackagesAPIService)(&c.common) + c.ContentRefsAPI = (*ContentRefsAPIService)(&c.common) + c.ContentReleaseArchitecturesAPI = (*ContentReleaseArchitecturesAPIService)(&c.common) + c.ContentReleaseComponentsAPI = (*ContentReleaseComponentsAPIService)(&c.common) + c.ContentReleaseFilesAPI = (*ContentReleaseFilesAPIService)(&c.common) + c.ContentReleasesAPI = (*ContentReleasesAPIService)(&c.common) + c.ContentRepoMetadataFilesAPI = (*ContentRepoMetadataFilesAPIService)(&c.common) + c.ContentRolesAPI = (*ContentRolesAPIService)(&c.common) + c.ContentSignaturesAPI = (*ContentSignaturesAPIService)(&c.common) + c.ContentSummariesAPI = (*ContentSummariesAPIService)(&c.common) + c.ContentTagsAPI = (*ContentTagsAPIService)(&c.common) + c.ContentguardsAPI = (*ContentguardsAPIService)(&c.common) + c.ContentguardsContentRedirectAPI = (*ContentguardsContentRedirectAPIService)(&c.common) + c.ContentguardsRbacAPI = (*ContentguardsRbacAPIService)(&c.common) + c.ContentguardsRhsmAPI = (*ContentguardsRhsmAPIService)(&c.common) + c.ContentguardsX509API = (*ContentguardsX509APIService)(&c.common) + c.DebCopyAPI = (*DebCopyAPIService)(&c.common) + c.DistributionsAPI = (*DistributionsAPIService)(&c.common) + c.DistributionsAnsibleAPI = (*DistributionsAnsibleAPIService)(&c.common) + c.DistributionsAptAPI = (*DistributionsAptAPIService)(&c.common) + c.DistributionsArtifactsAPI = (*DistributionsArtifactsAPIService)(&c.common) + c.DistributionsContainerAPI = (*DistributionsContainerAPIService)(&c.common) + c.DistributionsFileAPI = (*DistributionsFileAPIService)(&c.common) + c.DistributionsGemAPI = (*DistributionsGemAPIService)(&c.common) + c.DistributionsMavenAPI = (*DistributionsMavenAPIService)(&c.common) + c.DistributionsOstreeAPI = (*DistributionsOstreeAPIService)(&c.common) + c.DistributionsPypiAPI = (*DistributionsPypiAPIService)(&c.common) + c.DistributionsRpmAPI = (*DistributionsRpmAPIService)(&c.common) + c.DocsApiJsonAPI = (*DocsApiJsonAPIService)(&c.common) + c.DocsApiYamlAPI = (*DocsApiYamlAPIService)(&c.common) + c.DomainsAPI = (*DomainsAPIService)(&c.common) + c.ExportersFilesystemAPI = (*ExportersFilesystemAPIService)(&c.common) + c.ExportersFilesystemExportsAPI = (*ExportersFilesystemExportsAPIService)(&c.common) + c.ExportersPulpAPI = (*ExportersPulpAPIService)(&c.common) + c.ExportersPulpExportsAPI = (*ExportersPulpExportsAPIService)(&c.common) + c.GalaxyDetailAPI = (*GalaxyDetailAPIService)(&c.common) + c.GroupsAPI = (*GroupsAPIService)(&c.common) + c.GroupsRolesAPI = (*GroupsRolesAPIService)(&c.common) + c.GroupsUsersAPI = (*GroupsUsersAPIService)(&c.common) + c.ImportersPulpAPI = (*ImportersPulpAPIService)(&c.common) + c.ImportersPulpImportCheckAPI = (*ImportersPulpImportCheckAPIService)(&c.common) + c.ImportersPulpImportsAPI = (*ImportersPulpImportsAPIService)(&c.common) + c.OrphansAPI = (*OrphansAPIService)(&c.common) + c.OrphansCleanupAPI = (*OrphansCleanupAPIService)(&c.common) + c.PublicationsAPI = (*PublicationsAPIService)(&c.common) + c.PublicationsAptAPI = (*PublicationsAptAPIService)(&c.common) + c.PublicationsFileAPI = (*PublicationsFileAPIService)(&c.common) + c.PublicationsGemAPI = (*PublicationsGemAPIService)(&c.common) + c.PublicationsPypiAPI = (*PublicationsPypiAPIService)(&c.common) + c.PublicationsRpmAPI = (*PublicationsRpmAPIService)(&c.common) + c.PublicationsVerbatimAPI = (*PublicationsVerbatimAPIService)(&c.common) + c.PulpAnsibleApiAPI = (*PulpAnsibleApiAPIService)(&c.common) + c.PulpAnsibleApiV2CollectionsVersionsAPI = (*PulpAnsibleApiV2CollectionsVersionsAPIService)(&c.common) + c.PulpAnsibleApiV3API = (*PulpAnsibleApiV3APIService)(&c.common) + c.PulpAnsibleApiV3ArtifactsCollectionsAPI = (*PulpAnsibleApiV3ArtifactsCollectionsAPIService)(&c.common) + c.PulpAnsibleApiV3CollectionVersionsAllAPI = (*PulpAnsibleApiV3CollectionVersionsAllAPIService)(&c.common) + c.PulpAnsibleApiV3CollectionsAPI = (*PulpAnsibleApiV3CollectionsAPIService)(&c.common) + c.PulpAnsibleApiV3CollectionsAllAPI = (*PulpAnsibleApiV3CollectionsAllAPIService)(&c.common) + c.PulpAnsibleApiV3CollectionsVersionsAPI = (*PulpAnsibleApiV3CollectionsVersionsAPIService)(&c.common) + c.PulpAnsibleApiV3CollectionsVersionsDocsBlobAPI = (*PulpAnsibleApiV3CollectionsVersionsDocsBlobAPIService)(&c.common) + c.PulpAnsibleApiV3NamespacesAPI = (*PulpAnsibleApiV3NamespacesAPIService)(&c.common) + c.PulpAnsibleApiV3PluginAnsibleClientConfigurationAPI = (*PulpAnsibleApiV3PluginAnsibleClientConfigurationAPIService)(&c.common) + c.PulpAnsibleApiV3PluginAnsibleContentCollectionsAPI = (*PulpAnsibleApiV3PluginAnsibleContentCollectionsAPIService)(&c.common) + c.PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPI = (*PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService)(&c.common) + c.PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPI = (*PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsAPIService)(&c.common) + c.PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPI = (*PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsAPIService)(&c.common) + c.PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPI = (*PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexAPIService)(&c.common) + c.PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPI = (*PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService)(&c.common) + c.PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPI = (*PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService)(&c.common) + c.PulpAnsibleApiV3PluginAnsibleContentNamespacesAPI = (*PulpAnsibleApiV3PluginAnsibleContentNamespacesAPIService)(&c.common) + c.PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPI = (*PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsAPIService)(&c.common) + c.PulpAnsibleArtifactsCollectionsV3API = (*PulpAnsibleArtifactsCollectionsV3APIService)(&c.common) + c.PulpAnsibleDefaultApiAPI = (*PulpAnsibleDefaultApiAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3API = (*PulpAnsibleDefaultApiV3APIService)(&c.common) + c.PulpAnsibleDefaultApiV3ArtifactsCollectionsAPI = (*PulpAnsibleDefaultApiV3ArtifactsCollectionsAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3CollectionVersionsAllAPI = (*PulpAnsibleDefaultApiV3CollectionVersionsAllAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3CollectionsAPI = (*PulpAnsibleDefaultApiV3CollectionsAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3CollectionsAllAPI = (*PulpAnsibleDefaultApiV3CollectionsAllAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3CollectionsVersionsAPI = (*PulpAnsibleDefaultApiV3CollectionsVersionsAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPI = (*PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3NamespacesAPI = (*PulpAnsibleDefaultApiV3NamespacesAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPI = (*PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPI = (*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPI = (*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPI = (*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPI = (*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPI = (*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPI = (*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPI = (*PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPI = (*PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesAPIService)(&c.common) + c.PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPI = (*PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsAPIService)(&c.common) + c.PulpAnsibleTagsAPI = (*PulpAnsibleTagsAPIService)(&c.common) + c.PulpContainerNamespacesAPI = (*PulpContainerNamespacesAPIService)(&c.common) + c.PulpMavenAPI = (*PulpMavenAPIService)(&c.common) + c.PypiAPI = (*PypiAPIService)(&c.common) + c.PypiLegacyAPI = (*PypiLegacyAPIService)(&c.common) + c.PypiMetadataAPI = (*PypiMetadataAPIService)(&c.common) + c.PypiSimpleAPI = (*PypiSimpleAPIService)(&c.common) + c.RemotesAPI = (*RemotesAPIService)(&c.common) + c.RemotesAptAPI = (*RemotesAptAPIService)(&c.common) + c.RemotesCollectionAPI = (*RemotesCollectionAPIService)(&c.common) + c.RemotesContainerAPI = (*RemotesContainerAPIService)(&c.common) + c.RemotesFileAPI = (*RemotesFileAPIService)(&c.common) + c.RemotesGemAPI = (*RemotesGemAPIService)(&c.common) + c.RemotesGitAPI = (*RemotesGitAPIService)(&c.common) + c.RemotesMavenAPI = (*RemotesMavenAPIService)(&c.common) + c.RemotesOstreeAPI = (*RemotesOstreeAPIService)(&c.common) + c.RemotesPythonAPI = (*RemotesPythonAPIService)(&c.common) + c.RemotesRoleAPI = (*RemotesRoleAPIService)(&c.common) + c.RemotesRpmAPI = (*RemotesRpmAPIService)(&c.common) + c.RemotesUlnAPI = (*RemotesUlnAPIService)(&c.common) + c.RepairAPI = (*RepairAPIService)(&c.common) + c.RepositoriesAPI = (*RepositoriesAPIService)(&c.common) + c.RepositoriesAnsibleAPI = (*RepositoriesAnsibleAPIService)(&c.common) + c.RepositoriesAnsibleVersionsAPI = (*RepositoriesAnsibleVersionsAPIService)(&c.common) + c.RepositoriesAptAPI = (*RepositoriesAptAPIService)(&c.common) + c.RepositoriesAptVersionsAPI = (*RepositoriesAptVersionsAPIService)(&c.common) + c.RepositoriesContainerAPI = (*RepositoriesContainerAPIService)(&c.common) + c.RepositoriesContainerPushAPI = (*RepositoriesContainerPushAPIService)(&c.common) + c.RepositoriesContainerPushVersionsAPI = (*RepositoriesContainerPushVersionsAPIService)(&c.common) + c.RepositoriesContainerVersionsAPI = (*RepositoriesContainerVersionsAPIService)(&c.common) + c.RepositoriesFileAPI = (*RepositoriesFileAPIService)(&c.common) + c.RepositoriesFileVersionsAPI = (*RepositoriesFileVersionsAPIService)(&c.common) + c.RepositoriesGemAPI = (*RepositoriesGemAPIService)(&c.common) + c.RepositoriesGemVersionsAPI = (*RepositoriesGemVersionsAPIService)(&c.common) + c.RepositoriesMavenAPI = (*RepositoriesMavenAPIService)(&c.common) + c.RepositoriesMavenVersionsAPI = (*RepositoriesMavenVersionsAPIService)(&c.common) + c.RepositoriesOstreeAPI = (*RepositoriesOstreeAPIService)(&c.common) + c.RepositoriesOstreeVersionsAPI = (*RepositoriesOstreeVersionsAPIService)(&c.common) + c.RepositoriesPythonAPI = (*RepositoriesPythonAPIService)(&c.common) + c.RepositoriesPythonVersionsAPI = (*RepositoriesPythonVersionsAPIService)(&c.common) + c.RepositoriesReclaimSpaceAPI = (*RepositoriesReclaimSpaceAPIService)(&c.common) + c.RepositoriesRpmAPI = (*RepositoriesRpmAPIService)(&c.common) + c.RepositoriesRpmVersionsAPI = (*RepositoriesRpmVersionsAPIService)(&c.common) + c.RepositoryVersionsAPI = (*RepositoryVersionsAPIService)(&c.common) + c.RolesAPI = (*RolesAPIService)(&c.common) + c.RpmCompsAPI = (*RpmCompsAPIService)(&c.common) + c.RpmCopyAPI = (*RpmCopyAPIService)(&c.common) + c.SigningServicesAPI = (*SigningServicesAPIService)(&c.common) + c.StatusAPI = (*StatusAPIService)(&c.common) + c.TaskGroupsAPI = (*TaskGroupsAPIService)(&c.common) + c.TaskSchedulesAPI = (*TaskSchedulesAPIService)(&c.common) + c.TasksAPI = (*TasksAPIService)(&c.common) + c.TokenAPI = (*TokenAPIService)(&c.common) + c.UploadsAPI = (*UploadsAPIService)(&c.common) + c.UpstreamPulpsAPI = (*UpstreamPulpsAPIService)(&c.common) + c.UsersAPI = (*UsersAPIService)(&c.common) + c.UsersRolesAPI = (*UsersRolesAPIService)(&c.common) + c.VersionsAPI = (*VersionsAPIService)(&c.common) + c.WorkersAPI = (*WorkersAPIService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString( obj interface{}, key string ) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t,ok := obj.(MappedNullable); ok { + dataMap,err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i:=0;i 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() + if err != nil { + return err + } + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/configuration.go b/vendor/github.com/osbuild/pulp-client/pulpclient/configuration.go new file mode 100644 index 0000000000..9468aa1ef3 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/configuration.go @@ -0,0 +1,222 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") + + // ContextServerIndex uses a server configuration from the index. + ContextServerIndex = contextKey("serverIndex") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "http://localhost:8080", + Description: "No description provided", + }, + }, + OperationServers: map[string]ServerConfigurations{ + }, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_access_policy.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_access_policy.go new file mode 100644 index 0000000000..9ec2b6b856 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_access_policy.go @@ -0,0 +1,258 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AccessPolicy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccessPolicy{} + +// AccessPolicy Serializer for AccessPolicy. +type AccessPolicy struct { + // List of callables that define the new permissions to be created for new objects.This is deprecated. Use `creation_hooks` instead. + PermissionsAssignment []map[string]interface{} `json:"permissions_assignment,omitempty"` + // List of callables that may associate user roles for new objects. + CreationHooks []map[string]interface{} `json:"creation_hooks,omitempty"` + // List of policy statements defining the policy. + Statements []map[string]interface{} `json:"statements"` + // A callable for performing queryset scoping. See plugin documentation for valid callables. Set to blank to turn off queryset scoping. + QuerysetScoping map[string]interface{} `json:"queryset_scoping,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AccessPolicy AccessPolicy + +// NewAccessPolicy instantiates a new AccessPolicy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAccessPolicy(statements []map[string]interface{}) *AccessPolicy { + this := AccessPolicy{} + this.Statements = statements + return &this +} + +// NewAccessPolicyWithDefaults instantiates a new AccessPolicy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAccessPolicyWithDefaults() *AccessPolicy { + this := AccessPolicy{} + return &this +} + +// GetPermissionsAssignment returns the PermissionsAssignment field value if set, zero value otherwise. +func (o *AccessPolicy) GetPermissionsAssignment() []map[string]interface{} { + if o == nil || IsNil(o.PermissionsAssignment) { + var ret []map[string]interface{} + return ret + } + return o.PermissionsAssignment +} + +// GetPermissionsAssignmentOk returns a tuple with the PermissionsAssignment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessPolicy) GetPermissionsAssignmentOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.PermissionsAssignment) { + return nil, false + } + return o.PermissionsAssignment, true +} + +// HasPermissionsAssignment returns a boolean if a field has been set. +func (o *AccessPolicy) HasPermissionsAssignment() bool { + if o != nil && !IsNil(o.PermissionsAssignment) { + return true + } + + return false +} + +// SetPermissionsAssignment gets a reference to the given []map[string]interface{} and assigns it to the PermissionsAssignment field. +func (o *AccessPolicy) SetPermissionsAssignment(v []map[string]interface{}) { + o.PermissionsAssignment = v +} + +// GetCreationHooks returns the CreationHooks field value if set, zero value otherwise. +func (o *AccessPolicy) GetCreationHooks() []map[string]interface{} { + if o == nil || IsNil(o.CreationHooks) { + var ret []map[string]interface{} + return ret + } + return o.CreationHooks +} + +// GetCreationHooksOk returns a tuple with the CreationHooks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessPolicy) GetCreationHooksOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.CreationHooks) { + return nil, false + } + return o.CreationHooks, true +} + +// HasCreationHooks returns a boolean if a field has been set. +func (o *AccessPolicy) HasCreationHooks() bool { + if o != nil && !IsNil(o.CreationHooks) { + return true + } + + return false +} + +// SetCreationHooks gets a reference to the given []map[string]interface{} and assigns it to the CreationHooks field. +func (o *AccessPolicy) SetCreationHooks(v []map[string]interface{}) { + o.CreationHooks = v +} + +// GetStatements returns the Statements field value +func (o *AccessPolicy) GetStatements() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Statements +} + +// GetStatementsOk returns a tuple with the Statements field value +// and a boolean to check if the value has been set. +func (o *AccessPolicy) GetStatementsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Statements, true +} + +// SetStatements sets field value +func (o *AccessPolicy) SetStatements(v []map[string]interface{}) { + o.Statements = v +} + +// GetQuerysetScoping returns the QuerysetScoping field value if set, zero value otherwise. +func (o *AccessPolicy) GetQuerysetScoping() map[string]interface{} { + if o == nil || IsNil(o.QuerysetScoping) { + var ret map[string]interface{} + return ret + } + return o.QuerysetScoping +} + +// GetQuerysetScopingOk returns a tuple with the QuerysetScoping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessPolicy) GetQuerysetScopingOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.QuerysetScoping) { + return map[string]interface{}{}, false + } + return o.QuerysetScoping, true +} + +// HasQuerysetScoping returns a boolean if a field has been set. +func (o *AccessPolicy) HasQuerysetScoping() bool { + if o != nil && !IsNil(o.QuerysetScoping) { + return true + } + + return false +} + +// SetQuerysetScoping gets a reference to the given map[string]interface{} and assigns it to the QuerysetScoping field. +func (o *AccessPolicy) SetQuerysetScoping(v map[string]interface{}) { + o.QuerysetScoping = v +} + +func (o AccessPolicy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccessPolicy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PermissionsAssignment) { + toSerialize["permissions_assignment"] = o.PermissionsAssignment + } + if !IsNil(o.CreationHooks) { + toSerialize["creation_hooks"] = o.CreationHooks + } + toSerialize["statements"] = o.Statements + if !IsNil(o.QuerysetScoping) { + toSerialize["queryset_scoping"] = o.QuerysetScoping + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AccessPolicy) UnmarshalJSON(bytes []byte) (err error) { + varAccessPolicy := _AccessPolicy{} + + if err = json.Unmarshal(bytes, &varAccessPolicy); err == nil { + *o = AccessPolicy(varAccessPolicy) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "permissions_assignment") + delete(additionalProperties, "creation_hooks") + delete(additionalProperties, "statements") + delete(additionalProperties, "queryset_scoping") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAccessPolicy struct { + value *AccessPolicy + isSet bool +} + +func (v NullableAccessPolicy) Get() *AccessPolicy { + return v.value +} + +func (v *NullableAccessPolicy) Set(val *AccessPolicy) { + v.value = val + v.isSet = true +} + +func (v NullableAccessPolicy) IsSet() bool { + return v.isSet +} + +func (v *NullableAccessPolicy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccessPolicy(val *AccessPolicy) *NullableAccessPolicy { + return &NullableAccessPolicy{value: val, isSet: true} +} + +func (v NullableAccessPolicy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccessPolicy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_access_policy_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_access_policy_response.go new file mode 100644 index 0000000000..2d50baf055 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_access_policy_response.go @@ -0,0 +1,410 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the AccessPolicyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccessPolicyResponse{} + +// AccessPolicyResponse Serializer for AccessPolicy. +type AccessPolicyResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // List of callables that define the new permissions to be created for new objects.This is deprecated. Use `creation_hooks` instead. + PermissionsAssignment []map[string]interface{} `json:"permissions_assignment,omitempty"` + // List of callables that may associate user roles for new objects. + CreationHooks []map[string]interface{} `json:"creation_hooks,omitempty"` + // List of policy statements defining the policy. + Statements []map[string]interface{} `json:"statements"` + // The name of ViewSet this AccessPolicy authorizes. + ViewsetName *string `json:"viewset_name,omitempty"` + // True if the AccessPolicy has been user-modified. False otherwise. + Customized *bool `json:"customized,omitempty"` + // A callable for performing queryset scoping. See plugin documentation for valid callables. Set to blank to turn off queryset scoping. + QuerysetScoping map[string]interface{} `json:"queryset_scoping,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AccessPolicyResponse AccessPolicyResponse + +// NewAccessPolicyResponse instantiates a new AccessPolicyResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAccessPolicyResponse(statements []map[string]interface{}) *AccessPolicyResponse { + this := AccessPolicyResponse{} + this.Statements = statements + return &this +} + +// NewAccessPolicyResponseWithDefaults instantiates a new AccessPolicyResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAccessPolicyResponseWithDefaults() *AccessPolicyResponse { + this := AccessPolicyResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *AccessPolicyResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessPolicyResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *AccessPolicyResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *AccessPolicyResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *AccessPolicyResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessPolicyResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *AccessPolicyResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *AccessPolicyResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetPermissionsAssignment returns the PermissionsAssignment field value if set, zero value otherwise. +func (o *AccessPolicyResponse) GetPermissionsAssignment() []map[string]interface{} { + if o == nil || IsNil(o.PermissionsAssignment) { + var ret []map[string]interface{} + return ret + } + return o.PermissionsAssignment +} + +// GetPermissionsAssignmentOk returns a tuple with the PermissionsAssignment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessPolicyResponse) GetPermissionsAssignmentOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.PermissionsAssignment) { + return nil, false + } + return o.PermissionsAssignment, true +} + +// HasPermissionsAssignment returns a boolean if a field has been set. +func (o *AccessPolicyResponse) HasPermissionsAssignment() bool { + if o != nil && !IsNil(o.PermissionsAssignment) { + return true + } + + return false +} + +// SetPermissionsAssignment gets a reference to the given []map[string]interface{} and assigns it to the PermissionsAssignment field. +func (o *AccessPolicyResponse) SetPermissionsAssignment(v []map[string]interface{}) { + o.PermissionsAssignment = v +} + +// GetCreationHooks returns the CreationHooks field value if set, zero value otherwise. +func (o *AccessPolicyResponse) GetCreationHooks() []map[string]interface{} { + if o == nil || IsNil(o.CreationHooks) { + var ret []map[string]interface{} + return ret + } + return o.CreationHooks +} + +// GetCreationHooksOk returns a tuple with the CreationHooks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessPolicyResponse) GetCreationHooksOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.CreationHooks) { + return nil, false + } + return o.CreationHooks, true +} + +// HasCreationHooks returns a boolean if a field has been set. +func (o *AccessPolicyResponse) HasCreationHooks() bool { + if o != nil && !IsNil(o.CreationHooks) { + return true + } + + return false +} + +// SetCreationHooks gets a reference to the given []map[string]interface{} and assigns it to the CreationHooks field. +func (o *AccessPolicyResponse) SetCreationHooks(v []map[string]interface{}) { + o.CreationHooks = v +} + +// GetStatements returns the Statements field value +func (o *AccessPolicyResponse) GetStatements() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Statements +} + +// GetStatementsOk returns a tuple with the Statements field value +// and a boolean to check if the value has been set. +func (o *AccessPolicyResponse) GetStatementsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Statements, true +} + +// SetStatements sets field value +func (o *AccessPolicyResponse) SetStatements(v []map[string]interface{}) { + o.Statements = v +} + +// GetViewsetName returns the ViewsetName field value if set, zero value otherwise. +func (o *AccessPolicyResponse) GetViewsetName() string { + if o == nil || IsNil(o.ViewsetName) { + var ret string + return ret + } + return *o.ViewsetName +} + +// GetViewsetNameOk returns a tuple with the ViewsetName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessPolicyResponse) GetViewsetNameOk() (*string, bool) { + if o == nil || IsNil(o.ViewsetName) { + return nil, false + } + return o.ViewsetName, true +} + +// HasViewsetName returns a boolean if a field has been set. +func (o *AccessPolicyResponse) HasViewsetName() bool { + if o != nil && !IsNil(o.ViewsetName) { + return true + } + + return false +} + +// SetViewsetName gets a reference to the given string and assigns it to the ViewsetName field. +func (o *AccessPolicyResponse) SetViewsetName(v string) { + o.ViewsetName = &v +} + +// GetCustomized returns the Customized field value if set, zero value otherwise. +func (o *AccessPolicyResponse) GetCustomized() bool { + if o == nil || IsNil(o.Customized) { + var ret bool + return ret + } + return *o.Customized +} + +// GetCustomizedOk returns a tuple with the Customized field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessPolicyResponse) GetCustomizedOk() (*bool, bool) { + if o == nil || IsNil(o.Customized) { + return nil, false + } + return o.Customized, true +} + +// HasCustomized returns a boolean if a field has been set. +func (o *AccessPolicyResponse) HasCustomized() bool { + if o != nil && !IsNil(o.Customized) { + return true + } + + return false +} + +// SetCustomized gets a reference to the given bool and assigns it to the Customized field. +func (o *AccessPolicyResponse) SetCustomized(v bool) { + o.Customized = &v +} + +// GetQuerysetScoping returns the QuerysetScoping field value if set, zero value otherwise. +func (o *AccessPolicyResponse) GetQuerysetScoping() map[string]interface{} { + if o == nil || IsNil(o.QuerysetScoping) { + var ret map[string]interface{} + return ret + } + return o.QuerysetScoping +} + +// GetQuerysetScopingOk returns a tuple with the QuerysetScoping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccessPolicyResponse) GetQuerysetScopingOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.QuerysetScoping) { + return map[string]interface{}{}, false + } + return o.QuerysetScoping, true +} + +// HasQuerysetScoping returns a boolean if a field has been set. +func (o *AccessPolicyResponse) HasQuerysetScoping() bool { + if o != nil && !IsNil(o.QuerysetScoping) { + return true + } + + return false +} + +// SetQuerysetScoping gets a reference to the given map[string]interface{} and assigns it to the QuerysetScoping field. +func (o *AccessPolicyResponse) SetQuerysetScoping(v map[string]interface{}) { + o.QuerysetScoping = v +} + +func (o AccessPolicyResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccessPolicyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.PermissionsAssignment) { + toSerialize["permissions_assignment"] = o.PermissionsAssignment + } + if !IsNil(o.CreationHooks) { + toSerialize["creation_hooks"] = o.CreationHooks + } + toSerialize["statements"] = o.Statements + if !IsNil(o.ViewsetName) { + toSerialize["viewset_name"] = o.ViewsetName + } + if !IsNil(o.Customized) { + toSerialize["customized"] = o.Customized + } + if !IsNil(o.QuerysetScoping) { + toSerialize["queryset_scoping"] = o.QuerysetScoping + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AccessPolicyResponse) UnmarshalJSON(bytes []byte) (err error) { + varAccessPolicyResponse := _AccessPolicyResponse{} + + if err = json.Unmarshal(bytes, &varAccessPolicyResponse); err == nil { + *o = AccessPolicyResponse(varAccessPolicyResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "permissions_assignment") + delete(additionalProperties, "creation_hooks") + delete(additionalProperties, "statements") + delete(additionalProperties, "viewset_name") + delete(additionalProperties, "customized") + delete(additionalProperties, "queryset_scoping") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAccessPolicyResponse struct { + value *AccessPolicyResponse + isSet bool +} + +func (v NullableAccessPolicyResponse) Get() *AccessPolicyResponse { + return v.value +} + +func (v *NullableAccessPolicyResponse) Set(val *AccessPolicyResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAccessPolicyResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAccessPolicyResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccessPolicyResponse(val *AccessPolicyResponse) *NullableAccessPolicyResponse { + return &NullableAccessPolicyResponse{value: val, isSet: true} +} + +func (v NullableAccessPolicyResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccessPolicyResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_addon_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_addon_response.go new file mode 100644 index 0000000000..99b3e985f2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_addon_response.go @@ -0,0 +1,260 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AddonResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddonResponse{} + +// AddonResponse Addon serializer. +type AddonResponse struct { + // Addon id. + AddonId string `json:"addon_id"` + // Addon uid. + Uid string `json:"uid"` + // Addon name. + Name string `json:"name"` + // Addon type. + Type string `json:"type"` + // Relative path to directory with binary RPMs. + Packages string `json:"packages"` + AdditionalProperties map[string]interface{} +} + +type _AddonResponse AddonResponse + +// NewAddonResponse instantiates a new AddonResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddonResponse(addonId string, uid string, name string, type_ string, packages string) *AddonResponse { + this := AddonResponse{} + this.AddonId = addonId + this.Uid = uid + this.Name = name + this.Type = type_ + this.Packages = packages + return &this +} + +// NewAddonResponseWithDefaults instantiates a new AddonResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddonResponseWithDefaults() *AddonResponse { + this := AddonResponse{} + return &this +} + +// GetAddonId returns the AddonId field value +func (o *AddonResponse) GetAddonId() string { + if o == nil { + var ret string + return ret + } + + return o.AddonId +} + +// GetAddonIdOk returns a tuple with the AddonId field value +// and a boolean to check if the value has been set. +func (o *AddonResponse) GetAddonIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AddonId, true +} + +// SetAddonId sets field value +func (o *AddonResponse) SetAddonId(v string) { + o.AddonId = v +} + +// GetUid returns the Uid field value +func (o *AddonResponse) GetUid() string { + if o == nil { + var ret string + return ret + } + + return o.Uid +} + +// GetUidOk returns a tuple with the Uid field value +// and a boolean to check if the value has been set. +func (o *AddonResponse) GetUidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Uid, true +} + +// SetUid sets field value +func (o *AddonResponse) SetUid(v string) { + o.Uid = v +} + +// GetName returns the Name field value +func (o *AddonResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AddonResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AddonResponse) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *AddonResponse) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *AddonResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AddonResponse) SetType(v string) { + o.Type = v +} + +// GetPackages returns the Packages field value +func (o *AddonResponse) GetPackages() string { + if o == nil { + var ret string + return ret + } + + return o.Packages +} + +// GetPackagesOk returns a tuple with the Packages field value +// and a boolean to check if the value has been set. +func (o *AddonResponse) GetPackagesOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Packages, true +} + +// SetPackages sets field value +func (o *AddonResponse) SetPackages(v string) { + o.Packages = v +} + +func (o AddonResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddonResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["addon_id"] = o.AddonId + toSerialize["uid"] = o.Uid + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + toSerialize["packages"] = o.Packages + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AddonResponse) UnmarshalJSON(bytes []byte) (err error) { + varAddonResponse := _AddonResponse{} + + if err = json.Unmarshal(bytes, &varAddonResponse); err == nil { + *o = AddonResponse(varAddonResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "addon_id") + delete(additionalProperties, "uid") + delete(additionalProperties, "name") + delete(additionalProperties, "type") + delete(additionalProperties, "packages") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAddonResponse struct { + value *AddonResponse + isSet bool +} + +func (v NullableAddonResponse) Get() *AddonResponse { + return v.value +} + +func (v *NullableAddonResponse) Set(val *AddonResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAddonResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAddonResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddonResponse(val *AddonResponse) *NullableAddonResponse { + return &NullableAddonResponse{value: val, isSet: true} +} + +func (v NullableAddonResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddonResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_distribution.go new file mode 100644 index 0000000000..7c1602bb22 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_distribution.go @@ -0,0 +1,354 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleAnsibleDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleAnsibleDistribution{} + +// AnsibleAnsibleDistribution Serializer for Ansible Distributions. +type AnsibleAnsibleDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // RepositoryVersion to be served + RepositoryVersion NullableString `json:"repository_version,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleAnsibleDistribution AnsibleAnsibleDistribution + +// NewAnsibleAnsibleDistribution instantiates a new AnsibleAnsibleDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleAnsibleDistribution(basePath string, name string) *AnsibleAnsibleDistribution { + this := AnsibleAnsibleDistribution{} + this.BasePath = basePath + this.Name = name + return &this +} + +// NewAnsibleAnsibleDistributionWithDefaults instantiates a new AnsibleAnsibleDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleAnsibleDistributionWithDefaults() *AnsibleAnsibleDistribution { + this := AnsibleAnsibleDistribution{} + return &this +} + +// GetBasePath returns the BasePath field value +func (o *AnsibleAnsibleDistribution) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleDistribution) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *AnsibleAnsibleDistribution) SetBasePath(v string) { + o.BasePath = v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *AnsibleAnsibleDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *AnsibleAnsibleDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *AnsibleAnsibleDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *AnsibleAnsibleDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetName returns the Name field value +func (o *AnsibleAnsibleDistribution) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleDistribution) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleAnsibleDistribution) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *AnsibleAnsibleDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *AnsibleAnsibleDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *AnsibleAnsibleDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *AnsibleAnsibleDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleDistribution) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion.Get()) { + var ret string + return ret + } + return *o.RepositoryVersion.Get() +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleDistribution) GetRepositoryVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RepositoryVersion.Get(), o.RepositoryVersion.IsSet() +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *AnsibleAnsibleDistribution) HasRepositoryVersion() bool { + if o != nil && o.RepositoryVersion.IsSet() { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given NullableString and assigns it to the RepositoryVersion field. +func (o *AnsibleAnsibleDistribution) SetRepositoryVersion(v string) { + o.RepositoryVersion.Set(&v) +} +// SetRepositoryVersionNil sets the value for RepositoryVersion to be an explicit nil +func (o *AnsibleAnsibleDistribution) SetRepositoryVersionNil() { + o.RepositoryVersion.Set(nil) +} + +// UnsetRepositoryVersion ensures that no value is present for RepositoryVersion, not even an explicit nil +func (o *AnsibleAnsibleDistribution) UnsetRepositoryVersion() { + o.RepositoryVersion.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *AnsibleAnsibleDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *AnsibleAnsibleDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *AnsibleAnsibleDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +func (o AnsibleAnsibleDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleAnsibleDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["base_path"] = o.BasePath + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.RepositoryVersion.IsSet() { + toSerialize["repository_version"] = o.RepositoryVersion.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleAnsibleDistribution) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleAnsibleDistribution := _AnsibleAnsibleDistribution{} + + if err = json.Unmarshal(bytes, &varAnsibleAnsibleDistribution); err == nil { + *o = AnsibleAnsibleDistribution(varAnsibleAnsibleDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "pulp_labels") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleAnsibleDistribution struct { + value *AnsibleAnsibleDistribution + isSet bool +} + +func (v NullableAnsibleAnsibleDistribution) Get() *AnsibleAnsibleDistribution { + return v.value +} + +func (v *NullableAnsibleAnsibleDistribution) Set(val *AnsibleAnsibleDistribution) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleAnsibleDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleAnsibleDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleAnsibleDistribution(val *AnsibleAnsibleDistribution) *NullableAnsibleAnsibleDistribution { + return &NullableAnsibleAnsibleDistribution{value: val, isSet: true} +} + +func (v NullableAnsibleAnsibleDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleAnsibleDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_distribution_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_distribution_response.go new file mode 100644 index 0000000000..910de7dadc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_distribution_response.go @@ -0,0 +1,468 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the AnsibleAnsibleDistributionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleAnsibleDistributionResponse{} + +// AnsibleAnsibleDistributionResponse Serializer for Ansible Distributions. +type AnsibleAnsibleDistributionResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // RepositoryVersion to be served + RepositoryVersion NullableString `json:"repository_version,omitempty"` + // The URL of a Collection content source. + ClientUrl *string `json:"client_url,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleAnsibleDistributionResponse AnsibleAnsibleDistributionResponse + +// NewAnsibleAnsibleDistributionResponse instantiates a new AnsibleAnsibleDistributionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleAnsibleDistributionResponse(basePath string, name string) *AnsibleAnsibleDistributionResponse { + this := AnsibleAnsibleDistributionResponse{} + this.BasePath = basePath + this.Name = name + return &this +} + +// NewAnsibleAnsibleDistributionResponseWithDefaults instantiates a new AnsibleAnsibleDistributionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleAnsibleDistributionResponseWithDefaults() *AnsibleAnsibleDistributionResponse { + this := AnsibleAnsibleDistributionResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *AnsibleAnsibleDistributionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleDistributionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *AnsibleAnsibleDistributionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *AnsibleAnsibleDistributionResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *AnsibleAnsibleDistributionResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleDistributionResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *AnsibleAnsibleDistributionResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *AnsibleAnsibleDistributionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetBasePath returns the BasePath field value +func (o *AnsibleAnsibleDistributionResponse) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleDistributionResponse) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *AnsibleAnsibleDistributionResponse) SetBasePath(v string) { + o.BasePath = v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleDistributionResponse) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleDistributionResponse) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *AnsibleAnsibleDistributionResponse) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *AnsibleAnsibleDistributionResponse) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *AnsibleAnsibleDistributionResponse) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *AnsibleAnsibleDistributionResponse) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetName returns the Name field value +func (o *AnsibleAnsibleDistributionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleDistributionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleAnsibleDistributionResponse) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleDistributionResponse) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleDistributionResponse) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *AnsibleAnsibleDistributionResponse) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *AnsibleAnsibleDistributionResponse) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *AnsibleAnsibleDistributionResponse) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *AnsibleAnsibleDistributionResponse) UnsetRepository() { + o.Repository.Unset() +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleDistributionResponse) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion.Get()) { + var ret string + return ret + } + return *o.RepositoryVersion.Get() +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleDistributionResponse) GetRepositoryVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RepositoryVersion.Get(), o.RepositoryVersion.IsSet() +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *AnsibleAnsibleDistributionResponse) HasRepositoryVersion() bool { + if o != nil && o.RepositoryVersion.IsSet() { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given NullableString and assigns it to the RepositoryVersion field. +func (o *AnsibleAnsibleDistributionResponse) SetRepositoryVersion(v string) { + o.RepositoryVersion.Set(&v) +} +// SetRepositoryVersionNil sets the value for RepositoryVersion to be an explicit nil +func (o *AnsibleAnsibleDistributionResponse) SetRepositoryVersionNil() { + o.RepositoryVersion.Set(nil) +} + +// UnsetRepositoryVersion ensures that no value is present for RepositoryVersion, not even an explicit nil +func (o *AnsibleAnsibleDistributionResponse) UnsetRepositoryVersion() { + o.RepositoryVersion.Unset() +} + +// GetClientUrl returns the ClientUrl field value if set, zero value otherwise. +func (o *AnsibleAnsibleDistributionResponse) GetClientUrl() string { + if o == nil || IsNil(o.ClientUrl) { + var ret string + return ret + } + return *o.ClientUrl +} + +// GetClientUrlOk returns a tuple with the ClientUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleDistributionResponse) GetClientUrlOk() (*string, bool) { + if o == nil || IsNil(o.ClientUrl) { + return nil, false + } + return o.ClientUrl, true +} + +// HasClientUrl returns a boolean if a field has been set. +func (o *AnsibleAnsibleDistributionResponse) HasClientUrl() bool { + if o != nil && !IsNil(o.ClientUrl) { + return true + } + + return false +} + +// SetClientUrl gets a reference to the given string and assigns it to the ClientUrl field. +func (o *AnsibleAnsibleDistributionResponse) SetClientUrl(v string) { + o.ClientUrl = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *AnsibleAnsibleDistributionResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *AnsibleAnsibleDistributionResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *AnsibleAnsibleDistributionResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +func (o AnsibleAnsibleDistributionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleAnsibleDistributionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["base_path"] = o.BasePath + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.RepositoryVersion.IsSet() { + toSerialize["repository_version"] = o.RepositoryVersion.Get() + } + if !IsNil(o.ClientUrl) { + toSerialize["client_url"] = o.ClientUrl + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleAnsibleDistributionResponse) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleAnsibleDistributionResponse := _AnsibleAnsibleDistributionResponse{} + + if err = json.Unmarshal(bytes, &varAnsibleAnsibleDistributionResponse); err == nil { + *o = AnsibleAnsibleDistributionResponse(varAnsibleAnsibleDistributionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "client_url") + delete(additionalProperties, "pulp_labels") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleAnsibleDistributionResponse struct { + value *AnsibleAnsibleDistributionResponse + isSet bool +} + +func (v NullableAnsibleAnsibleDistributionResponse) Get() *AnsibleAnsibleDistributionResponse { + return v.value +} + +func (v *NullableAnsibleAnsibleDistributionResponse) Set(val *AnsibleAnsibleDistributionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleAnsibleDistributionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleAnsibleDistributionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleAnsibleDistributionResponse(val *AnsibleAnsibleDistributionResponse) *NullableAnsibleAnsibleDistributionResponse { + return &NullableAnsibleAnsibleDistributionResponse{value: val, isSet: true} +} + +func (v NullableAnsibleAnsibleDistributionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleAnsibleDistributionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_namespace_metadata.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_namespace_metadata.go new file mode 100644 index 0000000000..2914e247c7 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_namespace_metadata.go @@ -0,0 +1,373 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the AnsibleAnsibleNamespaceMetadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleAnsibleNamespaceMetadata{} + +// AnsibleAnsibleNamespaceMetadata A serializer for Namespaces. +type AnsibleAnsibleNamespaceMetadata struct { + // Required named, only accepts lowercase, numbers and underscores. + Name string `json:"name"` + // Optional namespace company owner. + Company *string `json:"company,omitempty"` + // Optional namespace contact email. + Email *string `json:"email,omitempty"` + // Optional short description. + Description *string `json:"description,omitempty"` + // Optional resource page in markdown format. + Resources *string `json:"resources,omitempty"` + // Labeled related links. + Links []NamespaceLink `json:"links,omitempty"` + // Optional avatar image for Namespace + Avatar **os.File `json:"avatar,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleAnsibleNamespaceMetadata AnsibleAnsibleNamespaceMetadata + +// NewAnsibleAnsibleNamespaceMetadata instantiates a new AnsibleAnsibleNamespaceMetadata object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleAnsibleNamespaceMetadata(name string) *AnsibleAnsibleNamespaceMetadata { + this := AnsibleAnsibleNamespaceMetadata{} + this.Name = name + return &this +} + +// NewAnsibleAnsibleNamespaceMetadataWithDefaults instantiates a new AnsibleAnsibleNamespaceMetadata object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleAnsibleNamespaceMetadataWithDefaults() *AnsibleAnsibleNamespaceMetadata { + this := AnsibleAnsibleNamespaceMetadata{} + return &this +} + +// GetName returns the Name field value +func (o *AnsibleAnsibleNamespaceMetadata) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadata) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleAnsibleNamespaceMetadata) SetName(v string) { + o.Name = v +} + +// GetCompany returns the Company field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadata) GetCompany() string { + if o == nil || IsNil(o.Company) { + var ret string + return ret + } + return *o.Company +} + +// GetCompanyOk returns a tuple with the Company field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadata) GetCompanyOk() (*string, bool) { + if o == nil || IsNil(o.Company) { + return nil, false + } + return o.Company, true +} + +// HasCompany returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadata) HasCompany() bool { + if o != nil && !IsNil(o.Company) { + return true + } + + return false +} + +// SetCompany gets a reference to the given string and assigns it to the Company field. +func (o *AnsibleAnsibleNamespaceMetadata) SetCompany(v string) { + o.Company = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadata) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadata) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadata) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *AnsibleAnsibleNamespaceMetadata) SetEmail(v string) { + o.Email = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadata) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadata) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadata) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *AnsibleAnsibleNamespaceMetadata) SetDescription(v string) { + o.Description = &v +} + +// GetResources returns the Resources field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadata) GetResources() string { + if o == nil || IsNil(o.Resources) { + var ret string + return ret + } + return *o.Resources +} + +// GetResourcesOk returns a tuple with the Resources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadata) GetResourcesOk() (*string, bool) { + if o == nil || IsNil(o.Resources) { + return nil, false + } + return o.Resources, true +} + +// HasResources returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadata) HasResources() bool { + if o != nil && !IsNil(o.Resources) { + return true + } + + return false +} + +// SetResources gets a reference to the given string and assigns it to the Resources field. +func (o *AnsibleAnsibleNamespaceMetadata) SetResources(v string) { + o.Resources = &v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadata) GetLinks() []NamespaceLink { + if o == nil || IsNil(o.Links) { + var ret []NamespaceLink + return ret + } + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadata) GetLinksOk() ([]NamespaceLink, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadata) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given []NamespaceLink and assigns it to the Links field. +func (o *AnsibleAnsibleNamespaceMetadata) SetLinks(v []NamespaceLink) { + o.Links = v +} + +// GetAvatar returns the Avatar field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadata) GetAvatar() *os.File { + if o == nil || IsNil(o.Avatar) { + var ret *os.File + return ret + } + return *o.Avatar +} + +// GetAvatarOk returns a tuple with the Avatar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadata) GetAvatarOk() (**os.File, bool) { + if o == nil || IsNil(o.Avatar) { + return nil, false + } + return o.Avatar, true +} + +// HasAvatar returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadata) HasAvatar() bool { + if o != nil && !IsNil(o.Avatar) { + return true + } + + return false +} + +// SetAvatar gets a reference to the given *os.File and assigns it to the Avatar field. +func (o *AnsibleAnsibleNamespaceMetadata) SetAvatar(v *os.File) { + o.Avatar = &v +} + +func (o AnsibleAnsibleNamespaceMetadata) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleAnsibleNamespaceMetadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Company) { + toSerialize["company"] = o.Company + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Resources) { + toSerialize["resources"] = o.Resources + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Avatar) { + toSerialize["avatar"] = o.Avatar + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleAnsibleNamespaceMetadata) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleAnsibleNamespaceMetadata := _AnsibleAnsibleNamespaceMetadata{} + + if err = json.Unmarshal(bytes, &varAnsibleAnsibleNamespaceMetadata); err == nil { + *o = AnsibleAnsibleNamespaceMetadata(varAnsibleAnsibleNamespaceMetadata) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "company") + delete(additionalProperties, "email") + delete(additionalProperties, "description") + delete(additionalProperties, "resources") + delete(additionalProperties, "links") + delete(additionalProperties, "avatar") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleAnsibleNamespaceMetadata struct { + value *AnsibleAnsibleNamespaceMetadata + isSet bool +} + +func (v NullableAnsibleAnsibleNamespaceMetadata) Get() *AnsibleAnsibleNamespaceMetadata { + return v.value +} + +func (v *NullableAnsibleAnsibleNamespaceMetadata) Set(val *AnsibleAnsibleNamespaceMetadata) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleAnsibleNamespaceMetadata) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleAnsibleNamespaceMetadata) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleAnsibleNamespaceMetadata(val *AnsibleAnsibleNamespaceMetadata) *NullableAnsibleAnsibleNamespaceMetadata { + return &NullableAnsibleAnsibleNamespaceMetadata{value: val, isSet: true} +} + +func (v NullableAnsibleAnsibleNamespaceMetadata) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleAnsibleNamespaceMetadata) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_namespace_metadata_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_namespace_metadata_response.go new file mode 100644 index 0000000000..1551385f70 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_namespace_metadata_response.go @@ -0,0 +1,484 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleAnsibleNamespaceMetadataResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleAnsibleNamespaceMetadataResponse{} + +// AnsibleAnsibleNamespaceMetadataResponse A serializer for Namespaces. +type AnsibleAnsibleNamespaceMetadataResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Required named, only accepts lowercase, numbers and underscores. + Name string `json:"name"` + // Optional namespace company owner. + Company *string `json:"company,omitempty"` + // Optional namespace contact email. + Email *string `json:"email,omitempty"` + // Optional short description. + Description *string `json:"description,omitempty"` + // Optional resource page in markdown format. + Resources *string `json:"resources,omitempty"` + // Labeled related links. + Links []NamespaceLinkResponse `json:"links,omitempty"` + // SHA256 digest of avatar image if present. + AvatarSha256 *string `json:"avatar_sha256,omitempty"` + // Download link for avatar image if present. + AvatarUrl *string `json:"avatar_url,omitempty"` + MetadataSha256 *string `json:"metadata_sha256,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleAnsibleNamespaceMetadataResponse AnsibleAnsibleNamespaceMetadataResponse + +// NewAnsibleAnsibleNamespaceMetadataResponse instantiates a new AnsibleAnsibleNamespaceMetadataResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleAnsibleNamespaceMetadataResponse(name string) *AnsibleAnsibleNamespaceMetadataResponse { + this := AnsibleAnsibleNamespaceMetadataResponse{} + this.Name = name + return &this +} + +// NewAnsibleAnsibleNamespaceMetadataResponseWithDefaults instantiates a new AnsibleAnsibleNamespaceMetadataResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleAnsibleNamespaceMetadataResponseWithDefaults() *AnsibleAnsibleNamespaceMetadataResponse { + this := AnsibleAnsibleNamespaceMetadataResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *AnsibleAnsibleNamespaceMetadataResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetName returns the Name field value +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleAnsibleNamespaceMetadataResponse) SetName(v string) { + o.Name = v +} + +// GetCompany returns the Company field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetCompany() string { + if o == nil || IsNil(o.Company) { + var ret string + return ret + } + return *o.Company +} + +// GetCompanyOk returns a tuple with the Company field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetCompanyOk() (*string, bool) { + if o == nil || IsNil(o.Company) { + return nil, false + } + return o.Company, true +} + +// HasCompany returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) HasCompany() bool { + if o != nil && !IsNil(o.Company) { + return true + } + + return false +} + +// SetCompany gets a reference to the given string and assigns it to the Company field. +func (o *AnsibleAnsibleNamespaceMetadataResponse) SetCompany(v string) { + o.Company = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *AnsibleAnsibleNamespaceMetadataResponse) SetEmail(v string) { + o.Email = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *AnsibleAnsibleNamespaceMetadataResponse) SetDescription(v string) { + o.Description = &v +} + +// GetResources returns the Resources field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetResources() string { + if o == nil || IsNil(o.Resources) { + var ret string + return ret + } + return *o.Resources +} + +// GetResourcesOk returns a tuple with the Resources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetResourcesOk() (*string, bool) { + if o == nil || IsNil(o.Resources) { + return nil, false + } + return o.Resources, true +} + +// HasResources returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) HasResources() bool { + if o != nil && !IsNil(o.Resources) { + return true + } + + return false +} + +// SetResources gets a reference to the given string and assigns it to the Resources field. +func (o *AnsibleAnsibleNamespaceMetadataResponse) SetResources(v string) { + o.Resources = &v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetLinks() []NamespaceLinkResponse { + if o == nil || IsNil(o.Links) { + var ret []NamespaceLinkResponse + return ret + } + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetLinksOk() ([]NamespaceLinkResponse, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given []NamespaceLinkResponse and assigns it to the Links field. +func (o *AnsibleAnsibleNamespaceMetadataResponse) SetLinks(v []NamespaceLinkResponse) { + o.Links = v +} + +// GetAvatarSha256 returns the AvatarSha256 field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetAvatarSha256() string { + if o == nil || IsNil(o.AvatarSha256) { + var ret string + return ret + } + return *o.AvatarSha256 +} + +// GetAvatarSha256Ok returns a tuple with the AvatarSha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetAvatarSha256Ok() (*string, bool) { + if o == nil || IsNil(o.AvatarSha256) { + return nil, false + } + return o.AvatarSha256, true +} + +// HasAvatarSha256 returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) HasAvatarSha256() bool { + if o != nil && !IsNil(o.AvatarSha256) { + return true + } + + return false +} + +// SetAvatarSha256 gets a reference to the given string and assigns it to the AvatarSha256 field. +func (o *AnsibleAnsibleNamespaceMetadataResponse) SetAvatarSha256(v string) { + o.AvatarSha256 = &v +} + +// GetAvatarUrl returns the AvatarUrl field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetAvatarUrl() string { + if o == nil || IsNil(o.AvatarUrl) { + var ret string + return ret + } + return *o.AvatarUrl +} + +// GetAvatarUrlOk returns a tuple with the AvatarUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetAvatarUrlOk() (*string, bool) { + if o == nil || IsNil(o.AvatarUrl) { + return nil, false + } + return o.AvatarUrl, true +} + +// HasAvatarUrl returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) HasAvatarUrl() bool { + if o != nil && !IsNil(o.AvatarUrl) { + return true + } + + return false +} + +// SetAvatarUrl gets a reference to the given string and assigns it to the AvatarUrl field. +func (o *AnsibleAnsibleNamespaceMetadataResponse) SetAvatarUrl(v string) { + o.AvatarUrl = &v +} + +// GetMetadataSha256 returns the MetadataSha256 field value if set, zero value otherwise. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetMetadataSha256() string { + if o == nil || IsNil(o.MetadataSha256) { + var ret string + return ret + } + return *o.MetadataSha256 +} + +// GetMetadataSha256Ok returns a tuple with the MetadataSha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) GetMetadataSha256Ok() (*string, bool) { + if o == nil || IsNil(o.MetadataSha256) { + return nil, false + } + return o.MetadataSha256, true +} + +// HasMetadataSha256 returns a boolean if a field has been set. +func (o *AnsibleAnsibleNamespaceMetadataResponse) HasMetadataSha256() bool { + if o != nil && !IsNil(o.MetadataSha256) { + return true + } + + return false +} + +// SetMetadataSha256 gets a reference to the given string and assigns it to the MetadataSha256 field. +func (o *AnsibleAnsibleNamespaceMetadataResponse) SetMetadataSha256(v string) { + o.MetadataSha256 = &v +} + +func (o AnsibleAnsibleNamespaceMetadataResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleAnsibleNamespaceMetadataResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + toSerialize["name"] = o.Name + if !IsNil(o.Company) { + toSerialize["company"] = o.Company + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Resources) { + toSerialize["resources"] = o.Resources + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.AvatarSha256) { + toSerialize["avatar_sha256"] = o.AvatarSha256 + } + if !IsNil(o.AvatarUrl) { + toSerialize["avatar_url"] = o.AvatarUrl + } + if !IsNil(o.MetadataSha256) { + toSerialize["metadata_sha256"] = o.MetadataSha256 + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleAnsibleNamespaceMetadataResponse) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleAnsibleNamespaceMetadataResponse := _AnsibleAnsibleNamespaceMetadataResponse{} + + if err = json.Unmarshal(bytes, &varAnsibleAnsibleNamespaceMetadataResponse); err == nil { + *o = AnsibleAnsibleNamespaceMetadataResponse(varAnsibleAnsibleNamespaceMetadataResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "name") + delete(additionalProperties, "company") + delete(additionalProperties, "email") + delete(additionalProperties, "description") + delete(additionalProperties, "resources") + delete(additionalProperties, "links") + delete(additionalProperties, "avatar_sha256") + delete(additionalProperties, "avatar_url") + delete(additionalProperties, "metadata_sha256") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleAnsibleNamespaceMetadataResponse struct { + value *AnsibleAnsibleNamespaceMetadataResponse + isSet bool +} + +func (v NullableAnsibleAnsibleNamespaceMetadataResponse) Get() *AnsibleAnsibleNamespaceMetadataResponse { + return v.value +} + +func (v *NullableAnsibleAnsibleNamespaceMetadataResponse) Set(val *AnsibleAnsibleNamespaceMetadataResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleAnsibleNamespaceMetadataResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleAnsibleNamespaceMetadataResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleAnsibleNamespaceMetadataResponse(val *AnsibleAnsibleNamespaceMetadataResponse) *NullableAnsibleAnsibleNamespaceMetadataResponse { + return &NullableAnsibleAnsibleNamespaceMetadataResponse{value: val, isSet: true} +} + +func (v NullableAnsibleAnsibleNamespaceMetadataResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleAnsibleNamespaceMetadataResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_repository.go new file mode 100644 index 0000000000..63a1225dc9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_repository.go @@ -0,0 +1,459 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the AnsibleAnsibleRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleAnsibleRepository{} + +// AnsibleAnsibleRepository Serializer for Ansible Repositories. +type AnsibleAnsibleRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // Last synced metadata time. + LastSyncedMetadataTime NullableTime `json:"last_synced_metadata_time,omitempty"` + // Gpg public key to verify collection signatures against + Gpgkey NullableString `json:"gpgkey,omitempty"` + Private *bool `json:"private,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleAnsibleRepository AnsibleAnsibleRepository + +// NewAnsibleAnsibleRepository instantiates a new AnsibleAnsibleRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleAnsibleRepository(name string) *AnsibleAnsibleRepository { + this := AnsibleAnsibleRepository{} + this.Name = name + return &this +} + +// NewAnsibleAnsibleRepositoryWithDefaults instantiates a new AnsibleAnsibleRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleAnsibleRepositoryWithDefaults() *AnsibleAnsibleRepository { + this := AnsibleAnsibleRepository{} + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *AnsibleAnsibleRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *AnsibleAnsibleRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *AnsibleAnsibleRepository) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleRepository) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleAnsibleRepository) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *AnsibleAnsibleRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *AnsibleAnsibleRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *AnsibleAnsibleRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *AnsibleAnsibleRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *AnsibleAnsibleRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *AnsibleAnsibleRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *AnsibleAnsibleRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *AnsibleAnsibleRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *AnsibleAnsibleRepository) UnsetRemote() { + o.Remote.Unset() +} + +// GetLastSyncedMetadataTime returns the LastSyncedMetadataTime field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleRepository) GetLastSyncedMetadataTime() time.Time { + if o == nil || IsNil(o.LastSyncedMetadataTime.Get()) { + var ret time.Time + return ret + } + return *o.LastSyncedMetadataTime.Get() +} + +// GetLastSyncedMetadataTimeOk returns a tuple with the LastSyncedMetadataTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleRepository) GetLastSyncedMetadataTimeOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastSyncedMetadataTime.Get(), o.LastSyncedMetadataTime.IsSet() +} + +// HasLastSyncedMetadataTime returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepository) HasLastSyncedMetadataTime() bool { + if o != nil && o.LastSyncedMetadataTime.IsSet() { + return true + } + + return false +} + +// SetLastSyncedMetadataTime gets a reference to the given NullableTime and assigns it to the LastSyncedMetadataTime field. +func (o *AnsibleAnsibleRepository) SetLastSyncedMetadataTime(v time.Time) { + o.LastSyncedMetadataTime.Set(&v) +} +// SetLastSyncedMetadataTimeNil sets the value for LastSyncedMetadataTime to be an explicit nil +func (o *AnsibleAnsibleRepository) SetLastSyncedMetadataTimeNil() { + o.LastSyncedMetadataTime.Set(nil) +} + +// UnsetLastSyncedMetadataTime ensures that no value is present for LastSyncedMetadataTime, not even an explicit nil +func (o *AnsibleAnsibleRepository) UnsetLastSyncedMetadataTime() { + o.LastSyncedMetadataTime.Unset() +} + +// GetGpgkey returns the Gpgkey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleRepository) GetGpgkey() string { + if o == nil || IsNil(o.Gpgkey.Get()) { + var ret string + return ret + } + return *o.Gpgkey.Get() +} + +// GetGpgkeyOk returns a tuple with the Gpgkey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleRepository) GetGpgkeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Gpgkey.Get(), o.Gpgkey.IsSet() +} + +// HasGpgkey returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepository) HasGpgkey() bool { + if o != nil && o.Gpgkey.IsSet() { + return true + } + + return false +} + +// SetGpgkey gets a reference to the given NullableString and assigns it to the Gpgkey field. +func (o *AnsibleAnsibleRepository) SetGpgkey(v string) { + o.Gpgkey.Set(&v) +} +// SetGpgkeyNil sets the value for Gpgkey to be an explicit nil +func (o *AnsibleAnsibleRepository) SetGpgkeyNil() { + o.Gpgkey.Set(nil) +} + +// UnsetGpgkey ensures that no value is present for Gpgkey, not even an explicit nil +func (o *AnsibleAnsibleRepository) UnsetGpgkey() { + o.Gpgkey.Unset() +} + +// GetPrivate returns the Private field value if set, zero value otherwise. +func (o *AnsibleAnsibleRepository) GetPrivate() bool { + if o == nil || IsNil(o.Private) { + var ret bool + return ret + } + return *o.Private +} + +// GetPrivateOk returns a tuple with the Private field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleRepository) GetPrivateOk() (*bool, bool) { + if o == nil || IsNil(o.Private) { + return nil, false + } + return o.Private, true +} + +// HasPrivate returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepository) HasPrivate() bool { + if o != nil && !IsNil(o.Private) { + return true + } + + return false +} + +// SetPrivate gets a reference to the given bool and assigns it to the Private field. +func (o *AnsibleAnsibleRepository) SetPrivate(v bool) { + o.Private = &v +} + +func (o AnsibleAnsibleRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleAnsibleRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if o.LastSyncedMetadataTime.IsSet() { + toSerialize["last_synced_metadata_time"] = o.LastSyncedMetadataTime.Get() + } + if o.Gpgkey.IsSet() { + toSerialize["gpgkey"] = o.Gpgkey.Get() + } + if !IsNil(o.Private) { + toSerialize["private"] = o.Private + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleAnsibleRepository) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleAnsibleRepository := _AnsibleAnsibleRepository{} + + if err = json.Unmarshal(bytes, &varAnsibleAnsibleRepository); err == nil { + *o = AnsibleAnsibleRepository(varAnsibleAnsibleRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "last_synced_metadata_time") + delete(additionalProperties, "gpgkey") + delete(additionalProperties, "private") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleAnsibleRepository struct { + value *AnsibleAnsibleRepository + isSet bool +} + +func (v NullableAnsibleAnsibleRepository) Get() *AnsibleAnsibleRepository { + return v.value +} + +func (v *NullableAnsibleAnsibleRepository) Set(val *AnsibleAnsibleRepository) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleAnsibleRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleAnsibleRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleAnsibleRepository(val *AnsibleAnsibleRepository) *NullableAnsibleAnsibleRepository { + return &NullableAnsibleAnsibleRepository{value: val, isSet: true} +} + +func (v NullableAnsibleAnsibleRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleAnsibleRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_repository_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_repository_response.go new file mode 100644 index 0000000000..9ff6d9cf95 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_ansible_repository_response.go @@ -0,0 +1,645 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the AnsibleAnsibleRepositoryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleAnsibleRepositoryResponse{} + +// AnsibleAnsibleRepositoryResponse Serializer for Ansible Repositories. +type AnsibleAnsibleRepositoryResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + VersionsHref *string `json:"versions_href,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + LatestVersionHref *string `json:"latest_version_href,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // Last synced metadata time. + LastSyncedMetadataTime NullableTime `json:"last_synced_metadata_time,omitempty"` + // Gpg public key to verify collection signatures against + Gpgkey NullableString `json:"gpgkey,omitempty"` + LastSyncTask *TaskResponse `json:"last_sync_task,omitempty"` + Private *bool `json:"private,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleAnsibleRepositoryResponse AnsibleAnsibleRepositoryResponse + +// NewAnsibleAnsibleRepositoryResponse instantiates a new AnsibleAnsibleRepositoryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleAnsibleRepositoryResponse(name string) *AnsibleAnsibleRepositoryResponse { + this := AnsibleAnsibleRepositoryResponse{} + this.Name = name + return &this +} + +// NewAnsibleAnsibleRepositoryResponseWithDefaults instantiates a new AnsibleAnsibleRepositoryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleAnsibleRepositoryResponseWithDefaults() *AnsibleAnsibleRepositoryResponse { + this := AnsibleAnsibleRepositoryResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *AnsibleAnsibleRepositoryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleRepositoryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepositoryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *AnsibleAnsibleRepositoryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *AnsibleAnsibleRepositoryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleRepositoryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepositoryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *AnsibleAnsibleRepositoryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetVersionsHref returns the VersionsHref field value if set, zero value otherwise. +func (o *AnsibleAnsibleRepositoryResponse) GetVersionsHref() string { + if o == nil || IsNil(o.VersionsHref) { + var ret string + return ret + } + return *o.VersionsHref +} + +// GetVersionsHrefOk returns a tuple with the VersionsHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleRepositoryResponse) GetVersionsHrefOk() (*string, bool) { + if o == nil || IsNil(o.VersionsHref) { + return nil, false + } + return o.VersionsHref, true +} + +// HasVersionsHref returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepositoryResponse) HasVersionsHref() bool { + if o != nil && !IsNil(o.VersionsHref) { + return true + } + + return false +} + +// SetVersionsHref gets a reference to the given string and assigns it to the VersionsHref field. +func (o *AnsibleAnsibleRepositoryResponse) SetVersionsHref(v string) { + o.VersionsHref = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *AnsibleAnsibleRepositoryResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleRepositoryResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepositoryResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *AnsibleAnsibleRepositoryResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetLatestVersionHref returns the LatestVersionHref field value if set, zero value otherwise. +func (o *AnsibleAnsibleRepositoryResponse) GetLatestVersionHref() string { + if o == nil || IsNil(o.LatestVersionHref) { + var ret string + return ret + } + return *o.LatestVersionHref +} + +// GetLatestVersionHrefOk returns a tuple with the LatestVersionHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleRepositoryResponse) GetLatestVersionHrefOk() (*string, bool) { + if o == nil || IsNil(o.LatestVersionHref) { + return nil, false + } + return o.LatestVersionHref, true +} + +// HasLatestVersionHref returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepositoryResponse) HasLatestVersionHref() bool { + if o != nil && !IsNil(o.LatestVersionHref) { + return true + } + + return false +} + +// SetLatestVersionHref gets a reference to the given string and assigns it to the LatestVersionHref field. +func (o *AnsibleAnsibleRepositoryResponse) SetLatestVersionHref(v string) { + o.LatestVersionHref = &v +} + +// GetName returns the Name field value +func (o *AnsibleAnsibleRepositoryResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleRepositoryResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleAnsibleRepositoryResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleRepositoryResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleRepositoryResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepositoryResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *AnsibleAnsibleRepositoryResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *AnsibleAnsibleRepositoryResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *AnsibleAnsibleRepositoryResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleRepositoryResponse) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleRepositoryResponse) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepositoryResponse) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *AnsibleAnsibleRepositoryResponse) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *AnsibleAnsibleRepositoryResponse) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *AnsibleAnsibleRepositoryResponse) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleRepositoryResponse) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleRepositoryResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepositoryResponse) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *AnsibleAnsibleRepositoryResponse) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *AnsibleAnsibleRepositoryResponse) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *AnsibleAnsibleRepositoryResponse) UnsetRemote() { + o.Remote.Unset() +} + +// GetLastSyncedMetadataTime returns the LastSyncedMetadataTime field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleRepositoryResponse) GetLastSyncedMetadataTime() time.Time { + if o == nil || IsNil(o.LastSyncedMetadataTime.Get()) { + var ret time.Time + return ret + } + return *o.LastSyncedMetadataTime.Get() +} + +// GetLastSyncedMetadataTimeOk returns a tuple with the LastSyncedMetadataTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleRepositoryResponse) GetLastSyncedMetadataTimeOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastSyncedMetadataTime.Get(), o.LastSyncedMetadataTime.IsSet() +} + +// HasLastSyncedMetadataTime returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepositoryResponse) HasLastSyncedMetadataTime() bool { + if o != nil && o.LastSyncedMetadataTime.IsSet() { + return true + } + + return false +} + +// SetLastSyncedMetadataTime gets a reference to the given NullableTime and assigns it to the LastSyncedMetadataTime field. +func (o *AnsibleAnsibleRepositoryResponse) SetLastSyncedMetadataTime(v time.Time) { + o.LastSyncedMetadataTime.Set(&v) +} +// SetLastSyncedMetadataTimeNil sets the value for LastSyncedMetadataTime to be an explicit nil +func (o *AnsibleAnsibleRepositoryResponse) SetLastSyncedMetadataTimeNil() { + o.LastSyncedMetadataTime.Set(nil) +} + +// UnsetLastSyncedMetadataTime ensures that no value is present for LastSyncedMetadataTime, not even an explicit nil +func (o *AnsibleAnsibleRepositoryResponse) UnsetLastSyncedMetadataTime() { + o.LastSyncedMetadataTime.Unset() +} + +// GetGpgkey returns the Gpgkey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleAnsibleRepositoryResponse) GetGpgkey() string { + if o == nil || IsNil(o.Gpgkey.Get()) { + var ret string + return ret + } + return *o.Gpgkey.Get() +} + +// GetGpgkeyOk returns a tuple with the Gpgkey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleAnsibleRepositoryResponse) GetGpgkeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Gpgkey.Get(), o.Gpgkey.IsSet() +} + +// HasGpgkey returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepositoryResponse) HasGpgkey() bool { + if o != nil && o.Gpgkey.IsSet() { + return true + } + + return false +} + +// SetGpgkey gets a reference to the given NullableString and assigns it to the Gpgkey field. +func (o *AnsibleAnsibleRepositoryResponse) SetGpgkey(v string) { + o.Gpgkey.Set(&v) +} +// SetGpgkeyNil sets the value for Gpgkey to be an explicit nil +func (o *AnsibleAnsibleRepositoryResponse) SetGpgkeyNil() { + o.Gpgkey.Set(nil) +} + +// UnsetGpgkey ensures that no value is present for Gpgkey, not even an explicit nil +func (o *AnsibleAnsibleRepositoryResponse) UnsetGpgkey() { + o.Gpgkey.Unset() +} + +// GetLastSyncTask returns the LastSyncTask field value if set, zero value otherwise. +func (o *AnsibleAnsibleRepositoryResponse) GetLastSyncTask() TaskResponse { + if o == nil || IsNil(o.LastSyncTask) { + var ret TaskResponse + return ret + } + return *o.LastSyncTask +} + +// GetLastSyncTaskOk returns a tuple with the LastSyncTask field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleRepositoryResponse) GetLastSyncTaskOk() (*TaskResponse, bool) { + if o == nil || IsNil(o.LastSyncTask) { + return nil, false + } + return o.LastSyncTask, true +} + +// HasLastSyncTask returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepositoryResponse) HasLastSyncTask() bool { + if o != nil && !IsNil(o.LastSyncTask) { + return true + } + + return false +} + +// SetLastSyncTask gets a reference to the given TaskResponse and assigns it to the LastSyncTask field. +func (o *AnsibleAnsibleRepositoryResponse) SetLastSyncTask(v TaskResponse) { + o.LastSyncTask = &v +} + +// GetPrivate returns the Private field value if set, zero value otherwise. +func (o *AnsibleAnsibleRepositoryResponse) GetPrivate() bool { + if o == nil || IsNil(o.Private) { + var ret bool + return ret + } + return *o.Private +} + +// GetPrivateOk returns a tuple with the Private field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleAnsibleRepositoryResponse) GetPrivateOk() (*bool, bool) { + if o == nil || IsNil(o.Private) { + return nil, false + } + return o.Private, true +} + +// HasPrivate returns a boolean if a field has been set. +func (o *AnsibleAnsibleRepositoryResponse) HasPrivate() bool { + if o != nil && !IsNil(o.Private) { + return true + } + + return false +} + +// SetPrivate gets a reference to the given bool and assigns it to the Private field. +func (o *AnsibleAnsibleRepositoryResponse) SetPrivate(v bool) { + o.Private = &v +} + +func (o AnsibleAnsibleRepositoryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleAnsibleRepositoryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.VersionsHref) { + toSerialize["versions_href"] = o.VersionsHref + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.LatestVersionHref) { + toSerialize["latest_version_href"] = o.LatestVersionHref + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if o.LastSyncedMetadataTime.IsSet() { + toSerialize["last_synced_metadata_time"] = o.LastSyncedMetadataTime.Get() + } + if o.Gpgkey.IsSet() { + toSerialize["gpgkey"] = o.Gpgkey.Get() + } + if !IsNil(o.LastSyncTask) { + toSerialize["last_sync_task"] = o.LastSyncTask + } + if !IsNil(o.Private) { + toSerialize["private"] = o.Private + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleAnsibleRepositoryResponse) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleAnsibleRepositoryResponse := _AnsibleAnsibleRepositoryResponse{} + + if err = json.Unmarshal(bytes, &varAnsibleAnsibleRepositoryResponse); err == nil { + *o = AnsibleAnsibleRepositoryResponse(varAnsibleAnsibleRepositoryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "versions_href") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "latest_version_href") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "last_synced_metadata_time") + delete(additionalProperties, "gpgkey") + delete(additionalProperties, "last_sync_task") + delete(additionalProperties, "private") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleAnsibleRepositoryResponse struct { + value *AnsibleAnsibleRepositoryResponse + isSet bool +} + +func (v NullableAnsibleAnsibleRepositoryResponse) Get() *AnsibleAnsibleRepositoryResponse { + return v.value +} + +func (v *NullableAnsibleAnsibleRepositoryResponse) Set(val *AnsibleAnsibleRepositoryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleAnsibleRepositoryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleAnsibleRepositoryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleAnsibleRepositoryResponse(val *AnsibleAnsibleRepositoryResponse) *NullableAnsibleAnsibleRepositoryResponse { + return &NullableAnsibleAnsibleRepositoryResponse{value: val, isSet: true} +} + +func (v NullableAnsibleAnsibleRepositoryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleAnsibleRepositoryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection.go new file mode 100644 index 0000000000..c7eb7fe5ec --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection.go @@ -0,0 +1,173 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleCollection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleCollection{} + +// AnsibleCollection A serializer for Ansible Collections. +type AnsibleCollection struct { + // The name of the Collection. + Name string `json:"name"` + // The namespace of the Collection. + Namespace string `json:"namespace"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleCollection AnsibleCollection + +// NewAnsibleCollection instantiates a new AnsibleCollection object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleCollection(name string, namespace string) *AnsibleCollection { + this := AnsibleCollection{} + this.Name = name + this.Namespace = namespace + return &this +} + +// NewAnsibleCollectionWithDefaults instantiates a new AnsibleCollection object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleCollectionWithDefaults() *AnsibleCollection { + this := AnsibleCollection{} + return &this +} + +// GetName returns the Name field value +func (o *AnsibleCollection) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollection) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleCollection) SetName(v string) { + o.Name = v +} + +// GetNamespace returns the Namespace field value +func (o *AnsibleCollection) GetNamespace() string { + if o == nil { + var ret string + return ret + } + + return o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollection) GetNamespaceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Namespace, true +} + +// SetNamespace sets field value +func (o *AnsibleCollection) SetNamespace(v string) { + o.Namespace = v +} + +func (o AnsibleCollection) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleCollection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["namespace"] = o.Namespace + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleCollection) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleCollection := _AnsibleCollection{} + + if err = json.Unmarshal(bytes, &varAnsibleCollection); err == nil { + *o = AnsibleCollection(varAnsibleCollection) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "namespace") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleCollection struct { + value *AnsibleCollection + isSet bool +} + +func (v NullableAnsibleCollection) Get() *AnsibleCollection { + return v.value +} + +func (v *NullableAnsibleCollection) Set(val *AnsibleCollection) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleCollection) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleCollection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleCollection(val *AnsibleCollection) *NullableAnsibleCollection { + return &NullableAnsibleCollection{value: val, isSet: true} +} + +func (v NullableAnsibleCollection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleCollection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_remote.go new file mode 100644 index 0000000000..6448ba3396 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_remote.go @@ -0,0 +1,1275 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleCollectionRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleCollectionRemote{} + +// AnsibleCollectionRemote A serializer for Collection Remotes. +type AnsibleCollectionRemote struct { + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *PolicyDb6Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // The string version of Collection requirements yaml. + RequirementsFile NullableString `json:"requirements_file,omitempty"` + // The URL to receive a session token from, e.g. used with Automation Hub. + AuthUrl NullableString `json:"auth_url,omitempty"` + // The token key to use for authentication. See https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#configuring-the-ansible-galaxy-clientfor more details + Token NullableString `json:"token,omitempty"` + // Sync dependencies for collections specified via requirements file + SyncDependencies *bool `json:"sync_dependencies,omitempty"` + // Sync only collections that have a signature + SignedOnly *bool `json:"signed_only,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleCollectionRemote AnsibleCollectionRemote + +// NewAnsibleCollectionRemote instantiates a new AnsibleCollectionRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleCollectionRemote(name string, url string) *AnsibleCollectionRemote { + this := AnsibleCollectionRemote{} + this.Name = name + this.Url = url + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + var syncDependencies bool = true + this.SyncDependencies = &syncDependencies + var signedOnly bool = false + this.SignedOnly = &signedOnly + return &this +} + +// NewAnsibleCollectionRemoteWithDefaults instantiates a new AnsibleCollectionRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleCollectionRemoteWithDefaults() *AnsibleCollectionRemote { + this := AnsibleCollectionRemote{} + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + var syncDependencies bool = true + this.SyncDependencies = &syncDependencies + var signedOnly bool = false + this.SignedOnly = &signedOnly + return &this +} + +// GetName returns the Name field value +func (o *AnsibleCollectionRemote) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemote) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleCollectionRemote) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *AnsibleCollectionRemote) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemote) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *AnsibleCollectionRemote) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *AnsibleCollectionRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *AnsibleCollectionRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *AnsibleCollectionRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *AnsibleCollectionRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *AnsibleCollectionRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *AnsibleCollectionRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *AnsibleCollectionRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *AnsibleCollectionRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *AnsibleCollectionRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *AnsibleCollectionRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *AnsibleCollectionRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *AnsibleCollectionRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *AnsibleCollectionRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *AnsibleCollectionRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *AnsibleCollectionRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *AnsibleCollectionRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *AnsibleCollectionRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *AnsibleCollectionRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *AnsibleCollectionRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *AnsibleCollectionRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *AnsibleCollectionRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *AnsibleCollectionRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *AnsibleCollectionRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *AnsibleCollectionRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *AnsibleCollectionRemote) GetPolicy() PolicyDb6Enum { + if o == nil || IsNil(o.Policy) { + var ret PolicyDb6Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemote) GetPolicyOk() (*PolicyDb6Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given PolicyDb6Enum and assigns it to the Policy field. +func (o *AnsibleCollectionRemote) SetPolicy(v PolicyDb6Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *AnsibleCollectionRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *AnsibleCollectionRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *AnsibleCollectionRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *AnsibleCollectionRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *AnsibleCollectionRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *AnsibleCollectionRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *AnsibleCollectionRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *AnsibleCollectionRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *AnsibleCollectionRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *AnsibleCollectionRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *AnsibleCollectionRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *AnsibleCollectionRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetRequirementsFile returns the RequirementsFile field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetRequirementsFile() string { + if o == nil || IsNil(o.RequirementsFile.Get()) { + var ret string + return ret + } + return *o.RequirementsFile.Get() +} + +// GetRequirementsFileOk returns a tuple with the RequirementsFile field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetRequirementsFileOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RequirementsFile.Get(), o.RequirementsFile.IsSet() +} + +// HasRequirementsFile returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasRequirementsFile() bool { + if o != nil && o.RequirementsFile.IsSet() { + return true + } + + return false +} + +// SetRequirementsFile gets a reference to the given NullableString and assigns it to the RequirementsFile field. +func (o *AnsibleCollectionRemote) SetRequirementsFile(v string) { + o.RequirementsFile.Set(&v) +} +// SetRequirementsFileNil sets the value for RequirementsFile to be an explicit nil +func (o *AnsibleCollectionRemote) SetRequirementsFileNil() { + o.RequirementsFile.Set(nil) +} + +// UnsetRequirementsFile ensures that no value is present for RequirementsFile, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetRequirementsFile() { + o.RequirementsFile.Unset() +} + +// GetAuthUrl returns the AuthUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetAuthUrl() string { + if o == nil || IsNil(o.AuthUrl.Get()) { + var ret string + return ret + } + return *o.AuthUrl.Get() +} + +// GetAuthUrlOk returns a tuple with the AuthUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetAuthUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AuthUrl.Get(), o.AuthUrl.IsSet() +} + +// HasAuthUrl returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasAuthUrl() bool { + if o != nil && o.AuthUrl.IsSet() { + return true + } + + return false +} + +// SetAuthUrl gets a reference to the given NullableString and assigns it to the AuthUrl field. +func (o *AnsibleCollectionRemote) SetAuthUrl(v string) { + o.AuthUrl.Set(&v) +} +// SetAuthUrlNil sets the value for AuthUrl to be an explicit nil +func (o *AnsibleCollectionRemote) SetAuthUrlNil() { + o.AuthUrl.Set(nil) +} + +// UnsetAuthUrl ensures that no value is present for AuthUrl, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetAuthUrl() { + o.AuthUrl.Unset() +} + +// GetToken returns the Token field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemote) GetToken() string { + if o == nil || IsNil(o.Token.Get()) { + var ret string + return ret + } + return *o.Token.Get() +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemote) GetTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Token.Get(), o.Token.IsSet() +} + +// HasToken returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasToken() bool { + if o != nil && o.Token.IsSet() { + return true + } + + return false +} + +// SetToken gets a reference to the given NullableString and assigns it to the Token field. +func (o *AnsibleCollectionRemote) SetToken(v string) { + o.Token.Set(&v) +} +// SetTokenNil sets the value for Token to be an explicit nil +func (o *AnsibleCollectionRemote) SetTokenNil() { + o.Token.Set(nil) +} + +// UnsetToken ensures that no value is present for Token, not even an explicit nil +func (o *AnsibleCollectionRemote) UnsetToken() { + o.Token.Unset() +} + +// GetSyncDependencies returns the SyncDependencies field value if set, zero value otherwise. +func (o *AnsibleCollectionRemote) GetSyncDependencies() bool { + if o == nil || IsNil(o.SyncDependencies) { + var ret bool + return ret + } + return *o.SyncDependencies +} + +// GetSyncDependenciesOk returns a tuple with the SyncDependencies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemote) GetSyncDependenciesOk() (*bool, bool) { + if o == nil || IsNil(o.SyncDependencies) { + return nil, false + } + return o.SyncDependencies, true +} + +// HasSyncDependencies returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasSyncDependencies() bool { + if o != nil && !IsNil(o.SyncDependencies) { + return true + } + + return false +} + +// SetSyncDependencies gets a reference to the given bool and assigns it to the SyncDependencies field. +func (o *AnsibleCollectionRemote) SetSyncDependencies(v bool) { + o.SyncDependencies = &v +} + +// GetSignedOnly returns the SignedOnly field value if set, zero value otherwise. +func (o *AnsibleCollectionRemote) GetSignedOnly() bool { + if o == nil || IsNil(o.SignedOnly) { + var ret bool + return ret + } + return *o.SignedOnly +} + +// GetSignedOnlyOk returns a tuple with the SignedOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemote) GetSignedOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.SignedOnly) { + return nil, false + } + return o.SignedOnly, true +} + +// HasSignedOnly returns a boolean if a field has been set. +func (o *AnsibleCollectionRemote) HasSignedOnly() bool { + if o != nil && !IsNil(o.SignedOnly) { + return true + } + + return false +} + +// SetSignedOnly gets a reference to the given bool and assigns it to the SignedOnly field. +func (o *AnsibleCollectionRemote) SetSignedOnly(v bool) { + o.SignedOnly = &v +} + +func (o AnsibleCollectionRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleCollectionRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if o.RequirementsFile.IsSet() { + toSerialize["requirements_file"] = o.RequirementsFile.Get() + } + if o.AuthUrl.IsSet() { + toSerialize["auth_url"] = o.AuthUrl.Get() + } + if o.Token.IsSet() { + toSerialize["token"] = o.Token.Get() + } + if !IsNil(o.SyncDependencies) { + toSerialize["sync_dependencies"] = o.SyncDependencies + } + if !IsNil(o.SignedOnly) { + toSerialize["signed_only"] = o.SignedOnly + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleCollectionRemote) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleCollectionRemote := _AnsibleCollectionRemote{} + + if err = json.Unmarshal(bytes, &varAnsibleCollectionRemote); err == nil { + *o = AnsibleCollectionRemote(varAnsibleCollectionRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "requirements_file") + delete(additionalProperties, "auth_url") + delete(additionalProperties, "token") + delete(additionalProperties, "sync_dependencies") + delete(additionalProperties, "signed_only") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleCollectionRemote struct { + value *AnsibleCollectionRemote + isSet bool +} + +func (v NullableAnsibleCollectionRemote) Get() *AnsibleCollectionRemote { + return v.value +} + +func (v *NullableAnsibleCollectionRemote) Set(val *AnsibleCollectionRemote) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleCollectionRemote) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleCollectionRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleCollectionRemote(val *AnsibleCollectionRemote) *NullableAnsibleCollectionRemote { + return &NullableAnsibleCollectionRemote{value: val, isSet: true} +} + +func (v NullableAnsibleCollectionRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleCollectionRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_remote_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_remote_response.go new file mode 100644 index 0000000000..3502495c44 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_remote_response.go @@ -0,0 +1,1176 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the AnsibleCollectionRemoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleCollectionRemoteResponse{} + +// AnsibleCollectionRemoteResponse A serializer for Collection Remotes. +type AnsibleCollectionRemoteResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *PolicyDb6Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + // The string version of Collection requirements yaml. + RequirementsFile NullableString `json:"requirements_file,omitempty"` + // The URL to receive a session token from, e.g. used with Automation Hub. + AuthUrl NullableString `json:"auth_url,omitempty"` + // Sync dependencies for collections specified via requirements file + SyncDependencies *bool `json:"sync_dependencies,omitempty"` + // Sync only collections that have a signature + SignedOnly *bool `json:"signed_only,omitempty"` + LastSyncTask *TaskResponse `json:"last_sync_task,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleCollectionRemoteResponse AnsibleCollectionRemoteResponse + +// NewAnsibleCollectionRemoteResponse instantiates a new AnsibleCollectionRemoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleCollectionRemoteResponse(name string, url string) *AnsibleCollectionRemoteResponse { + this := AnsibleCollectionRemoteResponse{} + this.Name = name + this.Url = url + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + var syncDependencies bool = true + this.SyncDependencies = &syncDependencies + var signedOnly bool = false + this.SignedOnly = &signedOnly + return &this +} + +// NewAnsibleCollectionRemoteResponseWithDefaults instantiates a new AnsibleCollectionRemoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleCollectionRemoteResponseWithDefaults() *AnsibleCollectionRemoteResponse { + this := AnsibleCollectionRemoteResponse{} + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + var syncDependencies bool = true + this.SyncDependencies = &syncDependencies + var signedOnly bool = false + this.SignedOnly = &signedOnly + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *AnsibleCollectionRemoteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemoteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *AnsibleCollectionRemoteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *AnsibleCollectionRemoteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemoteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *AnsibleCollectionRemoteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *AnsibleCollectionRemoteResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemoteResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleCollectionRemoteResponse) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *AnsibleCollectionRemoteResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemoteResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *AnsibleCollectionRemoteResponse) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemoteResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemoteResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *AnsibleCollectionRemoteResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *AnsibleCollectionRemoteResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *AnsibleCollectionRemoteResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemoteResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemoteResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *AnsibleCollectionRemoteResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *AnsibleCollectionRemoteResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *AnsibleCollectionRemoteResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *AnsibleCollectionRemoteResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemoteResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *AnsibleCollectionRemoteResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemoteResponse) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemoteResponse) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *AnsibleCollectionRemoteResponse) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *AnsibleCollectionRemoteResponse) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *AnsibleCollectionRemoteResponse) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *AnsibleCollectionRemoteResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemoteResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *AnsibleCollectionRemoteResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *AnsibleCollectionRemoteResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemoteResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *AnsibleCollectionRemoteResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemoteResponse) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemoteResponse) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *AnsibleCollectionRemoteResponse) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *AnsibleCollectionRemoteResponse) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *AnsibleCollectionRemoteResponse) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemoteResponse) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemoteResponse) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *AnsibleCollectionRemoteResponse) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *AnsibleCollectionRemoteResponse) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *AnsibleCollectionRemoteResponse) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *AnsibleCollectionRemoteResponse) GetPolicy() PolicyDb6Enum { + if o == nil || IsNil(o.Policy) { + var ret PolicyDb6Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemoteResponse) GetPolicyOk() (*PolicyDb6Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given PolicyDb6Enum and assigns it to the Policy field. +func (o *AnsibleCollectionRemoteResponse) SetPolicy(v PolicyDb6Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemoteResponse) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemoteResponse) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *AnsibleCollectionRemoteResponse) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *AnsibleCollectionRemoteResponse) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *AnsibleCollectionRemoteResponse) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemoteResponse) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemoteResponse) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *AnsibleCollectionRemoteResponse) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *AnsibleCollectionRemoteResponse) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *AnsibleCollectionRemoteResponse) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemoteResponse) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemoteResponse) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *AnsibleCollectionRemoteResponse) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *AnsibleCollectionRemoteResponse) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *AnsibleCollectionRemoteResponse) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemoteResponse) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemoteResponse) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *AnsibleCollectionRemoteResponse) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *AnsibleCollectionRemoteResponse) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *AnsibleCollectionRemoteResponse) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *AnsibleCollectionRemoteResponse) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemoteResponse) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *AnsibleCollectionRemoteResponse) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemoteResponse) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemoteResponse) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *AnsibleCollectionRemoteResponse) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *AnsibleCollectionRemoteResponse) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *AnsibleCollectionRemoteResponse) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *AnsibleCollectionRemoteResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemoteResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *AnsibleCollectionRemoteResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +// GetRequirementsFile returns the RequirementsFile field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemoteResponse) GetRequirementsFile() string { + if o == nil || IsNil(o.RequirementsFile.Get()) { + var ret string + return ret + } + return *o.RequirementsFile.Get() +} + +// GetRequirementsFileOk returns a tuple with the RequirementsFile field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemoteResponse) GetRequirementsFileOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RequirementsFile.Get(), o.RequirementsFile.IsSet() +} + +// HasRequirementsFile returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasRequirementsFile() bool { + if o != nil && o.RequirementsFile.IsSet() { + return true + } + + return false +} + +// SetRequirementsFile gets a reference to the given NullableString and assigns it to the RequirementsFile field. +func (o *AnsibleCollectionRemoteResponse) SetRequirementsFile(v string) { + o.RequirementsFile.Set(&v) +} +// SetRequirementsFileNil sets the value for RequirementsFile to be an explicit nil +func (o *AnsibleCollectionRemoteResponse) SetRequirementsFileNil() { + o.RequirementsFile.Set(nil) +} + +// UnsetRequirementsFile ensures that no value is present for RequirementsFile, not even an explicit nil +func (o *AnsibleCollectionRemoteResponse) UnsetRequirementsFile() { + o.RequirementsFile.Unset() +} + +// GetAuthUrl returns the AuthUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionRemoteResponse) GetAuthUrl() string { + if o == nil || IsNil(o.AuthUrl.Get()) { + var ret string + return ret + } + return *o.AuthUrl.Get() +} + +// GetAuthUrlOk returns a tuple with the AuthUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionRemoteResponse) GetAuthUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AuthUrl.Get(), o.AuthUrl.IsSet() +} + +// HasAuthUrl returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasAuthUrl() bool { + if o != nil && o.AuthUrl.IsSet() { + return true + } + + return false +} + +// SetAuthUrl gets a reference to the given NullableString and assigns it to the AuthUrl field. +func (o *AnsibleCollectionRemoteResponse) SetAuthUrl(v string) { + o.AuthUrl.Set(&v) +} +// SetAuthUrlNil sets the value for AuthUrl to be an explicit nil +func (o *AnsibleCollectionRemoteResponse) SetAuthUrlNil() { + o.AuthUrl.Set(nil) +} + +// UnsetAuthUrl ensures that no value is present for AuthUrl, not even an explicit nil +func (o *AnsibleCollectionRemoteResponse) UnsetAuthUrl() { + o.AuthUrl.Unset() +} + +// GetSyncDependencies returns the SyncDependencies field value if set, zero value otherwise. +func (o *AnsibleCollectionRemoteResponse) GetSyncDependencies() bool { + if o == nil || IsNil(o.SyncDependencies) { + var ret bool + return ret + } + return *o.SyncDependencies +} + +// GetSyncDependenciesOk returns a tuple with the SyncDependencies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemoteResponse) GetSyncDependenciesOk() (*bool, bool) { + if o == nil || IsNil(o.SyncDependencies) { + return nil, false + } + return o.SyncDependencies, true +} + +// HasSyncDependencies returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasSyncDependencies() bool { + if o != nil && !IsNil(o.SyncDependencies) { + return true + } + + return false +} + +// SetSyncDependencies gets a reference to the given bool and assigns it to the SyncDependencies field. +func (o *AnsibleCollectionRemoteResponse) SetSyncDependencies(v bool) { + o.SyncDependencies = &v +} + +// GetSignedOnly returns the SignedOnly field value if set, zero value otherwise. +func (o *AnsibleCollectionRemoteResponse) GetSignedOnly() bool { + if o == nil || IsNil(o.SignedOnly) { + var ret bool + return ret + } + return *o.SignedOnly +} + +// GetSignedOnlyOk returns a tuple with the SignedOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemoteResponse) GetSignedOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.SignedOnly) { + return nil, false + } + return o.SignedOnly, true +} + +// HasSignedOnly returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasSignedOnly() bool { + if o != nil && !IsNil(o.SignedOnly) { + return true + } + + return false +} + +// SetSignedOnly gets a reference to the given bool and assigns it to the SignedOnly field. +func (o *AnsibleCollectionRemoteResponse) SetSignedOnly(v bool) { + o.SignedOnly = &v +} + +// GetLastSyncTask returns the LastSyncTask field value if set, zero value otherwise. +func (o *AnsibleCollectionRemoteResponse) GetLastSyncTask() TaskResponse { + if o == nil || IsNil(o.LastSyncTask) { + var ret TaskResponse + return ret + } + return *o.LastSyncTask +} + +// GetLastSyncTaskOk returns a tuple with the LastSyncTask field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionRemoteResponse) GetLastSyncTaskOk() (*TaskResponse, bool) { + if o == nil || IsNil(o.LastSyncTask) { + return nil, false + } + return o.LastSyncTask, true +} + +// HasLastSyncTask returns a boolean if a field has been set. +func (o *AnsibleCollectionRemoteResponse) HasLastSyncTask() bool { + if o != nil && !IsNil(o.LastSyncTask) { + return true + } + + return false +} + +// SetLastSyncTask gets a reference to the given TaskResponse and assigns it to the LastSyncTask field. +func (o *AnsibleCollectionRemoteResponse) SetLastSyncTask(v TaskResponse) { + o.LastSyncTask = &v +} + +func (o AnsibleCollectionRemoteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleCollectionRemoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + if o.RequirementsFile.IsSet() { + toSerialize["requirements_file"] = o.RequirementsFile.Get() + } + if o.AuthUrl.IsSet() { + toSerialize["auth_url"] = o.AuthUrl.Get() + } + if !IsNil(o.SyncDependencies) { + toSerialize["sync_dependencies"] = o.SyncDependencies + } + if !IsNil(o.SignedOnly) { + toSerialize["signed_only"] = o.SignedOnly + } + if !IsNil(o.LastSyncTask) { + toSerialize["last_sync_task"] = o.LastSyncTask + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleCollectionRemoteResponse) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleCollectionRemoteResponse := _AnsibleCollectionRemoteResponse{} + + if err = json.Unmarshal(bytes, &varAnsibleCollectionRemoteResponse); err == nil { + *o = AnsibleCollectionRemoteResponse(varAnsibleCollectionRemoteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "hidden_fields") + delete(additionalProperties, "requirements_file") + delete(additionalProperties, "auth_url") + delete(additionalProperties, "sync_dependencies") + delete(additionalProperties, "signed_only") + delete(additionalProperties, "last_sync_task") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleCollectionRemoteResponse struct { + value *AnsibleCollectionRemoteResponse + isSet bool +} + +func (v NullableAnsibleCollectionRemoteResponse) Get() *AnsibleCollectionRemoteResponse { + return v.value +} + +func (v *NullableAnsibleCollectionRemoteResponse) Set(val *AnsibleCollectionRemoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleCollectionRemoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleCollectionRemoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleCollectionRemoteResponse(val *AnsibleCollectionRemoteResponse) *NullableAnsibleCollectionRemoteResponse { + return &NullableAnsibleCollectionRemoteResponse{value: val, isSet: true} +} + +func (v NullableAnsibleCollectionRemoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleCollectionRemoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_response.go new file mode 100644 index 0000000000..f85c059b96 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_response.go @@ -0,0 +1,173 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleCollectionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleCollectionResponse{} + +// AnsibleCollectionResponse A serializer for Ansible Collections. +type AnsibleCollectionResponse struct { + // The name of the Collection. + Name string `json:"name"` + // The namespace of the Collection. + Namespace string `json:"namespace"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleCollectionResponse AnsibleCollectionResponse + +// NewAnsibleCollectionResponse instantiates a new AnsibleCollectionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleCollectionResponse(name string, namespace string) *AnsibleCollectionResponse { + this := AnsibleCollectionResponse{} + this.Name = name + this.Namespace = namespace + return &this +} + +// NewAnsibleCollectionResponseWithDefaults instantiates a new AnsibleCollectionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleCollectionResponseWithDefaults() *AnsibleCollectionResponse { + this := AnsibleCollectionResponse{} + return &this +} + +// GetName returns the Name field value +func (o *AnsibleCollectionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleCollectionResponse) SetName(v string) { + o.Name = v +} + +// GetNamespace returns the Namespace field value +func (o *AnsibleCollectionResponse) GetNamespace() string { + if o == nil { + var ret string + return ret + } + + return o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionResponse) GetNamespaceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Namespace, true +} + +// SetNamespace sets field value +func (o *AnsibleCollectionResponse) SetNamespace(v string) { + o.Namespace = v +} + +func (o AnsibleCollectionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleCollectionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["namespace"] = o.Namespace + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleCollectionResponse) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleCollectionResponse := _AnsibleCollectionResponse{} + + if err = json.Unmarshal(bytes, &varAnsibleCollectionResponse); err == nil { + *o = AnsibleCollectionResponse(varAnsibleCollectionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "namespace") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleCollectionResponse struct { + value *AnsibleCollectionResponse + isSet bool +} + +func (v NullableAnsibleCollectionResponse) Get() *AnsibleCollectionResponse { + return v.value +} + +func (v *NullableAnsibleCollectionResponse) Set(val *AnsibleCollectionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleCollectionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleCollectionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleCollectionResponse(val *AnsibleCollectionResponse) *NullableAnsibleCollectionResponse { + return &NullableAnsibleCollectionResponse{value: val, isSet: true} +} + +func (v NullableAnsibleCollectionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleCollectionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version.go new file mode 100644 index 0000000000..f6b4053260 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version.go @@ -0,0 +1,382 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the AnsibleCollectionVersion type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleCollectionVersion{} + +// AnsibleCollectionVersion A serializer for CollectionVersion Content. +type AnsibleCollectionVersion struct { + // An uncommitted upload that may be turned into the artifact of the content unit. + Upload *string `json:"upload,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // An uploaded file that may be turned into the artifact of the content unit. + File **os.File `json:"file,omitempty"` + // The name of the collection. + ExpectedName *string `json:"expected_name,omitempty"` + // The namespace of the collection. + ExpectedNamespace *string `json:"expected_namespace,omitempty"` + // The version of the collection. + ExpectedVersion *string `json:"expected_version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleCollectionVersion AnsibleCollectionVersion + +// NewAnsibleCollectionVersion instantiates a new AnsibleCollectionVersion object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleCollectionVersion() *AnsibleCollectionVersion { + this := AnsibleCollectionVersion{} + return &this +} + +// NewAnsibleCollectionVersionWithDefaults instantiates a new AnsibleCollectionVersion object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleCollectionVersionWithDefaults() *AnsibleCollectionVersion { + this := AnsibleCollectionVersion{} + return &this +} + +// GetUpload returns the Upload field value if set, zero value otherwise. +func (o *AnsibleCollectionVersion) GetUpload() string { + if o == nil || IsNil(o.Upload) { + var ret string + return ret + } + return *o.Upload +} + +// GetUploadOk returns a tuple with the Upload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersion) GetUploadOk() (*string, bool) { + if o == nil || IsNil(o.Upload) { + return nil, false + } + return o.Upload, true +} + +// HasUpload returns a boolean if a field has been set. +func (o *AnsibleCollectionVersion) HasUpload() bool { + if o != nil && !IsNil(o.Upload) { + return true + } + + return false +} + +// SetUpload gets a reference to the given string and assigns it to the Upload field. +func (o *AnsibleCollectionVersion) SetUpload(v string) { + o.Upload = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *AnsibleCollectionVersion) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersion) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *AnsibleCollectionVersion) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *AnsibleCollectionVersion) SetArtifact(v string) { + o.Artifact = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *AnsibleCollectionVersion) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersion) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *AnsibleCollectionVersion) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *AnsibleCollectionVersion) SetRepository(v string) { + o.Repository = &v +} + +// GetFile returns the File field value if set, zero value otherwise. +func (o *AnsibleCollectionVersion) GetFile() *os.File { + if o == nil || IsNil(o.File) { + var ret *os.File + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersion) GetFileOk() (**os.File, bool) { + if o == nil || IsNil(o.File) { + return nil, false + } + return o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *AnsibleCollectionVersion) HasFile() bool { + if o != nil && !IsNil(o.File) { + return true + } + + return false +} + +// SetFile gets a reference to the given *os.File and assigns it to the File field. +func (o *AnsibleCollectionVersion) SetFile(v *os.File) { + o.File = &v +} + +// GetExpectedName returns the ExpectedName field value if set, zero value otherwise. +func (o *AnsibleCollectionVersion) GetExpectedName() string { + if o == nil || IsNil(o.ExpectedName) { + var ret string + return ret + } + return *o.ExpectedName +} + +// GetExpectedNameOk returns a tuple with the ExpectedName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersion) GetExpectedNameOk() (*string, bool) { + if o == nil || IsNil(o.ExpectedName) { + return nil, false + } + return o.ExpectedName, true +} + +// HasExpectedName returns a boolean if a field has been set. +func (o *AnsibleCollectionVersion) HasExpectedName() bool { + if o != nil && !IsNil(o.ExpectedName) { + return true + } + + return false +} + +// SetExpectedName gets a reference to the given string and assigns it to the ExpectedName field. +func (o *AnsibleCollectionVersion) SetExpectedName(v string) { + o.ExpectedName = &v +} + +// GetExpectedNamespace returns the ExpectedNamespace field value if set, zero value otherwise. +func (o *AnsibleCollectionVersion) GetExpectedNamespace() string { + if o == nil || IsNil(o.ExpectedNamespace) { + var ret string + return ret + } + return *o.ExpectedNamespace +} + +// GetExpectedNamespaceOk returns a tuple with the ExpectedNamespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersion) GetExpectedNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.ExpectedNamespace) { + return nil, false + } + return o.ExpectedNamespace, true +} + +// HasExpectedNamespace returns a boolean if a field has been set. +func (o *AnsibleCollectionVersion) HasExpectedNamespace() bool { + if o != nil && !IsNil(o.ExpectedNamespace) { + return true + } + + return false +} + +// SetExpectedNamespace gets a reference to the given string and assigns it to the ExpectedNamespace field. +func (o *AnsibleCollectionVersion) SetExpectedNamespace(v string) { + o.ExpectedNamespace = &v +} + +// GetExpectedVersion returns the ExpectedVersion field value if set, zero value otherwise. +func (o *AnsibleCollectionVersion) GetExpectedVersion() string { + if o == nil || IsNil(o.ExpectedVersion) { + var ret string + return ret + } + return *o.ExpectedVersion +} + +// GetExpectedVersionOk returns a tuple with the ExpectedVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersion) GetExpectedVersionOk() (*string, bool) { + if o == nil || IsNil(o.ExpectedVersion) { + return nil, false + } + return o.ExpectedVersion, true +} + +// HasExpectedVersion returns a boolean if a field has been set. +func (o *AnsibleCollectionVersion) HasExpectedVersion() bool { + if o != nil && !IsNil(o.ExpectedVersion) { + return true + } + + return false +} + +// SetExpectedVersion gets a reference to the given string and assigns it to the ExpectedVersion field. +func (o *AnsibleCollectionVersion) SetExpectedVersion(v string) { + o.ExpectedVersion = &v +} + +func (o AnsibleCollectionVersion) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleCollectionVersion) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Upload) { + toSerialize["upload"] = o.Upload + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.File) { + toSerialize["file"] = o.File + } + if !IsNil(o.ExpectedName) { + toSerialize["expected_name"] = o.ExpectedName + } + if !IsNil(o.ExpectedNamespace) { + toSerialize["expected_namespace"] = o.ExpectedNamespace + } + if !IsNil(o.ExpectedVersion) { + toSerialize["expected_version"] = o.ExpectedVersion + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleCollectionVersion) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleCollectionVersion := _AnsibleCollectionVersion{} + + if err = json.Unmarshal(bytes, &varAnsibleCollectionVersion); err == nil { + *o = AnsibleCollectionVersion(varAnsibleCollectionVersion) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "upload") + delete(additionalProperties, "artifact") + delete(additionalProperties, "repository") + delete(additionalProperties, "file") + delete(additionalProperties, "expected_name") + delete(additionalProperties, "expected_namespace") + delete(additionalProperties, "expected_version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleCollectionVersion struct { + value *AnsibleCollectionVersion + isSet bool +} + +func (v NullableAnsibleCollectionVersion) Get() *AnsibleCollectionVersion { + return v.value +} + +func (v *NullableAnsibleCollectionVersion) Set(val *AnsibleCollectionVersion) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleCollectionVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleCollectionVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleCollectionVersion(val *AnsibleCollectionVersion) *NullableAnsibleCollectionVersion { + return &NullableAnsibleCollectionVersion{value: val, isSet: true} +} + +func (v NullableAnsibleCollectionVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleCollectionVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_mark.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_mark.go new file mode 100644 index 0000000000..fffd9fdd9b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_mark.go @@ -0,0 +1,173 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleCollectionVersionMark type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleCollectionVersionMark{} + +// AnsibleCollectionVersionMark A serializer for mark models. +type AnsibleCollectionVersionMark struct { + // The content this mark is pointing to. + MarkedCollection string `json:"marked_collection"` + // The string value of this mark. + Value string `json:"value"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleCollectionVersionMark AnsibleCollectionVersionMark + +// NewAnsibleCollectionVersionMark instantiates a new AnsibleCollectionVersionMark object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleCollectionVersionMark(markedCollection string, value string) *AnsibleCollectionVersionMark { + this := AnsibleCollectionVersionMark{} + this.MarkedCollection = markedCollection + this.Value = value + return &this +} + +// NewAnsibleCollectionVersionMarkWithDefaults instantiates a new AnsibleCollectionVersionMark object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleCollectionVersionMarkWithDefaults() *AnsibleCollectionVersionMark { + this := AnsibleCollectionVersionMark{} + return &this +} + +// GetMarkedCollection returns the MarkedCollection field value +func (o *AnsibleCollectionVersionMark) GetMarkedCollection() string { + if o == nil { + var ret string + return ret + } + + return o.MarkedCollection +} + +// GetMarkedCollectionOk returns a tuple with the MarkedCollection field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionMark) GetMarkedCollectionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MarkedCollection, true +} + +// SetMarkedCollection sets field value +func (o *AnsibleCollectionVersionMark) SetMarkedCollection(v string) { + o.MarkedCollection = v +} + +// GetValue returns the Value field value +func (o *AnsibleCollectionVersionMark) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionMark) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *AnsibleCollectionVersionMark) SetValue(v string) { + o.Value = v +} + +func (o AnsibleCollectionVersionMark) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleCollectionVersionMark) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["marked_collection"] = o.MarkedCollection + toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleCollectionVersionMark) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleCollectionVersionMark := _AnsibleCollectionVersionMark{} + + if err = json.Unmarshal(bytes, &varAnsibleCollectionVersionMark); err == nil { + *o = AnsibleCollectionVersionMark(varAnsibleCollectionVersionMark) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "marked_collection") + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleCollectionVersionMark struct { + value *AnsibleCollectionVersionMark + isSet bool +} + +func (v NullableAnsibleCollectionVersionMark) Get() *AnsibleCollectionVersionMark { + return v.value +} + +func (v *NullableAnsibleCollectionVersionMark) Set(val *AnsibleCollectionVersionMark) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleCollectionVersionMark) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleCollectionVersionMark) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleCollectionVersionMark(val *AnsibleCollectionVersionMark) *NullableAnsibleCollectionVersionMark { + return &NullableAnsibleCollectionVersionMark{value: val, isSet: true} +} + +func (v NullableAnsibleCollectionVersionMark) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleCollectionVersionMark) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_mark_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_mark_response.go new file mode 100644 index 0000000000..969f427931 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_mark_response.go @@ -0,0 +1,249 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the AnsibleCollectionVersionMarkResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleCollectionVersionMarkResponse{} + +// AnsibleCollectionVersionMarkResponse A serializer for mark models. +type AnsibleCollectionVersionMarkResponse struct { + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + PulpHref *string `json:"pulp_href,omitempty"` + // The content this mark is pointing to. + MarkedCollection string `json:"marked_collection"` + // The string value of this mark. + Value string `json:"value"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleCollectionVersionMarkResponse AnsibleCollectionVersionMarkResponse + +// NewAnsibleCollectionVersionMarkResponse instantiates a new AnsibleCollectionVersionMarkResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleCollectionVersionMarkResponse(markedCollection string, value string) *AnsibleCollectionVersionMarkResponse { + this := AnsibleCollectionVersionMarkResponse{} + this.MarkedCollection = markedCollection + this.Value = value + return &this +} + +// NewAnsibleCollectionVersionMarkResponseWithDefaults instantiates a new AnsibleCollectionVersionMarkResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleCollectionVersionMarkResponseWithDefaults() *AnsibleCollectionVersionMarkResponse { + this := AnsibleCollectionVersionMarkResponse{} + return &this +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionMarkResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionMarkResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionMarkResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *AnsibleCollectionVersionMarkResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionMarkResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionMarkResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionMarkResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *AnsibleCollectionVersionMarkResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetMarkedCollection returns the MarkedCollection field value +func (o *AnsibleCollectionVersionMarkResponse) GetMarkedCollection() string { + if o == nil { + var ret string + return ret + } + + return o.MarkedCollection +} + +// GetMarkedCollectionOk returns a tuple with the MarkedCollection field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionMarkResponse) GetMarkedCollectionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MarkedCollection, true +} + +// SetMarkedCollection sets field value +func (o *AnsibleCollectionVersionMarkResponse) SetMarkedCollection(v string) { + o.MarkedCollection = v +} + +// GetValue returns the Value field value +func (o *AnsibleCollectionVersionMarkResponse) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionMarkResponse) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *AnsibleCollectionVersionMarkResponse) SetValue(v string) { + o.Value = v +} + +func (o AnsibleCollectionVersionMarkResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleCollectionVersionMarkResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + toSerialize["marked_collection"] = o.MarkedCollection + toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleCollectionVersionMarkResponse) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleCollectionVersionMarkResponse := _AnsibleCollectionVersionMarkResponse{} + + if err = json.Unmarshal(bytes, &varAnsibleCollectionVersionMarkResponse); err == nil { + *o = AnsibleCollectionVersionMarkResponse(varAnsibleCollectionVersionMarkResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "marked_collection") + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleCollectionVersionMarkResponse struct { + value *AnsibleCollectionVersionMarkResponse + isSet bool +} + +func (v NullableAnsibleCollectionVersionMarkResponse) Get() *AnsibleCollectionVersionMarkResponse { + return v.value +} + +func (v *NullableAnsibleCollectionVersionMarkResponse) Set(val *AnsibleCollectionVersionMarkResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleCollectionVersionMarkResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleCollectionVersionMarkResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleCollectionVersionMarkResponse(val *AnsibleCollectionVersionMarkResponse) *NullableAnsibleCollectionVersionMarkResponse { + return &NullableAnsibleCollectionVersionMarkResponse{value: val, isSet: true} +} + +func (v NullableAnsibleCollectionVersionMarkResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleCollectionVersionMarkResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_response.go new file mode 100644 index 0000000000..326406b1b0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_response.go @@ -0,0 +1,1150 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the AnsibleCollectionVersionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleCollectionVersionResponse{} + +// AnsibleCollectionVersionResponse A serializer for CollectionVersion Content. +type AnsibleCollectionVersionResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The SHA-256 checksum if available. + Sha256 *string `json:"sha256,omitempty"` + // The MD5 checksum if available. + Md5 *string `json:"md5,omitempty"` + // The SHA-1 checksum if available. + Sha1 *string `json:"sha1,omitempty"` + // The SHA-224 checksum if available. + Sha224 *string `json:"sha224,omitempty"` + // The SHA-384 checksum if available. + Sha384 *string `json:"sha384,omitempty"` + // The SHA-512 checksum if available. + Sha512 *string `json:"sha512,omitempty"` + // A collection identifier. + Id *string `json:"id,omitempty"` + // A list of the CollectionVersion content's authors. + Authors []string `json:"authors,omitempty"` + // A JSON field with data about the contents. + Contents map[string]interface{} `json:"contents,omitempty"` + // A dict declaring Collections that this collection requires to be installed for it to be usable. + Dependencies map[string]interface{} `json:"dependencies,omitempty"` + // A short summary description of the collection. + Description *string `json:"description,omitempty"` + // A JSON field holding the various documentation blobs in the collection. + DocsBlob map[string]interface{} `json:"docs_blob,omitempty"` + // A JSON field holding MANIFEST.json data. + Manifest map[string]interface{} `json:"manifest,omitempty"` + // A JSON field holding FILES.json data. + Files map[string]interface{} `json:"files,omitempty"` + // The URL to any online docs. + Documentation *string `json:"documentation,omitempty"` + // The URL to the homepage of the collection/project. + Homepage *string `json:"homepage,omitempty"` + // The URL to the collection issue tracker. + Issues *string `json:"issues,omitempty"` + // A list of licenses for content inside of a collection. + License []string `json:"license,omitempty"` + // The name of the collection. + Name *string `json:"name,omitempty"` + // The namespace of the collection. + Namespace *string `json:"namespace,omitempty"` + // The URL of the originating SCM repository. + OriginRepository *string `json:"origin_repository,omitempty"` + Tags []AnsibleTagResponse `json:"tags,omitempty"` + // The version of the collection. + Version *string `json:"version,omitempty"` + // The version of Ansible required to use the collection. Multiple versions can be separated with a comma. + RequiresAnsible NullableString `json:"requires_ansible,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleCollectionVersionResponse AnsibleCollectionVersionResponse + +// NewAnsibleCollectionVersionResponse instantiates a new AnsibleCollectionVersionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleCollectionVersionResponse() *AnsibleCollectionVersionResponse { + this := AnsibleCollectionVersionResponse{} + return &this +} + +// NewAnsibleCollectionVersionResponseWithDefaults instantiates a new AnsibleCollectionVersionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleCollectionVersionResponseWithDefaults() *AnsibleCollectionVersionResponse { + this := AnsibleCollectionVersionResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *AnsibleCollectionVersionResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *AnsibleCollectionVersionResponse) SetArtifact(v string) { + o.Artifact = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *AnsibleCollectionVersionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetSha256() string { + if o == nil || IsNil(o.Sha256) { + var ret string + return ret + } + return *o.Sha256 +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetSha256Ok() (*string, bool) { + if o == nil || IsNil(o.Sha256) { + return nil, false + } + return o.Sha256, true +} + +// HasSha256 returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasSha256() bool { + if o != nil && !IsNil(o.Sha256) { + return true + } + + return false +} + +// SetSha256 gets a reference to the given string and assigns it to the Sha256 field. +func (o *AnsibleCollectionVersionResponse) SetSha256(v string) { + o.Sha256 = &v +} + +// GetMd5 returns the Md5 field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetMd5() string { + if o == nil || IsNil(o.Md5) { + var ret string + return ret + } + return *o.Md5 +} + +// GetMd5Ok returns a tuple with the Md5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetMd5Ok() (*string, bool) { + if o == nil || IsNil(o.Md5) { + return nil, false + } + return o.Md5, true +} + +// HasMd5 returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasMd5() bool { + if o != nil && !IsNil(o.Md5) { + return true + } + + return false +} + +// SetMd5 gets a reference to the given string and assigns it to the Md5 field. +func (o *AnsibleCollectionVersionResponse) SetMd5(v string) { + o.Md5 = &v +} + +// GetSha1 returns the Sha1 field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetSha1() string { + if o == nil || IsNil(o.Sha1) { + var ret string + return ret + } + return *o.Sha1 +} + +// GetSha1Ok returns a tuple with the Sha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetSha1Ok() (*string, bool) { + if o == nil || IsNil(o.Sha1) { + return nil, false + } + return o.Sha1, true +} + +// HasSha1 returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasSha1() bool { + if o != nil && !IsNil(o.Sha1) { + return true + } + + return false +} + +// SetSha1 gets a reference to the given string and assigns it to the Sha1 field. +func (o *AnsibleCollectionVersionResponse) SetSha1(v string) { + o.Sha1 = &v +} + +// GetSha224 returns the Sha224 field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetSha224() string { + if o == nil || IsNil(o.Sha224) { + var ret string + return ret + } + return *o.Sha224 +} + +// GetSha224Ok returns a tuple with the Sha224 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetSha224Ok() (*string, bool) { + if o == nil || IsNil(o.Sha224) { + return nil, false + } + return o.Sha224, true +} + +// HasSha224 returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasSha224() bool { + if o != nil && !IsNil(o.Sha224) { + return true + } + + return false +} + +// SetSha224 gets a reference to the given string and assigns it to the Sha224 field. +func (o *AnsibleCollectionVersionResponse) SetSha224(v string) { + o.Sha224 = &v +} + +// GetSha384 returns the Sha384 field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetSha384() string { + if o == nil || IsNil(o.Sha384) { + var ret string + return ret + } + return *o.Sha384 +} + +// GetSha384Ok returns a tuple with the Sha384 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetSha384Ok() (*string, bool) { + if o == nil || IsNil(o.Sha384) { + return nil, false + } + return o.Sha384, true +} + +// HasSha384 returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasSha384() bool { + if o != nil && !IsNil(o.Sha384) { + return true + } + + return false +} + +// SetSha384 gets a reference to the given string and assigns it to the Sha384 field. +func (o *AnsibleCollectionVersionResponse) SetSha384(v string) { + o.Sha384 = &v +} + +// GetSha512 returns the Sha512 field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetSha512() string { + if o == nil || IsNil(o.Sha512) { + var ret string + return ret + } + return *o.Sha512 +} + +// GetSha512Ok returns a tuple with the Sha512 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetSha512Ok() (*string, bool) { + if o == nil || IsNil(o.Sha512) { + return nil, false + } + return o.Sha512, true +} + +// HasSha512 returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasSha512() bool { + if o != nil && !IsNil(o.Sha512) { + return true + } + + return false +} + +// SetSha512 gets a reference to the given string and assigns it to the Sha512 field. +func (o *AnsibleCollectionVersionResponse) SetSha512(v string) { + o.Sha512 = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *AnsibleCollectionVersionResponse) SetId(v string) { + o.Id = &v +} + +// GetAuthors returns the Authors field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetAuthors() []string { + if o == nil || IsNil(o.Authors) { + var ret []string + return ret + } + return o.Authors +} + +// GetAuthorsOk returns a tuple with the Authors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetAuthorsOk() ([]string, bool) { + if o == nil || IsNil(o.Authors) { + return nil, false + } + return o.Authors, true +} + +// HasAuthors returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasAuthors() bool { + if o != nil && !IsNil(o.Authors) { + return true + } + + return false +} + +// SetAuthors gets a reference to the given []string and assigns it to the Authors field. +func (o *AnsibleCollectionVersionResponse) SetAuthors(v []string) { + o.Authors = v +} + +// GetContents returns the Contents field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetContents() map[string]interface{} { + if o == nil || IsNil(o.Contents) { + var ret map[string]interface{} + return ret + } + return o.Contents +} + +// GetContentsOk returns a tuple with the Contents field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetContentsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Contents) { + return map[string]interface{}{}, false + } + return o.Contents, true +} + +// HasContents returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasContents() bool { + if o != nil && !IsNil(o.Contents) { + return true + } + + return false +} + +// SetContents gets a reference to the given map[string]interface{} and assigns it to the Contents field. +func (o *AnsibleCollectionVersionResponse) SetContents(v map[string]interface{}) { + o.Contents = v +} + +// GetDependencies returns the Dependencies field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetDependencies() map[string]interface{} { + if o == nil || IsNil(o.Dependencies) { + var ret map[string]interface{} + return ret + } + return o.Dependencies +} + +// GetDependenciesOk returns a tuple with the Dependencies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetDependenciesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Dependencies) { + return map[string]interface{}{}, false + } + return o.Dependencies, true +} + +// HasDependencies returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasDependencies() bool { + if o != nil && !IsNil(o.Dependencies) { + return true + } + + return false +} + +// SetDependencies gets a reference to the given map[string]interface{} and assigns it to the Dependencies field. +func (o *AnsibleCollectionVersionResponse) SetDependencies(v map[string]interface{}) { + o.Dependencies = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *AnsibleCollectionVersionResponse) SetDescription(v string) { + o.Description = &v +} + +// GetDocsBlob returns the DocsBlob field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetDocsBlob() map[string]interface{} { + if o == nil || IsNil(o.DocsBlob) { + var ret map[string]interface{} + return ret + } + return o.DocsBlob +} + +// GetDocsBlobOk returns a tuple with the DocsBlob field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetDocsBlobOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DocsBlob) { + return map[string]interface{}{}, false + } + return o.DocsBlob, true +} + +// HasDocsBlob returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasDocsBlob() bool { + if o != nil && !IsNil(o.DocsBlob) { + return true + } + + return false +} + +// SetDocsBlob gets a reference to the given map[string]interface{} and assigns it to the DocsBlob field. +func (o *AnsibleCollectionVersionResponse) SetDocsBlob(v map[string]interface{}) { + o.DocsBlob = v +} + +// GetManifest returns the Manifest field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetManifest() map[string]interface{} { + if o == nil || IsNil(o.Manifest) { + var ret map[string]interface{} + return ret + } + return o.Manifest +} + +// GetManifestOk returns a tuple with the Manifest field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetManifestOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Manifest) { + return map[string]interface{}{}, false + } + return o.Manifest, true +} + +// HasManifest returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasManifest() bool { + if o != nil && !IsNil(o.Manifest) { + return true + } + + return false +} + +// SetManifest gets a reference to the given map[string]interface{} and assigns it to the Manifest field. +func (o *AnsibleCollectionVersionResponse) SetManifest(v map[string]interface{}) { + o.Manifest = v +} + +// GetFiles returns the Files field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetFiles() map[string]interface{} { + if o == nil || IsNil(o.Files) { + var ret map[string]interface{} + return ret + } + return o.Files +} + +// GetFilesOk returns a tuple with the Files field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetFilesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Files) { + return map[string]interface{}{}, false + } + return o.Files, true +} + +// HasFiles returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasFiles() bool { + if o != nil && !IsNil(o.Files) { + return true + } + + return false +} + +// SetFiles gets a reference to the given map[string]interface{} and assigns it to the Files field. +func (o *AnsibleCollectionVersionResponse) SetFiles(v map[string]interface{}) { + o.Files = v +} + +// GetDocumentation returns the Documentation field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetDocumentation() string { + if o == nil || IsNil(o.Documentation) { + var ret string + return ret + } + return *o.Documentation +} + +// GetDocumentationOk returns a tuple with the Documentation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetDocumentationOk() (*string, bool) { + if o == nil || IsNil(o.Documentation) { + return nil, false + } + return o.Documentation, true +} + +// HasDocumentation returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasDocumentation() bool { + if o != nil && !IsNil(o.Documentation) { + return true + } + + return false +} + +// SetDocumentation gets a reference to the given string and assigns it to the Documentation field. +func (o *AnsibleCollectionVersionResponse) SetDocumentation(v string) { + o.Documentation = &v +} + +// GetHomepage returns the Homepage field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetHomepage() string { + if o == nil || IsNil(o.Homepage) { + var ret string + return ret + } + return *o.Homepage +} + +// GetHomepageOk returns a tuple with the Homepage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetHomepageOk() (*string, bool) { + if o == nil || IsNil(o.Homepage) { + return nil, false + } + return o.Homepage, true +} + +// HasHomepage returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasHomepage() bool { + if o != nil && !IsNil(o.Homepage) { + return true + } + + return false +} + +// SetHomepage gets a reference to the given string and assigns it to the Homepage field. +func (o *AnsibleCollectionVersionResponse) SetHomepage(v string) { + o.Homepage = &v +} + +// GetIssues returns the Issues field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetIssues() string { + if o == nil || IsNil(o.Issues) { + var ret string + return ret + } + return *o.Issues +} + +// GetIssuesOk returns a tuple with the Issues field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetIssuesOk() (*string, bool) { + if o == nil || IsNil(o.Issues) { + return nil, false + } + return o.Issues, true +} + +// HasIssues returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasIssues() bool { + if o != nil && !IsNil(o.Issues) { + return true + } + + return false +} + +// SetIssues gets a reference to the given string and assigns it to the Issues field. +func (o *AnsibleCollectionVersionResponse) SetIssues(v string) { + o.Issues = &v +} + +// GetLicense returns the License field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetLicense() []string { + if o == nil || IsNil(o.License) { + var ret []string + return ret + } + return o.License +} + +// GetLicenseOk returns a tuple with the License field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetLicenseOk() ([]string, bool) { + if o == nil || IsNil(o.License) { + return nil, false + } + return o.License, true +} + +// HasLicense returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasLicense() bool { + if o != nil && !IsNil(o.License) { + return true + } + + return false +} + +// SetLicense gets a reference to the given []string and assigns it to the License field. +func (o *AnsibleCollectionVersionResponse) SetLicense(v []string) { + o.License = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AnsibleCollectionVersionResponse) SetName(v string) { + o.Name = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *AnsibleCollectionVersionResponse) SetNamespace(v string) { + o.Namespace = &v +} + +// GetOriginRepository returns the OriginRepository field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetOriginRepository() string { + if o == nil || IsNil(o.OriginRepository) { + var ret string + return ret + } + return *o.OriginRepository +} + +// GetOriginRepositoryOk returns a tuple with the OriginRepository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetOriginRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.OriginRepository) { + return nil, false + } + return o.OriginRepository, true +} + +// HasOriginRepository returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasOriginRepository() bool { + if o != nil && !IsNil(o.OriginRepository) { + return true + } + + return false +} + +// SetOriginRepository gets a reference to the given string and assigns it to the OriginRepository field. +func (o *AnsibleCollectionVersionResponse) SetOriginRepository(v string) { + o.OriginRepository = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetTags() []AnsibleTagResponse { + if o == nil || IsNil(o.Tags) { + var ret []AnsibleTagResponse + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetTagsOk() ([]AnsibleTagResponse, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []AnsibleTagResponse and assigns it to the Tags field. +func (o *AnsibleCollectionVersionResponse) SetTags(v []AnsibleTagResponse) { + o.Tags = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionResponse) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionResponse) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *AnsibleCollectionVersionResponse) SetVersion(v string) { + o.Version = &v +} + +// GetRequiresAnsible returns the RequiresAnsible field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionVersionResponse) GetRequiresAnsible() string { + if o == nil || IsNil(o.RequiresAnsible.Get()) { + var ret string + return ret + } + return *o.RequiresAnsible.Get() +} + +// GetRequiresAnsibleOk returns a tuple with the RequiresAnsible field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionVersionResponse) GetRequiresAnsibleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RequiresAnsible.Get(), o.RequiresAnsible.IsSet() +} + +// HasRequiresAnsible returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionResponse) HasRequiresAnsible() bool { + if o != nil && o.RequiresAnsible.IsSet() { + return true + } + + return false +} + +// SetRequiresAnsible gets a reference to the given NullableString and assigns it to the RequiresAnsible field. +func (o *AnsibleCollectionVersionResponse) SetRequiresAnsible(v string) { + o.RequiresAnsible.Set(&v) +} +// SetRequiresAnsibleNil sets the value for RequiresAnsible to be an explicit nil +func (o *AnsibleCollectionVersionResponse) SetRequiresAnsibleNil() { + o.RequiresAnsible.Set(nil) +} + +// UnsetRequiresAnsible ensures that no value is present for RequiresAnsible, not even an explicit nil +func (o *AnsibleCollectionVersionResponse) UnsetRequiresAnsible() { + o.RequiresAnsible.Unset() +} + +func (o AnsibleCollectionVersionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleCollectionVersionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.Sha256) { + toSerialize["sha256"] = o.Sha256 + } + if !IsNil(o.Md5) { + toSerialize["md5"] = o.Md5 + } + if !IsNil(o.Sha1) { + toSerialize["sha1"] = o.Sha1 + } + if !IsNil(o.Sha224) { + toSerialize["sha224"] = o.Sha224 + } + if !IsNil(o.Sha384) { + toSerialize["sha384"] = o.Sha384 + } + if !IsNil(o.Sha512) { + toSerialize["sha512"] = o.Sha512 + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Authors) { + toSerialize["authors"] = o.Authors + } + if !IsNil(o.Contents) { + toSerialize["contents"] = o.Contents + } + if !IsNil(o.Dependencies) { + toSerialize["dependencies"] = o.Dependencies + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.DocsBlob) { + toSerialize["docs_blob"] = o.DocsBlob + } + if !IsNil(o.Manifest) { + toSerialize["manifest"] = o.Manifest + } + if !IsNil(o.Files) { + toSerialize["files"] = o.Files + } + if !IsNil(o.Documentation) { + toSerialize["documentation"] = o.Documentation + } + if !IsNil(o.Homepage) { + toSerialize["homepage"] = o.Homepage + } + if !IsNil(o.Issues) { + toSerialize["issues"] = o.Issues + } + if !IsNil(o.License) { + toSerialize["license"] = o.License + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + if !IsNil(o.OriginRepository) { + toSerialize["origin_repository"] = o.OriginRepository + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if o.RequiresAnsible.IsSet() { + toSerialize["requires_ansible"] = o.RequiresAnsible.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleCollectionVersionResponse) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleCollectionVersionResponse := _AnsibleCollectionVersionResponse{} + + if err = json.Unmarshal(bytes, &varAnsibleCollectionVersionResponse); err == nil { + *o = AnsibleCollectionVersionResponse(varAnsibleCollectionVersionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "artifact") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "sha256") + delete(additionalProperties, "md5") + delete(additionalProperties, "sha1") + delete(additionalProperties, "sha224") + delete(additionalProperties, "sha384") + delete(additionalProperties, "sha512") + delete(additionalProperties, "id") + delete(additionalProperties, "authors") + delete(additionalProperties, "contents") + delete(additionalProperties, "dependencies") + delete(additionalProperties, "description") + delete(additionalProperties, "docs_blob") + delete(additionalProperties, "manifest") + delete(additionalProperties, "files") + delete(additionalProperties, "documentation") + delete(additionalProperties, "homepage") + delete(additionalProperties, "issues") + delete(additionalProperties, "license") + delete(additionalProperties, "name") + delete(additionalProperties, "namespace") + delete(additionalProperties, "origin_repository") + delete(additionalProperties, "tags") + delete(additionalProperties, "version") + delete(additionalProperties, "requires_ansible") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleCollectionVersionResponse struct { + value *AnsibleCollectionVersionResponse + isSet bool +} + +func (v NullableAnsibleCollectionVersionResponse) Get() *AnsibleCollectionVersionResponse { + return v.value +} + +func (v *NullableAnsibleCollectionVersionResponse) Set(val *AnsibleCollectionVersionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleCollectionVersionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleCollectionVersionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleCollectionVersionResponse(val *AnsibleCollectionVersionResponse) *NullableAnsibleCollectionVersionResponse { + return &NullableAnsibleCollectionVersionResponse{value: val, isSet: true} +} + +func (v NullableAnsibleCollectionVersionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleCollectionVersionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_signature.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_signature.go new file mode 100644 index 0000000000..0a377835bc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_signature.go @@ -0,0 +1,212 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the AnsibleCollectionVersionSignature type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleCollectionVersionSignature{} + +// AnsibleCollectionVersionSignature A serializer for signature models. +type AnsibleCollectionVersionSignature struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // An uploaded file that may be turned into the artifact of the content unit. + File *os.File `json:"file"` + // The content this signature is pointing to. + SignedCollection string `json:"signed_collection"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleCollectionVersionSignature AnsibleCollectionVersionSignature + +// NewAnsibleCollectionVersionSignature instantiates a new AnsibleCollectionVersionSignature object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleCollectionVersionSignature(file *os.File, signedCollection string) *AnsibleCollectionVersionSignature { + this := AnsibleCollectionVersionSignature{} + this.File = file + this.SignedCollection = signedCollection + return &this +} + +// NewAnsibleCollectionVersionSignatureWithDefaults instantiates a new AnsibleCollectionVersionSignature object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleCollectionVersionSignatureWithDefaults() *AnsibleCollectionVersionSignature { + this := AnsibleCollectionVersionSignature{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionSignature) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionSignature) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionSignature) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *AnsibleCollectionVersionSignature) SetRepository(v string) { + o.Repository = &v +} + +// GetFile returns the File field value +func (o *AnsibleCollectionVersionSignature) GetFile() *os.File { + if o == nil { + var ret *os.File + return ret + } + + return o.File +} + +// GetFileOk returns a tuple with the File field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionSignature) GetFileOk() (**os.File, bool) { + if o == nil { + return nil, false + } + return &o.File, true +} + +// SetFile sets field value +func (o *AnsibleCollectionVersionSignature) SetFile(v *os.File) { + o.File = v +} + +// GetSignedCollection returns the SignedCollection field value +func (o *AnsibleCollectionVersionSignature) GetSignedCollection() string { + if o == nil { + var ret string + return ret + } + + return o.SignedCollection +} + +// GetSignedCollectionOk returns a tuple with the SignedCollection field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionSignature) GetSignedCollectionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SignedCollection, true +} + +// SetSignedCollection sets field value +func (o *AnsibleCollectionVersionSignature) SetSignedCollection(v string) { + o.SignedCollection = v +} + +func (o AnsibleCollectionVersionSignature) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleCollectionVersionSignature) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["file"] = o.File + toSerialize["signed_collection"] = o.SignedCollection + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleCollectionVersionSignature) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleCollectionVersionSignature := _AnsibleCollectionVersionSignature{} + + if err = json.Unmarshal(bytes, &varAnsibleCollectionVersionSignature); err == nil { + *o = AnsibleCollectionVersionSignature(varAnsibleCollectionVersionSignature) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "file") + delete(additionalProperties, "signed_collection") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleCollectionVersionSignature struct { + value *AnsibleCollectionVersionSignature + isSet bool +} + +func (v NullableAnsibleCollectionVersionSignature) Get() *AnsibleCollectionVersionSignature { + return v.value +} + +func (v *NullableAnsibleCollectionVersionSignature) Set(val *AnsibleCollectionVersionSignature) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleCollectionVersionSignature) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleCollectionVersionSignature) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleCollectionVersionSignature(val *AnsibleCollectionVersionSignature) *NullableAnsibleCollectionVersionSignature { + return &NullableAnsibleCollectionVersionSignature{value: val, isSet: true} +} + +func (v NullableAnsibleCollectionVersionSignature) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleCollectionVersionSignature) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_signature_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_signature_response.go new file mode 100644 index 0000000000..deef6cfa83 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_collection_version_signature_response.go @@ -0,0 +1,306 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the AnsibleCollectionVersionSignatureResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleCollectionVersionSignatureResponse{} + +// AnsibleCollectionVersionSignatureResponse A serializer for signature models. +type AnsibleCollectionVersionSignatureResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The content this signature is pointing to. + SignedCollection string `json:"signed_collection"` + // The fingerprint of the public key. + PubkeyFingerprint *string `json:"pubkey_fingerprint,omitempty"` + // The signing service used to create the signature. + SigningService NullableString `json:"signing_service,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleCollectionVersionSignatureResponse AnsibleCollectionVersionSignatureResponse + +// NewAnsibleCollectionVersionSignatureResponse instantiates a new AnsibleCollectionVersionSignatureResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleCollectionVersionSignatureResponse(signedCollection string) *AnsibleCollectionVersionSignatureResponse { + this := AnsibleCollectionVersionSignatureResponse{} + this.SignedCollection = signedCollection + return &this +} + +// NewAnsibleCollectionVersionSignatureResponseWithDefaults instantiates a new AnsibleCollectionVersionSignatureResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleCollectionVersionSignatureResponseWithDefaults() *AnsibleCollectionVersionSignatureResponse { + this := AnsibleCollectionVersionSignatureResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionSignatureResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionSignatureResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionSignatureResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *AnsibleCollectionVersionSignatureResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionSignatureResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionSignatureResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionSignatureResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *AnsibleCollectionVersionSignatureResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetSignedCollection returns the SignedCollection field value +func (o *AnsibleCollectionVersionSignatureResponse) GetSignedCollection() string { + if o == nil { + var ret string + return ret + } + + return o.SignedCollection +} + +// GetSignedCollectionOk returns a tuple with the SignedCollection field value +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionSignatureResponse) GetSignedCollectionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SignedCollection, true +} + +// SetSignedCollection sets field value +func (o *AnsibleCollectionVersionSignatureResponse) SetSignedCollection(v string) { + o.SignedCollection = v +} + +// GetPubkeyFingerprint returns the PubkeyFingerprint field value if set, zero value otherwise. +func (o *AnsibleCollectionVersionSignatureResponse) GetPubkeyFingerprint() string { + if o == nil || IsNil(o.PubkeyFingerprint) { + var ret string + return ret + } + return *o.PubkeyFingerprint +} + +// GetPubkeyFingerprintOk returns a tuple with the PubkeyFingerprint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleCollectionVersionSignatureResponse) GetPubkeyFingerprintOk() (*string, bool) { + if o == nil || IsNil(o.PubkeyFingerprint) { + return nil, false + } + return o.PubkeyFingerprint, true +} + +// HasPubkeyFingerprint returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionSignatureResponse) HasPubkeyFingerprint() bool { + if o != nil && !IsNil(o.PubkeyFingerprint) { + return true + } + + return false +} + +// SetPubkeyFingerprint gets a reference to the given string and assigns it to the PubkeyFingerprint field. +func (o *AnsibleCollectionVersionSignatureResponse) SetPubkeyFingerprint(v string) { + o.PubkeyFingerprint = &v +} + +// GetSigningService returns the SigningService field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleCollectionVersionSignatureResponse) GetSigningService() string { + if o == nil || IsNil(o.SigningService.Get()) { + var ret string + return ret + } + return *o.SigningService.Get() +} + +// GetSigningServiceOk returns a tuple with the SigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleCollectionVersionSignatureResponse) GetSigningServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SigningService.Get(), o.SigningService.IsSet() +} + +// HasSigningService returns a boolean if a field has been set. +func (o *AnsibleCollectionVersionSignatureResponse) HasSigningService() bool { + if o != nil && o.SigningService.IsSet() { + return true + } + + return false +} + +// SetSigningService gets a reference to the given NullableString and assigns it to the SigningService field. +func (o *AnsibleCollectionVersionSignatureResponse) SetSigningService(v string) { + o.SigningService.Set(&v) +} +// SetSigningServiceNil sets the value for SigningService to be an explicit nil +func (o *AnsibleCollectionVersionSignatureResponse) SetSigningServiceNil() { + o.SigningService.Set(nil) +} + +// UnsetSigningService ensures that no value is present for SigningService, not even an explicit nil +func (o *AnsibleCollectionVersionSignatureResponse) UnsetSigningService() { + o.SigningService.Unset() +} + +func (o AnsibleCollectionVersionSignatureResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleCollectionVersionSignatureResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["signed_collection"] = o.SignedCollection + if !IsNil(o.PubkeyFingerprint) { + toSerialize["pubkey_fingerprint"] = o.PubkeyFingerprint + } + if o.SigningService.IsSet() { + toSerialize["signing_service"] = o.SigningService.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleCollectionVersionSignatureResponse) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleCollectionVersionSignatureResponse := _AnsibleCollectionVersionSignatureResponse{} + + if err = json.Unmarshal(bytes, &varAnsibleCollectionVersionSignatureResponse); err == nil { + *o = AnsibleCollectionVersionSignatureResponse(varAnsibleCollectionVersionSignatureResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "signed_collection") + delete(additionalProperties, "pubkey_fingerprint") + delete(additionalProperties, "signing_service") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleCollectionVersionSignatureResponse struct { + value *AnsibleCollectionVersionSignatureResponse + isSet bool +} + +func (v NullableAnsibleCollectionVersionSignatureResponse) Get() *AnsibleCollectionVersionSignatureResponse { + return v.value +} + +func (v *NullableAnsibleCollectionVersionSignatureResponse) Set(val *AnsibleCollectionVersionSignatureResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleCollectionVersionSignatureResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleCollectionVersionSignatureResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleCollectionVersionSignatureResponse(val *AnsibleCollectionVersionSignatureResponse) *NullableAnsibleCollectionVersionSignatureResponse { + return &NullableAnsibleCollectionVersionSignatureResponse{value: val, isSet: true} +} + +func (v NullableAnsibleCollectionVersionSignatureResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleCollectionVersionSignatureResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_git_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_git_remote.go new file mode 100644 index 0000000000..585e866037 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_git_remote.go @@ -0,0 +1,1082 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleGitRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleGitRemote{} + +// AnsibleGitRemote A serializer for Git Collection Remotes. +type AnsibleGitRemote struct { + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // If True, only metadata about the content will be stored in Pulp. Clients will retrieve content from the remote URL. + MetadataOnly *bool `json:"metadata_only,omitempty"` + // A git ref. e.g.: branch, tag, or commit sha. + GitRef *string `json:"git_ref,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleGitRemote AnsibleGitRemote + +// NewAnsibleGitRemote instantiates a new AnsibleGitRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleGitRemote(url string, name string) *AnsibleGitRemote { + this := AnsibleGitRemote{} + this.Url = url + this.Name = name + return &this +} + +// NewAnsibleGitRemoteWithDefaults instantiates a new AnsibleGitRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleGitRemoteWithDefaults() *AnsibleGitRemote { + this := AnsibleGitRemote{} + return &this +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *AnsibleGitRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *AnsibleGitRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *AnsibleGitRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *AnsibleGitRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *AnsibleGitRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *AnsibleGitRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *AnsibleGitRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *AnsibleGitRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *AnsibleGitRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *AnsibleGitRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *AnsibleGitRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *AnsibleGitRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetUrl returns the Url field value +func (o *AnsibleGitRemote) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemote) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *AnsibleGitRemote) SetUrl(v string) { + o.Url = v +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *AnsibleGitRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *AnsibleGitRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *AnsibleGitRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *AnsibleGitRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *AnsibleGitRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *AnsibleGitRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *AnsibleGitRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *AnsibleGitRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *AnsibleGitRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *AnsibleGitRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *AnsibleGitRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *AnsibleGitRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *AnsibleGitRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *AnsibleGitRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *AnsibleGitRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *AnsibleGitRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *AnsibleGitRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *AnsibleGitRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *AnsibleGitRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *AnsibleGitRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *AnsibleGitRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *AnsibleGitRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *AnsibleGitRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *AnsibleGitRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *AnsibleGitRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *AnsibleGitRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *AnsibleGitRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *AnsibleGitRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *AnsibleGitRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *AnsibleGitRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetName returns the Name field value +func (o *AnsibleGitRemote) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemote) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleGitRemote) SetName(v string) { + o.Name = v +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *AnsibleGitRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *AnsibleGitRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *AnsibleGitRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *AnsibleGitRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *AnsibleGitRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *AnsibleGitRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *AnsibleGitRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *AnsibleGitRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *AnsibleGitRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMetadataOnly returns the MetadataOnly field value if set, zero value otherwise. +func (o *AnsibleGitRemote) GetMetadataOnly() bool { + if o == nil || IsNil(o.MetadataOnly) { + var ret bool + return ret + } + return *o.MetadataOnly +} + +// GetMetadataOnlyOk returns a tuple with the MetadataOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemote) GetMetadataOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.MetadataOnly) { + return nil, false + } + return o.MetadataOnly, true +} + +// HasMetadataOnly returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasMetadataOnly() bool { + if o != nil && !IsNil(o.MetadataOnly) { + return true + } + + return false +} + +// SetMetadataOnly gets a reference to the given bool and assigns it to the MetadataOnly field. +func (o *AnsibleGitRemote) SetMetadataOnly(v bool) { + o.MetadataOnly = &v +} + +// GetGitRef returns the GitRef field value if set, zero value otherwise. +func (o *AnsibleGitRemote) GetGitRef() string { + if o == nil || IsNil(o.GitRef) { + var ret string + return ret + } + return *o.GitRef +} + +// GetGitRefOk returns a tuple with the GitRef field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemote) GetGitRefOk() (*string, bool) { + if o == nil || IsNil(o.GitRef) { + return nil, false + } + return o.GitRef, true +} + +// HasGitRef returns a boolean if a field has been set. +func (o *AnsibleGitRemote) HasGitRef() bool { + if o != nil && !IsNil(o.GitRef) { + return true + } + + return false +} + +// SetGitRef gets a reference to the given string and assigns it to the GitRef field. +func (o *AnsibleGitRemote) SetGitRef(v string) { + o.GitRef = &v +} + +func (o AnsibleGitRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleGitRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + toSerialize["url"] = o.Url + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + toSerialize["name"] = o.Name + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if !IsNil(o.MetadataOnly) { + toSerialize["metadata_only"] = o.MetadataOnly + } + if !IsNil(o.GitRef) { + toSerialize["git_ref"] = o.GitRef + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleGitRemote) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleGitRemote := _AnsibleGitRemote{} + + if err = json.Unmarshal(bytes, &varAnsibleGitRemote); err == nil { + *o = AnsibleGitRemote(varAnsibleGitRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "headers") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "url") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "username") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "password") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "name") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "metadata_only") + delete(additionalProperties, "git_ref") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleGitRemote struct { + value *AnsibleGitRemote + isSet bool +} + +func (v NullableAnsibleGitRemote) Get() *AnsibleGitRemote { + return v.value +} + +func (v *NullableAnsibleGitRemote) Set(val *AnsibleGitRemote) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleGitRemote) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleGitRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleGitRemote(val *AnsibleGitRemote) *NullableAnsibleGitRemote { + return &NullableAnsibleGitRemote{value: val, isSet: true} +} + +func (v NullableAnsibleGitRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleGitRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_git_remote_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_git_remote_response.go new file mode 100644 index 0000000000..07f9944766 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_git_remote_response.go @@ -0,0 +1,994 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the AnsibleGitRemoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleGitRemoteResponse{} + +// AnsibleGitRemoteResponse A serializer for Git Collection Remotes. +type AnsibleGitRemoteResponse struct { + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + PulpHref *string `json:"pulp_href,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // If True, only metadata about the content will be stored in Pulp. Clients will retrieve content from the remote URL. + MetadataOnly *bool `json:"metadata_only,omitempty"` + // A git ref. e.g.: branch, tag, or commit sha. + GitRef *string `json:"git_ref,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleGitRemoteResponse AnsibleGitRemoteResponse + +// NewAnsibleGitRemoteResponse instantiates a new AnsibleGitRemoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleGitRemoteResponse(url string, name string) *AnsibleGitRemoteResponse { + this := AnsibleGitRemoteResponse{} + this.Url = url + this.Name = name + return &this +} + +// NewAnsibleGitRemoteResponseWithDefaults instantiates a new AnsibleGitRemoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleGitRemoteResponseWithDefaults() *AnsibleGitRemoteResponse { + this := AnsibleGitRemoteResponse{} + return &this +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *AnsibleGitRemoteResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemoteResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *AnsibleGitRemoteResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *AnsibleGitRemoteResponse) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemoteResponse) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *AnsibleGitRemoteResponse) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *AnsibleGitRemoteResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemoteResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *AnsibleGitRemoteResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *AnsibleGitRemoteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemoteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *AnsibleGitRemoteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemoteResponse) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemoteResponse) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *AnsibleGitRemoteResponse) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *AnsibleGitRemoteResponse) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *AnsibleGitRemoteResponse) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetUrl returns the Url field value +func (o *AnsibleGitRemoteResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemoteResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *AnsibleGitRemoteResponse) SetUrl(v string) { + o.Url = v +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemoteResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemoteResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *AnsibleGitRemoteResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *AnsibleGitRemoteResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *AnsibleGitRemoteResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemoteResponse) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemoteResponse) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *AnsibleGitRemoteResponse) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *AnsibleGitRemoteResponse) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *AnsibleGitRemoteResponse) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemoteResponse) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemoteResponse) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *AnsibleGitRemoteResponse) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *AnsibleGitRemoteResponse) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *AnsibleGitRemoteResponse) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemoteResponse) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemoteResponse) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *AnsibleGitRemoteResponse) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *AnsibleGitRemoteResponse) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *AnsibleGitRemoteResponse) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemoteResponse) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemoteResponse) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *AnsibleGitRemoteResponse) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *AnsibleGitRemoteResponse) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *AnsibleGitRemoteResponse) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *AnsibleGitRemoteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemoteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *AnsibleGitRemoteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemoteResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemoteResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *AnsibleGitRemoteResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *AnsibleGitRemoteResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *AnsibleGitRemoteResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemoteResponse) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemoteResponse) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *AnsibleGitRemoteResponse) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *AnsibleGitRemoteResponse) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *AnsibleGitRemoteResponse) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetName returns the Name field value +func (o *AnsibleGitRemoteResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemoteResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleGitRemoteResponse) SetName(v string) { + o.Name = v +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemoteResponse) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemoteResponse) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *AnsibleGitRemoteResponse) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *AnsibleGitRemoteResponse) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *AnsibleGitRemoteResponse) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *AnsibleGitRemoteResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemoteResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *AnsibleGitRemoteResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *AnsibleGitRemoteResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemoteResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *AnsibleGitRemoteResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleGitRemoteResponse) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleGitRemoteResponse) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *AnsibleGitRemoteResponse) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *AnsibleGitRemoteResponse) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *AnsibleGitRemoteResponse) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMetadataOnly returns the MetadataOnly field value if set, zero value otherwise. +func (o *AnsibleGitRemoteResponse) GetMetadataOnly() bool { + if o == nil || IsNil(o.MetadataOnly) { + var ret bool + return ret + } + return *o.MetadataOnly +} + +// GetMetadataOnlyOk returns a tuple with the MetadataOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemoteResponse) GetMetadataOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.MetadataOnly) { + return nil, false + } + return o.MetadataOnly, true +} + +// HasMetadataOnly returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasMetadataOnly() bool { + if o != nil && !IsNil(o.MetadataOnly) { + return true + } + + return false +} + +// SetMetadataOnly gets a reference to the given bool and assigns it to the MetadataOnly field. +func (o *AnsibleGitRemoteResponse) SetMetadataOnly(v bool) { + o.MetadataOnly = &v +} + +// GetGitRef returns the GitRef field value if set, zero value otherwise. +func (o *AnsibleGitRemoteResponse) GetGitRef() string { + if o == nil || IsNil(o.GitRef) { + var ret string + return ret + } + return *o.GitRef +} + +// GetGitRefOk returns a tuple with the GitRef field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleGitRemoteResponse) GetGitRefOk() (*string, bool) { + if o == nil || IsNil(o.GitRef) { + return nil, false + } + return o.GitRef, true +} + +// HasGitRef returns a boolean if a field has been set. +func (o *AnsibleGitRemoteResponse) HasGitRef() bool { + if o != nil && !IsNil(o.GitRef) { + return true + } + + return false +} + +// SetGitRef gets a reference to the given string and assigns it to the GitRef field. +func (o *AnsibleGitRemoteResponse) SetGitRef(v string) { + o.GitRef = &v +} + +func (o AnsibleGitRemoteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleGitRemoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + toSerialize["url"] = o.Url + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + toSerialize["name"] = o.Name + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if !IsNil(o.MetadataOnly) { + toSerialize["metadata_only"] = o.MetadataOnly + } + if !IsNil(o.GitRef) { + toSerialize["git_ref"] = o.GitRef + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleGitRemoteResponse) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleGitRemoteResponse := _AnsibleGitRemoteResponse{} + + if err = json.Unmarshal(bytes, &varAnsibleGitRemoteResponse); err == nil { + *o = AnsibleGitRemoteResponse(varAnsibleGitRemoteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "headers") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "url") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "name") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "hidden_fields") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "metadata_only") + delete(additionalProperties, "git_ref") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleGitRemoteResponse struct { + value *AnsibleGitRemoteResponse + isSet bool +} + +func (v NullableAnsibleGitRemoteResponse) Get() *AnsibleGitRemoteResponse { + return v.value +} + +func (v *NullableAnsibleGitRemoteResponse) Set(val *AnsibleGitRemoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleGitRemoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleGitRemoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleGitRemoteResponse(val *AnsibleGitRemoteResponse) *NullableAnsibleGitRemoteResponse { + return &NullableAnsibleGitRemoteResponse{value: val, isSet: true} +} + +func (v NullableAnsibleGitRemoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleGitRemoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_mark.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_mark.go new file mode 100644 index 0000000000..76a03eb375 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_mark.go @@ -0,0 +1,173 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleRepositoryMark type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleRepositoryMark{} + +// AnsibleRepositoryMark A serializer for the mark action. +type AnsibleRepositoryMark struct { + // List of collection version hrefs to mark, use * to mark all content in repository + ContentUnits []interface{} `json:"content_units"` + // The string value of this mark. + Value string `json:"value"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleRepositoryMark AnsibleRepositoryMark + +// NewAnsibleRepositoryMark instantiates a new AnsibleRepositoryMark object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleRepositoryMark(contentUnits []interface{}, value string) *AnsibleRepositoryMark { + this := AnsibleRepositoryMark{} + this.ContentUnits = contentUnits + this.Value = value + return &this +} + +// NewAnsibleRepositoryMarkWithDefaults instantiates a new AnsibleRepositoryMark object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleRepositoryMarkWithDefaults() *AnsibleRepositoryMark { + this := AnsibleRepositoryMark{} + return &this +} + +// GetContentUnits returns the ContentUnits field value +func (o *AnsibleRepositoryMark) GetContentUnits() []interface{} { + if o == nil { + var ret []interface{} + return ret + } + + return o.ContentUnits +} + +// GetContentUnitsOk returns a tuple with the ContentUnits field value +// and a boolean to check if the value has been set. +func (o *AnsibleRepositoryMark) GetContentUnitsOk() ([]interface{}, bool) { + if o == nil { + return nil, false + } + return o.ContentUnits, true +} + +// SetContentUnits sets field value +func (o *AnsibleRepositoryMark) SetContentUnits(v []interface{}) { + o.ContentUnits = v +} + +// GetValue returns the Value field value +func (o *AnsibleRepositoryMark) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *AnsibleRepositoryMark) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *AnsibleRepositoryMark) SetValue(v string) { + o.Value = v +} + +func (o AnsibleRepositoryMark) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleRepositoryMark) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["content_units"] = o.ContentUnits + toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleRepositoryMark) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleRepositoryMark := _AnsibleRepositoryMark{} + + if err = json.Unmarshal(bytes, &varAnsibleRepositoryMark); err == nil { + *o = AnsibleRepositoryMark(varAnsibleRepositoryMark) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "content_units") + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleRepositoryMark struct { + value *AnsibleRepositoryMark + isSet bool +} + +func (v NullableAnsibleRepositoryMark) Get() *AnsibleRepositoryMark { + return v.value +} + +func (v *NullableAnsibleRepositoryMark) Set(val *AnsibleRepositoryMark) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleRepositoryMark) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleRepositoryMark) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleRepositoryMark(val *AnsibleRepositoryMark) *NullableAnsibleRepositoryMark { + return &NullableAnsibleRepositoryMark{value: val, isSet: true} +} + +func (v NullableAnsibleRepositoryMark) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleRepositoryMark) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_rebuild.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_rebuild.go new file mode 100644 index 0000000000..54e4788823 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_rebuild.go @@ -0,0 +1,256 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleRepositoryRebuild type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleRepositoryRebuild{} + +// AnsibleRepositoryRebuild Serializer for Ansible Repository Rebuild. +type AnsibleRepositoryRebuild struct { + Namespace NullableString `json:"namespace,omitempty"` + Name NullableString `json:"name,omitempty"` + Version NullableString `json:"version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleRepositoryRebuild AnsibleRepositoryRebuild + +// NewAnsibleRepositoryRebuild instantiates a new AnsibleRepositoryRebuild object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleRepositoryRebuild() *AnsibleRepositoryRebuild { + this := AnsibleRepositoryRebuild{} + return &this +} + +// NewAnsibleRepositoryRebuildWithDefaults instantiates a new AnsibleRepositoryRebuild object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleRepositoryRebuildWithDefaults() *AnsibleRepositoryRebuild { + this := AnsibleRepositoryRebuild{} + return &this +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRepositoryRebuild) GetNamespace() string { + if o == nil || IsNil(o.Namespace.Get()) { + var ret string + return ret + } + return *o.Namespace.Get() +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRepositoryRebuild) GetNamespaceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Namespace.Get(), o.Namespace.IsSet() +} + +// HasNamespace returns a boolean if a field has been set. +func (o *AnsibleRepositoryRebuild) HasNamespace() bool { + if o != nil && o.Namespace.IsSet() { + return true + } + + return false +} + +// SetNamespace gets a reference to the given NullableString and assigns it to the Namespace field. +func (o *AnsibleRepositoryRebuild) SetNamespace(v string) { + o.Namespace.Set(&v) +} +// SetNamespaceNil sets the value for Namespace to be an explicit nil +func (o *AnsibleRepositoryRebuild) SetNamespaceNil() { + o.Namespace.Set(nil) +} + +// UnsetNamespace ensures that no value is present for Namespace, not even an explicit nil +func (o *AnsibleRepositoryRebuild) UnsetNamespace() { + o.Namespace.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRepositoryRebuild) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRepositoryRebuild) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *AnsibleRepositoryRebuild) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *AnsibleRepositoryRebuild) SetName(v string) { + o.Name.Set(&v) +} +// SetNameNil sets the value for Name to be an explicit nil +func (o *AnsibleRepositoryRebuild) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *AnsibleRepositoryRebuild) UnsetName() { + o.Name.Unset() +} + +// GetVersion returns the Version field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRepositoryRebuild) GetVersion() string { + if o == nil || IsNil(o.Version.Get()) { + var ret string + return ret + } + return *o.Version.Get() +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRepositoryRebuild) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Version.Get(), o.Version.IsSet() +} + +// HasVersion returns a boolean if a field has been set. +func (o *AnsibleRepositoryRebuild) HasVersion() bool { + if o != nil && o.Version.IsSet() { + return true + } + + return false +} + +// SetVersion gets a reference to the given NullableString and assigns it to the Version field. +func (o *AnsibleRepositoryRebuild) SetVersion(v string) { + o.Version.Set(&v) +} +// SetVersionNil sets the value for Version to be an explicit nil +func (o *AnsibleRepositoryRebuild) SetVersionNil() { + o.Version.Set(nil) +} + +// UnsetVersion ensures that no value is present for Version, not even an explicit nil +func (o *AnsibleRepositoryRebuild) UnsetVersion() { + o.Version.Unset() +} + +func (o AnsibleRepositoryRebuild) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleRepositoryRebuild) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Namespace.IsSet() { + toSerialize["namespace"] = o.Namespace.Get() + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.Version.IsSet() { + toSerialize["version"] = o.Version.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleRepositoryRebuild) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleRepositoryRebuild := _AnsibleRepositoryRebuild{} + + if err = json.Unmarshal(bytes, &varAnsibleRepositoryRebuild); err == nil { + *o = AnsibleRepositoryRebuild(varAnsibleRepositoryRebuild) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "namespace") + delete(additionalProperties, "name") + delete(additionalProperties, "version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleRepositoryRebuild struct { + value *AnsibleRepositoryRebuild + isSet bool +} + +func (v NullableAnsibleRepositoryRebuild) Get() *AnsibleRepositoryRebuild { + return v.value +} + +func (v *NullableAnsibleRepositoryRebuild) Set(val *AnsibleRepositoryRebuild) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleRepositoryRebuild) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleRepositoryRebuild) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleRepositoryRebuild(val *AnsibleRepositoryRebuild) *NullableAnsibleRepositoryRebuild { + return &NullableAnsibleRepositoryRebuild{value: val, isSet: true} +} + +func (v NullableAnsibleRepositoryRebuild) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleRepositoryRebuild) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_signature.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_signature.go new file mode 100644 index 0000000000..66c92b6a70 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_signature.go @@ -0,0 +1,173 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleRepositorySignature type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleRepositorySignature{} + +// AnsibleRepositorySignature A serializer for the signing action. +type AnsibleRepositorySignature struct { + // List of collection version hrefs to sign, use * to sign all content in repository + ContentUnits []interface{} `json:"content_units"` + // A signing service to use to sign the collections + SigningService string `json:"signing_service"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleRepositorySignature AnsibleRepositorySignature + +// NewAnsibleRepositorySignature instantiates a new AnsibleRepositorySignature object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleRepositorySignature(contentUnits []interface{}, signingService string) *AnsibleRepositorySignature { + this := AnsibleRepositorySignature{} + this.ContentUnits = contentUnits + this.SigningService = signingService + return &this +} + +// NewAnsibleRepositorySignatureWithDefaults instantiates a new AnsibleRepositorySignature object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleRepositorySignatureWithDefaults() *AnsibleRepositorySignature { + this := AnsibleRepositorySignature{} + return &this +} + +// GetContentUnits returns the ContentUnits field value +func (o *AnsibleRepositorySignature) GetContentUnits() []interface{} { + if o == nil { + var ret []interface{} + return ret + } + + return o.ContentUnits +} + +// GetContentUnitsOk returns a tuple with the ContentUnits field value +// and a boolean to check if the value has been set. +func (o *AnsibleRepositorySignature) GetContentUnitsOk() ([]interface{}, bool) { + if o == nil { + return nil, false + } + return o.ContentUnits, true +} + +// SetContentUnits sets field value +func (o *AnsibleRepositorySignature) SetContentUnits(v []interface{}) { + o.ContentUnits = v +} + +// GetSigningService returns the SigningService field value +func (o *AnsibleRepositorySignature) GetSigningService() string { + if o == nil { + var ret string + return ret + } + + return o.SigningService +} + +// GetSigningServiceOk returns a tuple with the SigningService field value +// and a boolean to check if the value has been set. +func (o *AnsibleRepositorySignature) GetSigningServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SigningService, true +} + +// SetSigningService sets field value +func (o *AnsibleRepositorySignature) SetSigningService(v string) { + o.SigningService = v +} + +func (o AnsibleRepositorySignature) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleRepositorySignature) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["content_units"] = o.ContentUnits + toSerialize["signing_service"] = o.SigningService + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleRepositorySignature) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleRepositorySignature := _AnsibleRepositorySignature{} + + if err = json.Unmarshal(bytes, &varAnsibleRepositorySignature); err == nil { + *o = AnsibleRepositorySignature(varAnsibleRepositorySignature) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "content_units") + delete(additionalProperties, "signing_service") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleRepositorySignature struct { + value *AnsibleRepositorySignature + isSet bool +} + +func (v NullableAnsibleRepositorySignature) Get() *AnsibleRepositorySignature { + return v.value +} + +func (v *NullableAnsibleRepositorySignature) Set(val *AnsibleRepositorySignature) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleRepositorySignature) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleRepositorySignature) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleRepositorySignature(val *AnsibleRepositorySignature) *NullableAnsibleRepositorySignature { + return &NullableAnsibleRepositorySignature{value: val, isSet: true} +} + +func (v NullableAnsibleRepositorySignature) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleRepositorySignature) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_sync_url.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_sync_url.go new file mode 100644 index 0000000000..8d9d50452e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_repository_sync_url.go @@ -0,0 +1,237 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleRepositorySyncURL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleRepositorySyncURL{} + +// AnsibleRepositorySyncURL Serializer for Ansible Repository Sync URL. +type AnsibleRepositorySyncURL struct { + // A remote to sync from. This will override a remote set on repository. + Remote *string `json:"remote,omitempty"` + // If ``True``, synchronization will remove all content that is not present in the remote repository. If ``False``, sync will be additive only. + Mirror *bool `json:"mirror,omitempty"` + // Whether to optimize sync or not. + Optimize *bool `json:"optimize,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleRepositorySyncURL AnsibleRepositorySyncURL + +// NewAnsibleRepositorySyncURL instantiates a new AnsibleRepositorySyncURL object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleRepositorySyncURL() *AnsibleRepositorySyncURL { + this := AnsibleRepositorySyncURL{} + var mirror bool = false + this.Mirror = &mirror + var optimize bool = true + this.Optimize = &optimize + return &this +} + +// NewAnsibleRepositorySyncURLWithDefaults instantiates a new AnsibleRepositorySyncURL object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleRepositorySyncURLWithDefaults() *AnsibleRepositorySyncURL { + this := AnsibleRepositorySyncURL{} + var mirror bool = false + this.Mirror = &mirror + var optimize bool = true + this.Optimize = &optimize + return &this +} + +// GetRemote returns the Remote field value if set, zero value otherwise. +func (o *AnsibleRepositorySyncURL) GetRemote() string { + if o == nil || IsNil(o.Remote) { + var ret string + return ret + } + return *o.Remote +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRepositorySyncURL) GetRemoteOk() (*string, bool) { + if o == nil || IsNil(o.Remote) { + return nil, false + } + return o.Remote, true +} + +// HasRemote returns a boolean if a field has been set. +func (o *AnsibleRepositorySyncURL) HasRemote() bool { + if o != nil && !IsNil(o.Remote) { + return true + } + + return false +} + +// SetRemote gets a reference to the given string and assigns it to the Remote field. +func (o *AnsibleRepositorySyncURL) SetRemote(v string) { + o.Remote = &v +} + +// GetMirror returns the Mirror field value if set, zero value otherwise. +func (o *AnsibleRepositorySyncURL) GetMirror() bool { + if o == nil || IsNil(o.Mirror) { + var ret bool + return ret + } + return *o.Mirror +} + +// GetMirrorOk returns a tuple with the Mirror field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRepositorySyncURL) GetMirrorOk() (*bool, bool) { + if o == nil || IsNil(o.Mirror) { + return nil, false + } + return o.Mirror, true +} + +// HasMirror returns a boolean if a field has been set. +func (o *AnsibleRepositorySyncURL) HasMirror() bool { + if o != nil && !IsNil(o.Mirror) { + return true + } + + return false +} + +// SetMirror gets a reference to the given bool and assigns it to the Mirror field. +func (o *AnsibleRepositorySyncURL) SetMirror(v bool) { + o.Mirror = &v +} + +// GetOptimize returns the Optimize field value if set, zero value otherwise. +func (o *AnsibleRepositorySyncURL) GetOptimize() bool { + if o == nil || IsNil(o.Optimize) { + var ret bool + return ret + } + return *o.Optimize +} + +// GetOptimizeOk returns a tuple with the Optimize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRepositorySyncURL) GetOptimizeOk() (*bool, bool) { + if o == nil || IsNil(o.Optimize) { + return nil, false + } + return o.Optimize, true +} + +// HasOptimize returns a boolean if a field has been set. +func (o *AnsibleRepositorySyncURL) HasOptimize() bool { + if o != nil && !IsNil(o.Optimize) { + return true + } + + return false +} + +// SetOptimize gets a reference to the given bool and assigns it to the Optimize field. +func (o *AnsibleRepositorySyncURL) SetOptimize(v bool) { + o.Optimize = &v +} + +func (o AnsibleRepositorySyncURL) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleRepositorySyncURL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Remote) { + toSerialize["remote"] = o.Remote + } + if !IsNil(o.Mirror) { + toSerialize["mirror"] = o.Mirror + } + if !IsNil(o.Optimize) { + toSerialize["optimize"] = o.Optimize + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleRepositorySyncURL) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleRepositorySyncURL := _AnsibleRepositorySyncURL{} + + if err = json.Unmarshal(bytes, &varAnsibleRepositorySyncURL); err == nil { + *o = AnsibleRepositorySyncURL(varAnsibleRepositorySyncURL) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "remote") + delete(additionalProperties, "mirror") + delete(additionalProperties, "optimize") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleRepositorySyncURL struct { + value *AnsibleRepositorySyncURL + isSet bool +} + +func (v NullableAnsibleRepositorySyncURL) Get() *AnsibleRepositorySyncURL { + return v.value +} + +func (v *NullableAnsibleRepositorySyncURL) Set(val *AnsibleRepositorySyncURL) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleRepositorySyncURL) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleRepositorySyncURL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleRepositorySyncURL(val *AnsibleRepositorySyncURL) *NullableAnsibleRepositorySyncURL { + return &NullableAnsibleRepositorySyncURL{value: val, isSet: true} +} + +func (v NullableAnsibleRepositorySyncURL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleRepositorySyncURL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role.go new file mode 100644 index 0000000000..39657047ff --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role.go @@ -0,0 +1,266 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleRole type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleRole{} + +// AnsibleRole A serializer for Role versions. +type AnsibleRole struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Artifact file representing the physical content + Artifact string `json:"artifact"` + Version string `json:"version"` + Name string `json:"name"` + Namespace string `json:"namespace"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleRole AnsibleRole + +// NewAnsibleRole instantiates a new AnsibleRole object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleRole(artifact string, version string, name string, namespace string) *AnsibleRole { + this := AnsibleRole{} + this.Artifact = artifact + this.Version = version + this.Name = name + this.Namespace = namespace + return &this +} + +// NewAnsibleRoleWithDefaults instantiates a new AnsibleRole object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleRoleWithDefaults() *AnsibleRole { + this := AnsibleRole{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *AnsibleRole) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRole) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *AnsibleRole) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *AnsibleRole) SetRepository(v string) { + o.Repository = &v +} + +// GetArtifact returns the Artifact field value +func (o *AnsibleRole) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *AnsibleRole) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *AnsibleRole) SetArtifact(v string) { + o.Artifact = v +} + +// GetVersion returns the Version field value +func (o *AnsibleRole) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *AnsibleRole) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *AnsibleRole) SetVersion(v string) { + o.Version = v +} + +// GetName returns the Name field value +func (o *AnsibleRole) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleRole) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleRole) SetName(v string) { + o.Name = v +} + +// GetNamespace returns the Namespace field value +func (o *AnsibleRole) GetNamespace() string { + if o == nil { + var ret string + return ret + } + + return o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value +// and a boolean to check if the value has been set. +func (o *AnsibleRole) GetNamespaceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Namespace, true +} + +// SetNamespace sets field value +func (o *AnsibleRole) SetNamespace(v string) { + o.Namespace = v +} + +func (o AnsibleRole) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleRole) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["artifact"] = o.Artifact + toSerialize["version"] = o.Version + toSerialize["name"] = o.Name + toSerialize["namespace"] = o.Namespace + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleRole) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleRole := _AnsibleRole{} + + if err = json.Unmarshal(bytes, &varAnsibleRole); err == nil { + *o = AnsibleRole(varAnsibleRole) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "artifact") + delete(additionalProperties, "version") + delete(additionalProperties, "name") + delete(additionalProperties, "namespace") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleRole struct { + value *AnsibleRole + isSet bool +} + +func (v NullableAnsibleRole) Get() *AnsibleRole { + return v.value +} + +func (v *NullableAnsibleRole) Set(val *AnsibleRole) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleRole) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleRole(val *AnsibleRole) *NullableAnsibleRole { + return &NullableAnsibleRole{value: val, isSet: true} +} + +func (v NullableAnsibleRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role_remote.go new file mode 100644 index 0000000000..77f9c8191c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role_remote.go @@ -0,0 +1,1047 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleRoleRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleRoleRemote{} + +// AnsibleRoleRemote A serializer for Ansible Remotes. +type AnsibleRoleRemote struct { + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *PolicyDb6Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleRoleRemote AnsibleRoleRemote + +// NewAnsibleRoleRemote instantiates a new AnsibleRoleRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleRoleRemote(name string, url string) *AnsibleRoleRemote { + this := AnsibleRoleRemote{} + this.Name = name + this.Url = url + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewAnsibleRoleRemoteWithDefaults instantiates a new AnsibleRoleRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleRoleRemoteWithDefaults() *AnsibleRoleRemote { + this := AnsibleRoleRemote{} + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value +func (o *AnsibleRoleRemote) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemote) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleRoleRemote) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *AnsibleRoleRemote) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemote) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *AnsibleRoleRemote) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *AnsibleRoleRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *AnsibleRoleRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *AnsibleRoleRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *AnsibleRoleRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *AnsibleRoleRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *AnsibleRoleRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *AnsibleRoleRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *AnsibleRoleRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *AnsibleRoleRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *AnsibleRoleRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *AnsibleRoleRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *AnsibleRoleRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *AnsibleRoleRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *AnsibleRoleRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *AnsibleRoleRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *AnsibleRoleRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *AnsibleRoleRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *AnsibleRoleRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *AnsibleRoleRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *AnsibleRoleRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *AnsibleRoleRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *AnsibleRoleRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *AnsibleRoleRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *AnsibleRoleRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *AnsibleRoleRemote) GetPolicy() PolicyDb6Enum { + if o == nil || IsNil(o.Policy) { + var ret PolicyDb6Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemote) GetPolicyOk() (*PolicyDb6Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given PolicyDb6Enum and assigns it to the Policy field. +func (o *AnsibleRoleRemote) SetPolicy(v PolicyDb6Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *AnsibleRoleRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *AnsibleRoleRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *AnsibleRoleRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *AnsibleRoleRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *AnsibleRoleRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *AnsibleRoleRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *AnsibleRoleRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *AnsibleRoleRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *AnsibleRoleRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *AnsibleRoleRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *AnsibleRoleRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *AnsibleRoleRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *AnsibleRoleRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *AnsibleRoleRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +func (o AnsibleRoleRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleRoleRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleRoleRemote) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleRoleRemote := _AnsibleRoleRemote{} + + if err = json.Unmarshal(bytes, &varAnsibleRoleRemote); err == nil { + *o = AnsibleRoleRemote(varAnsibleRoleRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleRoleRemote struct { + value *AnsibleRoleRemote + isSet bool +} + +func (v NullableAnsibleRoleRemote) Get() *AnsibleRoleRemote { + return v.value +} + +func (v *NullableAnsibleRoleRemote) Set(val *AnsibleRoleRemote) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleRoleRemote) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleRoleRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleRoleRemote(val *AnsibleRoleRemote) *NullableAnsibleRoleRemote { + return &NullableAnsibleRoleRemote{value: val, isSet: true} +} + +func (v NullableAnsibleRoleRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleRoleRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role_remote_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role_remote_response.go new file mode 100644 index 0000000000..4e2a55ee4b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role_remote_response.go @@ -0,0 +1,959 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the AnsibleRoleRemoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleRoleRemoteResponse{} + +// AnsibleRoleRemoteResponse A serializer for Ansible Remotes. +type AnsibleRoleRemoteResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *PolicyDb6Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleRoleRemoteResponse AnsibleRoleRemoteResponse + +// NewAnsibleRoleRemoteResponse instantiates a new AnsibleRoleRemoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleRoleRemoteResponse(name string, url string) *AnsibleRoleRemoteResponse { + this := AnsibleRoleRemoteResponse{} + this.Name = name + this.Url = url + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewAnsibleRoleRemoteResponseWithDefaults instantiates a new AnsibleRoleRemoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleRoleRemoteResponseWithDefaults() *AnsibleRoleRemoteResponse { + this := AnsibleRoleRemoteResponse{} + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *AnsibleRoleRemoteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemoteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *AnsibleRoleRemoteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *AnsibleRoleRemoteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemoteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *AnsibleRoleRemoteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *AnsibleRoleRemoteResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemoteResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleRoleRemoteResponse) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *AnsibleRoleRemoteResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemoteResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *AnsibleRoleRemoteResponse) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemoteResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemoteResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *AnsibleRoleRemoteResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *AnsibleRoleRemoteResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *AnsibleRoleRemoteResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemoteResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemoteResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *AnsibleRoleRemoteResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *AnsibleRoleRemoteResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *AnsibleRoleRemoteResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *AnsibleRoleRemoteResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemoteResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *AnsibleRoleRemoteResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemoteResponse) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemoteResponse) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *AnsibleRoleRemoteResponse) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *AnsibleRoleRemoteResponse) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *AnsibleRoleRemoteResponse) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *AnsibleRoleRemoteResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemoteResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *AnsibleRoleRemoteResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *AnsibleRoleRemoteResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemoteResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *AnsibleRoleRemoteResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemoteResponse) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemoteResponse) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *AnsibleRoleRemoteResponse) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *AnsibleRoleRemoteResponse) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *AnsibleRoleRemoteResponse) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemoteResponse) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemoteResponse) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *AnsibleRoleRemoteResponse) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *AnsibleRoleRemoteResponse) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *AnsibleRoleRemoteResponse) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *AnsibleRoleRemoteResponse) GetPolicy() PolicyDb6Enum { + if o == nil || IsNil(o.Policy) { + var ret PolicyDb6Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemoteResponse) GetPolicyOk() (*PolicyDb6Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given PolicyDb6Enum and assigns it to the Policy field. +func (o *AnsibleRoleRemoteResponse) SetPolicy(v PolicyDb6Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemoteResponse) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemoteResponse) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *AnsibleRoleRemoteResponse) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *AnsibleRoleRemoteResponse) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *AnsibleRoleRemoteResponse) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemoteResponse) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemoteResponse) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *AnsibleRoleRemoteResponse) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *AnsibleRoleRemoteResponse) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *AnsibleRoleRemoteResponse) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemoteResponse) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemoteResponse) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *AnsibleRoleRemoteResponse) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *AnsibleRoleRemoteResponse) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *AnsibleRoleRemoteResponse) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemoteResponse) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemoteResponse) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *AnsibleRoleRemoteResponse) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *AnsibleRoleRemoteResponse) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *AnsibleRoleRemoteResponse) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *AnsibleRoleRemoteResponse) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemoteResponse) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *AnsibleRoleRemoteResponse) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AnsibleRoleRemoteResponse) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AnsibleRoleRemoteResponse) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *AnsibleRoleRemoteResponse) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *AnsibleRoleRemoteResponse) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *AnsibleRoleRemoteResponse) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *AnsibleRoleRemoteResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleRemoteResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *AnsibleRoleRemoteResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *AnsibleRoleRemoteResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +func (o AnsibleRoleRemoteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleRoleRemoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleRoleRemoteResponse) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleRoleRemoteResponse := _AnsibleRoleRemoteResponse{} + + if err = json.Unmarshal(bytes, &varAnsibleRoleRemoteResponse); err == nil { + *o = AnsibleRoleRemoteResponse(varAnsibleRoleRemoteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "hidden_fields") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleRoleRemoteResponse struct { + value *AnsibleRoleRemoteResponse + isSet bool +} + +func (v NullableAnsibleRoleRemoteResponse) Get() *AnsibleRoleRemoteResponse { + return v.value +} + +func (v *NullableAnsibleRoleRemoteResponse) Set(val *AnsibleRoleRemoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleRoleRemoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleRoleRemoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleRoleRemoteResponse(val *AnsibleRoleRemoteResponse) *NullableAnsibleRoleRemoteResponse { + return &NullableAnsibleRoleRemoteResponse{value: val, isSet: true} +} + +func (v NullableAnsibleRoleRemoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleRoleRemoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role_response.go new file mode 100644 index 0000000000..aea373572b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_role_response.go @@ -0,0 +1,304 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the AnsibleRoleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleRoleResponse{} + +// AnsibleRoleResponse A serializer for Role versions. +type AnsibleRoleResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Artifact file representing the physical content + Artifact string `json:"artifact"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + Version string `json:"version"` + Name string `json:"name"` + Namespace string `json:"namespace"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleRoleResponse AnsibleRoleResponse + +// NewAnsibleRoleResponse instantiates a new AnsibleRoleResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleRoleResponse(artifact string, version string, name string, namespace string) *AnsibleRoleResponse { + this := AnsibleRoleResponse{} + this.Artifact = artifact + this.Version = version + this.Name = name + this.Namespace = namespace + return &this +} + +// NewAnsibleRoleResponseWithDefaults instantiates a new AnsibleRoleResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleRoleResponseWithDefaults() *AnsibleRoleResponse { + this := AnsibleRoleResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *AnsibleRoleResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *AnsibleRoleResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *AnsibleRoleResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetArtifact returns the Artifact field value +func (o *AnsibleRoleResponse) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *AnsibleRoleResponse) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *AnsibleRoleResponse) SetArtifact(v string) { + o.Artifact = v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *AnsibleRoleResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleRoleResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *AnsibleRoleResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *AnsibleRoleResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetVersion returns the Version field value +func (o *AnsibleRoleResponse) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *AnsibleRoleResponse) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *AnsibleRoleResponse) SetVersion(v string) { + o.Version = v +} + +// GetName returns the Name field value +func (o *AnsibleRoleResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AnsibleRoleResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AnsibleRoleResponse) SetName(v string) { + o.Name = v +} + +// GetNamespace returns the Namespace field value +func (o *AnsibleRoleResponse) GetNamespace() string { + if o == nil { + var ret string + return ret + } + + return o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value +// and a boolean to check if the value has been set. +func (o *AnsibleRoleResponse) GetNamespaceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Namespace, true +} + +// SetNamespace sets field value +func (o *AnsibleRoleResponse) SetNamespace(v string) { + o.Namespace = v +} + +func (o AnsibleRoleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleRoleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + toSerialize["artifact"] = o.Artifact + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["version"] = o.Version + toSerialize["name"] = o.Name + toSerialize["namespace"] = o.Namespace + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleRoleResponse) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleRoleResponse := _AnsibleRoleResponse{} + + if err = json.Unmarshal(bytes, &varAnsibleRoleResponse); err == nil { + *o = AnsibleRoleResponse(varAnsibleRoleResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "artifact") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "version") + delete(additionalProperties, "name") + delete(additionalProperties, "namespace") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleRoleResponse struct { + value *AnsibleRoleResponse + isSet bool +} + +func (v NullableAnsibleRoleResponse) Get() *AnsibleRoleResponse { + return v.value +} + +func (v *NullableAnsibleRoleResponse) Set(val *AnsibleRoleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleRoleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleRoleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleRoleResponse(val *AnsibleRoleResponse) *NullableAnsibleRoleResponse { + return &NullableAnsibleRoleResponse{value: val, isSet: true} +} + +func (v NullableAnsibleRoleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleRoleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_tag_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_tag_response.go new file mode 100644 index 0000000000..a7b1b67a41 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ansible_tag_response.go @@ -0,0 +1,153 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AnsibleTagResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AnsibleTagResponse{} + +// AnsibleTagResponse A serializer for nesting in the CollectionVersion model. +type AnsibleTagResponse struct { + // The name of the Tag. + Name *string `json:"name,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AnsibleTagResponse AnsibleTagResponse + +// NewAnsibleTagResponse instantiates a new AnsibleTagResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAnsibleTagResponse() *AnsibleTagResponse { + this := AnsibleTagResponse{} + return &this +} + +// NewAnsibleTagResponseWithDefaults instantiates a new AnsibleTagResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAnsibleTagResponseWithDefaults() *AnsibleTagResponse { + this := AnsibleTagResponse{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *AnsibleTagResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AnsibleTagResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AnsibleTagResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AnsibleTagResponse) SetName(v string) { + o.Name = &v +} + +func (o AnsibleTagResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AnsibleTagResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AnsibleTagResponse) UnmarshalJSON(bytes []byte) (err error) { + varAnsibleTagResponse := _AnsibleTagResponse{} + + if err = json.Unmarshal(bytes, &varAnsibleTagResponse); err == nil { + *o = AnsibleTagResponse(varAnsibleTagResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAnsibleTagResponse struct { + value *AnsibleTagResponse + isSet bool +} + +func (v NullableAnsibleTagResponse) Get() *AnsibleTagResponse { + return v.value +} + +func (v *NullableAnsibleTagResponse) Set(val *AnsibleTagResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAnsibleTagResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAnsibleTagResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAnsibleTagResponse(val *AnsibleTagResponse) *NullableAnsibleTagResponse { + return &NullableAnsibleTagResponse{value: val, isSet: true} +} + +func (v NullableAnsibleTagResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAnsibleTagResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_apt_repository_sync_url.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_apt_repository_sync_url.go new file mode 100644 index 0000000000..a206d24dfc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_apt_repository_sync_url.go @@ -0,0 +1,237 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AptRepositorySyncURL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AptRepositorySyncURL{} + +// AptRepositorySyncURL A Serializer for AptRepository Sync. +type AptRepositorySyncURL struct { + // A remote to sync from. This will override a remote set on repository. + Remote *string `json:"remote,omitempty"` + // If ``True``, synchronization will remove all content that is not present in the remote repository. If ``False``, sync will be additive only. + Mirror *bool `json:"mirror,omitempty"` + // Using optimize sync, will skip the processing of metadata if the checksum has not changed since the last sync. This greately improves re-sync performance in such situations. If you feel the sync is missing something that has changed about the remote repository you are syncing, try using optimize=False for a full re-sync. Consider opening an issue on why we should not optimize in your use case. + Optimize *bool `json:"optimize,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AptRepositorySyncURL AptRepositorySyncURL + +// NewAptRepositorySyncURL instantiates a new AptRepositorySyncURL object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAptRepositorySyncURL() *AptRepositorySyncURL { + this := AptRepositorySyncURL{} + var mirror bool = false + this.Mirror = &mirror + var optimize bool = true + this.Optimize = &optimize + return &this +} + +// NewAptRepositorySyncURLWithDefaults instantiates a new AptRepositorySyncURL object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAptRepositorySyncURLWithDefaults() *AptRepositorySyncURL { + this := AptRepositorySyncURL{} + var mirror bool = false + this.Mirror = &mirror + var optimize bool = true + this.Optimize = &optimize + return &this +} + +// GetRemote returns the Remote field value if set, zero value otherwise. +func (o *AptRepositorySyncURL) GetRemote() string { + if o == nil || IsNil(o.Remote) { + var ret string + return ret + } + return *o.Remote +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AptRepositorySyncURL) GetRemoteOk() (*string, bool) { + if o == nil || IsNil(o.Remote) { + return nil, false + } + return o.Remote, true +} + +// HasRemote returns a boolean if a field has been set. +func (o *AptRepositorySyncURL) HasRemote() bool { + if o != nil && !IsNil(o.Remote) { + return true + } + + return false +} + +// SetRemote gets a reference to the given string and assigns it to the Remote field. +func (o *AptRepositorySyncURL) SetRemote(v string) { + o.Remote = &v +} + +// GetMirror returns the Mirror field value if set, zero value otherwise. +func (o *AptRepositorySyncURL) GetMirror() bool { + if o == nil || IsNil(o.Mirror) { + var ret bool + return ret + } + return *o.Mirror +} + +// GetMirrorOk returns a tuple with the Mirror field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AptRepositorySyncURL) GetMirrorOk() (*bool, bool) { + if o == nil || IsNil(o.Mirror) { + return nil, false + } + return o.Mirror, true +} + +// HasMirror returns a boolean if a field has been set. +func (o *AptRepositorySyncURL) HasMirror() bool { + if o != nil && !IsNil(o.Mirror) { + return true + } + + return false +} + +// SetMirror gets a reference to the given bool and assigns it to the Mirror field. +func (o *AptRepositorySyncURL) SetMirror(v bool) { + o.Mirror = &v +} + +// GetOptimize returns the Optimize field value if set, zero value otherwise. +func (o *AptRepositorySyncURL) GetOptimize() bool { + if o == nil || IsNil(o.Optimize) { + var ret bool + return ret + } + return *o.Optimize +} + +// GetOptimizeOk returns a tuple with the Optimize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AptRepositorySyncURL) GetOptimizeOk() (*bool, bool) { + if o == nil || IsNil(o.Optimize) { + return nil, false + } + return o.Optimize, true +} + +// HasOptimize returns a boolean if a field has been set. +func (o *AptRepositorySyncURL) HasOptimize() bool { + if o != nil && !IsNil(o.Optimize) { + return true + } + + return false +} + +// SetOptimize gets a reference to the given bool and assigns it to the Optimize field. +func (o *AptRepositorySyncURL) SetOptimize(v bool) { + o.Optimize = &v +} + +func (o AptRepositorySyncURL) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AptRepositorySyncURL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Remote) { + toSerialize["remote"] = o.Remote + } + if !IsNil(o.Mirror) { + toSerialize["mirror"] = o.Mirror + } + if !IsNil(o.Optimize) { + toSerialize["optimize"] = o.Optimize + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AptRepositorySyncURL) UnmarshalJSON(bytes []byte) (err error) { + varAptRepositorySyncURL := _AptRepositorySyncURL{} + + if err = json.Unmarshal(bytes, &varAptRepositorySyncURL); err == nil { + *o = AptRepositorySyncURL(varAptRepositorySyncURL) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "remote") + delete(additionalProperties, "mirror") + delete(additionalProperties, "optimize") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAptRepositorySyncURL struct { + value *AptRepositorySyncURL + isSet bool +} + +func (v NullableAptRepositorySyncURL) Get() *AptRepositorySyncURL { + return v.value +} + +func (v *NullableAptRepositorySyncURL) Set(val *AptRepositorySyncURL) { + v.value = val + v.isSet = true +} + +func (v NullableAptRepositorySyncURL) IsSet() bool { + return v.isSet +} + +func (v *NullableAptRepositorySyncURL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAptRepositorySyncURL(val *AptRepositorySyncURL) *NullableAptRepositorySyncURL { + return &NullableAptRepositorySyncURL{value: val, isSet: true} +} + +func (v NullableAptRepositorySyncURL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAptRepositorySyncURL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact.go new file mode 100644 index 0000000000..fdb170129c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact.go @@ -0,0 +1,471 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the Artifact type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Artifact{} + +// Artifact Base serializer for use with :class:`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. +type Artifact struct { + // The stored file. + File *os.File `json:"file"` + // The size of the file in bytes. + Size *int64 `json:"size,omitempty"` + // The MD5 checksum of the file if available. + Md5 NullableString `json:"md5,omitempty"` + // The SHA-1 checksum of the file if available. + Sha1 NullableString `json:"sha1,omitempty"` + // The SHA-224 checksum of the file if available. + Sha224 NullableString `json:"sha224,omitempty"` + // The SHA-256 checksum of the file if available. + Sha256 NullableString `json:"sha256,omitempty"` + // The SHA-384 checksum of the file if available. + Sha384 NullableString `json:"sha384,omitempty"` + // The SHA-512 checksum of the file if available. + Sha512 NullableString `json:"sha512,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Artifact Artifact + +// NewArtifact instantiates a new Artifact object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArtifact(file *os.File) *Artifact { + this := Artifact{} + this.File = file + return &this +} + +// NewArtifactWithDefaults instantiates a new Artifact object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArtifactWithDefaults() *Artifact { + this := Artifact{} + return &this +} + +// GetFile returns the File field value +func (o *Artifact) GetFile() *os.File { + if o == nil { + var ret *os.File + return ret + } + + return o.File +} + +// GetFileOk returns a tuple with the File field value +// and a boolean to check if the value has been set. +func (o *Artifact) GetFileOk() (**os.File, bool) { + if o == nil { + return nil, false + } + return &o.File, true +} + +// SetFile sets field value +func (o *Artifact) SetFile(v *os.File) { + o.File = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *Artifact) GetSize() int64 { + if o == nil || IsNil(o.Size) { + var ret int64 + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Artifact) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *Artifact) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *Artifact) SetSize(v int64) { + o.Size = &v +} + +// GetMd5 returns the Md5 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Artifact) GetMd5() string { + if o == nil || IsNil(o.Md5.Get()) { + var ret string + return ret + } + return *o.Md5.Get() +} + +// GetMd5Ok returns a tuple with the Md5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Artifact) GetMd5Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Md5.Get(), o.Md5.IsSet() +} + +// HasMd5 returns a boolean if a field has been set. +func (o *Artifact) HasMd5() bool { + if o != nil && o.Md5.IsSet() { + return true + } + + return false +} + +// SetMd5 gets a reference to the given NullableString and assigns it to the Md5 field. +func (o *Artifact) SetMd5(v string) { + o.Md5.Set(&v) +} +// SetMd5Nil sets the value for Md5 to be an explicit nil +func (o *Artifact) SetMd5Nil() { + o.Md5.Set(nil) +} + +// UnsetMd5 ensures that no value is present for Md5, not even an explicit nil +func (o *Artifact) UnsetMd5() { + o.Md5.Unset() +} + +// GetSha1 returns the Sha1 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Artifact) GetSha1() string { + if o == nil || IsNil(o.Sha1.Get()) { + var ret string + return ret + } + return *o.Sha1.Get() +} + +// GetSha1Ok returns a tuple with the Sha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Artifact) GetSha1Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha1.Get(), o.Sha1.IsSet() +} + +// HasSha1 returns a boolean if a field has been set. +func (o *Artifact) HasSha1() bool { + if o != nil && o.Sha1.IsSet() { + return true + } + + return false +} + +// SetSha1 gets a reference to the given NullableString and assigns it to the Sha1 field. +func (o *Artifact) SetSha1(v string) { + o.Sha1.Set(&v) +} +// SetSha1Nil sets the value for Sha1 to be an explicit nil +func (o *Artifact) SetSha1Nil() { + o.Sha1.Set(nil) +} + +// UnsetSha1 ensures that no value is present for Sha1, not even an explicit nil +func (o *Artifact) UnsetSha1() { + o.Sha1.Unset() +} + +// GetSha224 returns the Sha224 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Artifact) GetSha224() string { + if o == nil || IsNil(o.Sha224.Get()) { + var ret string + return ret + } + return *o.Sha224.Get() +} + +// GetSha224Ok returns a tuple with the Sha224 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Artifact) GetSha224Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha224.Get(), o.Sha224.IsSet() +} + +// HasSha224 returns a boolean if a field has been set. +func (o *Artifact) HasSha224() bool { + if o != nil && o.Sha224.IsSet() { + return true + } + + return false +} + +// SetSha224 gets a reference to the given NullableString and assigns it to the Sha224 field. +func (o *Artifact) SetSha224(v string) { + o.Sha224.Set(&v) +} +// SetSha224Nil sets the value for Sha224 to be an explicit nil +func (o *Artifact) SetSha224Nil() { + o.Sha224.Set(nil) +} + +// UnsetSha224 ensures that no value is present for Sha224, not even an explicit nil +func (o *Artifact) UnsetSha224() { + o.Sha224.Unset() +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Artifact) GetSha256() string { + if o == nil || IsNil(o.Sha256.Get()) { + var ret string + return ret + } + return *o.Sha256.Get() +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Artifact) GetSha256Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha256.Get(), o.Sha256.IsSet() +} + +// HasSha256 returns a boolean if a field has been set. +func (o *Artifact) HasSha256() bool { + if o != nil && o.Sha256.IsSet() { + return true + } + + return false +} + +// SetSha256 gets a reference to the given NullableString and assigns it to the Sha256 field. +func (o *Artifact) SetSha256(v string) { + o.Sha256.Set(&v) +} +// SetSha256Nil sets the value for Sha256 to be an explicit nil +func (o *Artifact) SetSha256Nil() { + o.Sha256.Set(nil) +} + +// UnsetSha256 ensures that no value is present for Sha256, not even an explicit nil +func (o *Artifact) UnsetSha256() { + o.Sha256.Unset() +} + +// GetSha384 returns the Sha384 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Artifact) GetSha384() string { + if o == nil || IsNil(o.Sha384.Get()) { + var ret string + return ret + } + return *o.Sha384.Get() +} + +// GetSha384Ok returns a tuple with the Sha384 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Artifact) GetSha384Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha384.Get(), o.Sha384.IsSet() +} + +// HasSha384 returns a boolean if a field has been set. +func (o *Artifact) HasSha384() bool { + if o != nil && o.Sha384.IsSet() { + return true + } + + return false +} + +// SetSha384 gets a reference to the given NullableString and assigns it to the Sha384 field. +func (o *Artifact) SetSha384(v string) { + o.Sha384.Set(&v) +} +// SetSha384Nil sets the value for Sha384 to be an explicit nil +func (o *Artifact) SetSha384Nil() { + o.Sha384.Set(nil) +} + +// UnsetSha384 ensures that no value is present for Sha384, not even an explicit nil +func (o *Artifact) UnsetSha384() { + o.Sha384.Unset() +} + +// GetSha512 returns the Sha512 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Artifact) GetSha512() string { + if o == nil || IsNil(o.Sha512.Get()) { + var ret string + return ret + } + return *o.Sha512.Get() +} + +// GetSha512Ok returns a tuple with the Sha512 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Artifact) GetSha512Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha512.Get(), o.Sha512.IsSet() +} + +// HasSha512 returns a boolean if a field has been set. +func (o *Artifact) HasSha512() bool { + if o != nil && o.Sha512.IsSet() { + return true + } + + return false +} + +// SetSha512 gets a reference to the given NullableString and assigns it to the Sha512 field. +func (o *Artifact) SetSha512(v string) { + o.Sha512.Set(&v) +} +// SetSha512Nil sets the value for Sha512 to be an explicit nil +func (o *Artifact) SetSha512Nil() { + o.Sha512.Set(nil) +} + +// UnsetSha512 ensures that no value is present for Sha512, not even an explicit nil +func (o *Artifact) UnsetSha512() { + o.Sha512.Unset() +} + +func (o Artifact) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Artifact) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["file"] = o.File + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if o.Md5.IsSet() { + toSerialize["md5"] = o.Md5.Get() + } + if o.Sha1.IsSet() { + toSerialize["sha1"] = o.Sha1.Get() + } + if o.Sha224.IsSet() { + toSerialize["sha224"] = o.Sha224.Get() + } + if o.Sha256.IsSet() { + toSerialize["sha256"] = o.Sha256.Get() + } + if o.Sha384.IsSet() { + toSerialize["sha384"] = o.Sha384.Get() + } + if o.Sha512.IsSet() { + toSerialize["sha512"] = o.Sha512.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Artifact) UnmarshalJSON(bytes []byte) (err error) { + varArtifact := _Artifact{} + + if err = json.Unmarshal(bytes, &varArtifact); err == nil { + *o = Artifact(varArtifact) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "file") + delete(additionalProperties, "size") + delete(additionalProperties, "md5") + delete(additionalProperties, "sha1") + delete(additionalProperties, "sha224") + delete(additionalProperties, "sha256") + delete(additionalProperties, "sha384") + delete(additionalProperties, "sha512") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableArtifact struct { + value *Artifact + isSet bool +} + +func (v NullableArtifact) Get() *Artifact { + return v.value +} + +func (v *NullableArtifact) Set(val *Artifact) { + v.value = val + v.isSet = true +} + +func (v NullableArtifact) IsSet() bool { + return v.isSet +} + +func (v *NullableArtifact) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArtifact(val *Artifact) *NullableArtifact { + return &NullableArtifact{value: val, isSet: true} +} + +func (v NullableArtifact) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArtifact) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact_distribution_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact_distribution_response.go new file mode 100644 index 0000000000..8ff8636e8c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact_distribution_response.go @@ -0,0 +1,414 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ArtifactDistributionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArtifactDistributionResponse{} + +// ArtifactDistributionResponse A serializer for ArtifactDistribution. +type ArtifactDistributionResponse struct { + // The URL for accessing the publication as defined by this distribution. + BaseUrl *string `json:"base_url,omitempty"` + PulpHref *string `json:"pulp_href,omitempty"` + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ArtifactDistributionResponse ArtifactDistributionResponse + +// NewArtifactDistributionResponse instantiates a new ArtifactDistributionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArtifactDistributionResponse(basePath string, name string) *ArtifactDistributionResponse { + this := ArtifactDistributionResponse{} + this.BasePath = basePath + this.Name = name + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// NewArtifactDistributionResponseWithDefaults instantiates a new ArtifactDistributionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArtifactDistributionResponseWithDefaults() *ArtifactDistributionResponse { + this := ArtifactDistributionResponse{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBaseUrl returns the BaseUrl field value if set, zero value otherwise. +func (o *ArtifactDistributionResponse) GetBaseUrl() string { + if o == nil || IsNil(o.BaseUrl) { + var ret string + return ret + } + return *o.BaseUrl +} + +// GetBaseUrlOk returns a tuple with the BaseUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactDistributionResponse) GetBaseUrlOk() (*string, bool) { + if o == nil || IsNil(o.BaseUrl) { + return nil, false + } + return o.BaseUrl, true +} + +// HasBaseUrl returns a boolean if a field has been set. +func (o *ArtifactDistributionResponse) HasBaseUrl() bool { + if o != nil && !IsNil(o.BaseUrl) { + return true + } + + return false +} + +// SetBaseUrl gets a reference to the given string and assigns it to the BaseUrl field. +func (o *ArtifactDistributionResponse) SetBaseUrl(v string) { + o.BaseUrl = &v +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ArtifactDistributionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactDistributionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ArtifactDistributionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ArtifactDistributionResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetBasePath returns the BasePath field value +func (o *ArtifactDistributionResponse) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *ArtifactDistributionResponse) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *ArtifactDistributionResponse) SetBasePath(v string) { + o.BasePath = v +} + +// GetName returns the Name field value +func (o *ArtifactDistributionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ArtifactDistributionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ArtifactDistributionResponse) SetName(v string) { + o.Name = v +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *ArtifactDistributionResponse) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactDistributionResponse) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *ArtifactDistributionResponse) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *ArtifactDistributionResponse) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ArtifactDistributionResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactDistributionResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ArtifactDistributionResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ArtifactDistributionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *ArtifactDistributionResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *ArtifactDistributionResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *ArtifactDistributionResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArtifactDistributionResponse) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactDistributionResponse) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *ArtifactDistributionResponse) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *ArtifactDistributionResponse) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *ArtifactDistributionResponse) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *ArtifactDistributionResponse) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +func (o ArtifactDistributionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ArtifactDistributionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BaseUrl) { + toSerialize["base_url"] = o.BaseUrl + } + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + toSerialize["base_path"] = o.BasePath + toSerialize["name"] = o.Name + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ArtifactDistributionResponse) UnmarshalJSON(bytes []byte) (err error) { + varArtifactDistributionResponse := _ArtifactDistributionResponse{} + + if err = json.Unmarshal(bytes, &varArtifactDistributionResponse); err == nil { + *o = ArtifactDistributionResponse(varArtifactDistributionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_url") + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "base_path") + delete(additionalProperties, "name") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "content_guard") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableArtifactDistributionResponse struct { + value *ArtifactDistributionResponse + isSet bool +} + +func (v NullableArtifactDistributionResponse) Get() *ArtifactDistributionResponse { + return v.value +} + +func (v *NullableArtifactDistributionResponse) Set(val *ArtifactDistributionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableArtifactDistributionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableArtifactDistributionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArtifactDistributionResponse(val *ArtifactDistributionResponse) *NullableArtifactDistributionResponse { + return &NullableArtifactDistributionResponse{value: val, isSet: true} +} + +func (v NullableArtifactDistributionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArtifactDistributionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact_ref_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact_ref_response.go new file mode 100644 index 0000000000..287f0be0db --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact_ref_response.go @@ -0,0 +1,199 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ArtifactRefResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArtifactRefResponse{} + +// ArtifactRefResponse A serializer for an Artifact reference. +type ArtifactRefResponse struct { + Filename string `json:"filename"` + Sha256 string `json:"sha256"` + Size int64 `json:"size"` + AdditionalProperties map[string]interface{} +} + +type _ArtifactRefResponse ArtifactRefResponse + +// NewArtifactRefResponse instantiates a new ArtifactRefResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArtifactRefResponse(filename string, sha256 string, size int64) *ArtifactRefResponse { + this := ArtifactRefResponse{} + this.Filename = filename + this.Sha256 = sha256 + this.Size = size + return &this +} + +// NewArtifactRefResponseWithDefaults instantiates a new ArtifactRefResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArtifactRefResponseWithDefaults() *ArtifactRefResponse { + this := ArtifactRefResponse{} + return &this +} + +// GetFilename returns the Filename field value +func (o *ArtifactRefResponse) GetFilename() string { + if o == nil { + var ret string + return ret + } + + return o.Filename +} + +// GetFilenameOk returns a tuple with the Filename field value +// and a boolean to check if the value has been set. +func (o *ArtifactRefResponse) GetFilenameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Filename, true +} + +// SetFilename sets field value +func (o *ArtifactRefResponse) SetFilename(v string) { + o.Filename = v +} + +// GetSha256 returns the Sha256 field value +func (o *ArtifactRefResponse) GetSha256() string { + if o == nil { + var ret string + return ret + } + + return o.Sha256 +} + +// GetSha256Ok returns a tuple with the Sha256 field value +// and a boolean to check if the value has been set. +func (o *ArtifactRefResponse) GetSha256Ok() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Sha256, true +} + +// SetSha256 sets field value +func (o *ArtifactRefResponse) SetSha256(v string) { + o.Sha256 = v +} + +// GetSize returns the Size field value +func (o *ArtifactRefResponse) GetSize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *ArtifactRefResponse) GetSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Size, true +} + +// SetSize sets field value +func (o *ArtifactRefResponse) SetSize(v int64) { + o.Size = v +} + +func (o ArtifactRefResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ArtifactRefResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["filename"] = o.Filename + toSerialize["sha256"] = o.Sha256 + toSerialize["size"] = o.Size + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ArtifactRefResponse) UnmarshalJSON(bytes []byte) (err error) { + varArtifactRefResponse := _ArtifactRefResponse{} + + if err = json.Unmarshal(bytes, &varArtifactRefResponse); err == nil { + *o = ArtifactRefResponse(varArtifactRefResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "filename") + delete(additionalProperties, "sha256") + delete(additionalProperties, "size") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableArtifactRefResponse struct { + value *ArtifactRefResponse + isSet bool +} + +func (v NullableArtifactRefResponse) Get() *ArtifactRefResponse { + return v.value +} + +func (v *NullableArtifactRefResponse) Set(val *ArtifactRefResponse) { + v.value = val + v.isSet = true +} + +func (v NullableArtifactRefResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableArtifactRefResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArtifactRefResponse(val *ArtifactRefResponse) *NullableArtifactRefResponse { + return &NullableArtifactRefResponse{value: val, isSet: true} +} + +func (v NullableArtifactRefResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArtifactRefResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact_response.go new file mode 100644 index 0000000000..ce7b3e158e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_artifact_response.go @@ -0,0 +1,546 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ArtifactResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArtifactResponse{} + +// ArtifactResponse Base serializer for use with :class:`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. +type ArtifactResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The stored file. + File string `json:"file"` + // The size of the file in bytes. + Size *int64 `json:"size,omitempty"` + // The MD5 checksum of the file if available. + Md5 NullableString `json:"md5,omitempty"` + // The SHA-1 checksum of the file if available. + Sha1 NullableString `json:"sha1,omitempty"` + // The SHA-224 checksum of the file if available. + Sha224 NullableString `json:"sha224,omitempty"` + // The SHA-256 checksum of the file if available. + Sha256 NullableString `json:"sha256,omitempty"` + // The SHA-384 checksum of the file if available. + Sha384 NullableString `json:"sha384,omitempty"` + // The SHA-512 checksum of the file if available. + Sha512 NullableString `json:"sha512,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ArtifactResponse ArtifactResponse + +// NewArtifactResponse instantiates a new ArtifactResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArtifactResponse(file string) *ArtifactResponse { + this := ArtifactResponse{} + this.File = file + return &this +} + +// NewArtifactResponseWithDefaults instantiates a new ArtifactResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArtifactResponseWithDefaults() *ArtifactResponse { + this := ArtifactResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ArtifactResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ArtifactResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ArtifactResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ArtifactResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ArtifactResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ArtifactResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetFile returns the File field value +func (o *ArtifactResponse) GetFile() string { + if o == nil { + var ret string + return ret + } + + return o.File +} + +// GetFileOk returns a tuple with the File field value +// and a boolean to check if the value has been set. +func (o *ArtifactResponse) GetFileOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.File, true +} + +// SetFile sets field value +func (o *ArtifactResponse) SetFile(v string) { + o.File = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *ArtifactResponse) GetSize() int64 { + if o == nil || IsNil(o.Size) { + var ret int64 + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactResponse) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *ArtifactResponse) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *ArtifactResponse) SetSize(v int64) { + o.Size = &v +} + +// GetMd5 returns the Md5 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArtifactResponse) GetMd5() string { + if o == nil || IsNil(o.Md5.Get()) { + var ret string + return ret + } + return *o.Md5.Get() +} + +// GetMd5Ok returns a tuple with the Md5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactResponse) GetMd5Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Md5.Get(), o.Md5.IsSet() +} + +// HasMd5 returns a boolean if a field has been set. +func (o *ArtifactResponse) HasMd5() bool { + if o != nil && o.Md5.IsSet() { + return true + } + + return false +} + +// SetMd5 gets a reference to the given NullableString and assigns it to the Md5 field. +func (o *ArtifactResponse) SetMd5(v string) { + o.Md5.Set(&v) +} +// SetMd5Nil sets the value for Md5 to be an explicit nil +func (o *ArtifactResponse) SetMd5Nil() { + o.Md5.Set(nil) +} + +// UnsetMd5 ensures that no value is present for Md5, not even an explicit nil +func (o *ArtifactResponse) UnsetMd5() { + o.Md5.Unset() +} + +// GetSha1 returns the Sha1 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArtifactResponse) GetSha1() string { + if o == nil || IsNil(o.Sha1.Get()) { + var ret string + return ret + } + return *o.Sha1.Get() +} + +// GetSha1Ok returns a tuple with the Sha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactResponse) GetSha1Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha1.Get(), o.Sha1.IsSet() +} + +// HasSha1 returns a boolean if a field has been set. +func (o *ArtifactResponse) HasSha1() bool { + if o != nil && o.Sha1.IsSet() { + return true + } + + return false +} + +// SetSha1 gets a reference to the given NullableString and assigns it to the Sha1 field. +func (o *ArtifactResponse) SetSha1(v string) { + o.Sha1.Set(&v) +} +// SetSha1Nil sets the value for Sha1 to be an explicit nil +func (o *ArtifactResponse) SetSha1Nil() { + o.Sha1.Set(nil) +} + +// UnsetSha1 ensures that no value is present for Sha1, not even an explicit nil +func (o *ArtifactResponse) UnsetSha1() { + o.Sha1.Unset() +} + +// GetSha224 returns the Sha224 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArtifactResponse) GetSha224() string { + if o == nil || IsNil(o.Sha224.Get()) { + var ret string + return ret + } + return *o.Sha224.Get() +} + +// GetSha224Ok returns a tuple with the Sha224 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactResponse) GetSha224Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha224.Get(), o.Sha224.IsSet() +} + +// HasSha224 returns a boolean if a field has been set. +func (o *ArtifactResponse) HasSha224() bool { + if o != nil && o.Sha224.IsSet() { + return true + } + + return false +} + +// SetSha224 gets a reference to the given NullableString and assigns it to the Sha224 field. +func (o *ArtifactResponse) SetSha224(v string) { + o.Sha224.Set(&v) +} +// SetSha224Nil sets the value for Sha224 to be an explicit nil +func (o *ArtifactResponse) SetSha224Nil() { + o.Sha224.Set(nil) +} + +// UnsetSha224 ensures that no value is present for Sha224, not even an explicit nil +func (o *ArtifactResponse) UnsetSha224() { + o.Sha224.Unset() +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArtifactResponse) GetSha256() string { + if o == nil || IsNil(o.Sha256.Get()) { + var ret string + return ret + } + return *o.Sha256.Get() +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactResponse) GetSha256Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha256.Get(), o.Sha256.IsSet() +} + +// HasSha256 returns a boolean if a field has been set. +func (o *ArtifactResponse) HasSha256() bool { + if o != nil && o.Sha256.IsSet() { + return true + } + + return false +} + +// SetSha256 gets a reference to the given NullableString and assigns it to the Sha256 field. +func (o *ArtifactResponse) SetSha256(v string) { + o.Sha256.Set(&v) +} +// SetSha256Nil sets the value for Sha256 to be an explicit nil +func (o *ArtifactResponse) SetSha256Nil() { + o.Sha256.Set(nil) +} + +// UnsetSha256 ensures that no value is present for Sha256, not even an explicit nil +func (o *ArtifactResponse) UnsetSha256() { + o.Sha256.Unset() +} + +// GetSha384 returns the Sha384 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArtifactResponse) GetSha384() string { + if o == nil || IsNil(o.Sha384.Get()) { + var ret string + return ret + } + return *o.Sha384.Get() +} + +// GetSha384Ok returns a tuple with the Sha384 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactResponse) GetSha384Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha384.Get(), o.Sha384.IsSet() +} + +// HasSha384 returns a boolean if a field has been set. +func (o *ArtifactResponse) HasSha384() bool { + if o != nil && o.Sha384.IsSet() { + return true + } + + return false +} + +// SetSha384 gets a reference to the given NullableString and assigns it to the Sha384 field. +func (o *ArtifactResponse) SetSha384(v string) { + o.Sha384.Set(&v) +} +// SetSha384Nil sets the value for Sha384 to be an explicit nil +func (o *ArtifactResponse) SetSha384Nil() { + o.Sha384.Set(nil) +} + +// UnsetSha384 ensures that no value is present for Sha384, not even an explicit nil +func (o *ArtifactResponse) UnsetSha384() { + o.Sha384.Unset() +} + +// GetSha512 returns the Sha512 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArtifactResponse) GetSha512() string { + if o == nil || IsNil(o.Sha512.Get()) { + var ret string + return ret + } + return *o.Sha512.Get() +} + +// GetSha512Ok returns a tuple with the Sha512 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactResponse) GetSha512Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha512.Get(), o.Sha512.IsSet() +} + +// HasSha512 returns a boolean if a field has been set. +func (o *ArtifactResponse) HasSha512() bool { + if o != nil && o.Sha512.IsSet() { + return true + } + + return false +} + +// SetSha512 gets a reference to the given NullableString and assigns it to the Sha512 field. +func (o *ArtifactResponse) SetSha512(v string) { + o.Sha512.Set(&v) +} +// SetSha512Nil sets the value for Sha512 to be an explicit nil +func (o *ArtifactResponse) SetSha512Nil() { + o.Sha512.Set(nil) +} + +// UnsetSha512 ensures that no value is present for Sha512, not even an explicit nil +func (o *ArtifactResponse) UnsetSha512() { + o.Sha512.Unset() +} + +func (o ArtifactResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ArtifactResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["file"] = o.File + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if o.Md5.IsSet() { + toSerialize["md5"] = o.Md5.Get() + } + if o.Sha1.IsSet() { + toSerialize["sha1"] = o.Sha1.Get() + } + if o.Sha224.IsSet() { + toSerialize["sha224"] = o.Sha224.Get() + } + if o.Sha256.IsSet() { + toSerialize["sha256"] = o.Sha256.Get() + } + if o.Sha384.IsSet() { + toSerialize["sha384"] = o.Sha384.Get() + } + if o.Sha512.IsSet() { + toSerialize["sha512"] = o.Sha512.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ArtifactResponse) UnmarshalJSON(bytes []byte) (err error) { + varArtifactResponse := _ArtifactResponse{} + + if err = json.Unmarshal(bytes, &varArtifactResponse); err == nil { + *o = ArtifactResponse(varArtifactResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "file") + delete(additionalProperties, "size") + delete(additionalProperties, "md5") + delete(additionalProperties, "sha1") + delete(additionalProperties, "sha224") + delete(additionalProperties, "sha256") + delete(additionalProperties, "sha384") + delete(additionalProperties, "sha512") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableArtifactResponse struct { + value *ArtifactResponse + isSet bool +} + +func (v NullableArtifactResponse) Get() *ArtifactResponse { + return v.value +} + +func (v *NullableArtifactResponse) Set(val *ArtifactResponse) { + v.value = val + v.isSet = true +} + +func (v NullableArtifactResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableArtifactResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArtifactResponse(val *ArtifactResponse) *NullableArtifactResponse { + return &NullableArtifactResponse{value: val, isSet: true} +} + +func (v NullableArtifactResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArtifactResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_async_operation_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_async_operation_response.go new file mode 100644 index 0000000000..262a2d9de1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_async_operation_response.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the AsyncOperationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AsyncOperationResponse{} + +// AsyncOperationResponse Serializer for asynchronous operations. +type AsyncOperationResponse struct { + // The href of the task. + Task string `json:"task"` + AdditionalProperties map[string]interface{} +} + +type _AsyncOperationResponse AsyncOperationResponse + +// NewAsyncOperationResponse instantiates a new AsyncOperationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAsyncOperationResponse(task string) *AsyncOperationResponse { + this := AsyncOperationResponse{} + this.Task = task + return &this +} + +// NewAsyncOperationResponseWithDefaults instantiates a new AsyncOperationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAsyncOperationResponseWithDefaults() *AsyncOperationResponse { + this := AsyncOperationResponse{} + return &this +} + +// GetTask returns the Task field value +func (o *AsyncOperationResponse) GetTask() string { + if o == nil { + var ret string + return ret + } + + return o.Task +} + +// GetTaskOk returns a tuple with the Task field value +// and a boolean to check if the value has been set. +func (o *AsyncOperationResponse) GetTaskOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Task, true +} + +// SetTask sets field value +func (o *AsyncOperationResponse) SetTask(v string) { + o.Task = v +} + +func (o AsyncOperationResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AsyncOperationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["task"] = o.Task + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AsyncOperationResponse) UnmarshalJSON(bytes []byte) (err error) { + varAsyncOperationResponse := _AsyncOperationResponse{} + + if err = json.Unmarshal(bytes, &varAsyncOperationResponse); err == nil { + *o = AsyncOperationResponse(varAsyncOperationResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "task") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAsyncOperationResponse struct { + value *AsyncOperationResponse + isSet bool +} + +func (v NullableAsyncOperationResponse) Get() *AsyncOperationResponse { + return v.value +} + +func (v *NullableAsyncOperationResponse) Set(val *AsyncOperationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAsyncOperationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAsyncOperationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAsyncOperationResponse(val *AsyncOperationResponse) *NullableAsyncOperationResponse { + return &NullableAsyncOperationResponse{value: val, isSet: true} +} + +func (v NullableAsyncOperationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAsyncOperationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_rhsm_cert_guard.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_rhsm_cert_guard.go new file mode 100644 index 0000000000..d3f6e992be --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_rhsm_cert_guard.go @@ -0,0 +1,221 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the CertguardRHSMCertGuard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertguardRHSMCertGuard{} + +// CertguardRHSMCertGuard RHSM Content Guard Serializer. +type CertguardRHSMCertGuard struct { + // The unique name. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // A Certificate Authority (CA) certificate (or a bundle thereof) used to verify client-certificate authenticity. + CaCertificate string `json:"ca_certificate"` + AdditionalProperties map[string]interface{} +} + +type _CertguardRHSMCertGuard CertguardRHSMCertGuard + +// NewCertguardRHSMCertGuard instantiates a new CertguardRHSMCertGuard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCertguardRHSMCertGuard(name string, caCertificate string) *CertguardRHSMCertGuard { + this := CertguardRHSMCertGuard{} + this.Name = name + this.CaCertificate = caCertificate + return &this +} + +// NewCertguardRHSMCertGuardWithDefaults instantiates a new CertguardRHSMCertGuard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCertguardRHSMCertGuardWithDefaults() *CertguardRHSMCertGuard { + this := CertguardRHSMCertGuard{} + return &this +} + +// GetName returns the Name field value +func (o *CertguardRHSMCertGuard) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CertguardRHSMCertGuard) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CertguardRHSMCertGuard) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertguardRHSMCertGuard) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertguardRHSMCertGuard) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *CertguardRHSMCertGuard) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *CertguardRHSMCertGuard) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *CertguardRHSMCertGuard) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *CertguardRHSMCertGuard) UnsetDescription() { + o.Description.Unset() +} + +// GetCaCertificate returns the CaCertificate field value +func (o *CertguardRHSMCertGuard) GetCaCertificate() string { + if o == nil { + var ret string + return ret + } + + return o.CaCertificate +} + +// GetCaCertificateOk returns a tuple with the CaCertificate field value +// and a boolean to check if the value has been set. +func (o *CertguardRHSMCertGuard) GetCaCertificateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CaCertificate, true +} + +// SetCaCertificate sets field value +func (o *CertguardRHSMCertGuard) SetCaCertificate(v string) { + o.CaCertificate = v +} + +func (o CertguardRHSMCertGuard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertguardRHSMCertGuard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["ca_certificate"] = o.CaCertificate + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CertguardRHSMCertGuard) UnmarshalJSON(bytes []byte) (err error) { + varCertguardRHSMCertGuard := _CertguardRHSMCertGuard{} + + if err = json.Unmarshal(bytes, &varCertguardRHSMCertGuard); err == nil { + *o = CertguardRHSMCertGuard(varCertguardRHSMCertGuard) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "ca_certificate") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCertguardRHSMCertGuard struct { + value *CertguardRHSMCertGuard + isSet bool +} + +func (v NullableCertguardRHSMCertGuard) Get() *CertguardRHSMCertGuard { + return v.value +} + +func (v *NullableCertguardRHSMCertGuard) Set(val *CertguardRHSMCertGuard) { + v.value = val + v.isSet = true +} + +func (v NullableCertguardRHSMCertGuard) IsSet() bool { + return v.isSet +} + +func (v *NullableCertguardRHSMCertGuard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertguardRHSMCertGuard(val *CertguardRHSMCertGuard) *NullableCertguardRHSMCertGuard { + return &NullableCertguardRHSMCertGuard{value: val, isSet: true} +} + +func (v NullableCertguardRHSMCertGuard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertguardRHSMCertGuard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_rhsm_cert_guard_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_rhsm_cert_guard_response.go new file mode 100644 index 0000000000..b59ef7cf42 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_rhsm_cert_guard_response.go @@ -0,0 +1,297 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the CertguardRHSMCertGuardResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertguardRHSMCertGuardResponse{} + +// CertguardRHSMCertGuardResponse RHSM Content Guard Serializer. +type CertguardRHSMCertGuardResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The unique name. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // A Certificate Authority (CA) certificate (or a bundle thereof) used to verify client-certificate authenticity. + CaCertificate string `json:"ca_certificate"` + AdditionalProperties map[string]interface{} +} + +type _CertguardRHSMCertGuardResponse CertguardRHSMCertGuardResponse + +// NewCertguardRHSMCertGuardResponse instantiates a new CertguardRHSMCertGuardResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCertguardRHSMCertGuardResponse(name string, caCertificate string) *CertguardRHSMCertGuardResponse { + this := CertguardRHSMCertGuardResponse{} + this.Name = name + this.CaCertificate = caCertificate + return &this +} + +// NewCertguardRHSMCertGuardResponseWithDefaults instantiates a new CertguardRHSMCertGuardResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCertguardRHSMCertGuardResponseWithDefaults() *CertguardRHSMCertGuardResponse { + this := CertguardRHSMCertGuardResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *CertguardRHSMCertGuardResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertguardRHSMCertGuardResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *CertguardRHSMCertGuardResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *CertguardRHSMCertGuardResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *CertguardRHSMCertGuardResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertguardRHSMCertGuardResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *CertguardRHSMCertGuardResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *CertguardRHSMCertGuardResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *CertguardRHSMCertGuardResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CertguardRHSMCertGuardResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CertguardRHSMCertGuardResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertguardRHSMCertGuardResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertguardRHSMCertGuardResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *CertguardRHSMCertGuardResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *CertguardRHSMCertGuardResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *CertguardRHSMCertGuardResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *CertguardRHSMCertGuardResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetCaCertificate returns the CaCertificate field value +func (o *CertguardRHSMCertGuardResponse) GetCaCertificate() string { + if o == nil { + var ret string + return ret + } + + return o.CaCertificate +} + +// GetCaCertificateOk returns a tuple with the CaCertificate field value +// and a boolean to check if the value has been set. +func (o *CertguardRHSMCertGuardResponse) GetCaCertificateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CaCertificate, true +} + +// SetCaCertificate sets field value +func (o *CertguardRHSMCertGuardResponse) SetCaCertificate(v string) { + o.CaCertificate = v +} + +func (o CertguardRHSMCertGuardResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertguardRHSMCertGuardResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["ca_certificate"] = o.CaCertificate + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CertguardRHSMCertGuardResponse) UnmarshalJSON(bytes []byte) (err error) { + varCertguardRHSMCertGuardResponse := _CertguardRHSMCertGuardResponse{} + + if err = json.Unmarshal(bytes, &varCertguardRHSMCertGuardResponse); err == nil { + *o = CertguardRHSMCertGuardResponse(varCertguardRHSMCertGuardResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "ca_certificate") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCertguardRHSMCertGuardResponse struct { + value *CertguardRHSMCertGuardResponse + isSet bool +} + +func (v NullableCertguardRHSMCertGuardResponse) Get() *CertguardRHSMCertGuardResponse { + return v.value +} + +func (v *NullableCertguardRHSMCertGuardResponse) Set(val *CertguardRHSMCertGuardResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCertguardRHSMCertGuardResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCertguardRHSMCertGuardResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertguardRHSMCertGuardResponse(val *CertguardRHSMCertGuardResponse) *NullableCertguardRHSMCertGuardResponse { + return &NullableCertguardRHSMCertGuardResponse{value: val, isSet: true} +} + +func (v NullableCertguardRHSMCertGuardResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertguardRHSMCertGuardResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_x509_cert_guard.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_x509_cert_guard.go new file mode 100644 index 0000000000..b511f319c3 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_x509_cert_guard.go @@ -0,0 +1,221 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the CertguardX509CertGuard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertguardX509CertGuard{} + +// CertguardX509CertGuard X.509 Content Guard Serializer. +type CertguardX509CertGuard struct { + // The unique name. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // A Certificate Authority (CA) certificate (or a bundle thereof) used to verify client-certificate authenticity. + CaCertificate string `json:"ca_certificate"` + AdditionalProperties map[string]interface{} +} + +type _CertguardX509CertGuard CertguardX509CertGuard + +// NewCertguardX509CertGuard instantiates a new CertguardX509CertGuard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCertguardX509CertGuard(name string, caCertificate string) *CertguardX509CertGuard { + this := CertguardX509CertGuard{} + this.Name = name + this.CaCertificate = caCertificate + return &this +} + +// NewCertguardX509CertGuardWithDefaults instantiates a new CertguardX509CertGuard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCertguardX509CertGuardWithDefaults() *CertguardX509CertGuard { + this := CertguardX509CertGuard{} + return &this +} + +// GetName returns the Name field value +func (o *CertguardX509CertGuard) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CertguardX509CertGuard) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CertguardX509CertGuard) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertguardX509CertGuard) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertguardX509CertGuard) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *CertguardX509CertGuard) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *CertguardX509CertGuard) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *CertguardX509CertGuard) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *CertguardX509CertGuard) UnsetDescription() { + o.Description.Unset() +} + +// GetCaCertificate returns the CaCertificate field value +func (o *CertguardX509CertGuard) GetCaCertificate() string { + if o == nil { + var ret string + return ret + } + + return o.CaCertificate +} + +// GetCaCertificateOk returns a tuple with the CaCertificate field value +// and a boolean to check if the value has been set. +func (o *CertguardX509CertGuard) GetCaCertificateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CaCertificate, true +} + +// SetCaCertificate sets field value +func (o *CertguardX509CertGuard) SetCaCertificate(v string) { + o.CaCertificate = v +} + +func (o CertguardX509CertGuard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertguardX509CertGuard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["ca_certificate"] = o.CaCertificate + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CertguardX509CertGuard) UnmarshalJSON(bytes []byte) (err error) { + varCertguardX509CertGuard := _CertguardX509CertGuard{} + + if err = json.Unmarshal(bytes, &varCertguardX509CertGuard); err == nil { + *o = CertguardX509CertGuard(varCertguardX509CertGuard) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "ca_certificate") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCertguardX509CertGuard struct { + value *CertguardX509CertGuard + isSet bool +} + +func (v NullableCertguardX509CertGuard) Get() *CertguardX509CertGuard { + return v.value +} + +func (v *NullableCertguardX509CertGuard) Set(val *CertguardX509CertGuard) { + v.value = val + v.isSet = true +} + +func (v NullableCertguardX509CertGuard) IsSet() bool { + return v.isSet +} + +func (v *NullableCertguardX509CertGuard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertguardX509CertGuard(val *CertguardX509CertGuard) *NullableCertguardX509CertGuard { + return &NullableCertguardX509CertGuard{value: val, isSet: true} +} + +func (v NullableCertguardX509CertGuard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertguardX509CertGuard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_x509_cert_guard_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_x509_cert_guard_response.go new file mode 100644 index 0000000000..2b02a56f4f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_certguard_x509_cert_guard_response.go @@ -0,0 +1,297 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the CertguardX509CertGuardResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertguardX509CertGuardResponse{} + +// CertguardX509CertGuardResponse X.509 Content Guard Serializer. +type CertguardX509CertGuardResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The unique name. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // A Certificate Authority (CA) certificate (or a bundle thereof) used to verify client-certificate authenticity. + CaCertificate string `json:"ca_certificate"` + AdditionalProperties map[string]interface{} +} + +type _CertguardX509CertGuardResponse CertguardX509CertGuardResponse + +// NewCertguardX509CertGuardResponse instantiates a new CertguardX509CertGuardResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCertguardX509CertGuardResponse(name string, caCertificate string) *CertguardX509CertGuardResponse { + this := CertguardX509CertGuardResponse{} + this.Name = name + this.CaCertificate = caCertificate + return &this +} + +// NewCertguardX509CertGuardResponseWithDefaults instantiates a new CertguardX509CertGuardResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCertguardX509CertGuardResponseWithDefaults() *CertguardX509CertGuardResponse { + this := CertguardX509CertGuardResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *CertguardX509CertGuardResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertguardX509CertGuardResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *CertguardX509CertGuardResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *CertguardX509CertGuardResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *CertguardX509CertGuardResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertguardX509CertGuardResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *CertguardX509CertGuardResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *CertguardX509CertGuardResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *CertguardX509CertGuardResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CertguardX509CertGuardResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CertguardX509CertGuardResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertguardX509CertGuardResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertguardX509CertGuardResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *CertguardX509CertGuardResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *CertguardX509CertGuardResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *CertguardX509CertGuardResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *CertguardX509CertGuardResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetCaCertificate returns the CaCertificate field value +func (o *CertguardX509CertGuardResponse) GetCaCertificate() string { + if o == nil { + var ret string + return ret + } + + return o.CaCertificate +} + +// GetCaCertificateOk returns a tuple with the CaCertificate field value +// and a boolean to check if the value has been set. +func (o *CertguardX509CertGuardResponse) GetCaCertificateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CaCertificate, true +} + +// SetCaCertificate sets field value +func (o *CertguardX509CertGuardResponse) SetCaCertificate(v string) { + o.CaCertificate = v +} + +func (o CertguardX509CertGuardResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertguardX509CertGuardResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["ca_certificate"] = o.CaCertificate + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CertguardX509CertGuardResponse) UnmarshalJSON(bytes []byte) (err error) { + varCertguardX509CertGuardResponse := _CertguardX509CertGuardResponse{} + + if err = json.Unmarshal(bytes, &varCertguardX509CertGuardResponse); err == nil { + *o = CertguardX509CertGuardResponse(varCertguardX509CertGuardResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "ca_certificate") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCertguardX509CertGuardResponse struct { + value *CertguardX509CertGuardResponse + isSet bool +} + +func (v NullableCertguardX509CertGuardResponse) Get() *CertguardX509CertGuardResponse { + return v.value +} + +func (v *NullableCertguardX509CertGuardResponse) Set(val *CertguardX509CertGuardResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCertguardX509CertGuardResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCertguardX509CertGuardResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertguardX509CertGuardResponse(val *CertguardX509CertGuardResponse) *NullableCertguardX509CertGuardResponse { + return &NullableCertguardX509CertGuardResponse{value: val, isSet: true} +} + +func (v NullableCertguardX509CertGuardResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertguardX509CertGuardResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_checksum_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_checksum_response.go new file mode 100644 index 0000000000..514aad49ca --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_checksum_response.go @@ -0,0 +1,173 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ChecksumResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChecksumResponse{} + +// ChecksumResponse Checksum serializer. +type ChecksumResponse struct { + // File path. + Path string `json:"path"` + // Checksum for the file. + Checksum string `json:"checksum"` + AdditionalProperties map[string]interface{} +} + +type _ChecksumResponse ChecksumResponse + +// NewChecksumResponse instantiates a new ChecksumResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChecksumResponse(path string, checksum string) *ChecksumResponse { + this := ChecksumResponse{} + this.Path = path + this.Checksum = checksum + return &this +} + +// NewChecksumResponseWithDefaults instantiates a new ChecksumResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChecksumResponseWithDefaults() *ChecksumResponse { + this := ChecksumResponse{} + return &this +} + +// GetPath returns the Path field value +func (o *ChecksumResponse) GetPath() string { + if o == nil { + var ret string + return ret + } + + return o.Path +} + +// GetPathOk returns a tuple with the Path field value +// and a boolean to check if the value has been set. +func (o *ChecksumResponse) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Path, true +} + +// SetPath sets field value +func (o *ChecksumResponse) SetPath(v string) { + o.Path = v +} + +// GetChecksum returns the Checksum field value +func (o *ChecksumResponse) GetChecksum() string { + if o == nil { + var ret string + return ret + } + + return o.Checksum +} + +// GetChecksumOk returns a tuple with the Checksum field value +// and a boolean to check if the value has been set. +func (o *ChecksumResponse) GetChecksumOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Checksum, true +} + +// SetChecksum sets field value +func (o *ChecksumResponse) SetChecksum(v string) { + o.Checksum = v +} + +func (o ChecksumResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChecksumResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["path"] = o.Path + toSerialize["checksum"] = o.Checksum + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ChecksumResponse) UnmarshalJSON(bytes []byte) (err error) { + varChecksumResponse := _ChecksumResponse{} + + if err = json.Unmarshal(bytes, &varChecksumResponse); err == nil { + *o = ChecksumResponse(varChecksumResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "path") + delete(additionalProperties, "checksum") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableChecksumResponse struct { + value *ChecksumResponse + isSet bool +} + +func (v NullableChecksumResponse) Get() *ChecksumResponse { + return v.value +} + +func (v *NullableChecksumResponse) Set(val *ChecksumResponse) { + v.value = val + v.isSet = true +} + +func (v NullableChecksumResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableChecksumResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChecksumResponse(val *ChecksumResponse) *NullableChecksumResponse { + return &NullableChecksumResponse{value: val, isSet: true} +} + +func (v NullableChecksumResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChecksumResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_client_configuration_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_client_configuration_response.go new file mode 100644 index 0000000000..4db131a426 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_client_configuration_response.go @@ -0,0 +1,145 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ClientConfigurationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ClientConfigurationResponse{} + +// ClientConfigurationResponse Configuration settings for the ansible-galaxy client. +type ClientConfigurationResponse struct { + DefaultDistributionPath NullableString `json:"default_distribution_path"` + AdditionalProperties map[string]interface{} +} + +type _ClientConfigurationResponse ClientConfigurationResponse + +// NewClientConfigurationResponse instantiates a new ClientConfigurationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewClientConfigurationResponse(defaultDistributionPath NullableString) *ClientConfigurationResponse { + this := ClientConfigurationResponse{} + this.DefaultDistributionPath = defaultDistributionPath + return &this +} + +// NewClientConfigurationResponseWithDefaults instantiates a new ClientConfigurationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewClientConfigurationResponseWithDefaults() *ClientConfigurationResponse { + this := ClientConfigurationResponse{} + return &this +} + +// GetDefaultDistributionPath returns the DefaultDistributionPath field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ClientConfigurationResponse) GetDefaultDistributionPath() string { + if o == nil || o.DefaultDistributionPath.Get() == nil { + var ret string + return ret + } + + return *o.DefaultDistributionPath.Get() +} + +// GetDefaultDistributionPathOk returns a tuple with the DefaultDistributionPath field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ClientConfigurationResponse) GetDefaultDistributionPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DefaultDistributionPath.Get(), o.DefaultDistributionPath.IsSet() +} + +// SetDefaultDistributionPath sets field value +func (o *ClientConfigurationResponse) SetDefaultDistributionPath(v string) { + o.DefaultDistributionPath.Set(&v) +} + +func (o ClientConfigurationResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ClientConfigurationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["default_distribution_path"] = o.DefaultDistributionPath.Get() + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ClientConfigurationResponse) UnmarshalJSON(bytes []byte) (err error) { + varClientConfigurationResponse := _ClientConfigurationResponse{} + + if err = json.Unmarshal(bytes, &varClientConfigurationResponse); err == nil { + *o = ClientConfigurationResponse(varClientConfigurationResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "default_distribution_path") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableClientConfigurationResponse struct { + value *ClientConfigurationResponse + isSet bool +} + +func (v NullableClientConfigurationResponse) Get() *ClientConfigurationResponse { + return v.value +} + +func (v *NullableClientConfigurationResponse) Set(val *ClientConfigurationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableClientConfigurationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableClientConfigurationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClientConfigurationResponse(val *ClientConfigurationResponse) *NullableClientConfigurationResponse { + return &NullableClientConfigurationResponse{value: val, isSet: true} +} + +func (v NullableClientConfigurationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClientConfigurationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_import_detail_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_import_detail_response.go new file mode 100644 index 0000000000..5fff0f20cc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_import_detail_response.go @@ -0,0 +1,358 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the CollectionImportDetailResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionImportDetailResponse{} + +// CollectionImportDetailResponse A serializer for a CollectionImport detail view. +type CollectionImportDetailResponse struct { + Id string `json:"id"` + State string `json:"state"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + StartedAt time.Time `json:"started_at"` + FinishedAt *time.Time `json:"finished_at,omitempty"` + Error map[string]interface{} `json:"error,omitempty"` + Messages map[string]interface{} `json:"messages"` + AdditionalProperties map[string]interface{} +} + +type _CollectionImportDetailResponse CollectionImportDetailResponse + +// NewCollectionImportDetailResponse instantiates a new CollectionImportDetailResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionImportDetailResponse(id string, state string, createdAt time.Time, updatedAt time.Time, startedAt time.Time, messages map[string]interface{}) *CollectionImportDetailResponse { + this := CollectionImportDetailResponse{} + this.Id = id + this.State = state + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.StartedAt = startedAt + this.Messages = messages + return &this +} + +// NewCollectionImportDetailResponseWithDefaults instantiates a new CollectionImportDetailResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionImportDetailResponseWithDefaults() *CollectionImportDetailResponse { + this := CollectionImportDetailResponse{} + return &this +} + +// GetId returns the Id field value +func (o *CollectionImportDetailResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CollectionImportDetailResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CollectionImportDetailResponse) SetId(v string) { + o.Id = v +} + +// GetState returns the State field value +func (o *CollectionImportDetailResponse) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *CollectionImportDetailResponse) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *CollectionImportDetailResponse) SetState(v string) { + o.State = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CollectionImportDetailResponse) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CollectionImportDetailResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CollectionImportDetailResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CollectionImportDetailResponse) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CollectionImportDetailResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CollectionImportDetailResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetStartedAt returns the StartedAt field value +func (o *CollectionImportDetailResponse) GetStartedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.StartedAt +} + +// GetStartedAtOk returns a tuple with the StartedAt field value +// and a boolean to check if the value has been set. +func (o *CollectionImportDetailResponse) GetStartedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.StartedAt, true +} + +// SetStartedAt sets field value +func (o *CollectionImportDetailResponse) SetStartedAt(v time.Time) { + o.StartedAt = v +} + +// GetFinishedAt returns the FinishedAt field value if set, zero value otherwise. +func (o *CollectionImportDetailResponse) GetFinishedAt() time.Time { + if o == nil || IsNil(o.FinishedAt) { + var ret time.Time + return ret + } + return *o.FinishedAt +} + +// GetFinishedAtOk returns a tuple with the FinishedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionImportDetailResponse) GetFinishedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.FinishedAt) { + return nil, false + } + return o.FinishedAt, true +} + +// HasFinishedAt returns a boolean if a field has been set. +func (o *CollectionImportDetailResponse) HasFinishedAt() bool { + if o != nil && !IsNil(o.FinishedAt) { + return true + } + + return false +} + +// SetFinishedAt gets a reference to the given time.Time and assigns it to the FinishedAt field. +func (o *CollectionImportDetailResponse) SetFinishedAt(v time.Time) { + o.FinishedAt = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *CollectionImportDetailResponse) GetError() map[string]interface{} { + if o == nil || IsNil(o.Error) { + var ret map[string]interface{} + return ret + } + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionImportDetailResponse) GetErrorOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Error) { + return map[string]interface{}{}, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *CollectionImportDetailResponse) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given map[string]interface{} and assigns it to the Error field. +func (o *CollectionImportDetailResponse) SetError(v map[string]interface{}) { + o.Error = v +} + +// GetMessages returns the Messages field value +func (o *CollectionImportDetailResponse) GetMessages() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Messages +} + +// GetMessagesOk returns a tuple with the Messages field value +// and a boolean to check if the value has been set. +func (o *CollectionImportDetailResponse) GetMessagesOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Messages, true +} + +// SetMessages sets field value +func (o *CollectionImportDetailResponse) SetMessages(v map[string]interface{}) { + o.Messages = v +} + +func (o CollectionImportDetailResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionImportDetailResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["state"] = o.State + toSerialize["created_at"] = o.CreatedAt + toSerialize["updated_at"] = o.UpdatedAt + toSerialize["started_at"] = o.StartedAt + if !IsNil(o.FinishedAt) { + toSerialize["finished_at"] = o.FinishedAt + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + toSerialize["messages"] = o.Messages + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionImportDetailResponse) UnmarshalJSON(bytes []byte) (err error) { + varCollectionImportDetailResponse := _CollectionImportDetailResponse{} + + if err = json.Unmarshal(bytes, &varCollectionImportDetailResponse); err == nil { + *o = CollectionImportDetailResponse(varCollectionImportDetailResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "state") + delete(additionalProperties, "created_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "started_at") + delete(additionalProperties, "finished_at") + delete(additionalProperties, "error") + delete(additionalProperties, "messages") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionImportDetailResponse struct { + value *CollectionImportDetailResponse + isSet bool +} + +func (v NullableCollectionImportDetailResponse) Get() *CollectionImportDetailResponse { + return v.value +} + +func (v *NullableCollectionImportDetailResponse) Set(val *CollectionImportDetailResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionImportDetailResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionImportDetailResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionImportDetailResponse(val *CollectionImportDetailResponse) *NullableCollectionImportDetailResponse { + return &NullableCollectionImportDetailResponse{value: val, isSet: true} +} + +func (v NullableCollectionImportDetailResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionImportDetailResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_metadata_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_metadata_response.go new file mode 100644 index 0000000000..2c6c769eb1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_metadata_response.go @@ -0,0 +1,476 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the CollectionMetadataResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionMetadataResponse{} + +// CollectionMetadataResponse A serializer for a CollectionVersion metadata. +type CollectionMetadataResponse struct { + Authors []string `json:"authors,omitempty"` + Contents map[string]interface{} `json:"contents,omitempty"` + Dependencies map[string]interface{} `json:"dependencies,omitempty"` + Description *string `json:"description,omitempty"` + Documentation *string `json:"documentation,omitempty"` + Homepage *string `json:"homepage,omitempty"` + Issues *string `json:"issues,omitempty"` + License []string `json:"license,omitempty"` + Repository *string `json:"repository,omitempty"` + Tags []string `json:"tags"` + AdditionalProperties map[string]interface{} +} + +type _CollectionMetadataResponse CollectionMetadataResponse + +// NewCollectionMetadataResponse instantiates a new CollectionMetadataResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionMetadataResponse(tags []string) *CollectionMetadataResponse { + this := CollectionMetadataResponse{} + this.Tags = tags + return &this +} + +// NewCollectionMetadataResponseWithDefaults instantiates a new CollectionMetadataResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionMetadataResponseWithDefaults() *CollectionMetadataResponse { + this := CollectionMetadataResponse{} + return &this +} + +// GetAuthors returns the Authors field value if set, zero value otherwise. +func (o *CollectionMetadataResponse) GetAuthors() []string { + if o == nil || IsNil(o.Authors) { + var ret []string + return ret + } + return o.Authors +} + +// GetAuthorsOk returns a tuple with the Authors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionMetadataResponse) GetAuthorsOk() ([]string, bool) { + if o == nil || IsNil(o.Authors) { + return nil, false + } + return o.Authors, true +} + +// HasAuthors returns a boolean if a field has been set. +func (o *CollectionMetadataResponse) HasAuthors() bool { + if o != nil && !IsNil(o.Authors) { + return true + } + + return false +} + +// SetAuthors gets a reference to the given []string and assigns it to the Authors field. +func (o *CollectionMetadataResponse) SetAuthors(v []string) { + o.Authors = v +} + +// GetContents returns the Contents field value if set, zero value otherwise. +func (o *CollectionMetadataResponse) GetContents() map[string]interface{} { + if o == nil || IsNil(o.Contents) { + var ret map[string]interface{} + return ret + } + return o.Contents +} + +// GetContentsOk returns a tuple with the Contents field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionMetadataResponse) GetContentsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Contents) { + return map[string]interface{}{}, false + } + return o.Contents, true +} + +// HasContents returns a boolean if a field has been set. +func (o *CollectionMetadataResponse) HasContents() bool { + if o != nil && !IsNil(o.Contents) { + return true + } + + return false +} + +// SetContents gets a reference to the given map[string]interface{} and assigns it to the Contents field. +func (o *CollectionMetadataResponse) SetContents(v map[string]interface{}) { + o.Contents = v +} + +// GetDependencies returns the Dependencies field value if set, zero value otherwise. +func (o *CollectionMetadataResponse) GetDependencies() map[string]interface{} { + if o == nil || IsNil(o.Dependencies) { + var ret map[string]interface{} + return ret + } + return o.Dependencies +} + +// GetDependenciesOk returns a tuple with the Dependencies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionMetadataResponse) GetDependenciesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Dependencies) { + return map[string]interface{}{}, false + } + return o.Dependencies, true +} + +// HasDependencies returns a boolean if a field has been set. +func (o *CollectionMetadataResponse) HasDependencies() bool { + if o != nil && !IsNil(o.Dependencies) { + return true + } + + return false +} + +// SetDependencies gets a reference to the given map[string]interface{} and assigns it to the Dependencies field. +func (o *CollectionMetadataResponse) SetDependencies(v map[string]interface{}) { + o.Dependencies = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CollectionMetadataResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionMetadataResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CollectionMetadataResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CollectionMetadataResponse) SetDescription(v string) { + o.Description = &v +} + +// GetDocumentation returns the Documentation field value if set, zero value otherwise. +func (o *CollectionMetadataResponse) GetDocumentation() string { + if o == nil || IsNil(o.Documentation) { + var ret string + return ret + } + return *o.Documentation +} + +// GetDocumentationOk returns a tuple with the Documentation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionMetadataResponse) GetDocumentationOk() (*string, bool) { + if o == nil || IsNil(o.Documentation) { + return nil, false + } + return o.Documentation, true +} + +// HasDocumentation returns a boolean if a field has been set. +func (o *CollectionMetadataResponse) HasDocumentation() bool { + if o != nil && !IsNil(o.Documentation) { + return true + } + + return false +} + +// SetDocumentation gets a reference to the given string and assigns it to the Documentation field. +func (o *CollectionMetadataResponse) SetDocumentation(v string) { + o.Documentation = &v +} + +// GetHomepage returns the Homepage field value if set, zero value otherwise. +func (o *CollectionMetadataResponse) GetHomepage() string { + if o == nil || IsNil(o.Homepage) { + var ret string + return ret + } + return *o.Homepage +} + +// GetHomepageOk returns a tuple with the Homepage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionMetadataResponse) GetHomepageOk() (*string, bool) { + if o == nil || IsNil(o.Homepage) { + return nil, false + } + return o.Homepage, true +} + +// HasHomepage returns a boolean if a field has been set. +func (o *CollectionMetadataResponse) HasHomepage() bool { + if o != nil && !IsNil(o.Homepage) { + return true + } + + return false +} + +// SetHomepage gets a reference to the given string and assigns it to the Homepage field. +func (o *CollectionMetadataResponse) SetHomepage(v string) { + o.Homepage = &v +} + +// GetIssues returns the Issues field value if set, zero value otherwise. +func (o *CollectionMetadataResponse) GetIssues() string { + if o == nil || IsNil(o.Issues) { + var ret string + return ret + } + return *o.Issues +} + +// GetIssuesOk returns a tuple with the Issues field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionMetadataResponse) GetIssuesOk() (*string, bool) { + if o == nil || IsNil(o.Issues) { + return nil, false + } + return o.Issues, true +} + +// HasIssues returns a boolean if a field has been set. +func (o *CollectionMetadataResponse) HasIssues() bool { + if o != nil && !IsNil(o.Issues) { + return true + } + + return false +} + +// SetIssues gets a reference to the given string and assigns it to the Issues field. +func (o *CollectionMetadataResponse) SetIssues(v string) { + o.Issues = &v +} + +// GetLicense returns the License field value if set, zero value otherwise. +func (o *CollectionMetadataResponse) GetLicense() []string { + if o == nil || IsNil(o.License) { + var ret []string + return ret + } + return o.License +} + +// GetLicenseOk returns a tuple with the License field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionMetadataResponse) GetLicenseOk() ([]string, bool) { + if o == nil || IsNil(o.License) { + return nil, false + } + return o.License, true +} + +// HasLicense returns a boolean if a field has been set. +func (o *CollectionMetadataResponse) HasLicense() bool { + if o != nil && !IsNil(o.License) { + return true + } + + return false +} + +// SetLicense gets a reference to the given []string and assigns it to the License field. +func (o *CollectionMetadataResponse) SetLicense(v []string) { + o.License = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *CollectionMetadataResponse) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionMetadataResponse) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *CollectionMetadataResponse) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *CollectionMetadataResponse) SetRepository(v string) { + o.Repository = &v +} + +// GetTags returns the Tags field value +func (o *CollectionMetadataResponse) GetTags() []string { + if o == nil { + var ret []string + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *CollectionMetadataResponse) GetTagsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *CollectionMetadataResponse) SetTags(v []string) { + o.Tags = v +} + +func (o CollectionMetadataResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionMetadataResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Authors) { + toSerialize["authors"] = o.Authors + } + if !IsNil(o.Contents) { + toSerialize["contents"] = o.Contents + } + if !IsNil(o.Dependencies) { + toSerialize["dependencies"] = o.Dependencies + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Documentation) { + toSerialize["documentation"] = o.Documentation + } + if !IsNil(o.Homepage) { + toSerialize["homepage"] = o.Homepage + } + if !IsNil(o.Issues) { + toSerialize["issues"] = o.Issues + } + if !IsNil(o.License) { + toSerialize["license"] = o.License + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["tags"] = o.Tags + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionMetadataResponse) UnmarshalJSON(bytes []byte) (err error) { + varCollectionMetadataResponse := _CollectionMetadataResponse{} + + if err = json.Unmarshal(bytes, &varCollectionMetadataResponse); err == nil { + *o = CollectionMetadataResponse(varCollectionMetadataResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "authors") + delete(additionalProperties, "contents") + delete(additionalProperties, "dependencies") + delete(additionalProperties, "description") + delete(additionalProperties, "documentation") + delete(additionalProperties, "homepage") + delete(additionalProperties, "issues") + delete(additionalProperties, "license") + delete(additionalProperties, "repository") + delete(additionalProperties, "tags") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionMetadataResponse struct { + value *CollectionMetadataResponse + isSet bool +} + +func (v NullableCollectionMetadataResponse) Get() *CollectionMetadataResponse { + return v.value +} + +func (v *NullableCollectionMetadataResponse) Set(val *CollectionMetadataResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionMetadataResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionMetadataResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionMetadataResponse(val *CollectionMetadataResponse) *NullableCollectionMetadataResponse { + return &NullableCollectionMetadataResponse{value: val, isSet: true} +} + +func (v NullableCollectionMetadataResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionMetadataResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_namespace_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_namespace_response.go new file mode 100644 index 0000000000..dfd3d652d2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_namespace_response.go @@ -0,0 +1,173 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the CollectionNamespaceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionNamespaceResponse{} + +// CollectionNamespaceResponse A serializer for a Collection Version namespace field. +type CollectionNamespaceResponse struct { + Name string `json:"name"` + MetadataSha256 NullableString `json:"metadata_sha256"` + AdditionalProperties map[string]interface{} +} + +type _CollectionNamespaceResponse CollectionNamespaceResponse + +// NewCollectionNamespaceResponse instantiates a new CollectionNamespaceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionNamespaceResponse(name string, metadataSha256 NullableString) *CollectionNamespaceResponse { + this := CollectionNamespaceResponse{} + this.Name = name + this.MetadataSha256 = metadataSha256 + return &this +} + +// NewCollectionNamespaceResponseWithDefaults instantiates a new CollectionNamespaceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionNamespaceResponseWithDefaults() *CollectionNamespaceResponse { + this := CollectionNamespaceResponse{} + return &this +} + +// GetName returns the Name field value +func (o *CollectionNamespaceResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CollectionNamespaceResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CollectionNamespaceResponse) SetName(v string) { + o.Name = v +} + +// GetMetadataSha256 returns the MetadataSha256 field value +// If the value is explicit nil, the zero value for string will be returned +func (o *CollectionNamespaceResponse) GetMetadataSha256() string { + if o == nil || o.MetadataSha256.Get() == nil { + var ret string + return ret + } + + return *o.MetadataSha256.Get() +} + +// GetMetadataSha256Ok returns a tuple with the MetadataSha256 field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CollectionNamespaceResponse) GetMetadataSha256Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.MetadataSha256.Get(), o.MetadataSha256.IsSet() +} + +// SetMetadataSha256 sets field value +func (o *CollectionNamespaceResponse) SetMetadataSha256(v string) { + o.MetadataSha256.Set(&v) +} + +func (o CollectionNamespaceResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionNamespaceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["metadata_sha256"] = o.MetadataSha256.Get() + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionNamespaceResponse) UnmarshalJSON(bytes []byte) (err error) { + varCollectionNamespaceResponse := _CollectionNamespaceResponse{} + + if err = json.Unmarshal(bytes, &varCollectionNamespaceResponse); err == nil { + *o = CollectionNamespaceResponse(varCollectionNamespaceResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "metadata_sha256") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionNamespaceResponse struct { + value *CollectionNamespaceResponse + isSet bool +} + +func (v NullableCollectionNamespaceResponse) Get() *CollectionNamespaceResponse { + return v.value +} + +func (v *NullableCollectionNamespaceResponse) Set(val *CollectionNamespaceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionNamespaceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionNamespaceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionNamespaceResponse(val *CollectionNamespaceResponse) *NullableCollectionNamespaceResponse { + return &NullableCollectionNamespaceResponse{value: val, isSet: true} +} + +func (v NullableCollectionNamespaceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionNamespaceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_one_shot.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_one_shot.go new file mode 100644 index 0000000000..71c48fab77 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_one_shot.go @@ -0,0 +1,297 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the CollectionOneShot type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionOneShot{} + +// CollectionOneShot A serializer for the Collection One Shot Upload API. +type CollectionOneShot struct { + // The Collection tarball. + File *os.File `json:"file"` + // An optional sha256 checksum of the uploaded file. + Sha256 *string `json:"sha256,omitempty"` + // The expected 'namespace' of the Collection to be verified against the metadata during import. + ExpectedNamespace *string `json:"expected_namespace,omitempty"` + // The expected 'name' of the Collection to be verified against the metadata during import. + ExpectedName *string `json:"expected_name,omitempty"` + // The expected version of the Collection to be verified against the metadata during import. + ExpectedVersion *string `json:"expected_version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CollectionOneShot CollectionOneShot + +// NewCollectionOneShot instantiates a new CollectionOneShot object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionOneShot(file *os.File) *CollectionOneShot { + this := CollectionOneShot{} + this.File = file + return &this +} + +// NewCollectionOneShotWithDefaults instantiates a new CollectionOneShot object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionOneShotWithDefaults() *CollectionOneShot { + this := CollectionOneShot{} + return &this +} + +// GetFile returns the File field value +func (o *CollectionOneShot) GetFile() *os.File { + if o == nil { + var ret *os.File + return ret + } + + return o.File +} + +// GetFileOk returns a tuple with the File field value +// and a boolean to check if the value has been set. +func (o *CollectionOneShot) GetFileOk() (**os.File, bool) { + if o == nil { + return nil, false + } + return &o.File, true +} + +// SetFile sets field value +func (o *CollectionOneShot) SetFile(v *os.File) { + o.File = v +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise. +func (o *CollectionOneShot) GetSha256() string { + if o == nil || IsNil(o.Sha256) { + var ret string + return ret + } + return *o.Sha256 +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionOneShot) GetSha256Ok() (*string, bool) { + if o == nil || IsNil(o.Sha256) { + return nil, false + } + return o.Sha256, true +} + +// HasSha256 returns a boolean if a field has been set. +func (o *CollectionOneShot) HasSha256() bool { + if o != nil && !IsNil(o.Sha256) { + return true + } + + return false +} + +// SetSha256 gets a reference to the given string and assigns it to the Sha256 field. +func (o *CollectionOneShot) SetSha256(v string) { + o.Sha256 = &v +} + +// GetExpectedNamespace returns the ExpectedNamespace field value if set, zero value otherwise. +func (o *CollectionOneShot) GetExpectedNamespace() string { + if o == nil || IsNil(o.ExpectedNamespace) { + var ret string + return ret + } + return *o.ExpectedNamespace +} + +// GetExpectedNamespaceOk returns a tuple with the ExpectedNamespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionOneShot) GetExpectedNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.ExpectedNamespace) { + return nil, false + } + return o.ExpectedNamespace, true +} + +// HasExpectedNamespace returns a boolean if a field has been set. +func (o *CollectionOneShot) HasExpectedNamespace() bool { + if o != nil && !IsNil(o.ExpectedNamespace) { + return true + } + + return false +} + +// SetExpectedNamespace gets a reference to the given string and assigns it to the ExpectedNamespace field. +func (o *CollectionOneShot) SetExpectedNamespace(v string) { + o.ExpectedNamespace = &v +} + +// GetExpectedName returns the ExpectedName field value if set, zero value otherwise. +func (o *CollectionOneShot) GetExpectedName() string { + if o == nil || IsNil(o.ExpectedName) { + var ret string + return ret + } + return *o.ExpectedName +} + +// GetExpectedNameOk returns a tuple with the ExpectedName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionOneShot) GetExpectedNameOk() (*string, bool) { + if o == nil || IsNil(o.ExpectedName) { + return nil, false + } + return o.ExpectedName, true +} + +// HasExpectedName returns a boolean if a field has been set. +func (o *CollectionOneShot) HasExpectedName() bool { + if o != nil && !IsNil(o.ExpectedName) { + return true + } + + return false +} + +// SetExpectedName gets a reference to the given string and assigns it to the ExpectedName field. +func (o *CollectionOneShot) SetExpectedName(v string) { + o.ExpectedName = &v +} + +// GetExpectedVersion returns the ExpectedVersion field value if set, zero value otherwise. +func (o *CollectionOneShot) GetExpectedVersion() string { + if o == nil || IsNil(o.ExpectedVersion) { + var ret string + return ret + } + return *o.ExpectedVersion +} + +// GetExpectedVersionOk returns a tuple with the ExpectedVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionOneShot) GetExpectedVersionOk() (*string, bool) { + if o == nil || IsNil(o.ExpectedVersion) { + return nil, false + } + return o.ExpectedVersion, true +} + +// HasExpectedVersion returns a boolean if a field has been set. +func (o *CollectionOneShot) HasExpectedVersion() bool { + if o != nil && !IsNil(o.ExpectedVersion) { + return true + } + + return false +} + +// SetExpectedVersion gets a reference to the given string and assigns it to the ExpectedVersion field. +func (o *CollectionOneShot) SetExpectedVersion(v string) { + o.ExpectedVersion = &v +} + +func (o CollectionOneShot) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionOneShot) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["file"] = o.File + if !IsNil(o.Sha256) { + toSerialize["sha256"] = o.Sha256 + } + if !IsNil(o.ExpectedNamespace) { + toSerialize["expected_namespace"] = o.ExpectedNamespace + } + if !IsNil(o.ExpectedName) { + toSerialize["expected_name"] = o.ExpectedName + } + if !IsNil(o.ExpectedVersion) { + toSerialize["expected_version"] = o.ExpectedVersion + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionOneShot) UnmarshalJSON(bytes []byte) (err error) { + varCollectionOneShot := _CollectionOneShot{} + + if err = json.Unmarshal(bytes, &varCollectionOneShot); err == nil { + *o = CollectionOneShot(varCollectionOneShot) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "file") + delete(additionalProperties, "sha256") + delete(additionalProperties, "expected_namespace") + delete(additionalProperties, "expected_name") + delete(additionalProperties, "expected_version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionOneShot struct { + value *CollectionOneShot + isSet bool +} + +func (v NullableCollectionOneShot) Get() *CollectionOneShot { + return v.value +} + +func (v *NullableCollectionOneShot) Set(val *CollectionOneShot) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionOneShot) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionOneShot) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionOneShot(val *CollectionOneShot) *NullableCollectionOneShot { + return &NullableCollectionOneShot{value: val, isSet: true} +} + +func (v NullableCollectionOneShot) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionOneShot) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_ref_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_ref_response.go new file mode 100644 index 0000000000..59ca370ce9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_ref_response.go @@ -0,0 +1,209 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the CollectionRefResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionRefResponse{} + +// CollectionRefResponse A serializer for a Collection reference. +type CollectionRefResponse struct { + Id string `json:"id"` + Name string `json:"name"` + // Returns link to a collection. + Href *string `json:"href,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CollectionRefResponse CollectionRefResponse + +// NewCollectionRefResponse instantiates a new CollectionRefResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionRefResponse(id string, name string) *CollectionRefResponse { + this := CollectionRefResponse{} + this.Id = id + this.Name = name + return &this +} + +// NewCollectionRefResponseWithDefaults instantiates a new CollectionRefResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionRefResponseWithDefaults() *CollectionRefResponse { + this := CollectionRefResponse{} + return &this +} + +// GetId returns the Id field value +func (o *CollectionRefResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CollectionRefResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CollectionRefResponse) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CollectionRefResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CollectionRefResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CollectionRefResponse) SetName(v string) { + o.Name = v +} + +// GetHref returns the Href field value if set, zero value otherwise. +func (o *CollectionRefResponse) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret + } + return *o.Href +} + +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionRefResponse) GetHrefOk() (*string, bool) { + if o == nil || IsNil(o.Href) { + return nil, false + } + return o.Href, true +} + +// HasHref returns a boolean if a field has been set. +func (o *CollectionRefResponse) HasHref() bool { + if o != nil && !IsNil(o.Href) { + return true + } + + return false +} + +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *CollectionRefResponse) SetHref(v string) { + o.Href = &v +} + +func (o CollectionRefResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionRefResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Href) { + toSerialize["href"] = o.Href + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionRefResponse) UnmarshalJSON(bytes []byte) (err error) { + varCollectionRefResponse := _CollectionRefResponse{} + + if err = json.Unmarshal(bytes, &varCollectionRefResponse); err == nil { + *o = CollectionRefResponse(varCollectionRefResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "href") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionRefResponse struct { + value *CollectionRefResponse + isSet bool +} + +func (v NullableCollectionRefResponse) Get() *CollectionRefResponse { + return v.value +} + +func (v *NullableCollectionRefResponse) Set(val *CollectionRefResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionRefResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionRefResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionRefResponse(val *CollectionRefResponse) *NullableCollectionRefResponse { + return &NullableCollectionRefResponse{value: val, isSet: true} +} + +func (v NullableCollectionRefResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionRefResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_response.go new file mode 100644 index 0000000000..dcf809daaa --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_response.go @@ -0,0 +1,445 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the CollectionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionResponse{} + +// CollectionResponse A serializer for a Collection. +type CollectionResponse struct { + // Get href. + Href *string `json:"href,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Name *string `json:"name,omitempty"` + Deprecated bool `json:"deprecated"` + // Get a link to a collection versions list. + VersionsUrl *string `json:"versions_url,omitempty"` + // Get a highest version and its link. + HighestVersion map[string]interface{} `json:"highest_version,omitempty"` + // Get the timestamp of the lowest version CollectionVersion's created timestamp. + CreatedAt *time.Time `json:"created_at,omitempty"` + // Get the timestamp of the latest version CollectionVersion's created timestamp. + UpdatedAt *time.Time `json:"updated_at,omitempty"` + DownloadCount *string `json:"download_count,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CollectionResponse CollectionResponse + +// NewCollectionResponse instantiates a new CollectionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionResponse(deprecated bool) *CollectionResponse { + this := CollectionResponse{} + this.Deprecated = deprecated + return &this +} + +// NewCollectionResponseWithDefaults instantiates a new CollectionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionResponseWithDefaults() *CollectionResponse { + this := CollectionResponse{} + return &this +} + +// GetHref returns the Href field value if set, zero value otherwise. +func (o *CollectionResponse) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret + } + return *o.Href +} + +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionResponse) GetHrefOk() (*string, bool) { + if o == nil || IsNil(o.Href) { + return nil, false + } + return o.Href, true +} + +// HasHref returns a boolean if a field has been set. +func (o *CollectionResponse) HasHref() bool { + if o != nil && !IsNil(o.Href) { + return true + } + + return false +} + +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *CollectionResponse) SetHref(v string) { + o.Href = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *CollectionResponse) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionResponse) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *CollectionResponse) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *CollectionResponse) SetNamespace(v string) { + o.Namespace = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CollectionResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CollectionResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CollectionResponse) SetName(v string) { + o.Name = &v +} + +// GetDeprecated returns the Deprecated field value +func (o *CollectionResponse) GetDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.Deprecated +} + +// GetDeprecatedOk returns a tuple with the Deprecated field value +// and a boolean to check if the value has been set. +func (o *CollectionResponse) GetDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Deprecated, true +} + +// SetDeprecated sets field value +func (o *CollectionResponse) SetDeprecated(v bool) { + o.Deprecated = v +} + +// GetVersionsUrl returns the VersionsUrl field value if set, zero value otherwise. +func (o *CollectionResponse) GetVersionsUrl() string { + if o == nil || IsNil(o.VersionsUrl) { + var ret string + return ret + } + return *o.VersionsUrl +} + +// GetVersionsUrlOk returns a tuple with the VersionsUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionResponse) GetVersionsUrlOk() (*string, bool) { + if o == nil || IsNil(o.VersionsUrl) { + return nil, false + } + return o.VersionsUrl, true +} + +// HasVersionsUrl returns a boolean if a field has been set. +func (o *CollectionResponse) HasVersionsUrl() bool { + if o != nil && !IsNil(o.VersionsUrl) { + return true + } + + return false +} + +// SetVersionsUrl gets a reference to the given string and assigns it to the VersionsUrl field. +func (o *CollectionResponse) SetVersionsUrl(v string) { + o.VersionsUrl = &v +} + +// GetHighestVersion returns the HighestVersion field value if set, zero value otherwise. +func (o *CollectionResponse) GetHighestVersion() map[string]interface{} { + if o == nil || IsNil(o.HighestVersion) { + var ret map[string]interface{} + return ret + } + return o.HighestVersion +} + +// GetHighestVersionOk returns a tuple with the HighestVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionResponse) GetHighestVersionOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.HighestVersion) { + return map[string]interface{}{}, false + } + return o.HighestVersion, true +} + +// HasHighestVersion returns a boolean if a field has been set. +func (o *CollectionResponse) HasHighestVersion() bool { + if o != nil && !IsNil(o.HighestVersion) { + return true + } + + return false +} + +// SetHighestVersion gets a reference to the given map[string]interface{} and assigns it to the HighestVersion field. +func (o *CollectionResponse) SetHighestVersion(v map[string]interface{}) { + o.HighestVersion = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CollectionResponse) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CollectionResponse) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CollectionResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CollectionResponse) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CollectionResponse) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CollectionResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetDownloadCount returns the DownloadCount field value if set, zero value otherwise. +func (o *CollectionResponse) GetDownloadCount() string { + if o == nil || IsNil(o.DownloadCount) { + var ret string + return ret + } + return *o.DownloadCount +} + +// GetDownloadCountOk returns a tuple with the DownloadCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionResponse) GetDownloadCountOk() (*string, bool) { + if o == nil || IsNil(o.DownloadCount) { + return nil, false + } + return o.DownloadCount, true +} + +// HasDownloadCount returns a boolean if a field has been set. +func (o *CollectionResponse) HasDownloadCount() bool { + if o != nil && !IsNil(o.DownloadCount) { + return true + } + + return false +} + +// SetDownloadCount gets a reference to the given string and assigns it to the DownloadCount field. +func (o *CollectionResponse) SetDownloadCount(v string) { + o.DownloadCount = &v +} + +func (o CollectionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Href) { + toSerialize["href"] = o.Href + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["deprecated"] = o.Deprecated + if !IsNil(o.VersionsUrl) { + toSerialize["versions_url"] = o.VersionsUrl + } + if !IsNil(o.HighestVersion) { + toSerialize["highest_version"] = o.HighestVersion + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !IsNil(o.DownloadCount) { + toSerialize["download_count"] = o.DownloadCount + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionResponse) UnmarshalJSON(bytes []byte) (err error) { + varCollectionResponse := _CollectionResponse{} + + if err = json.Unmarshal(bytes, &varCollectionResponse); err == nil { + *o = CollectionResponse(varCollectionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "href") + delete(additionalProperties, "namespace") + delete(additionalProperties, "name") + delete(additionalProperties, "deprecated") + delete(additionalProperties, "versions_url") + delete(additionalProperties, "highest_version") + delete(additionalProperties, "created_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "download_count") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionResponse struct { + value *CollectionResponse + isSet bool +} + +func (v NullableCollectionResponse) Get() *CollectionResponse { + return v.value +} + +func (v *NullableCollectionResponse) Set(val *CollectionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionResponse(val *CollectionResponse) *NullableCollectionResponse { + return &NullableCollectionResponse{value: val, isSet: true} +} + +func (v NullableCollectionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_summary_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_summary_response.go new file mode 100644 index 0000000000..e0c5392391 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_summary_response.go @@ -0,0 +1,504 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the CollectionSummaryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionSummaryResponse{} + +// CollectionSummaryResponse Collection Version serializer without docs blob. +type CollectionSummaryResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // The namespace of the collection. + Namespace *string `json:"namespace,omitempty"` + // The name of the collection. + Name *string `json:"name,omitempty"` + // The version of the collection. + Version *string `json:"version,omitempty"` + // The version of Ansible required to use the collection. Multiple versions can be separated with a comma. + RequiresAnsible NullableString `json:"requires_ansible,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A JSON field with data about the contents. + Contents map[string]interface{} `json:"contents,omitempty"` + // A dict declaring Collections that this collection requires to be installed for it to be usable. + Dependencies map[string]interface{} `json:"dependencies,omitempty"` + // A short summary description of the collection. + Description *string `json:"description,omitempty"` + Tags []AnsibleTagResponse `json:"tags,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CollectionSummaryResponse CollectionSummaryResponse + +// NewCollectionSummaryResponse instantiates a new CollectionSummaryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionSummaryResponse() *CollectionSummaryResponse { + this := CollectionSummaryResponse{} + return &this +} + +// NewCollectionSummaryResponseWithDefaults instantiates a new CollectionSummaryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionSummaryResponseWithDefaults() *CollectionSummaryResponse { + this := CollectionSummaryResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *CollectionSummaryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionSummaryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *CollectionSummaryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *CollectionSummaryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *CollectionSummaryResponse) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionSummaryResponse) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *CollectionSummaryResponse) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *CollectionSummaryResponse) SetNamespace(v string) { + o.Namespace = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CollectionSummaryResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionSummaryResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CollectionSummaryResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CollectionSummaryResponse) SetName(v string) { + o.Name = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *CollectionSummaryResponse) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionSummaryResponse) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *CollectionSummaryResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *CollectionSummaryResponse) SetVersion(v string) { + o.Version = &v +} + +// GetRequiresAnsible returns the RequiresAnsible field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CollectionSummaryResponse) GetRequiresAnsible() string { + if o == nil || IsNil(o.RequiresAnsible.Get()) { + var ret string + return ret + } + return *o.RequiresAnsible.Get() +} + +// GetRequiresAnsibleOk returns a tuple with the RequiresAnsible field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CollectionSummaryResponse) GetRequiresAnsibleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RequiresAnsible.Get(), o.RequiresAnsible.IsSet() +} + +// HasRequiresAnsible returns a boolean if a field has been set. +func (o *CollectionSummaryResponse) HasRequiresAnsible() bool { + if o != nil && o.RequiresAnsible.IsSet() { + return true + } + + return false +} + +// SetRequiresAnsible gets a reference to the given NullableString and assigns it to the RequiresAnsible field. +func (o *CollectionSummaryResponse) SetRequiresAnsible(v string) { + o.RequiresAnsible.Set(&v) +} +// SetRequiresAnsibleNil sets the value for RequiresAnsible to be an explicit nil +func (o *CollectionSummaryResponse) SetRequiresAnsibleNil() { + o.RequiresAnsible.Set(nil) +} + +// UnsetRequiresAnsible ensures that no value is present for RequiresAnsible, not even an explicit nil +func (o *CollectionSummaryResponse) UnsetRequiresAnsible() { + o.RequiresAnsible.Unset() +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *CollectionSummaryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionSummaryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *CollectionSummaryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *CollectionSummaryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetContents returns the Contents field value if set, zero value otherwise. +func (o *CollectionSummaryResponse) GetContents() map[string]interface{} { + if o == nil || IsNil(o.Contents) { + var ret map[string]interface{} + return ret + } + return o.Contents +} + +// GetContentsOk returns a tuple with the Contents field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionSummaryResponse) GetContentsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Contents) { + return map[string]interface{}{}, false + } + return o.Contents, true +} + +// HasContents returns a boolean if a field has been set. +func (o *CollectionSummaryResponse) HasContents() bool { + if o != nil && !IsNil(o.Contents) { + return true + } + + return false +} + +// SetContents gets a reference to the given map[string]interface{} and assigns it to the Contents field. +func (o *CollectionSummaryResponse) SetContents(v map[string]interface{}) { + o.Contents = v +} + +// GetDependencies returns the Dependencies field value if set, zero value otherwise. +func (o *CollectionSummaryResponse) GetDependencies() map[string]interface{} { + if o == nil || IsNil(o.Dependencies) { + var ret map[string]interface{} + return ret + } + return o.Dependencies +} + +// GetDependenciesOk returns a tuple with the Dependencies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionSummaryResponse) GetDependenciesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Dependencies) { + return map[string]interface{}{}, false + } + return o.Dependencies, true +} + +// HasDependencies returns a boolean if a field has been set. +func (o *CollectionSummaryResponse) HasDependencies() bool { + if o != nil && !IsNil(o.Dependencies) { + return true + } + + return false +} + +// SetDependencies gets a reference to the given map[string]interface{} and assigns it to the Dependencies field. +func (o *CollectionSummaryResponse) SetDependencies(v map[string]interface{}) { + o.Dependencies = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CollectionSummaryResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionSummaryResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CollectionSummaryResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CollectionSummaryResponse) SetDescription(v string) { + o.Description = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *CollectionSummaryResponse) GetTags() []AnsibleTagResponse { + if o == nil || IsNil(o.Tags) { + var ret []AnsibleTagResponse + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionSummaryResponse) GetTagsOk() ([]AnsibleTagResponse, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *CollectionSummaryResponse) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []AnsibleTagResponse and assigns it to the Tags field. +func (o *CollectionSummaryResponse) SetTags(v []AnsibleTagResponse) { + o.Tags = v +} + +func (o CollectionSummaryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionSummaryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if o.RequiresAnsible.IsSet() { + toSerialize["requires_ansible"] = o.RequiresAnsible.Get() + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.Contents) { + toSerialize["contents"] = o.Contents + } + if !IsNil(o.Dependencies) { + toSerialize["dependencies"] = o.Dependencies + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionSummaryResponse) UnmarshalJSON(bytes []byte) (err error) { + varCollectionSummaryResponse := _CollectionSummaryResponse{} + + if err = json.Unmarshal(bytes, &varCollectionSummaryResponse); err == nil { + *o = CollectionSummaryResponse(varCollectionSummaryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "namespace") + delete(additionalProperties, "name") + delete(additionalProperties, "version") + delete(additionalProperties, "requires_ansible") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "contents") + delete(additionalProperties, "dependencies") + delete(additionalProperties, "description") + delete(additionalProperties, "tags") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionSummaryResponse struct { + value *CollectionSummaryResponse + isSet bool +} + +func (v NullableCollectionSummaryResponse) Get() *CollectionSummaryResponse { + return v.value +} + +func (v *NullableCollectionSummaryResponse) Set(val *CollectionSummaryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionSummaryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionSummaryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionSummaryResponse(val *CollectionSummaryResponse) *NullableCollectionSummaryResponse { + return &NullableCollectionSummaryResponse{value: val, isSet: true} +} + +func (v NullableCollectionSummaryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionSummaryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_copy_move.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_copy_move.go new file mode 100644 index 0000000000..30fa6636cb --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_copy_move.go @@ -0,0 +1,211 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the CollectionVersionCopyMove type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionVersionCopyMove{} + +// CollectionVersionCopyMove Copy or move collections from a source repository into one or more destinations. This will carry associated content like Signatures and Marks along. +type CollectionVersionCopyMove struct { + // A list of collection versions to move or copy. + CollectionVersions []string `json:"collection_versions"` + // List of repository HREFs to put content in. + DestinationRepositories []string `json:"destination_repositories"` + // HREF for a signing service. This will be used to sign the collection before moving putting it in any new repositories. + SigningService *string `json:"signing_service,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CollectionVersionCopyMove CollectionVersionCopyMove + +// NewCollectionVersionCopyMove instantiates a new CollectionVersionCopyMove object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionVersionCopyMove(collectionVersions []string, destinationRepositories []string) *CollectionVersionCopyMove { + this := CollectionVersionCopyMove{} + this.CollectionVersions = collectionVersions + this.DestinationRepositories = destinationRepositories + return &this +} + +// NewCollectionVersionCopyMoveWithDefaults instantiates a new CollectionVersionCopyMove object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionVersionCopyMoveWithDefaults() *CollectionVersionCopyMove { + this := CollectionVersionCopyMove{} + return &this +} + +// GetCollectionVersions returns the CollectionVersions field value +func (o *CollectionVersionCopyMove) GetCollectionVersions() []string { + if o == nil { + var ret []string + return ret + } + + return o.CollectionVersions +} + +// GetCollectionVersionsOk returns a tuple with the CollectionVersions field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionCopyMove) GetCollectionVersionsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.CollectionVersions, true +} + +// SetCollectionVersions sets field value +func (o *CollectionVersionCopyMove) SetCollectionVersions(v []string) { + o.CollectionVersions = v +} + +// GetDestinationRepositories returns the DestinationRepositories field value +func (o *CollectionVersionCopyMove) GetDestinationRepositories() []string { + if o == nil { + var ret []string + return ret + } + + return o.DestinationRepositories +} + +// GetDestinationRepositoriesOk returns a tuple with the DestinationRepositories field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionCopyMove) GetDestinationRepositoriesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.DestinationRepositories, true +} + +// SetDestinationRepositories sets field value +func (o *CollectionVersionCopyMove) SetDestinationRepositories(v []string) { + o.DestinationRepositories = v +} + +// GetSigningService returns the SigningService field value if set, zero value otherwise. +func (o *CollectionVersionCopyMove) GetSigningService() string { + if o == nil || IsNil(o.SigningService) { + var ret string + return ret + } + return *o.SigningService +} + +// GetSigningServiceOk returns a tuple with the SigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionCopyMove) GetSigningServiceOk() (*string, bool) { + if o == nil || IsNil(o.SigningService) { + return nil, false + } + return o.SigningService, true +} + +// HasSigningService returns a boolean if a field has been set. +func (o *CollectionVersionCopyMove) HasSigningService() bool { + if o != nil && !IsNil(o.SigningService) { + return true + } + + return false +} + +// SetSigningService gets a reference to the given string and assigns it to the SigningService field. +func (o *CollectionVersionCopyMove) SetSigningService(v string) { + o.SigningService = &v +} + +func (o CollectionVersionCopyMove) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionVersionCopyMove) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["collection_versions"] = o.CollectionVersions + toSerialize["destination_repositories"] = o.DestinationRepositories + if !IsNil(o.SigningService) { + toSerialize["signing_service"] = o.SigningService + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionVersionCopyMove) UnmarshalJSON(bytes []byte) (err error) { + varCollectionVersionCopyMove := _CollectionVersionCopyMove{} + + if err = json.Unmarshal(bytes, &varCollectionVersionCopyMove); err == nil { + *o = CollectionVersionCopyMove(varCollectionVersionCopyMove) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "collection_versions") + delete(additionalProperties, "destination_repositories") + delete(additionalProperties, "signing_service") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionVersionCopyMove struct { + value *CollectionVersionCopyMove + isSet bool +} + +func (v NullableCollectionVersionCopyMove) Get() *CollectionVersionCopyMove { + return v.value +} + +func (v *NullableCollectionVersionCopyMove) Set(val *CollectionVersionCopyMove) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionVersionCopyMove) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionVersionCopyMove) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionVersionCopyMove(val *CollectionVersionCopyMove) *NullableCollectionVersionCopyMove { + return &NullableCollectionVersionCopyMove{value: val, isSet: true} +} + +func (v NullableCollectionVersionCopyMove) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionVersionCopyMove) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_docs_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_docs_response.go new file mode 100644 index 0000000000..3965dde0e2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_docs_response.go @@ -0,0 +1,143 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the CollectionVersionDocsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionVersionDocsResponse{} + +// CollectionVersionDocsResponse A serializer to display the docs_blob of a CollectionVersion. +type CollectionVersionDocsResponse struct { + DocsBlob map[string]interface{} `json:"docs_blob"` + AdditionalProperties map[string]interface{} +} + +type _CollectionVersionDocsResponse CollectionVersionDocsResponse + +// NewCollectionVersionDocsResponse instantiates a new CollectionVersionDocsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionVersionDocsResponse(docsBlob map[string]interface{}) *CollectionVersionDocsResponse { + this := CollectionVersionDocsResponse{} + this.DocsBlob = docsBlob + return &this +} + +// NewCollectionVersionDocsResponseWithDefaults instantiates a new CollectionVersionDocsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionVersionDocsResponseWithDefaults() *CollectionVersionDocsResponse { + this := CollectionVersionDocsResponse{} + return &this +} + +// GetDocsBlob returns the DocsBlob field value +func (o *CollectionVersionDocsResponse) GetDocsBlob() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.DocsBlob +} + +// GetDocsBlobOk returns a tuple with the DocsBlob field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionDocsResponse) GetDocsBlobOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.DocsBlob, true +} + +// SetDocsBlob sets field value +func (o *CollectionVersionDocsResponse) SetDocsBlob(v map[string]interface{}) { + o.DocsBlob = v +} + +func (o CollectionVersionDocsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionVersionDocsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["docs_blob"] = o.DocsBlob + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionVersionDocsResponse) UnmarshalJSON(bytes []byte) (err error) { + varCollectionVersionDocsResponse := _CollectionVersionDocsResponse{} + + if err = json.Unmarshal(bytes, &varCollectionVersionDocsResponse); err == nil { + *o = CollectionVersionDocsResponse(varCollectionVersionDocsResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "docs_blob") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionVersionDocsResponse struct { + value *CollectionVersionDocsResponse + isSet bool +} + +func (v NullableCollectionVersionDocsResponse) Get() *CollectionVersionDocsResponse { + return v.value +} + +func (v *NullableCollectionVersionDocsResponse) Set(val *CollectionVersionDocsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionVersionDocsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionVersionDocsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionVersionDocsResponse(val *CollectionVersionDocsResponse) *NullableCollectionVersionDocsResponse { + return &NullableCollectionVersionDocsResponse{value: val, isSet: true} +} + +func (v NullableCollectionVersionDocsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionVersionDocsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_list_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_list_response.go new file mode 100644 index 0000000000..9c5a5ce9fa --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_list_response.go @@ -0,0 +1,332 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the CollectionVersionListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionVersionListResponse{} + +// CollectionVersionListResponse A serializer for a CollectionVersion list item. +type CollectionVersionListResponse struct { + Version *string `json:"version,omitempty"` + // Get href. + Href *string `json:"href,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + RequiresAnsible NullableString `json:"requires_ansible,omitempty"` + // Get a list of mark values filtering only those in the current repo. + Marks []string `json:"marks,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CollectionVersionListResponse CollectionVersionListResponse + +// NewCollectionVersionListResponse instantiates a new CollectionVersionListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionVersionListResponse(createdAt time.Time, updatedAt time.Time) *CollectionVersionListResponse { + this := CollectionVersionListResponse{} + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + return &this +} + +// NewCollectionVersionListResponseWithDefaults instantiates a new CollectionVersionListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionVersionListResponseWithDefaults() *CollectionVersionListResponse { + this := CollectionVersionListResponse{} + return &this +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *CollectionVersionListResponse) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionListResponse) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *CollectionVersionListResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *CollectionVersionListResponse) SetVersion(v string) { + o.Version = &v +} + +// GetHref returns the Href field value if set, zero value otherwise. +func (o *CollectionVersionListResponse) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret + } + return *o.Href +} + +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionListResponse) GetHrefOk() (*string, bool) { + if o == nil || IsNil(o.Href) { + return nil, false + } + return o.Href, true +} + +// HasHref returns a boolean if a field has been set. +func (o *CollectionVersionListResponse) HasHref() bool { + if o != nil && !IsNil(o.Href) { + return true + } + + return false +} + +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *CollectionVersionListResponse) SetHref(v string) { + o.Href = &v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CollectionVersionListResponse) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionListResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CollectionVersionListResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CollectionVersionListResponse) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionListResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CollectionVersionListResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetRequiresAnsible returns the RequiresAnsible field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CollectionVersionListResponse) GetRequiresAnsible() string { + if o == nil || IsNil(o.RequiresAnsible.Get()) { + var ret string + return ret + } + return *o.RequiresAnsible.Get() +} + +// GetRequiresAnsibleOk returns a tuple with the RequiresAnsible field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CollectionVersionListResponse) GetRequiresAnsibleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RequiresAnsible.Get(), o.RequiresAnsible.IsSet() +} + +// HasRequiresAnsible returns a boolean if a field has been set. +func (o *CollectionVersionListResponse) HasRequiresAnsible() bool { + if o != nil && o.RequiresAnsible.IsSet() { + return true + } + + return false +} + +// SetRequiresAnsible gets a reference to the given NullableString and assigns it to the RequiresAnsible field. +func (o *CollectionVersionListResponse) SetRequiresAnsible(v string) { + o.RequiresAnsible.Set(&v) +} +// SetRequiresAnsibleNil sets the value for RequiresAnsible to be an explicit nil +func (o *CollectionVersionListResponse) SetRequiresAnsibleNil() { + o.RequiresAnsible.Set(nil) +} + +// UnsetRequiresAnsible ensures that no value is present for RequiresAnsible, not even an explicit nil +func (o *CollectionVersionListResponse) UnsetRequiresAnsible() { + o.RequiresAnsible.Unset() +} + +// GetMarks returns the Marks field value if set, zero value otherwise. +func (o *CollectionVersionListResponse) GetMarks() []string { + if o == nil || IsNil(o.Marks) { + var ret []string + return ret + } + return o.Marks +} + +// GetMarksOk returns a tuple with the Marks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionListResponse) GetMarksOk() ([]string, bool) { + if o == nil || IsNil(o.Marks) { + return nil, false + } + return o.Marks, true +} + +// HasMarks returns a boolean if a field has been set. +func (o *CollectionVersionListResponse) HasMarks() bool { + if o != nil && !IsNil(o.Marks) { + return true + } + + return false +} + +// SetMarks gets a reference to the given []string and assigns it to the Marks field. +func (o *CollectionVersionListResponse) SetMarks(v []string) { + o.Marks = v +} + +func (o CollectionVersionListResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionVersionListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.Href) { + toSerialize["href"] = o.Href + } + toSerialize["created_at"] = o.CreatedAt + toSerialize["updated_at"] = o.UpdatedAt + if o.RequiresAnsible.IsSet() { + toSerialize["requires_ansible"] = o.RequiresAnsible.Get() + } + if !IsNil(o.Marks) { + toSerialize["marks"] = o.Marks + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionVersionListResponse) UnmarshalJSON(bytes []byte) (err error) { + varCollectionVersionListResponse := _CollectionVersionListResponse{} + + if err = json.Unmarshal(bytes, &varCollectionVersionListResponse); err == nil { + *o = CollectionVersionListResponse(varCollectionVersionListResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "version") + delete(additionalProperties, "href") + delete(additionalProperties, "created_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "requires_ansible") + delete(additionalProperties, "marks") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionVersionListResponse struct { + value *CollectionVersionListResponse + isSet bool +} + +func (v NullableCollectionVersionListResponse) Get() *CollectionVersionListResponse { + return v.value +} + +func (v *NullableCollectionVersionListResponse) Set(val *CollectionVersionListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionVersionListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionVersionListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionVersionListResponse(val *CollectionVersionListResponse) *NullableCollectionVersionListResponse { + return &NullableCollectionVersionListResponse{value: val, isSet: true} +} + +func (v NullableCollectionVersionListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionVersionListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_response.go new file mode 100644 index 0000000000..42c1a5fea2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_response.go @@ -0,0 +1,735 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the CollectionVersionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionVersionResponse{} + +// CollectionVersionResponse A serializer for a CollectionVersion. +type CollectionVersionResponse struct { + Version *string `json:"version,omitempty"` + // Get href. + Href *string `json:"href,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + RequiresAnsible NullableString `json:"requires_ansible,omitempty"` + // Get a list of mark values filtering only those in the current repo. + Marks []string `json:"marks,omitempty"` + Artifact *ArtifactRefResponse `json:"artifact,omitempty"` + Collection *CollectionRefResponse `json:"collection,omitempty"` + // Get artifact download URL. + DownloadUrl *string `json:"download_url,omitempty"` + Name *string `json:"name,omitempty"` + Namespace *CollectionNamespaceResponse `json:"namespace,omitempty"` + Signatures []CollectionVersionSignatureResponse `json:"signatures"` + Metadata *CollectionMetadataResponse `json:"metadata,omitempty"` + // Get the git URL. + GitUrl *string `json:"git_url,omitempty"` + // Get the git commit sha. + GitCommitSha *string `json:"git_commit_sha,omitempty"` + // A JSON field holding MANIFEST.json data. + Manifest map[string]interface{} `json:"manifest,omitempty"` + // A JSON field holding FILES.json data. + Files map[string]interface{} `json:"files,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CollectionVersionResponse CollectionVersionResponse + +// NewCollectionVersionResponse instantiates a new CollectionVersionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionVersionResponse(createdAt time.Time, updatedAt time.Time, signatures []CollectionVersionSignatureResponse) *CollectionVersionResponse { + this := CollectionVersionResponse{} + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Signatures = signatures + return &this +} + +// NewCollectionVersionResponseWithDefaults instantiates a new CollectionVersionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionVersionResponseWithDefaults() *CollectionVersionResponse { + this := CollectionVersionResponse{} + return &this +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *CollectionVersionResponse) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *CollectionVersionResponse) SetVersion(v string) { + o.Version = &v +} + +// GetHref returns the Href field value if set, zero value otherwise. +func (o *CollectionVersionResponse) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret + } + return *o.Href +} + +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetHrefOk() (*string, bool) { + if o == nil || IsNil(o.Href) { + return nil, false + } + return o.Href, true +} + +// HasHref returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasHref() bool { + if o != nil && !IsNil(o.Href) { + return true + } + + return false +} + +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *CollectionVersionResponse) SetHref(v string) { + o.Href = &v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CollectionVersionResponse) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CollectionVersionResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CollectionVersionResponse) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CollectionVersionResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetRequiresAnsible returns the RequiresAnsible field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CollectionVersionResponse) GetRequiresAnsible() string { + if o == nil || IsNil(o.RequiresAnsible.Get()) { + var ret string + return ret + } + return *o.RequiresAnsible.Get() +} + +// GetRequiresAnsibleOk returns a tuple with the RequiresAnsible field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CollectionVersionResponse) GetRequiresAnsibleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RequiresAnsible.Get(), o.RequiresAnsible.IsSet() +} + +// HasRequiresAnsible returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasRequiresAnsible() bool { + if o != nil && o.RequiresAnsible.IsSet() { + return true + } + + return false +} + +// SetRequiresAnsible gets a reference to the given NullableString and assigns it to the RequiresAnsible field. +func (o *CollectionVersionResponse) SetRequiresAnsible(v string) { + o.RequiresAnsible.Set(&v) +} +// SetRequiresAnsibleNil sets the value for RequiresAnsible to be an explicit nil +func (o *CollectionVersionResponse) SetRequiresAnsibleNil() { + o.RequiresAnsible.Set(nil) +} + +// UnsetRequiresAnsible ensures that no value is present for RequiresAnsible, not even an explicit nil +func (o *CollectionVersionResponse) UnsetRequiresAnsible() { + o.RequiresAnsible.Unset() +} + +// GetMarks returns the Marks field value if set, zero value otherwise. +func (o *CollectionVersionResponse) GetMarks() []string { + if o == nil || IsNil(o.Marks) { + var ret []string + return ret + } + return o.Marks +} + +// GetMarksOk returns a tuple with the Marks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetMarksOk() ([]string, bool) { + if o == nil || IsNil(o.Marks) { + return nil, false + } + return o.Marks, true +} + +// HasMarks returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasMarks() bool { + if o != nil && !IsNil(o.Marks) { + return true + } + + return false +} + +// SetMarks gets a reference to the given []string and assigns it to the Marks field. +func (o *CollectionVersionResponse) SetMarks(v []string) { + o.Marks = v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *CollectionVersionResponse) GetArtifact() ArtifactRefResponse { + if o == nil || IsNil(o.Artifact) { + var ret ArtifactRefResponse + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetArtifactOk() (*ArtifactRefResponse, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given ArtifactRefResponse and assigns it to the Artifact field. +func (o *CollectionVersionResponse) SetArtifact(v ArtifactRefResponse) { + o.Artifact = &v +} + +// GetCollection returns the Collection field value if set, zero value otherwise. +func (o *CollectionVersionResponse) GetCollection() CollectionRefResponse { + if o == nil || IsNil(o.Collection) { + var ret CollectionRefResponse + return ret + } + return *o.Collection +} + +// GetCollectionOk returns a tuple with the Collection field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetCollectionOk() (*CollectionRefResponse, bool) { + if o == nil || IsNil(o.Collection) { + return nil, false + } + return o.Collection, true +} + +// HasCollection returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasCollection() bool { + if o != nil && !IsNil(o.Collection) { + return true + } + + return false +} + +// SetCollection gets a reference to the given CollectionRefResponse and assigns it to the Collection field. +func (o *CollectionVersionResponse) SetCollection(v CollectionRefResponse) { + o.Collection = &v +} + +// GetDownloadUrl returns the DownloadUrl field value if set, zero value otherwise. +func (o *CollectionVersionResponse) GetDownloadUrl() string { + if o == nil || IsNil(o.DownloadUrl) { + var ret string + return ret + } + return *o.DownloadUrl +} + +// GetDownloadUrlOk returns a tuple with the DownloadUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetDownloadUrlOk() (*string, bool) { + if o == nil || IsNil(o.DownloadUrl) { + return nil, false + } + return o.DownloadUrl, true +} + +// HasDownloadUrl returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasDownloadUrl() bool { + if o != nil && !IsNil(o.DownloadUrl) { + return true + } + + return false +} + +// SetDownloadUrl gets a reference to the given string and assigns it to the DownloadUrl field. +func (o *CollectionVersionResponse) SetDownloadUrl(v string) { + o.DownloadUrl = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CollectionVersionResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CollectionVersionResponse) SetName(v string) { + o.Name = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *CollectionVersionResponse) GetNamespace() CollectionNamespaceResponse { + if o == nil || IsNil(o.Namespace) { + var ret CollectionNamespaceResponse + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetNamespaceOk() (*CollectionNamespaceResponse, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given CollectionNamespaceResponse and assigns it to the Namespace field. +func (o *CollectionVersionResponse) SetNamespace(v CollectionNamespaceResponse) { + o.Namespace = &v +} + +// GetSignatures returns the Signatures field value +func (o *CollectionVersionResponse) GetSignatures() []CollectionVersionSignatureResponse { + if o == nil { + var ret []CollectionVersionSignatureResponse + return ret + } + + return o.Signatures +} + +// GetSignaturesOk returns a tuple with the Signatures field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetSignaturesOk() ([]CollectionVersionSignatureResponse, bool) { + if o == nil { + return nil, false + } + return o.Signatures, true +} + +// SetSignatures sets field value +func (o *CollectionVersionResponse) SetSignatures(v []CollectionVersionSignatureResponse) { + o.Signatures = v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *CollectionVersionResponse) GetMetadata() CollectionMetadataResponse { + if o == nil || IsNil(o.Metadata) { + var ret CollectionMetadataResponse + return ret + } + return *o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetMetadataOk() (*CollectionMetadataResponse, bool) { + if o == nil || IsNil(o.Metadata) { + return nil, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given CollectionMetadataResponse and assigns it to the Metadata field. +func (o *CollectionVersionResponse) SetMetadata(v CollectionMetadataResponse) { + o.Metadata = &v +} + +// GetGitUrl returns the GitUrl field value if set, zero value otherwise. +func (o *CollectionVersionResponse) GetGitUrl() string { + if o == nil || IsNil(o.GitUrl) { + var ret string + return ret + } + return *o.GitUrl +} + +// GetGitUrlOk returns a tuple with the GitUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetGitUrlOk() (*string, bool) { + if o == nil || IsNil(o.GitUrl) { + return nil, false + } + return o.GitUrl, true +} + +// HasGitUrl returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasGitUrl() bool { + if o != nil && !IsNil(o.GitUrl) { + return true + } + + return false +} + +// SetGitUrl gets a reference to the given string and assigns it to the GitUrl field. +func (o *CollectionVersionResponse) SetGitUrl(v string) { + o.GitUrl = &v +} + +// GetGitCommitSha returns the GitCommitSha field value if set, zero value otherwise. +func (o *CollectionVersionResponse) GetGitCommitSha() string { + if o == nil || IsNil(o.GitCommitSha) { + var ret string + return ret + } + return *o.GitCommitSha +} + +// GetGitCommitShaOk returns a tuple with the GitCommitSha field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetGitCommitShaOk() (*string, bool) { + if o == nil || IsNil(o.GitCommitSha) { + return nil, false + } + return o.GitCommitSha, true +} + +// HasGitCommitSha returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasGitCommitSha() bool { + if o != nil && !IsNil(o.GitCommitSha) { + return true + } + + return false +} + +// SetGitCommitSha gets a reference to the given string and assigns it to the GitCommitSha field. +func (o *CollectionVersionResponse) SetGitCommitSha(v string) { + o.GitCommitSha = &v +} + +// GetManifest returns the Manifest field value if set, zero value otherwise. +func (o *CollectionVersionResponse) GetManifest() map[string]interface{} { + if o == nil || IsNil(o.Manifest) { + var ret map[string]interface{} + return ret + } + return o.Manifest +} + +// GetManifestOk returns a tuple with the Manifest field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetManifestOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Manifest) { + return map[string]interface{}{}, false + } + return o.Manifest, true +} + +// HasManifest returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasManifest() bool { + if o != nil && !IsNil(o.Manifest) { + return true + } + + return false +} + +// SetManifest gets a reference to the given map[string]interface{} and assigns it to the Manifest field. +func (o *CollectionVersionResponse) SetManifest(v map[string]interface{}) { + o.Manifest = v +} + +// GetFiles returns the Files field value if set, zero value otherwise. +func (o *CollectionVersionResponse) GetFiles() map[string]interface{} { + if o == nil || IsNil(o.Files) { + var ret map[string]interface{} + return ret + } + return o.Files +} + +// GetFilesOk returns a tuple with the Files field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionResponse) GetFilesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Files) { + return map[string]interface{}{}, false + } + return o.Files, true +} + +// HasFiles returns a boolean if a field has been set. +func (o *CollectionVersionResponse) HasFiles() bool { + if o != nil && !IsNil(o.Files) { + return true + } + + return false +} + +// SetFiles gets a reference to the given map[string]interface{} and assigns it to the Files field. +func (o *CollectionVersionResponse) SetFiles(v map[string]interface{}) { + o.Files = v +} + +func (o CollectionVersionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionVersionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.Href) { + toSerialize["href"] = o.Href + } + toSerialize["created_at"] = o.CreatedAt + toSerialize["updated_at"] = o.UpdatedAt + if o.RequiresAnsible.IsSet() { + toSerialize["requires_ansible"] = o.RequiresAnsible.Get() + } + if !IsNil(o.Marks) { + toSerialize["marks"] = o.Marks + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + if !IsNil(o.Collection) { + toSerialize["collection"] = o.Collection + } + if !IsNil(o.DownloadUrl) { + toSerialize["download_url"] = o.DownloadUrl + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + toSerialize["signatures"] = o.Signatures + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !IsNil(o.GitUrl) { + toSerialize["git_url"] = o.GitUrl + } + if !IsNil(o.GitCommitSha) { + toSerialize["git_commit_sha"] = o.GitCommitSha + } + if !IsNil(o.Manifest) { + toSerialize["manifest"] = o.Manifest + } + if !IsNil(o.Files) { + toSerialize["files"] = o.Files + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionVersionResponse) UnmarshalJSON(bytes []byte) (err error) { + varCollectionVersionResponse := _CollectionVersionResponse{} + + if err = json.Unmarshal(bytes, &varCollectionVersionResponse); err == nil { + *o = CollectionVersionResponse(varCollectionVersionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "version") + delete(additionalProperties, "href") + delete(additionalProperties, "created_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "requires_ansible") + delete(additionalProperties, "marks") + delete(additionalProperties, "artifact") + delete(additionalProperties, "collection") + delete(additionalProperties, "download_url") + delete(additionalProperties, "name") + delete(additionalProperties, "namespace") + delete(additionalProperties, "signatures") + delete(additionalProperties, "metadata") + delete(additionalProperties, "git_url") + delete(additionalProperties, "git_commit_sha") + delete(additionalProperties, "manifest") + delete(additionalProperties, "files") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionVersionResponse struct { + value *CollectionVersionResponse + isSet bool +} + +func (v NullableCollectionVersionResponse) Get() *CollectionVersionResponse { + return v.value +} + +func (v *NullableCollectionVersionResponse) Set(val *CollectionVersionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionVersionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionVersionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionVersionResponse(val *CollectionVersionResponse) *NullableCollectionVersionResponse { + return &NullableCollectionVersionResponse{value: val, isSet: true} +} + +func (v NullableCollectionVersionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionVersionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_search_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_search_list.go new file mode 100644 index 0000000000..ffebec6394 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_search_list.go @@ -0,0 +1,286 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the CollectionVersionSearchList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionVersionSearchList{} + +// CollectionVersionSearchList Cross-repo search results. +type CollectionVersionSearchList struct { + Repository Repository `json:"repository"` + // Collection Version serializer without docs blob. + CollectionVersion map[string]interface{} `json:"collection_version"` + NamespaceMetadata NullableAnsibleAnsibleNamespaceMetadata `json:"namespace_metadata"` + IsHighest bool `json:"is_highest"` + IsDeprecated bool `json:"is_deprecated"` + IsSigned bool `json:"is_signed"` + AdditionalProperties map[string]interface{} +} + +type _CollectionVersionSearchList CollectionVersionSearchList + +// NewCollectionVersionSearchList instantiates a new CollectionVersionSearchList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionVersionSearchList(repository Repository, collectionVersion map[string]interface{}, namespaceMetadata NullableAnsibleAnsibleNamespaceMetadata, isHighest bool, isDeprecated bool, isSigned bool) *CollectionVersionSearchList { + this := CollectionVersionSearchList{} + this.Repository = repository + this.CollectionVersion = collectionVersion + this.NamespaceMetadata = namespaceMetadata + this.IsHighest = isHighest + this.IsDeprecated = isDeprecated + this.IsSigned = isSigned + return &this +} + +// NewCollectionVersionSearchListWithDefaults instantiates a new CollectionVersionSearchList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionVersionSearchListWithDefaults() *CollectionVersionSearchList { + this := CollectionVersionSearchList{} + return &this +} + +// GetRepository returns the Repository field value +func (o *CollectionVersionSearchList) GetRepository() Repository { + if o == nil { + var ret Repository + return ret + } + + return o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionSearchList) GetRepositoryOk() (*Repository, bool) { + if o == nil { + return nil, false + } + return &o.Repository, true +} + +// SetRepository sets field value +func (o *CollectionVersionSearchList) SetRepository(v Repository) { + o.Repository = v +} + +// GetCollectionVersion returns the CollectionVersion field value +func (o *CollectionVersionSearchList) GetCollectionVersion() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.CollectionVersion +} + +// GetCollectionVersionOk returns a tuple with the CollectionVersion field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionSearchList) GetCollectionVersionOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.CollectionVersion, true +} + +// SetCollectionVersion sets field value +func (o *CollectionVersionSearchList) SetCollectionVersion(v map[string]interface{}) { + o.CollectionVersion = v +} + +// GetNamespaceMetadata returns the NamespaceMetadata field value +// If the value is explicit nil, the zero value for AnsibleAnsibleNamespaceMetadata will be returned +func (o *CollectionVersionSearchList) GetNamespaceMetadata() AnsibleAnsibleNamespaceMetadata { + if o == nil || o.NamespaceMetadata.Get() == nil { + var ret AnsibleAnsibleNamespaceMetadata + return ret + } + + return *o.NamespaceMetadata.Get() +} + +// GetNamespaceMetadataOk returns a tuple with the NamespaceMetadata field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CollectionVersionSearchList) GetNamespaceMetadataOk() (*AnsibleAnsibleNamespaceMetadata, bool) { + if o == nil { + return nil, false + } + return o.NamespaceMetadata.Get(), o.NamespaceMetadata.IsSet() +} + +// SetNamespaceMetadata sets field value +func (o *CollectionVersionSearchList) SetNamespaceMetadata(v AnsibleAnsibleNamespaceMetadata) { + o.NamespaceMetadata.Set(&v) +} + +// GetIsHighest returns the IsHighest field value +func (o *CollectionVersionSearchList) GetIsHighest() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsHighest +} + +// GetIsHighestOk returns a tuple with the IsHighest field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionSearchList) GetIsHighestOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsHighest, true +} + +// SetIsHighest sets field value +func (o *CollectionVersionSearchList) SetIsHighest(v bool) { + o.IsHighest = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *CollectionVersionSearchList) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionSearchList) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *CollectionVersionSearchList) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsSigned returns the IsSigned field value +func (o *CollectionVersionSearchList) GetIsSigned() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsSigned +} + +// GetIsSignedOk returns a tuple with the IsSigned field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionSearchList) GetIsSignedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsSigned, true +} + +// SetIsSigned sets field value +func (o *CollectionVersionSearchList) SetIsSigned(v bool) { + o.IsSigned = v +} + +func (o CollectionVersionSearchList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionVersionSearchList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["repository"] = o.Repository + toSerialize["collection_version"] = o.CollectionVersion + toSerialize["namespace_metadata"] = o.NamespaceMetadata.Get() + toSerialize["is_highest"] = o.IsHighest + toSerialize["is_deprecated"] = o.IsDeprecated + toSerialize["is_signed"] = o.IsSigned + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionVersionSearchList) UnmarshalJSON(bytes []byte) (err error) { + varCollectionVersionSearchList := _CollectionVersionSearchList{} + + if err = json.Unmarshal(bytes, &varCollectionVersionSearchList); err == nil { + *o = CollectionVersionSearchList(varCollectionVersionSearchList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "collection_version") + delete(additionalProperties, "namespace_metadata") + delete(additionalProperties, "is_highest") + delete(additionalProperties, "is_deprecated") + delete(additionalProperties, "is_signed") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionVersionSearchList struct { + value *CollectionVersionSearchList + isSet bool +} + +func (v NullableCollectionVersionSearchList) Get() *CollectionVersionSearchList { + return v.value +} + +func (v *NullableCollectionVersionSearchList) Set(val *CollectionVersionSearchList) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionVersionSearchList) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionVersionSearchList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionVersionSearchList(val *CollectionVersionSearchList) *NullableCollectionVersionSearchList { + return &NullableCollectionVersionSearchList{value: val, isSet: true} +} + +func (v NullableCollectionVersionSearchList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionVersionSearchList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_search_list_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_search_list_response.go new file mode 100644 index 0000000000..f92a2a487a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_search_list_response.go @@ -0,0 +1,322 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the CollectionVersionSearchListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionVersionSearchListResponse{} + +// CollectionVersionSearchListResponse Cross-repo search results. +type CollectionVersionSearchListResponse struct { + Repository RepositoryResponse `json:"repository"` + CollectionVersion CollectionSummaryResponse `json:"collection_version"` + RepositoryVersion *string `json:"repository_version,omitempty"` + NamespaceMetadata NullableAnsibleAnsibleNamespaceMetadataResponse `json:"namespace_metadata"` + IsHighest bool `json:"is_highest"` + IsDeprecated bool `json:"is_deprecated"` + IsSigned bool `json:"is_signed"` + AdditionalProperties map[string]interface{} +} + +type _CollectionVersionSearchListResponse CollectionVersionSearchListResponse + +// NewCollectionVersionSearchListResponse instantiates a new CollectionVersionSearchListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionVersionSearchListResponse(repository RepositoryResponse, collectionVersion CollectionSummaryResponse, namespaceMetadata NullableAnsibleAnsibleNamespaceMetadataResponse, isHighest bool, isDeprecated bool, isSigned bool) *CollectionVersionSearchListResponse { + this := CollectionVersionSearchListResponse{} + this.Repository = repository + this.CollectionVersion = collectionVersion + this.NamespaceMetadata = namespaceMetadata + this.IsHighest = isHighest + this.IsDeprecated = isDeprecated + this.IsSigned = isSigned + return &this +} + +// NewCollectionVersionSearchListResponseWithDefaults instantiates a new CollectionVersionSearchListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionVersionSearchListResponseWithDefaults() *CollectionVersionSearchListResponse { + this := CollectionVersionSearchListResponse{} + return &this +} + +// GetRepository returns the Repository field value +func (o *CollectionVersionSearchListResponse) GetRepository() RepositoryResponse { + if o == nil { + var ret RepositoryResponse + return ret + } + + return o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionSearchListResponse) GetRepositoryOk() (*RepositoryResponse, bool) { + if o == nil { + return nil, false + } + return &o.Repository, true +} + +// SetRepository sets field value +func (o *CollectionVersionSearchListResponse) SetRepository(v RepositoryResponse) { + o.Repository = v +} + +// GetCollectionVersion returns the CollectionVersion field value +func (o *CollectionVersionSearchListResponse) GetCollectionVersion() CollectionSummaryResponse { + if o == nil { + var ret CollectionSummaryResponse + return ret + } + + return o.CollectionVersion +} + +// GetCollectionVersionOk returns a tuple with the CollectionVersion field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionSearchListResponse) GetCollectionVersionOk() (*CollectionSummaryResponse, bool) { + if o == nil { + return nil, false + } + return &o.CollectionVersion, true +} + +// SetCollectionVersion sets field value +func (o *CollectionVersionSearchListResponse) SetCollectionVersion(v CollectionSummaryResponse) { + o.CollectionVersion = v +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *CollectionVersionSearchListResponse) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionSearchListResponse) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *CollectionVersionSearchListResponse) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *CollectionVersionSearchListResponse) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetNamespaceMetadata returns the NamespaceMetadata field value +// If the value is explicit nil, the zero value for AnsibleAnsibleNamespaceMetadataResponse will be returned +func (o *CollectionVersionSearchListResponse) GetNamespaceMetadata() AnsibleAnsibleNamespaceMetadataResponse { + if o == nil || o.NamespaceMetadata.Get() == nil { + var ret AnsibleAnsibleNamespaceMetadataResponse + return ret + } + + return *o.NamespaceMetadata.Get() +} + +// GetNamespaceMetadataOk returns a tuple with the NamespaceMetadata field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CollectionVersionSearchListResponse) GetNamespaceMetadataOk() (*AnsibleAnsibleNamespaceMetadataResponse, bool) { + if o == nil { + return nil, false + } + return o.NamespaceMetadata.Get(), o.NamespaceMetadata.IsSet() +} + +// SetNamespaceMetadata sets field value +func (o *CollectionVersionSearchListResponse) SetNamespaceMetadata(v AnsibleAnsibleNamespaceMetadataResponse) { + o.NamespaceMetadata.Set(&v) +} + +// GetIsHighest returns the IsHighest field value +func (o *CollectionVersionSearchListResponse) GetIsHighest() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsHighest +} + +// GetIsHighestOk returns a tuple with the IsHighest field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionSearchListResponse) GetIsHighestOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsHighest, true +} + +// SetIsHighest sets field value +func (o *CollectionVersionSearchListResponse) SetIsHighest(v bool) { + o.IsHighest = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *CollectionVersionSearchListResponse) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionSearchListResponse) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *CollectionVersionSearchListResponse) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsSigned returns the IsSigned field value +func (o *CollectionVersionSearchListResponse) GetIsSigned() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsSigned +} + +// GetIsSignedOk returns a tuple with the IsSigned field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionSearchListResponse) GetIsSignedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsSigned, true +} + +// SetIsSigned sets field value +func (o *CollectionVersionSearchListResponse) SetIsSigned(v bool) { + o.IsSigned = v +} + +func (o CollectionVersionSearchListResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionVersionSearchListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["repository"] = o.Repository + toSerialize["collection_version"] = o.CollectionVersion + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + toSerialize["namespace_metadata"] = o.NamespaceMetadata.Get() + toSerialize["is_highest"] = o.IsHighest + toSerialize["is_deprecated"] = o.IsDeprecated + toSerialize["is_signed"] = o.IsSigned + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionVersionSearchListResponse) UnmarshalJSON(bytes []byte) (err error) { + varCollectionVersionSearchListResponse := _CollectionVersionSearchListResponse{} + + if err = json.Unmarshal(bytes, &varCollectionVersionSearchListResponse); err == nil { + *o = CollectionVersionSearchListResponse(varCollectionVersionSearchListResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "collection_version") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "namespace_metadata") + delete(additionalProperties, "is_highest") + delete(additionalProperties, "is_deprecated") + delete(additionalProperties, "is_signed") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionVersionSearchListResponse struct { + value *CollectionVersionSearchListResponse + isSet bool +} + +func (v NullableCollectionVersionSearchListResponse) Get() *CollectionVersionSearchListResponse { + return v.value +} + +func (v *NullableCollectionVersionSearchListResponse) Set(val *CollectionVersionSearchListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionVersionSearchListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionVersionSearchListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionVersionSearchListResponse(val *CollectionVersionSearchListResponse) *NullableCollectionVersionSearchListResponse { + return &NullableCollectionVersionSearchListResponse{value: val, isSet: true} +} + +func (v NullableCollectionVersionSearchListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionVersionSearchListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_signature_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_signature_response.go new file mode 100644 index 0000000000..b5b6eced59 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_collection_version_signature_response.go @@ -0,0 +1,265 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the CollectionVersionSignatureResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CollectionVersionSignatureResponse{} + +// CollectionVersionSignatureResponse A serializer for the signatures on a Collection Version. +type CollectionVersionSignatureResponse struct { + Signature *string `json:"signature,omitempty"` + PubkeyFingerprint string `json:"pubkey_fingerprint"` + SigningService NullableString `json:"signing_service,omitempty"` + PulpCreated *time.Time `json:"pulp_created,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CollectionVersionSignatureResponse CollectionVersionSignatureResponse + +// NewCollectionVersionSignatureResponse instantiates a new CollectionVersionSignatureResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCollectionVersionSignatureResponse(pubkeyFingerprint string) *CollectionVersionSignatureResponse { + this := CollectionVersionSignatureResponse{} + this.PubkeyFingerprint = pubkeyFingerprint + return &this +} + +// NewCollectionVersionSignatureResponseWithDefaults instantiates a new CollectionVersionSignatureResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCollectionVersionSignatureResponseWithDefaults() *CollectionVersionSignatureResponse { + this := CollectionVersionSignatureResponse{} + return &this +} + +// GetSignature returns the Signature field value if set, zero value otherwise. +func (o *CollectionVersionSignatureResponse) GetSignature() string { + if o == nil || IsNil(o.Signature) { + var ret string + return ret + } + return *o.Signature +} + +// GetSignatureOk returns a tuple with the Signature field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionSignatureResponse) GetSignatureOk() (*string, bool) { + if o == nil || IsNil(o.Signature) { + return nil, false + } + return o.Signature, true +} + +// HasSignature returns a boolean if a field has been set. +func (o *CollectionVersionSignatureResponse) HasSignature() bool { + if o != nil && !IsNil(o.Signature) { + return true + } + + return false +} + +// SetSignature gets a reference to the given string and assigns it to the Signature field. +func (o *CollectionVersionSignatureResponse) SetSignature(v string) { + o.Signature = &v +} + +// GetPubkeyFingerprint returns the PubkeyFingerprint field value +func (o *CollectionVersionSignatureResponse) GetPubkeyFingerprint() string { + if o == nil { + var ret string + return ret + } + + return o.PubkeyFingerprint +} + +// GetPubkeyFingerprintOk returns a tuple with the PubkeyFingerprint field value +// and a boolean to check if the value has been set. +func (o *CollectionVersionSignatureResponse) GetPubkeyFingerprintOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PubkeyFingerprint, true +} + +// SetPubkeyFingerprint sets field value +func (o *CollectionVersionSignatureResponse) SetPubkeyFingerprint(v string) { + o.PubkeyFingerprint = v +} + +// GetSigningService returns the SigningService field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CollectionVersionSignatureResponse) GetSigningService() string { + if o == nil || IsNil(o.SigningService.Get()) { + var ret string + return ret + } + return *o.SigningService.Get() +} + +// GetSigningServiceOk returns a tuple with the SigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CollectionVersionSignatureResponse) GetSigningServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SigningService.Get(), o.SigningService.IsSet() +} + +// HasSigningService returns a boolean if a field has been set. +func (o *CollectionVersionSignatureResponse) HasSigningService() bool { + if o != nil && o.SigningService.IsSet() { + return true + } + + return false +} + +// SetSigningService gets a reference to the given NullableString and assigns it to the SigningService field. +func (o *CollectionVersionSignatureResponse) SetSigningService(v string) { + o.SigningService.Set(&v) +} +// SetSigningServiceNil sets the value for SigningService to be an explicit nil +func (o *CollectionVersionSignatureResponse) SetSigningServiceNil() { + o.SigningService.Set(nil) +} + +// UnsetSigningService ensures that no value is present for SigningService, not even an explicit nil +func (o *CollectionVersionSignatureResponse) UnsetSigningService() { + o.SigningService.Unset() +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *CollectionVersionSignatureResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CollectionVersionSignatureResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *CollectionVersionSignatureResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *CollectionVersionSignatureResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +func (o CollectionVersionSignatureResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CollectionVersionSignatureResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Signature) { + toSerialize["signature"] = o.Signature + } + toSerialize["pubkey_fingerprint"] = o.PubkeyFingerprint + if o.SigningService.IsSet() { + toSerialize["signing_service"] = o.SigningService.Get() + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CollectionVersionSignatureResponse) UnmarshalJSON(bytes []byte) (err error) { + varCollectionVersionSignatureResponse := _CollectionVersionSignatureResponse{} + + if err = json.Unmarshal(bytes, &varCollectionVersionSignatureResponse); err == nil { + *o = CollectionVersionSignatureResponse(varCollectionVersionSignatureResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "signature") + delete(additionalProperties, "pubkey_fingerprint") + delete(additionalProperties, "signing_service") + delete(additionalProperties, "pulp_created") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCollectionVersionSignatureResponse struct { + value *CollectionVersionSignatureResponse + isSet bool +} + +func (v NullableCollectionVersionSignatureResponse) Get() *CollectionVersionSignatureResponse { + return v.value +} + +func (v *NullableCollectionVersionSignatureResponse) Set(val *CollectionVersionSignatureResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCollectionVersionSignatureResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCollectionVersionSignatureResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCollectionVersionSignatureResponse(val *CollectionVersionSignatureResponse) *NullableCollectionVersionSignatureResponse { + return &NullableCollectionVersionSignatureResponse{value: val, isSet: true} +} + +func (v NullableCollectionVersionSignatureResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCollectionVersionSignatureResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_comps_xml.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_comps_xml.go new file mode 100644 index 0000000000..6cc5d20e05 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_comps_xml.go @@ -0,0 +1,221 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the CompsXml type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompsXml{} + +// CompsXml A serializer for comps.xml Upload API. +type CompsXml struct { + // Full path of a comps.xml file that may be parsed into comps.xml Content units. + File *os.File `json:"file"` + // URI of an RPM repository the comps.xml content units should be associated to. + Repository *string `json:"repository,omitempty"` + // If true, incoming comps.xml replaces existing comps-related ContentUnits in the specified repository. + Replace *bool `json:"replace,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CompsXml CompsXml + +// NewCompsXml instantiates a new CompsXml object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCompsXml(file *os.File) *CompsXml { + this := CompsXml{} + this.File = file + return &this +} + +// NewCompsXmlWithDefaults instantiates a new CompsXml object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCompsXmlWithDefaults() *CompsXml { + this := CompsXml{} + return &this +} + +// GetFile returns the File field value +func (o *CompsXml) GetFile() *os.File { + if o == nil { + var ret *os.File + return ret + } + + return o.File +} + +// GetFileOk returns a tuple with the File field value +// and a boolean to check if the value has been set. +func (o *CompsXml) GetFileOk() (**os.File, bool) { + if o == nil { + return nil, false + } + return &o.File, true +} + +// SetFile sets field value +func (o *CompsXml) SetFile(v *os.File) { + o.File = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *CompsXml) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompsXml) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *CompsXml) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *CompsXml) SetRepository(v string) { + o.Repository = &v +} + +// GetReplace returns the Replace field value if set, zero value otherwise. +func (o *CompsXml) GetReplace() bool { + if o == nil || IsNil(o.Replace) { + var ret bool + return ret + } + return *o.Replace +} + +// GetReplaceOk returns a tuple with the Replace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CompsXml) GetReplaceOk() (*bool, bool) { + if o == nil || IsNil(o.Replace) { + return nil, false + } + return o.Replace, true +} + +// HasReplace returns a boolean if a field has been set. +func (o *CompsXml) HasReplace() bool { + if o != nil && !IsNil(o.Replace) { + return true + } + + return false +} + +// SetReplace gets a reference to the given bool and assigns it to the Replace field. +func (o *CompsXml) SetReplace(v bool) { + o.Replace = &v +} + +func (o CompsXml) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompsXml) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["file"] = o.File + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.Replace) { + toSerialize["replace"] = o.Replace + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CompsXml) UnmarshalJSON(bytes []byte) (err error) { + varCompsXml := _CompsXml{} + + if err = json.Unmarshal(bytes, &varCompsXml); err == nil { + *o = CompsXml(varCompsXml) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "file") + delete(additionalProperties, "repository") + delete(additionalProperties, "replace") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCompsXml struct { + value *CompsXml + isSet bool +} + +func (v NullableCompsXml) Get() *CompsXml { + return v.value +} + +func (v *NullableCompsXml) Set(val *CompsXml) { + v.value = val + v.isSet = true +} + +func (v NullableCompsXml) IsSet() bool { + return v.isSet +} + +func (v *NullableCompsXml) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCompsXml(val *CompsXml) *NullableCompsXml { + return &NullableCompsXml{value: val, isSet: true} +} + +func (v NullableCompsXml) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCompsXml) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_blob_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_blob_response.go new file mode 100644 index 0000000000..f14d69a8f7 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_blob_response.go @@ -0,0 +1,249 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ContainerBlobResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerBlobResponse{} + +// ContainerBlobResponse Serializer for Blobs. +type ContainerBlobResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact string `json:"artifact"` + // sha256 of the Blob file + Digest string `json:"digest"` + AdditionalProperties map[string]interface{} +} + +type _ContainerBlobResponse ContainerBlobResponse + +// NewContainerBlobResponse instantiates a new ContainerBlobResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerBlobResponse(artifact string, digest string) *ContainerBlobResponse { + this := ContainerBlobResponse{} + this.Artifact = artifact + this.Digest = digest + return &this +} + +// NewContainerBlobResponseWithDefaults instantiates a new ContainerBlobResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerBlobResponseWithDefaults() *ContainerBlobResponse { + this := ContainerBlobResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ContainerBlobResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerBlobResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ContainerBlobResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ContainerBlobResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ContainerBlobResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerBlobResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ContainerBlobResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ContainerBlobResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value +func (o *ContainerBlobResponse) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *ContainerBlobResponse) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *ContainerBlobResponse) SetArtifact(v string) { + o.Artifact = v +} + +// GetDigest returns the Digest field value +func (o *ContainerBlobResponse) GetDigest() string { + if o == nil { + var ret string + return ret + } + + return o.Digest +} + +// GetDigestOk returns a tuple with the Digest field value +// and a boolean to check if the value has been set. +func (o *ContainerBlobResponse) GetDigestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Digest, true +} + +// SetDigest sets field value +func (o *ContainerBlobResponse) SetDigest(v string) { + o.Digest = v +} + +func (o ContainerBlobResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerBlobResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifact"] = o.Artifact + toSerialize["digest"] = o.Digest + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerBlobResponse) UnmarshalJSON(bytes []byte) (err error) { + varContainerBlobResponse := _ContainerBlobResponse{} + + if err = json.Unmarshal(bytes, &varContainerBlobResponse); err == nil { + *o = ContainerBlobResponse(varContainerBlobResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "digest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerBlobResponse struct { + value *ContainerBlobResponse + isSet bool +} + +func (v NullableContainerBlobResponse) Get() *ContainerBlobResponse { + return v.value +} + +func (v *NullableContainerBlobResponse) Set(val *ContainerBlobResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContainerBlobResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerBlobResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerBlobResponse(val *ContainerBlobResponse) *NullableContainerBlobResponse { + return &NullableContainerBlobResponse{value: val, isSet: true} +} + +func (v NullableContainerBlobResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerBlobResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_distribution.go new file mode 100644 index 0000000000..778235b38c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_distribution.go @@ -0,0 +1,472 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ContainerContainerDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerContainerDistribution{} + +// ContainerContainerDistribution A serializer for ContainerDistribution. +type ContainerContainerDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // An optional content-guard. If none is specified, a default one will be used. + ContentGuard *string `json:"content_guard,omitempty"` + // RepositoryVersion to be served + RepositoryVersion NullableString `json:"repository_version,omitempty"` + // Restrict pull access to explicitly authorized users. Defaults to unrestricted pull access. + Private *bool `json:"private,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ContainerContainerDistribution ContainerContainerDistribution + +// NewContainerContainerDistribution instantiates a new ContainerContainerDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerContainerDistribution(basePath string, name string) *ContainerContainerDistribution { + this := ContainerContainerDistribution{} + this.BasePath = basePath + this.Name = name + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// NewContainerContainerDistributionWithDefaults instantiates a new ContainerContainerDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerContainerDistributionWithDefaults() *ContainerContainerDistribution { + this := ContainerContainerDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value +func (o *ContainerContainerDistribution) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistribution) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *ContainerContainerDistribution) SetBasePath(v string) { + o.BasePath = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *ContainerContainerDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *ContainerContainerDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *ContainerContainerDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *ContainerContainerDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetName returns the Name field value +func (o *ContainerContainerDistribution) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistribution) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContainerContainerDistribution) SetName(v string) { + o.Name = v +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *ContainerContainerDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *ContainerContainerDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *ContainerContainerDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *ContainerContainerDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *ContainerContainerDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *ContainerContainerDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise. +func (o *ContainerContainerDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard) { + var ret string + return ret + } + return *o.ContentGuard +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistribution) GetContentGuardOk() (*string, bool) { + if o == nil || IsNil(o.ContentGuard) { + return nil, false + } + return o.ContentGuard, true +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *ContainerContainerDistribution) HasContentGuard() bool { + if o != nil && !IsNil(o.ContentGuard) { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given string and assigns it to the ContentGuard field. +func (o *ContainerContainerDistribution) SetContentGuard(v string) { + o.ContentGuard = &v +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerDistribution) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion.Get()) { + var ret string + return ret + } + return *o.RepositoryVersion.Get() +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerDistribution) GetRepositoryVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RepositoryVersion.Get(), o.RepositoryVersion.IsSet() +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *ContainerContainerDistribution) HasRepositoryVersion() bool { + if o != nil && o.RepositoryVersion.IsSet() { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given NullableString and assigns it to the RepositoryVersion field. +func (o *ContainerContainerDistribution) SetRepositoryVersion(v string) { + o.RepositoryVersion.Set(&v) +} +// SetRepositoryVersionNil sets the value for RepositoryVersion to be an explicit nil +func (o *ContainerContainerDistribution) SetRepositoryVersionNil() { + o.RepositoryVersion.Set(nil) +} + +// UnsetRepositoryVersion ensures that no value is present for RepositoryVersion, not even an explicit nil +func (o *ContainerContainerDistribution) UnsetRepositoryVersion() { + o.RepositoryVersion.Unset() +} + +// GetPrivate returns the Private field value if set, zero value otherwise. +func (o *ContainerContainerDistribution) GetPrivate() bool { + if o == nil || IsNil(o.Private) { + var ret bool + return ret + } + return *o.Private +} + +// GetPrivateOk returns a tuple with the Private field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistribution) GetPrivateOk() (*bool, bool) { + if o == nil || IsNil(o.Private) { + return nil, false + } + return o.Private, true +} + +// HasPrivate returns a boolean if a field has been set. +func (o *ContainerContainerDistribution) HasPrivate() bool { + if o != nil && !IsNil(o.Private) { + return true + } + + return false +} + +// SetPrivate gets a reference to the given bool and assigns it to the Private field. +func (o *ContainerContainerDistribution) SetPrivate(v bool) { + o.Private = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerDistribution) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerDistribution) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ContainerContainerDistribution) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ContainerContainerDistribution) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ContainerContainerDistribution) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ContainerContainerDistribution) UnsetDescription() { + o.Description.Unset() +} + +func (o ContainerContainerDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerContainerDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["base_path"] = o.BasePath + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + toSerialize["name"] = o.Name + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.ContentGuard) { + toSerialize["content_guard"] = o.ContentGuard + } + if o.RepositoryVersion.IsSet() { + toSerialize["repository_version"] = o.RepositoryVersion.Get() + } + if !IsNil(o.Private) { + toSerialize["private"] = o.Private + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerContainerDistribution) UnmarshalJSON(bytes []byte) (err error) { + varContainerContainerDistribution := _ContainerContainerDistribution{} + + if err = json.Unmarshal(bytes, &varContainerContainerDistribution); err == nil { + *o = ContainerContainerDistribution(varContainerContainerDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "repository") + delete(additionalProperties, "name") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "private") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerContainerDistribution struct { + value *ContainerContainerDistribution + isSet bool +} + +func (v NullableContainerContainerDistribution) Get() *ContainerContainerDistribution { + return v.value +} + +func (v *NullableContainerContainerDistribution) Set(val *ContainerContainerDistribution) { + v.value = val + v.isSet = true +} + +func (v NullableContainerContainerDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerContainerDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerContainerDistribution(val *ContainerContainerDistribution) *NullableContainerContainerDistribution { + return &NullableContainerContainerDistribution{value: val, isSet: true} +} + +func (v NullableContainerContainerDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerContainerDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_distribution_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_distribution_response.go new file mode 100644 index 0000000000..0ead10a154 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_distribution_response.go @@ -0,0 +1,624 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ContainerContainerDistributionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerContainerDistributionResponse{} + +// ContainerContainerDistributionResponse A serializer for ContainerDistribution. +type ContainerContainerDistributionResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // An optional content-guard. If none is specified, a default one will be used. + ContentGuard *string `json:"content_guard,omitempty"` + // RepositoryVersion to be served + RepositoryVersion NullableString `json:"repository_version,omitempty"` + // The Registry hostname/name/ to use with docker pull command defined by this distribution. + RegistryPath *string `json:"registry_path,omitempty"` + // Namespace this distribution belongs to. + Namespace *string `json:"namespace,omitempty"` + // Restrict pull access to explicitly authorized users. Defaults to unrestricted pull access. + Private *bool `json:"private,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ContainerContainerDistributionResponse ContainerContainerDistributionResponse + +// NewContainerContainerDistributionResponse instantiates a new ContainerContainerDistributionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerContainerDistributionResponse(basePath string, name string) *ContainerContainerDistributionResponse { + this := ContainerContainerDistributionResponse{} + this.BasePath = basePath + this.Name = name + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// NewContainerContainerDistributionResponseWithDefaults instantiates a new ContainerContainerDistributionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerContainerDistributionResponseWithDefaults() *ContainerContainerDistributionResponse { + this := ContainerContainerDistributionResponse{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ContainerContainerDistributionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistributionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ContainerContainerDistributionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ContainerContainerDistributionResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetBasePath returns the BasePath field value +func (o *ContainerContainerDistributionResponse) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistributionResponse) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *ContainerContainerDistributionResponse) SetBasePath(v string) { + o.BasePath = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerDistributionResponse) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerDistributionResponse) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *ContainerContainerDistributionResponse) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *ContainerContainerDistributionResponse) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *ContainerContainerDistributionResponse) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *ContainerContainerDistributionResponse) UnsetRepository() { + o.Repository.Unset() +} + +// GetName returns the Name field value +func (o *ContainerContainerDistributionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistributionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContainerContainerDistributionResponse) SetName(v string) { + o.Name = v +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *ContainerContainerDistributionResponse) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistributionResponse) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *ContainerContainerDistributionResponse) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *ContainerContainerDistributionResponse) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ContainerContainerDistributionResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistributionResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ContainerContainerDistributionResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ContainerContainerDistributionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *ContainerContainerDistributionResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *ContainerContainerDistributionResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *ContainerContainerDistributionResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise. +func (o *ContainerContainerDistributionResponse) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard) { + var ret string + return ret + } + return *o.ContentGuard +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistributionResponse) GetContentGuardOk() (*string, bool) { + if o == nil || IsNil(o.ContentGuard) { + return nil, false + } + return o.ContentGuard, true +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *ContainerContainerDistributionResponse) HasContentGuard() bool { + if o != nil && !IsNil(o.ContentGuard) { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given string and assigns it to the ContentGuard field. +func (o *ContainerContainerDistributionResponse) SetContentGuard(v string) { + o.ContentGuard = &v +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerDistributionResponse) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion.Get()) { + var ret string + return ret + } + return *o.RepositoryVersion.Get() +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerDistributionResponse) GetRepositoryVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RepositoryVersion.Get(), o.RepositoryVersion.IsSet() +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *ContainerContainerDistributionResponse) HasRepositoryVersion() bool { + if o != nil && o.RepositoryVersion.IsSet() { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given NullableString and assigns it to the RepositoryVersion field. +func (o *ContainerContainerDistributionResponse) SetRepositoryVersion(v string) { + o.RepositoryVersion.Set(&v) +} +// SetRepositoryVersionNil sets the value for RepositoryVersion to be an explicit nil +func (o *ContainerContainerDistributionResponse) SetRepositoryVersionNil() { + o.RepositoryVersion.Set(nil) +} + +// UnsetRepositoryVersion ensures that no value is present for RepositoryVersion, not even an explicit nil +func (o *ContainerContainerDistributionResponse) UnsetRepositoryVersion() { + o.RepositoryVersion.Unset() +} + +// GetRegistryPath returns the RegistryPath field value if set, zero value otherwise. +func (o *ContainerContainerDistributionResponse) GetRegistryPath() string { + if o == nil || IsNil(o.RegistryPath) { + var ret string + return ret + } + return *o.RegistryPath +} + +// GetRegistryPathOk returns a tuple with the RegistryPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistributionResponse) GetRegistryPathOk() (*string, bool) { + if o == nil || IsNil(o.RegistryPath) { + return nil, false + } + return o.RegistryPath, true +} + +// HasRegistryPath returns a boolean if a field has been set. +func (o *ContainerContainerDistributionResponse) HasRegistryPath() bool { + if o != nil && !IsNil(o.RegistryPath) { + return true + } + + return false +} + +// SetRegistryPath gets a reference to the given string and assigns it to the RegistryPath field. +func (o *ContainerContainerDistributionResponse) SetRegistryPath(v string) { + o.RegistryPath = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *ContainerContainerDistributionResponse) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistributionResponse) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *ContainerContainerDistributionResponse) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *ContainerContainerDistributionResponse) SetNamespace(v string) { + o.Namespace = &v +} + +// GetPrivate returns the Private field value if set, zero value otherwise. +func (o *ContainerContainerDistributionResponse) GetPrivate() bool { + if o == nil || IsNil(o.Private) { + var ret bool + return ret + } + return *o.Private +} + +// GetPrivateOk returns a tuple with the Private field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerDistributionResponse) GetPrivateOk() (*bool, bool) { + if o == nil || IsNil(o.Private) { + return nil, false + } + return o.Private, true +} + +// HasPrivate returns a boolean if a field has been set. +func (o *ContainerContainerDistributionResponse) HasPrivate() bool { + if o != nil && !IsNil(o.Private) { + return true + } + + return false +} + +// SetPrivate gets a reference to the given bool and assigns it to the Private field. +func (o *ContainerContainerDistributionResponse) SetPrivate(v bool) { + o.Private = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerDistributionResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerDistributionResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ContainerContainerDistributionResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ContainerContainerDistributionResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ContainerContainerDistributionResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ContainerContainerDistributionResponse) UnsetDescription() { + o.Description.Unset() +} + +func (o ContainerContainerDistributionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerContainerDistributionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + toSerialize["base_path"] = o.BasePath + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + toSerialize["name"] = o.Name + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.ContentGuard) { + toSerialize["content_guard"] = o.ContentGuard + } + if o.RepositoryVersion.IsSet() { + toSerialize["repository_version"] = o.RepositoryVersion.Get() + } + if !IsNil(o.RegistryPath) { + toSerialize["registry_path"] = o.RegistryPath + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + if !IsNil(o.Private) { + toSerialize["private"] = o.Private + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerContainerDistributionResponse) UnmarshalJSON(bytes []byte) (err error) { + varContainerContainerDistributionResponse := _ContainerContainerDistributionResponse{} + + if err = json.Unmarshal(bytes, &varContainerContainerDistributionResponse); err == nil { + *o = ContainerContainerDistributionResponse(varContainerContainerDistributionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "base_path") + delete(additionalProperties, "repository") + delete(additionalProperties, "name") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "registry_path") + delete(additionalProperties, "namespace") + delete(additionalProperties, "private") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerContainerDistributionResponse struct { + value *ContainerContainerDistributionResponse + isSet bool +} + +func (v NullableContainerContainerDistributionResponse) Get() *ContainerContainerDistributionResponse { + return v.value +} + +func (v *NullableContainerContainerDistributionResponse) Set(val *ContainerContainerDistributionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContainerContainerDistributionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerContainerDistributionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerContainerDistributionResponse(val *ContainerContainerDistributionResponse) *NullableContainerContainerDistributionResponse { + return &NullableContainerContainerDistributionResponse{value: val, isSet: true} +} + +func (v NullableContainerContainerDistributionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerContainerDistributionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_namespace.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_namespace.go new file mode 100644 index 0000000000..f9d7ca4170 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_namespace.go @@ -0,0 +1,143 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ContainerContainerNamespace type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerContainerNamespace{} + +// ContainerContainerNamespace Serializer for ContainerNamespaces. +type ContainerContainerNamespace struct { + Name string `json:"name"` + AdditionalProperties map[string]interface{} +} + +type _ContainerContainerNamespace ContainerContainerNamespace + +// NewContainerContainerNamespace instantiates a new ContainerContainerNamespace object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerContainerNamespace(name string) *ContainerContainerNamespace { + this := ContainerContainerNamespace{} + this.Name = name + return &this +} + +// NewContainerContainerNamespaceWithDefaults instantiates a new ContainerContainerNamespace object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerContainerNamespaceWithDefaults() *ContainerContainerNamespace { + this := ContainerContainerNamespace{} + return &this +} + +// GetName returns the Name field value +func (o *ContainerContainerNamespace) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerNamespace) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContainerContainerNamespace) SetName(v string) { + o.Name = v +} + +func (o ContainerContainerNamespace) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerContainerNamespace) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerContainerNamespace) UnmarshalJSON(bytes []byte) (err error) { + varContainerContainerNamespace := _ContainerContainerNamespace{} + + if err = json.Unmarshal(bytes, &varContainerContainerNamespace); err == nil { + *o = ContainerContainerNamespace(varContainerContainerNamespace) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerContainerNamespace struct { + value *ContainerContainerNamespace + isSet bool +} + +func (v NullableContainerContainerNamespace) Get() *ContainerContainerNamespace { + return v.value +} + +func (v *NullableContainerContainerNamespace) Set(val *ContainerContainerNamespace) { + v.value = val + v.isSet = true +} + +func (v NullableContainerContainerNamespace) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerContainerNamespace) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerContainerNamespace(val *ContainerContainerNamespace) *NullableContainerContainerNamespace { + return &NullableContainerContainerNamespace{value: val, isSet: true} +} + +func (v NullableContainerContainerNamespace) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerContainerNamespace) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_namespace_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_namespace_response.go new file mode 100644 index 0000000000..cf082495b6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_namespace_response.go @@ -0,0 +1,219 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ContainerContainerNamespaceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerContainerNamespaceResponse{} + +// ContainerContainerNamespaceResponse Serializer for ContainerNamespaces. +type ContainerContainerNamespaceResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + Name string `json:"name"` + AdditionalProperties map[string]interface{} +} + +type _ContainerContainerNamespaceResponse ContainerContainerNamespaceResponse + +// NewContainerContainerNamespaceResponse instantiates a new ContainerContainerNamespaceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerContainerNamespaceResponse(name string) *ContainerContainerNamespaceResponse { + this := ContainerContainerNamespaceResponse{} + this.Name = name + return &this +} + +// NewContainerContainerNamespaceResponseWithDefaults instantiates a new ContainerContainerNamespaceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerContainerNamespaceResponseWithDefaults() *ContainerContainerNamespaceResponse { + this := ContainerContainerNamespaceResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ContainerContainerNamespaceResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerNamespaceResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ContainerContainerNamespaceResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ContainerContainerNamespaceResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ContainerContainerNamespaceResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerNamespaceResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ContainerContainerNamespaceResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ContainerContainerNamespaceResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *ContainerContainerNamespaceResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerNamespaceResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContainerContainerNamespaceResponse) SetName(v string) { + o.Name = v +} + +func (o ContainerContainerNamespaceResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerContainerNamespaceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerContainerNamespaceResponse) UnmarshalJSON(bytes []byte) (err error) { + varContainerContainerNamespaceResponse := _ContainerContainerNamespaceResponse{} + + if err = json.Unmarshal(bytes, &varContainerContainerNamespaceResponse); err == nil { + *o = ContainerContainerNamespaceResponse(varContainerContainerNamespaceResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerContainerNamespaceResponse struct { + value *ContainerContainerNamespaceResponse + isSet bool +} + +func (v NullableContainerContainerNamespaceResponse) Get() *ContainerContainerNamespaceResponse { + return v.value +} + +func (v *NullableContainerContainerNamespaceResponse) Set(val *ContainerContainerNamespaceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContainerContainerNamespaceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerContainerNamespaceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerContainerNamespaceResponse(val *ContainerContainerNamespaceResponse) *NullableContainerContainerNamespaceResponse { + return &NullableContainerContainerNamespaceResponse{value: val, isSet: true} +} + +func (v NullableContainerContainerNamespaceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerContainerNamespaceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_push_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_push_repository.go new file mode 100644 index 0000000000..d7b16b3293 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_push_repository.go @@ -0,0 +1,325 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ContainerContainerPushRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerContainerPushRepository{} + +// ContainerContainerPushRepository Serializer for Container Push Repositories. +type ContainerContainerPushRepository struct { + // A reference to an associated signing service. + ManifestSigningService NullableString `json:"manifest_signing_service,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ContainerContainerPushRepository ContainerContainerPushRepository + +// NewContainerContainerPushRepository instantiates a new ContainerContainerPushRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerContainerPushRepository(name string) *ContainerContainerPushRepository { + this := ContainerContainerPushRepository{} + this.Name = name + return &this +} + +// NewContainerContainerPushRepositoryWithDefaults instantiates a new ContainerContainerPushRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerContainerPushRepositoryWithDefaults() *ContainerContainerPushRepository { + this := ContainerContainerPushRepository{} + return &this +} + +// GetManifestSigningService returns the ManifestSigningService field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerPushRepository) GetManifestSigningService() string { + if o == nil || IsNil(o.ManifestSigningService.Get()) { + var ret string + return ret + } + return *o.ManifestSigningService.Get() +} + +// GetManifestSigningServiceOk returns a tuple with the ManifestSigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerPushRepository) GetManifestSigningServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ManifestSigningService.Get(), o.ManifestSigningService.IsSet() +} + +// HasManifestSigningService returns a boolean if a field has been set. +func (o *ContainerContainerPushRepository) HasManifestSigningService() bool { + if o != nil && o.ManifestSigningService.IsSet() { + return true + } + + return false +} + +// SetManifestSigningService gets a reference to the given NullableString and assigns it to the ManifestSigningService field. +func (o *ContainerContainerPushRepository) SetManifestSigningService(v string) { + o.ManifestSigningService.Set(&v) +} +// SetManifestSigningServiceNil sets the value for ManifestSigningService to be an explicit nil +func (o *ContainerContainerPushRepository) SetManifestSigningServiceNil() { + o.ManifestSigningService.Set(nil) +} + +// UnsetManifestSigningService ensures that no value is present for ManifestSigningService, not even an explicit nil +func (o *ContainerContainerPushRepository) UnsetManifestSigningService() { + o.ManifestSigningService.Unset() +} + +// GetName returns the Name field value +func (o *ContainerContainerPushRepository) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerPushRepository) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContainerContainerPushRepository) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerPushRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerPushRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ContainerContainerPushRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ContainerContainerPushRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ContainerContainerPushRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ContainerContainerPushRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerPushRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerPushRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *ContainerContainerPushRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *ContainerContainerPushRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *ContainerContainerPushRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *ContainerContainerPushRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *ContainerContainerPushRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerPushRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *ContainerContainerPushRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *ContainerContainerPushRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +func (o ContainerContainerPushRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerContainerPushRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ManifestSigningService.IsSet() { + toSerialize["manifest_signing_service"] = o.ManifestSigningService.Get() + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerContainerPushRepository) UnmarshalJSON(bytes []byte) (err error) { + varContainerContainerPushRepository := _ContainerContainerPushRepository{} + + if err = json.Unmarshal(bytes, &varContainerContainerPushRepository); err == nil { + *o = ContainerContainerPushRepository(varContainerContainerPushRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "manifest_signing_service") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "pulp_labels") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerContainerPushRepository struct { + value *ContainerContainerPushRepository + isSet bool +} + +func (v NullableContainerContainerPushRepository) Get() *ContainerContainerPushRepository { + return v.value +} + +func (v *NullableContainerContainerPushRepository) Set(val *ContainerContainerPushRepository) { + v.value = val + v.isSet = true +} + +func (v NullableContainerContainerPushRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerContainerPushRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerContainerPushRepository(val *ContainerContainerPushRepository) *NullableContainerContainerPushRepository { + return &NullableContainerContainerPushRepository{value: val, isSet: true} +} + +func (v NullableContainerContainerPushRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerContainerPushRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_push_repository_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_push_repository_response.go new file mode 100644 index 0000000000..2f63c8125b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_push_repository_response.go @@ -0,0 +1,475 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ContainerContainerPushRepositoryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerContainerPushRepositoryResponse{} + +// ContainerContainerPushRepositoryResponse Serializer for Container Push Repositories. +type ContainerContainerPushRepositoryResponse struct { + LatestVersionHref *string `json:"latest_version_href,omitempty"` + PulpHref *string `json:"pulp_href,omitempty"` + VersionsHref *string `json:"versions_href,omitempty"` + // A reference to an associated signing service. + ManifestSigningService NullableString `json:"manifest_signing_service,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ContainerContainerPushRepositoryResponse ContainerContainerPushRepositoryResponse + +// NewContainerContainerPushRepositoryResponse instantiates a new ContainerContainerPushRepositoryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerContainerPushRepositoryResponse(name string) *ContainerContainerPushRepositoryResponse { + this := ContainerContainerPushRepositoryResponse{} + this.Name = name + return &this +} + +// NewContainerContainerPushRepositoryResponseWithDefaults instantiates a new ContainerContainerPushRepositoryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerContainerPushRepositoryResponseWithDefaults() *ContainerContainerPushRepositoryResponse { + this := ContainerContainerPushRepositoryResponse{} + return &this +} + +// GetLatestVersionHref returns the LatestVersionHref field value if set, zero value otherwise. +func (o *ContainerContainerPushRepositoryResponse) GetLatestVersionHref() string { + if o == nil || IsNil(o.LatestVersionHref) { + var ret string + return ret + } + return *o.LatestVersionHref +} + +// GetLatestVersionHrefOk returns a tuple with the LatestVersionHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerPushRepositoryResponse) GetLatestVersionHrefOk() (*string, bool) { + if o == nil || IsNil(o.LatestVersionHref) { + return nil, false + } + return o.LatestVersionHref, true +} + +// HasLatestVersionHref returns a boolean if a field has been set. +func (o *ContainerContainerPushRepositoryResponse) HasLatestVersionHref() bool { + if o != nil && !IsNil(o.LatestVersionHref) { + return true + } + + return false +} + +// SetLatestVersionHref gets a reference to the given string and assigns it to the LatestVersionHref field. +func (o *ContainerContainerPushRepositoryResponse) SetLatestVersionHref(v string) { + o.LatestVersionHref = &v +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ContainerContainerPushRepositoryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerPushRepositoryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ContainerContainerPushRepositoryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ContainerContainerPushRepositoryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetVersionsHref returns the VersionsHref field value if set, zero value otherwise. +func (o *ContainerContainerPushRepositoryResponse) GetVersionsHref() string { + if o == nil || IsNil(o.VersionsHref) { + var ret string + return ret + } + return *o.VersionsHref +} + +// GetVersionsHrefOk returns a tuple with the VersionsHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerPushRepositoryResponse) GetVersionsHrefOk() (*string, bool) { + if o == nil || IsNil(o.VersionsHref) { + return nil, false + } + return o.VersionsHref, true +} + +// HasVersionsHref returns a boolean if a field has been set. +func (o *ContainerContainerPushRepositoryResponse) HasVersionsHref() bool { + if o != nil && !IsNil(o.VersionsHref) { + return true + } + + return false +} + +// SetVersionsHref gets a reference to the given string and assigns it to the VersionsHref field. +func (o *ContainerContainerPushRepositoryResponse) SetVersionsHref(v string) { + o.VersionsHref = &v +} + +// GetManifestSigningService returns the ManifestSigningService field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerPushRepositoryResponse) GetManifestSigningService() string { + if o == nil || IsNil(o.ManifestSigningService.Get()) { + var ret string + return ret + } + return *o.ManifestSigningService.Get() +} + +// GetManifestSigningServiceOk returns a tuple with the ManifestSigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerPushRepositoryResponse) GetManifestSigningServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ManifestSigningService.Get(), o.ManifestSigningService.IsSet() +} + +// HasManifestSigningService returns a boolean if a field has been set. +func (o *ContainerContainerPushRepositoryResponse) HasManifestSigningService() bool { + if o != nil && o.ManifestSigningService.IsSet() { + return true + } + + return false +} + +// SetManifestSigningService gets a reference to the given NullableString and assigns it to the ManifestSigningService field. +func (o *ContainerContainerPushRepositoryResponse) SetManifestSigningService(v string) { + o.ManifestSigningService.Set(&v) +} +// SetManifestSigningServiceNil sets the value for ManifestSigningService to be an explicit nil +func (o *ContainerContainerPushRepositoryResponse) SetManifestSigningServiceNil() { + o.ManifestSigningService.Set(nil) +} + +// UnsetManifestSigningService ensures that no value is present for ManifestSigningService, not even an explicit nil +func (o *ContainerContainerPushRepositoryResponse) UnsetManifestSigningService() { + o.ManifestSigningService.Unset() +} + +// GetName returns the Name field value +func (o *ContainerContainerPushRepositoryResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerPushRepositoryResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContainerContainerPushRepositoryResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerPushRepositoryResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerPushRepositoryResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ContainerContainerPushRepositoryResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ContainerContainerPushRepositoryResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ContainerContainerPushRepositoryResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ContainerContainerPushRepositoryResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerPushRepositoryResponse) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerPushRepositoryResponse) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *ContainerContainerPushRepositoryResponse) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *ContainerContainerPushRepositoryResponse) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *ContainerContainerPushRepositoryResponse) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *ContainerContainerPushRepositoryResponse) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *ContainerContainerPushRepositoryResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerPushRepositoryResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *ContainerContainerPushRepositoryResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *ContainerContainerPushRepositoryResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ContainerContainerPushRepositoryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerPushRepositoryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ContainerContainerPushRepositoryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ContainerContainerPushRepositoryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +func (o ContainerContainerPushRepositoryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerContainerPushRepositoryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LatestVersionHref) { + toSerialize["latest_version_href"] = o.LatestVersionHref + } + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.VersionsHref) { + toSerialize["versions_href"] = o.VersionsHref + } + if o.ManifestSigningService.IsSet() { + toSerialize["manifest_signing_service"] = o.ManifestSigningService.Get() + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerContainerPushRepositoryResponse) UnmarshalJSON(bytes []byte) (err error) { + varContainerContainerPushRepositoryResponse := _ContainerContainerPushRepositoryResponse{} + + if err = json.Unmarshal(bytes, &varContainerContainerPushRepositoryResponse); err == nil { + *o = ContainerContainerPushRepositoryResponse(varContainerContainerPushRepositoryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "latest_version_href") + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "versions_href") + delete(additionalProperties, "manifest_signing_service") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_created") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerContainerPushRepositoryResponse struct { + value *ContainerContainerPushRepositoryResponse + isSet bool +} + +func (v NullableContainerContainerPushRepositoryResponse) Get() *ContainerContainerPushRepositoryResponse { + return v.value +} + +func (v *NullableContainerContainerPushRepositoryResponse) Set(val *ContainerContainerPushRepositoryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContainerContainerPushRepositoryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerContainerPushRepositoryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerContainerPushRepositoryResponse(val *ContainerContainerPushRepositoryResponse) *NullableContainerContainerPushRepositoryResponse { + return &NullableContainerContainerPushRepositoryResponse{value: val, isSet: true} +} + +func (v NullableContainerContainerPushRepositoryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerContainerPushRepositoryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_remote.go new file mode 100644 index 0000000000..f875be6591 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_remote.go @@ -0,0 +1,1192 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ContainerContainerRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerContainerRemote{} + +// ContainerContainerRemote A Serializer for ContainerRemote. +type ContainerContainerRemote struct { + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // Name of the upstream repository + UpstreamName string `json:"upstream_name"` + // A list of tags to include during sync. Wildcards *, ? are recognized. 'include_tags' is evaluated before 'exclude_tags'. + IncludeTags []string `json:"include_tags,omitempty"` + // A list of tags to exclude during sync. Wildcards *, ? are recognized. 'exclude_tags' is evaluated after 'include_tags'. + ExcludeTags []string `json:"exclude_tags,omitempty"` + // A URL to a sigstore to download image signatures from + Sigstore *string `json:"sigstore,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ContainerContainerRemote ContainerContainerRemote + +// NewContainerContainerRemote instantiates a new ContainerContainerRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerContainerRemote(name string, url string, upstreamName string) *ContainerContainerRemote { + this := ContainerContainerRemote{} + this.Name = name + this.Url = url + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + this.UpstreamName = upstreamName + return &this +} + +// NewContainerContainerRemoteWithDefaults instantiates a new ContainerContainerRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerContainerRemoteWithDefaults() *ContainerContainerRemote { + this := ContainerContainerRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value +func (o *ContainerContainerRemote) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemote) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContainerContainerRemote) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *ContainerContainerRemote) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemote) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *ContainerContainerRemote) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *ContainerContainerRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *ContainerContainerRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *ContainerContainerRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *ContainerContainerRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *ContainerContainerRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *ContainerContainerRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *ContainerContainerRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *ContainerContainerRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *ContainerContainerRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *ContainerContainerRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *ContainerContainerRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *ContainerContainerRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *ContainerContainerRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *ContainerContainerRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *ContainerContainerRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *ContainerContainerRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *ContainerContainerRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *ContainerContainerRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *ContainerContainerRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *ContainerContainerRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *ContainerContainerRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *ContainerContainerRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *ContainerContainerRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *ContainerContainerRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *ContainerContainerRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *ContainerContainerRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *ContainerContainerRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *ContainerContainerRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *ContainerContainerRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *ContainerContainerRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *ContainerContainerRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *ContainerContainerRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *ContainerContainerRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *ContainerContainerRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *ContainerContainerRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *ContainerContainerRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *ContainerContainerRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *ContainerContainerRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *ContainerContainerRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *ContainerContainerRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *ContainerContainerRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *ContainerContainerRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *ContainerContainerRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *ContainerContainerRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *ContainerContainerRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *ContainerContainerRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *ContainerContainerRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *ContainerContainerRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *ContainerContainerRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *ContainerContainerRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *ContainerContainerRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *ContainerContainerRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *ContainerContainerRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetUpstreamName returns the UpstreamName field value +func (o *ContainerContainerRemote) GetUpstreamName() string { + if o == nil { + var ret string + return ret + } + + return o.UpstreamName +} + +// GetUpstreamNameOk returns a tuple with the UpstreamName field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemote) GetUpstreamNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UpstreamName, true +} + +// SetUpstreamName sets field value +func (o *ContainerContainerRemote) SetUpstreamName(v string) { + o.UpstreamName = v +} + +// GetIncludeTags returns the IncludeTags field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetIncludeTags() []string { + if o == nil { + var ret []string + return ret + } + return o.IncludeTags +} + +// GetIncludeTagsOk returns a tuple with the IncludeTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetIncludeTagsOk() ([]string, bool) { + if o == nil || IsNil(o.IncludeTags) { + return nil, false + } + return o.IncludeTags, true +} + +// HasIncludeTags returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasIncludeTags() bool { + if o != nil && IsNil(o.IncludeTags) { + return true + } + + return false +} + +// SetIncludeTags gets a reference to the given []string and assigns it to the IncludeTags field. +func (o *ContainerContainerRemote) SetIncludeTags(v []string) { + o.IncludeTags = v +} + +// GetExcludeTags returns the ExcludeTags field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemote) GetExcludeTags() []string { + if o == nil { + var ret []string + return ret + } + return o.ExcludeTags +} + +// GetExcludeTagsOk returns a tuple with the ExcludeTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemote) GetExcludeTagsOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeTags) { + return nil, false + } + return o.ExcludeTags, true +} + +// HasExcludeTags returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasExcludeTags() bool { + if o != nil && IsNil(o.ExcludeTags) { + return true + } + + return false +} + +// SetExcludeTags gets a reference to the given []string and assigns it to the ExcludeTags field. +func (o *ContainerContainerRemote) SetExcludeTags(v []string) { + o.ExcludeTags = v +} + +// GetSigstore returns the Sigstore field value if set, zero value otherwise. +func (o *ContainerContainerRemote) GetSigstore() string { + if o == nil || IsNil(o.Sigstore) { + var ret string + return ret + } + return *o.Sigstore +} + +// GetSigstoreOk returns a tuple with the Sigstore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemote) GetSigstoreOk() (*string, bool) { + if o == nil || IsNil(o.Sigstore) { + return nil, false + } + return o.Sigstore, true +} + +// HasSigstore returns a boolean if a field has been set. +func (o *ContainerContainerRemote) HasSigstore() bool { + if o != nil && !IsNil(o.Sigstore) { + return true + } + + return false +} + +// SetSigstore gets a reference to the given string and assigns it to the Sigstore field. +func (o *ContainerContainerRemote) SetSigstore(v string) { + o.Sigstore = &v +} + +func (o ContainerContainerRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerContainerRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + toSerialize["upstream_name"] = o.UpstreamName + if o.IncludeTags != nil { + toSerialize["include_tags"] = o.IncludeTags + } + if o.ExcludeTags != nil { + toSerialize["exclude_tags"] = o.ExcludeTags + } + if !IsNil(o.Sigstore) { + toSerialize["sigstore"] = o.Sigstore + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerContainerRemote) UnmarshalJSON(bytes []byte) (err error) { + varContainerContainerRemote := _ContainerContainerRemote{} + + if err = json.Unmarshal(bytes, &varContainerContainerRemote); err == nil { + *o = ContainerContainerRemote(varContainerContainerRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "upstream_name") + delete(additionalProperties, "include_tags") + delete(additionalProperties, "exclude_tags") + delete(additionalProperties, "sigstore") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerContainerRemote struct { + value *ContainerContainerRemote + isSet bool +} + +func (v NullableContainerContainerRemote) Get() *ContainerContainerRemote { + return v.value +} + +func (v *NullableContainerContainerRemote) Set(val *ContainerContainerRemote) { + v.value = val + v.isSet = true +} + +func (v NullableContainerContainerRemote) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerContainerRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerContainerRemote(val *ContainerContainerRemote) *NullableContainerContainerRemote { + return &NullableContainerContainerRemote{value: val, isSet: true} +} + +func (v NullableContainerContainerRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerContainerRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_remote_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_remote_response.go new file mode 100644 index 0000000000..ebab7853fc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_remote_response.go @@ -0,0 +1,1104 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ContainerContainerRemoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerContainerRemoteResponse{} + +// ContainerContainerRemoteResponse A Serializer for ContainerRemote. +type ContainerContainerRemoteResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + // Name of the upstream repository + UpstreamName string `json:"upstream_name"` + // A list of tags to include during sync. Wildcards *, ? are recognized. 'include_tags' is evaluated before 'exclude_tags'. + IncludeTags []string `json:"include_tags,omitempty"` + // A list of tags to exclude during sync. Wildcards *, ? are recognized. 'exclude_tags' is evaluated after 'include_tags'. + ExcludeTags []string `json:"exclude_tags,omitempty"` + // A URL to a sigstore to download image signatures from + Sigstore *string `json:"sigstore,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ContainerContainerRemoteResponse ContainerContainerRemoteResponse + +// NewContainerContainerRemoteResponse instantiates a new ContainerContainerRemoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerContainerRemoteResponse(name string, url string, upstreamName string) *ContainerContainerRemoteResponse { + this := ContainerContainerRemoteResponse{} + this.Name = name + this.Url = url + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + this.UpstreamName = upstreamName + return &this +} + +// NewContainerContainerRemoteResponseWithDefaults instantiates a new ContainerContainerRemoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerContainerRemoteResponseWithDefaults() *ContainerContainerRemoteResponse { + this := ContainerContainerRemoteResponse{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ContainerContainerRemoteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemoteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ContainerContainerRemoteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ContainerContainerRemoteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemoteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ContainerContainerRemoteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *ContainerContainerRemoteResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemoteResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContainerContainerRemoteResponse) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *ContainerContainerRemoteResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemoteResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *ContainerContainerRemoteResponse) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemoteResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemoteResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *ContainerContainerRemoteResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *ContainerContainerRemoteResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *ContainerContainerRemoteResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemoteResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemoteResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *ContainerContainerRemoteResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *ContainerContainerRemoteResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *ContainerContainerRemoteResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *ContainerContainerRemoteResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemoteResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *ContainerContainerRemoteResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemoteResponse) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemoteResponse) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *ContainerContainerRemoteResponse) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *ContainerContainerRemoteResponse) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *ContainerContainerRemoteResponse) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *ContainerContainerRemoteResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemoteResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *ContainerContainerRemoteResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *ContainerContainerRemoteResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemoteResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *ContainerContainerRemoteResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemoteResponse) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemoteResponse) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *ContainerContainerRemoteResponse) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *ContainerContainerRemoteResponse) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *ContainerContainerRemoteResponse) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemoteResponse) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemoteResponse) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *ContainerContainerRemoteResponse) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *ContainerContainerRemoteResponse) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *ContainerContainerRemoteResponse) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *ContainerContainerRemoteResponse) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemoteResponse) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *ContainerContainerRemoteResponse) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemoteResponse) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemoteResponse) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *ContainerContainerRemoteResponse) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *ContainerContainerRemoteResponse) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *ContainerContainerRemoteResponse) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemoteResponse) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemoteResponse) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *ContainerContainerRemoteResponse) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *ContainerContainerRemoteResponse) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *ContainerContainerRemoteResponse) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemoteResponse) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemoteResponse) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *ContainerContainerRemoteResponse) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *ContainerContainerRemoteResponse) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *ContainerContainerRemoteResponse) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemoteResponse) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemoteResponse) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *ContainerContainerRemoteResponse) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *ContainerContainerRemoteResponse) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *ContainerContainerRemoteResponse) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *ContainerContainerRemoteResponse) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemoteResponse) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *ContainerContainerRemoteResponse) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemoteResponse) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemoteResponse) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *ContainerContainerRemoteResponse) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *ContainerContainerRemoteResponse) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *ContainerContainerRemoteResponse) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *ContainerContainerRemoteResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemoteResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *ContainerContainerRemoteResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +// GetUpstreamName returns the UpstreamName field value +func (o *ContainerContainerRemoteResponse) GetUpstreamName() string { + if o == nil { + var ret string + return ret + } + + return o.UpstreamName +} + +// GetUpstreamNameOk returns a tuple with the UpstreamName field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemoteResponse) GetUpstreamNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UpstreamName, true +} + +// SetUpstreamName sets field value +func (o *ContainerContainerRemoteResponse) SetUpstreamName(v string) { + o.UpstreamName = v +} + +// GetIncludeTags returns the IncludeTags field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemoteResponse) GetIncludeTags() []string { + if o == nil { + var ret []string + return ret + } + return o.IncludeTags +} + +// GetIncludeTagsOk returns a tuple with the IncludeTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemoteResponse) GetIncludeTagsOk() ([]string, bool) { + if o == nil || IsNil(o.IncludeTags) { + return nil, false + } + return o.IncludeTags, true +} + +// HasIncludeTags returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasIncludeTags() bool { + if o != nil && IsNil(o.IncludeTags) { + return true + } + + return false +} + +// SetIncludeTags gets a reference to the given []string and assigns it to the IncludeTags field. +func (o *ContainerContainerRemoteResponse) SetIncludeTags(v []string) { + o.IncludeTags = v +} + +// GetExcludeTags returns the ExcludeTags field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRemoteResponse) GetExcludeTags() []string { + if o == nil { + var ret []string + return ret + } + return o.ExcludeTags +} + +// GetExcludeTagsOk returns a tuple with the ExcludeTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRemoteResponse) GetExcludeTagsOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeTags) { + return nil, false + } + return o.ExcludeTags, true +} + +// HasExcludeTags returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasExcludeTags() bool { + if o != nil && IsNil(o.ExcludeTags) { + return true + } + + return false +} + +// SetExcludeTags gets a reference to the given []string and assigns it to the ExcludeTags field. +func (o *ContainerContainerRemoteResponse) SetExcludeTags(v []string) { + o.ExcludeTags = v +} + +// GetSigstore returns the Sigstore field value if set, zero value otherwise. +func (o *ContainerContainerRemoteResponse) GetSigstore() string { + if o == nil || IsNil(o.Sigstore) { + var ret string + return ret + } + return *o.Sigstore +} + +// GetSigstoreOk returns a tuple with the Sigstore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRemoteResponse) GetSigstoreOk() (*string, bool) { + if o == nil || IsNil(o.Sigstore) { + return nil, false + } + return o.Sigstore, true +} + +// HasSigstore returns a boolean if a field has been set. +func (o *ContainerContainerRemoteResponse) HasSigstore() bool { + if o != nil && !IsNil(o.Sigstore) { + return true + } + + return false +} + +// SetSigstore gets a reference to the given string and assigns it to the Sigstore field. +func (o *ContainerContainerRemoteResponse) SetSigstore(v string) { + o.Sigstore = &v +} + +func (o ContainerContainerRemoteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerContainerRemoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + toSerialize["upstream_name"] = o.UpstreamName + if o.IncludeTags != nil { + toSerialize["include_tags"] = o.IncludeTags + } + if o.ExcludeTags != nil { + toSerialize["exclude_tags"] = o.ExcludeTags + } + if !IsNil(o.Sigstore) { + toSerialize["sigstore"] = o.Sigstore + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerContainerRemoteResponse) UnmarshalJSON(bytes []byte) (err error) { + varContainerContainerRemoteResponse := _ContainerContainerRemoteResponse{} + + if err = json.Unmarshal(bytes, &varContainerContainerRemoteResponse); err == nil { + *o = ContainerContainerRemoteResponse(varContainerContainerRemoteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "hidden_fields") + delete(additionalProperties, "upstream_name") + delete(additionalProperties, "include_tags") + delete(additionalProperties, "exclude_tags") + delete(additionalProperties, "sigstore") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerContainerRemoteResponse struct { + value *ContainerContainerRemoteResponse + isSet bool +} + +func (v NullableContainerContainerRemoteResponse) Get() *ContainerContainerRemoteResponse { + return v.value +} + +func (v *NullableContainerContainerRemoteResponse) Set(val *ContainerContainerRemoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContainerContainerRemoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerContainerRemoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerContainerRemoteResponse(val *ContainerContainerRemoteResponse) *NullableContainerContainerRemoteResponse { + return &NullableContainerContainerRemoteResponse{value: val, isSet: true} +} + +func (v NullableContainerContainerRemoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerContainerRemoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_repository.go new file mode 100644 index 0000000000..89af291e62 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_repository.go @@ -0,0 +1,373 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ContainerContainerRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerContainerRepository{} + +// ContainerContainerRepository Serializer for Container Repositories. +type ContainerContainerRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // A reference to an associated signing service. + ManifestSigningService NullableString `json:"manifest_signing_service,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ContainerContainerRepository ContainerContainerRepository + +// NewContainerContainerRepository instantiates a new ContainerContainerRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerContainerRepository(name string) *ContainerContainerRepository { + this := ContainerContainerRepository{} + this.Name = name + return &this +} + +// NewContainerContainerRepositoryWithDefaults instantiates a new ContainerContainerRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerContainerRepositoryWithDefaults() *ContainerContainerRepository { + this := ContainerContainerRepository{} + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *ContainerContainerRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *ContainerContainerRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *ContainerContainerRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *ContainerContainerRepository) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerRepository) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContainerContainerRepository) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ContainerContainerRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ContainerContainerRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ContainerContainerRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ContainerContainerRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *ContainerContainerRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *ContainerContainerRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *ContainerContainerRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *ContainerContainerRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *ContainerContainerRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *ContainerContainerRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *ContainerContainerRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *ContainerContainerRepository) UnsetRemote() { + o.Remote.Unset() +} + +// GetManifestSigningService returns the ManifestSigningService field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRepository) GetManifestSigningService() string { + if o == nil || IsNil(o.ManifestSigningService.Get()) { + var ret string + return ret + } + return *o.ManifestSigningService.Get() +} + +// GetManifestSigningServiceOk returns a tuple with the ManifestSigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRepository) GetManifestSigningServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ManifestSigningService.Get(), o.ManifestSigningService.IsSet() +} + +// HasManifestSigningService returns a boolean if a field has been set. +func (o *ContainerContainerRepository) HasManifestSigningService() bool { + if o != nil && o.ManifestSigningService.IsSet() { + return true + } + + return false +} + +// SetManifestSigningService gets a reference to the given NullableString and assigns it to the ManifestSigningService field. +func (o *ContainerContainerRepository) SetManifestSigningService(v string) { + o.ManifestSigningService.Set(&v) +} +// SetManifestSigningServiceNil sets the value for ManifestSigningService to be an explicit nil +func (o *ContainerContainerRepository) SetManifestSigningServiceNil() { + o.ManifestSigningService.Set(nil) +} + +// UnsetManifestSigningService ensures that no value is present for ManifestSigningService, not even an explicit nil +func (o *ContainerContainerRepository) UnsetManifestSigningService() { + o.ManifestSigningService.Unset() +} + +func (o ContainerContainerRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerContainerRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if o.ManifestSigningService.IsSet() { + toSerialize["manifest_signing_service"] = o.ManifestSigningService.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerContainerRepository) UnmarshalJSON(bytes []byte) (err error) { + varContainerContainerRepository := _ContainerContainerRepository{} + + if err = json.Unmarshal(bytes, &varContainerContainerRepository); err == nil { + *o = ContainerContainerRepository(varContainerContainerRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "manifest_signing_service") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerContainerRepository struct { + value *ContainerContainerRepository + isSet bool +} + +func (v NullableContainerContainerRepository) Get() *ContainerContainerRepository { + return v.value +} + +func (v *NullableContainerContainerRepository) Set(val *ContainerContainerRepository) { + v.value = val + v.isSet = true +} + +func (v NullableContainerContainerRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerContainerRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerContainerRepository(val *ContainerContainerRepository) *NullableContainerContainerRepository { + return &NullableContainerContainerRepository{value: val, isSet: true} +} + +func (v NullableContainerContainerRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerContainerRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_repository_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_repository_response.go new file mode 100644 index 0000000000..351183ec72 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_container_repository_response.go @@ -0,0 +1,523 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ContainerContainerRepositoryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerContainerRepositoryResponse{} + +// ContainerContainerRepositoryResponse Serializer for Container Repositories. +type ContainerContainerRepositoryResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + VersionsHref *string `json:"versions_href,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + LatestVersionHref *string `json:"latest_version_href,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // A reference to an associated signing service. + ManifestSigningService NullableString `json:"manifest_signing_service,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ContainerContainerRepositoryResponse ContainerContainerRepositoryResponse + +// NewContainerContainerRepositoryResponse instantiates a new ContainerContainerRepositoryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerContainerRepositoryResponse(name string) *ContainerContainerRepositoryResponse { + this := ContainerContainerRepositoryResponse{} + this.Name = name + return &this +} + +// NewContainerContainerRepositoryResponseWithDefaults instantiates a new ContainerContainerRepositoryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerContainerRepositoryResponseWithDefaults() *ContainerContainerRepositoryResponse { + this := ContainerContainerRepositoryResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ContainerContainerRepositoryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRepositoryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ContainerContainerRepositoryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ContainerContainerRepositoryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ContainerContainerRepositoryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRepositoryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ContainerContainerRepositoryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ContainerContainerRepositoryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetVersionsHref returns the VersionsHref field value if set, zero value otherwise. +func (o *ContainerContainerRepositoryResponse) GetVersionsHref() string { + if o == nil || IsNil(o.VersionsHref) { + var ret string + return ret + } + return *o.VersionsHref +} + +// GetVersionsHrefOk returns a tuple with the VersionsHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRepositoryResponse) GetVersionsHrefOk() (*string, bool) { + if o == nil || IsNil(o.VersionsHref) { + return nil, false + } + return o.VersionsHref, true +} + +// HasVersionsHref returns a boolean if a field has been set. +func (o *ContainerContainerRepositoryResponse) HasVersionsHref() bool { + if o != nil && !IsNil(o.VersionsHref) { + return true + } + + return false +} + +// SetVersionsHref gets a reference to the given string and assigns it to the VersionsHref field. +func (o *ContainerContainerRepositoryResponse) SetVersionsHref(v string) { + o.VersionsHref = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *ContainerContainerRepositoryResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRepositoryResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *ContainerContainerRepositoryResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *ContainerContainerRepositoryResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetLatestVersionHref returns the LatestVersionHref field value if set, zero value otherwise. +func (o *ContainerContainerRepositoryResponse) GetLatestVersionHref() string { + if o == nil || IsNil(o.LatestVersionHref) { + var ret string + return ret + } + return *o.LatestVersionHref +} + +// GetLatestVersionHrefOk returns a tuple with the LatestVersionHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerContainerRepositoryResponse) GetLatestVersionHrefOk() (*string, bool) { + if o == nil || IsNil(o.LatestVersionHref) { + return nil, false + } + return o.LatestVersionHref, true +} + +// HasLatestVersionHref returns a boolean if a field has been set. +func (o *ContainerContainerRepositoryResponse) HasLatestVersionHref() bool { + if o != nil && !IsNil(o.LatestVersionHref) { + return true + } + + return false +} + +// SetLatestVersionHref gets a reference to the given string and assigns it to the LatestVersionHref field. +func (o *ContainerContainerRepositoryResponse) SetLatestVersionHref(v string) { + o.LatestVersionHref = &v +} + +// GetName returns the Name field value +func (o *ContainerContainerRepositoryResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContainerContainerRepositoryResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContainerContainerRepositoryResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRepositoryResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRepositoryResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ContainerContainerRepositoryResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ContainerContainerRepositoryResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ContainerContainerRepositoryResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ContainerContainerRepositoryResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRepositoryResponse) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRepositoryResponse) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *ContainerContainerRepositoryResponse) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *ContainerContainerRepositoryResponse) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *ContainerContainerRepositoryResponse) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *ContainerContainerRepositoryResponse) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRepositoryResponse) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRepositoryResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *ContainerContainerRepositoryResponse) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *ContainerContainerRepositoryResponse) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *ContainerContainerRepositoryResponse) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *ContainerContainerRepositoryResponse) UnsetRemote() { + o.Remote.Unset() +} + +// GetManifestSigningService returns the ManifestSigningService field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContainerContainerRepositoryResponse) GetManifestSigningService() string { + if o == nil || IsNil(o.ManifestSigningService.Get()) { + var ret string + return ret + } + return *o.ManifestSigningService.Get() +} + +// GetManifestSigningServiceOk returns a tuple with the ManifestSigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContainerContainerRepositoryResponse) GetManifestSigningServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ManifestSigningService.Get(), o.ManifestSigningService.IsSet() +} + +// HasManifestSigningService returns a boolean if a field has been set. +func (o *ContainerContainerRepositoryResponse) HasManifestSigningService() bool { + if o != nil && o.ManifestSigningService.IsSet() { + return true + } + + return false +} + +// SetManifestSigningService gets a reference to the given NullableString and assigns it to the ManifestSigningService field. +func (o *ContainerContainerRepositoryResponse) SetManifestSigningService(v string) { + o.ManifestSigningService.Set(&v) +} +// SetManifestSigningServiceNil sets the value for ManifestSigningService to be an explicit nil +func (o *ContainerContainerRepositoryResponse) SetManifestSigningServiceNil() { + o.ManifestSigningService.Set(nil) +} + +// UnsetManifestSigningService ensures that no value is present for ManifestSigningService, not even an explicit nil +func (o *ContainerContainerRepositoryResponse) UnsetManifestSigningService() { + o.ManifestSigningService.Unset() +} + +func (o ContainerContainerRepositoryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerContainerRepositoryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.VersionsHref) { + toSerialize["versions_href"] = o.VersionsHref + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.LatestVersionHref) { + toSerialize["latest_version_href"] = o.LatestVersionHref + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if o.ManifestSigningService.IsSet() { + toSerialize["manifest_signing_service"] = o.ManifestSigningService.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerContainerRepositoryResponse) UnmarshalJSON(bytes []byte) (err error) { + varContainerContainerRepositoryResponse := _ContainerContainerRepositoryResponse{} + + if err = json.Unmarshal(bytes, &varContainerContainerRepositoryResponse); err == nil { + *o = ContainerContainerRepositoryResponse(varContainerContainerRepositoryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "versions_href") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "latest_version_href") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "manifest_signing_service") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerContainerRepositoryResponse struct { + value *ContainerContainerRepositoryResponse + isSet bool +} + +func (v NullableContainerContainerRepositoryResponse) Get() *ContainerContainerRepositoryResponse { + return v.value +} + +func (v *NullableContainerContainerRepositoryResponse) Set(val *ContainerContainerRepositoryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContainerContainerRepositoryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerContainerRepositoryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerContainerRepositoryResponse(val *ContainerContainerRepositoryResponse) *NullableContainerContainerRepositoryResponse { + return &NullableContainerContainerRepositoryResponse{value: val, isSet: true} +} + +func (v NullableContainerContainerRepositoryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerContainerRepositoryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_manifest_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_manifest_response.go new file mode 100644 index 0000000000..e0412d4488 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_manifest_response.go @@ -0,0 +1,403 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ContainerManifestResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerManifestResponse{} + +// ContainerManifestResponse Serializer for Manifests. +type ContainerManifestResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact string `json:"artifact"` + // sha256 of the Manifest file + Digest string `json:"digest"` + // Manifest schema version + SchemaVersion int64 `json:"schema_version"` + // Manifest media type of the file + MediaType string `json:"media_type"` + // Manifests that are referenced by this Manifest List + ListedManifests []string `json:"listed_manifests"` + // Blob that contains configuration for this Manifest + ConfigBlob *string `json:"config_blob,omitempty"` + // Blobs that are referenced by this Manifest + Blobs []string `json:"blobs"` + AdditionalProperties map[string]interface{} +} + +type _ContainerManifestResponse ContainerManifestResponse + +// NewContainerManifestResponse instantiates a new ContainerManifestResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerManifestResponse(artifact string, digest string, schemaVersion int64, mediaType string, listedManifests []string, blobs []string) *ContainerManifestResponse { + this := ContainerManifestResponse{} + this.Artifact = artifact + this.Digest = digest + this.SchemaVersion = schemaVersion + this.MediaType = mediaType + this.ListedManifests = listedManifests + this.Blobs = blobs + return &this +} + +// NewContainerManifestResponseWithDefaults instantiates a new ContainerManifestResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerManifestResponseWithDefaults() *ContainerManifestResponse { + this := ContainerManifestResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ContainerManifestResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerManifestResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ContainerManifestResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ContainerManifestResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ContainerManifestResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerManifestResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ContainerManifestResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ContainerManifestResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value +func (o *ContainerManifestResponse) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *ContainerManifestResponse) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *ContainerManifestResponse) SetArtifact(v string) { + o.Artifact = v +} + +// GetDigest returns the Digest field value +func (o *ContainerManifestResponse) GetDigest() string { + if o == nil { + var ret string + return ret + } + + return o.Digest +} + +// GetDigestOk returns a tuple with the Digest field value +// and a boolean to check if the value has been set. +func (o *ContainerManifestResponse) GetDigestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Digest, true +} + +// SetDigest sets field value +func (o *ContainerManifestResponse) SetDigest(v string) { + o.Digest = v +} + +// GetSchemaVersion returns the SchemaVersion field value +func (o *ContainerManifestResponse) GetSchemaVersion() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.SchemaVersion +} + +// GetSchemaVersionOk returns a tuple with the SchemaVersion field value +// and a boolean to check if the value has been set. +func (o *ContainerManifestResponse) GetSchemaVersionOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.SchemaVersion, true +} + +// SetSchemaVersion sets field value +func (o *ContainerManifestResponse) SetSchemaVersion(v int64) { + o.SchemaVersion = v +} + +// GetMediaType returns the MediaType field value +func (o *ContainerManifestResponse) GetMediaType() string { + if o == nil { + var ret string + return ret + } + + return o.MediaType +} + +// GetMediaTypeOk returns a tuple with the MediaType field value +// and a boolean to check if the value has been set. +func (o *ContainerManifestResponse) GetMediaTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MediaType, true +} + +// SetMediaType sets field value +func (o *ContainerManifestResponse) SetMediaType(v string) { + o.MediaType = v +} + +// GetListedManifests returns the ListedManifests field value +func (o *ContainerManifestResponse) GetListedManifests() []string { + if o == nil { + var ret []string + return ret + } + + return o.ListedManifests +} + +// GetListedManifestsOk returns a tuple with the ListedManifests field value +// and a boolean to check if the value has been set. +func (o *ContainerManifestResponse) GetListedManifestsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ListedManifests, true +} + +// SetListedManifests sets field value +func (o *ContainerManifestResponse) SetListedManifests(v []string) { + o.ListedManifests = v +} + +// GetConfigBlob returns the ConfigBlob field value if set, zero value otherwise. +func (o *ContainerManifestResponse) GetConfigBlob() string { + if o == nil || IsNil(o.ConfigBlob) { + var ret string + return ret + } + return *o.ConfigBlob +} + +// GetConfigBlobOk returns a tuple with the ConfigBlob field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerManifestResponse) GetConfigBlobOk() (*string, bool) { + if o == nil || IsNil(o.ConfigBlob) { + return nil, false + } + return o.ConfigBlob, true +} + +// HasConfigBlob returns a boolean if a field has been set. +func (o *ContainerManifestResponse) HasConfigBlob() bool { + if o != nil && !IsNil(o.ConfigBlob) { + return true + } + + return false +} + +// SetConfigBlob gets a reference to the given string and assigns it to the ConfigBlob field. +func (o *ContainerManifestResponse) SetConfigBlob(v string) { + o.ConfigBlob = &v +} + +// GetBlobs returns the Blobs field value +func (o *ContainerManifestResponse) GetBlobs() []string { + if o == nil { + var ret []string + return ret + } + + return o.Blobs +} + +// GetBlobsOk returns a tuple with the Blobs field value +// and a boolean to check if the value has been set. +func (o *ContainerManifestResponse) GetBlobsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Blobs, true +} + +// SetBlobs sets field value +func (o *ContainerManifestResponse) SetBlobs(v []string) { + o.Blobs = v +} + +func (o ContainerManifestResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerManifestResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifact"] = o.Artifact + toSerialize["digest"] = o.Digest + toSerialize["schema_version"] = o.SchemaVersion + toSerialize["media_type"] = o.MediaType + toSerialize["listed_manifests"] = o.ListedManifests + if !IsNil(o.ConfigBlob) { + toSerialize["config_blob"] = o.ConfigBlob + } + toSerialize["blobs"] = o.Blobs + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerManifestResponse) UnmarshalJSON(bytes []byte) (err error) { + varContainerManifestResponse := _ContainerManifestResponse{} + + if err = json.Unmarshal(bytes, &varContainerManifestResponse); err == nil { + *o = ContainerManifestResponse(varContainerManifestResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "digest") + delete(additionalProperties, "schema_version") + delete(additionalProperties, "media_type") + delete(additionalProperties, "listed_manifests") + delete(additionalProperties, "config_blob") + delete(additionalProperties, "blobs") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerManifestResponse struct { + value *ContainerManifestResponse + isSet bool +} + +func (v NullableContainerManifestResponse) Get() *ContainerManifestResponse { + return v.value +} + +func (v *NullableContainerManifestResponse) Set(val *ContainerManifestResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContainerManifestResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerManifestResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerManifestResponse(val *ContainerManifestResponse) *NullableContainerManifestResponse { + return &NullableContainerManifestResponse{value: val, isSet: true} +} + +func (v NullableContainerManifestResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerManifestResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_manifest_signature_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_manifest_signature_response.go new file mode 100644 index 0000000000..afb6693b02 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_manifest_signature_response.go @@ -0,0 +1,394 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ContainerManifestSignatureResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerManifestSignatureResponse{} + +// ContainerManifestSignatureResponse Serializer for image manifest signatures. +type ContainerManifestSignatureResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Signature name in the format of `digest_algo:manifest_digest@random_32_chars` + Name string `json:"name"` + // sha256 digest of the signature blob + Digest string `json:"digest"` + // Container signature type, e.g. 'atomic' + Type string `json:"type"` + // Signing key ID + KeyId string `json:"key_id"` + // Timestamp of a signature + Timestamp int64 `json:"timestamp"` + // Signature creator + Creator string `json:"creator"` + // Manifest that is signed + SignedManifest string `json:"signed_manifest"` + AdditionalProperties map[string]interface{} +} + +type _ContainerManifestSignatureResponse ContainerManifestSignatureResponse + +// NewContainerManifestSignatureResponse instantiates a new ContainerManifestSignatureResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerManifestSignatureResponse(name string, digest string, type_ string, keyId string, timestamp int64, creator string, signedManifest string) *ContainerManifestSignatureResponse { + this := ContainerManifestSignatureResponse{} + this.Name = name + this.Digest = digest + this.Type = type_ + this.KeyId = keyId + this.Timestamp = timestamp + this.Creator = creator + this.SignedManifest = signedManifest + return &this +} + +// NewContainerManifestSignatureResponseWithDefaults instantiates a new ContainerManifestSignatureResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerManifestSignatureResponseWithDefaults() *ContainerManifestSignatureResponse { + this := ContainerManifestSignatureResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ContainerManifestSignatureResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerManifestSignatureResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ContainerManifestSignatureResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ContainerManifestSignatureResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ContainerManifestSignatureResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerManifestSignatureResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ContainerManifestSignatureResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ContainerManifestSignatureResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *ContainerManifestSignatureResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContainerManifestSignatureResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContainerManifestSignatureResponse) SetName(v string) { + o.Name = v +} + +// GetDigest returns the Digest field value +func (o *ContainerManifestSignatureResponse) GetDigest() string { + if o == nil { + var ret string + return ret + } + + return o.Digest +} + +// GetDigestOk returns a tuple with the Digest field value +// and a boolean to check if the value has been set. +func (o *ContainerManifestSignatureResponse) GetDigestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Digest, true +} + +// SetDigest sets field value +func (o *ContainerManifestSignatureResponse) SetDigest(v string) { + o.Digest = v +} + +// GetType returns the Type field value +func (o *ContainerManifestSignatureResponse) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ContainerManifestSignatureResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ContainerManifestSignatureResponse) SetType(v string) { + o.Type = v +} + +// GetKeyId returns the KeyId field value +func (o *ContainerManifestSignatureResponse) GetKeyId() string { + if o == nil { + var ret string + return ret + } + + return o.KeyId +} + +// GetKeyIdOk returns a tuple with the KeyId field value +// and a boolean to check if the value has been set. +func (o *ContainerManifestSignatureResponse) GetKeyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyId, true +} + +// SetKeyId sets field value +func (o *ContainerManifestSignatureResponse) SetKeyId(v string) { + o.KeyId = v +} + +// GetTimestamp returns the Timestamp field value +func (o *ContainerManifestSignatureResponse) GetTimestamp() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value +// and a boolean to check if the value has been set. +func (o *ContainerManifestSignatureResponse) GetTimestampOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Timestamp, true +} + +// SetTimestamp sets field value +func (o *ContainerManifestSignatureResponse) SetTimestamp(v int64) { + o.Timestamp = v +} + +// GetCreator returns the Creator field value +func (o *ContainerManifestSignatureResponse) GetCreator() string { + if o == nil { + var ret string + return ret + } + + return o.Creator +} + +// GetCreatorOk returns a tuple with the Creator field value +// and a boolean to check if the value has been set. +func (o *ContainerManifestSignatureResponse) GetCreatorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Creator, true +} + +// SetCreator sets field value +func (o *ContainerManifestSignatureResponse) SetCreator(v string) { + o.Creator = v +} + +// GetSignedManifest returns the SignedManifest field value +func (o *ContainerManifestSignatureResponse) GetSignedManifest() string { + if o == nil { + var ret string + return ret + } + + return o.SignedManifest +} + +// GetSignedManifestOk returns a tuple with the SignedManifest field value +// and a boolean to check if the value has been set. +func (o *ContainerManifestSignatureResponse) GetSignedManifestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SignedManifest, true +} + +// SetSignedManifest sets field value +func (o *ContainerManifestSignatureResponse) SetSignedManifest(v string) { + o.SignedManifest = v +} + +func (o ContainerManifestSignatureResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerManifestSignatureResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["digest"] = o.Digest + toSerialize["type"] = o.Type + toSerialize["key_id"] = o.KeyId + toSerialize["timestamp"] = o.Timestamp + toSerialize["creator"] = o.Creator + toSerialize["signed_manifest"] = o.SignedManifest + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerManifestSignatureResponse) UnmarshalJSON(bytes []byte) (err error) { + varContainerManifestSignatureResponse := _ContainerManifestSignatureResponse{} + + if err = json.Unmarshal(bytes, &varContainerManifestSignatureResponse); err == nil { + *o = ContainerManifestSignatureResponse(varContainerManifestSignatureResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "digest") + delete(additionalProperties, "type") + delete(additionalProperties, "key_id") + delete(additionalProperties, "timestamp") + delete(additionalProperties, "creator") + delete(additionalProperties, "signed_manifest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerManifestSignatureResponse struct { + value *ContainerManifestSignatureResponse + isSet bool +} + +func (v NullableContainerManifestSignatureResponse) Get() *ContainerManifestSignatureResponse { + return v.value +} + +func (v *NullableContainerManifestSignatureResponse) Set(val *ContainerManifestSignatureResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContainerManifestSignatureResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerManifestSignatureResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerManifestSignatureResponse(val *ContainerManifestSignatureResponse) *NullableContainerManifestSignatureResponse { + return &NullableContainerManifestSignatureResponse{value: val, isSet: true} +} + +func (v NullableContainerManifestSignatureResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerManifestSignatureResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_repository_sync_url.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_repository_sync_url.go new file mode 100644 index 0000000000..b3dffb2de2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_repository_sync_url.go @@ -0,0 +1,237 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ContainerRepositorySyncURL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerRepositorySyncURL{} + +// ContainerRepositorySyncURL Serializer for Container Sync. +type ContainerRepositorySyncURL struct { + // A remote to sync from. This will override a remote set on repository. + Remote *string `json:"remote,omitempty"` + // If ``True``, synchronization will remove all content that is not present in the remote repository. If ``False``, sync will be additive only. + Mirror *bool `json:"mirror,omitempty"` + // If ``True``, only signed content will be synced. Signatures are not verified. + SignedOnly *bool `json:"signed_only,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ContainerRepositorySyncURL ContainerRepositorySyncURL + +// NewContainerRepositorySyncURL instantiates a new ContainerRepositorySyncURL object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerRepositorySyncURL() *ContainerRepositorySyncURL { + this := ContainerRepositorySyncURL{} + var mirror bool = false + this.Mirror = &mirror + var signedOnly bool = false + this.SignedOnly = &signedOnly + return &this +} + +// NewContainerRepositorySyncURLWithDefaults instantiates a new ContainerRepositorySyncURL object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerRepositorySyncURLWithDefaults() *ContainerRepositorySyncURL { + this := ContainerRepositorySyncURL{} + var mirror bool = false + this.Mirror = &mirror + var signedOnly bool = false + this.SignedOnly = &signedOnly + return &this +} + +// GetRemote returns the Remote field value if set, zero value otherwise. +func (o *ContainerRepositorySyncURL) GetRemote() string { + if o == nil || IsNil(o.Remote) { + var ret string + return ret + } + return *o.Remote +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerRepositorySyncURL) GetRemoteOk() (*string, bool) { + if o == nil || IsNil(o.Remote) { + return nil, false + } + return o.Remote, true +} + +// HasRemote returns a boolean if a field has been set. +func (o *ContainerRepositorySyncURL) HasRemote() bool { + if o != nil && !IsNil(o.Remote) { + return true + } + + return false +} + +// SetRemote gets a reference to the given string and assigns it to the Remote field. +func (o *ContainerRepositorySyncURL) SetRemote(v string) { + o.Remote = &v +} + +// GetMirror returns the Mirror field value if set, zero value otherwise. +func (o *ContainerRepositorySyncURL) GetMirror() bool { + if o == nil || IsNil(o.Mirror) { + var ret bool + return ret + } + return *o.Mirror +} + +// GetMirrorOk returns a tuple with the Mirror field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerRepositorySyncURL) GetMirrorOk() (*bool, bool) { + if o == nil || IsNil(o.Mirror) { + return nil, false + } + return o.Mirror, true +} + +// HasMirror returns a boolean if a field has been set. +func (o *ContainerRepositorySyncURL) HasMirror() bool { + if o != nil && !IsNil(o.Mirror) { + return true + } + + return false +} + +// SetMirror gets a reference to the given bool and assigns it to the Mirror field. +func (o *ContainerRepositorySyncURL) SetMirror(v bool) { + o.Mirror = &v +} + +// GetSignedOnly returns the SignedOnly field value if set, zero value otherwise. +func (o *ContainerRepositorySyncURL) GetSignedOnly() bool { + if o == nil || IsNil(o.SignedOnly) { + var ret bool + return ret + } + return *o.SignedOnly +} + +// GetSignedOnlyOk returns a tuple with the SignedOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerRepositorySyncURL) GetSignedOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.SignedOnly) { + return nil, false + } + return o.SignedOnly, true +} + +// HasSignedOnly returns a boolean if a field has been set. +func (o *ContainerRepositorySyncURL) HasSignedOnly() bool { + if o != nil && !IsNil(o.SignedOnly) { + return true + } + + return false +} + +// SetSignedOnly gets a reference to the given bool and assigns it to the SignedOnly field. +func (o *ContainerRepositorySyncURL) SetSignedOnly(v bool) { + o.SignedOnly = &v +} + +func (o ContainerRepositorySyncURL) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerRepositorySyncURL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Remote) { + toSerialize["remote"] = o.Remote + } + if !IsNil(o.Mirror) { + toSerialize["mirror"] = o.Mirror + } + if !IsNil(o.SignedOnly) { + toSerialize["signed_only"] = o.SignedOnly + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerRepositorySyncURL) UnmarshalJSON(bytes []byte) (err error) { + varContainerRepositorySyncURL := _ContainerRepositorySyncURL{} + + if err = json.Unmarshal(bytes, &varContainerRepositorySyncURL); err == nil { + *o = ContainerRepositorySyncURL(varContainerRepositorySyncURL) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "remote") + delete(additionalProperties, "mirror") + delete(additionalProperties, "signed_only") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerRepositorySyncURL struct { + value *ContainerRepositorySyncURL + isSet bool +} + +func (v NullableContainerRepositorySyncURL) Get() *ContainerRepositorySyncURL { + return v.value +} + +func (v *NullableContainerRepositorySyncURL) Set(val *ContainerRepositorySyncURL) { + v.value = val + v.isSet = true +} + +func (v NullableContainerRepositorySyncURL) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerRepositorySyncURL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerRepositorySyncURL(val *ContainerRepositorySyncURL) *NullableContainerRepositorySyncURL { + return &NullableContainerRepositorySyncURL{value: val, isSet: true} +} + +func (v NullableContainerRepositorySyncURL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerRepositorySyncURL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_tag_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_tag_response.go new file mode 100644 index 0000000000..c3fd4b1acc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_container_tag_response.go @@ -0,0 +1,249 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ContainerTagResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContainerTagResponse{} + +// ContainerTagResponse Serializer for Tags. +type ContainerTagResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Tag name + Name string `json:"name"` + // Manifest that is tagged + TaggedManifest string `json:"tagged_manifest"` + AdditionalProperties map[string]interface{} +} + +type _ContainerTagResponse ContainerTagResponse + +// NewContainerTagResponse instantiates a new ContainerTagResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContainerTagResponse(name string, taggedManifest string) *ContainerTagResponse { + this := ContainerTagResponse{} + this.Name = name + this.TaggedManifest = taggedManifest + return &this +} + +// NewContainerTagResponseWithDefaults instantiates a new ContainerTagResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContainerTagResponseWithDefaults() *ContainerTagResponse { + this := ContainerTagResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ContainerTagResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerTagResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ContainerTagResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ContainerTagResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ContainerTagResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContainerTagResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ContainerTagResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ContainerTagResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *ContainerTagResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContainerTagResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContainerTagResponse) SetName(v string) { + o.Name = v +} + +// GetTaggedManifest returns the TaggedManifest field value +func (o *ContainerTagResponse) GetTaggedManifest() string { + if o == nil { + var ret string + return ret + } + + return o.TaggedManifest +} + +// GetTaggedManifestOk returns a tuple with the TaggedManifest field value +// and a boolean to check if the value has been set. +func (o *ContainerTagResponse) GetTaggedManifestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TaggedManifest, true +} + +// SetTaggedManifest sets field value +func (o *ContainerTagResponse) SetTaggedManifest(v string) { + o.TaggedManifest = v +} + +func (o ContainerTagResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContainerTagResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["tagged_manifest"] = o.TaggedManifest + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContainerTagResponse) UnmarshalJSON(bytes []byte) (err error) { + varContainerTagResponse := _ContainerTagResponse{} + + if err = json.Unmarshal(bytes, &varContainerTagResponse); err == nil { + *o = ContainerTagResponse(varContainerTagResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "tagged_manifest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContainerTagResponse struct { + value *ContainerTagResponse + isSet bool +} + +func (v NullableContainerTagResponse) Get() *ContainerTagResponse { + return v.value +} + +func (v *NullableContainerTagResponse) Set(val *ContainerTagResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContainerTagResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContainerTagResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContainerTagResponse(val *ContainerTagResponse) *NullableContainerTagResponse { + return &NullableContainerTagResponse{value: val, isSet: true} +} + +func (v NullableContainerTagResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContainerTagResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_app_status_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_app_status_response.go new file mode 100644 index 0000000000..604b84d3ca --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_app_status_response.go @@ -0,0 +1,192 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ContentAppStatusResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContentAppStatusResponse{} + +// ContentAppStatusResponse Base serializer for use with :class:`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. +type ContentAppStatusResponse struct { + // The name of the worker. + Name *string `json:"name,omitempty"` + // Timestamp of the last time the worker talked to the service. + LastHeartbeat *time.Time `json:"last_heartbeat,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ContentAppStatusResponse ContentAppStatusResponse + +// NewContentAppStatusResponse instantiates a new ContentAppStatusResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContentAppStatusResponse() *ContentAppStatusResponse { + this := ContentAppStatusResponse{} + return &this +} + +// NewContentAppStatusResponseWithDefaults instantiates a new ContentAppStatusResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContentAppStatusResponseWithDefaults() *ContentAppStatusResponse { + this := ContentAppStatusResponse{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ContentAppStatusResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContentAppStatusResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ContentAppStatusResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ContentAppStatusResponse) SetName(v string) { + o.Name = &v +} + +// GetLastHeartbeat returns the LastHeartbeat field value if set, zero value otherwise. +func (o *ContentAppStatusResponse) GetLastHeartbeat() time.Time { + if o == nil || IsNil(o.LastHeartbeat) { + var ret time.Time + return ret + } + return *o.LastHeartbeat +} + +// GetLastHeartbeatOk returns a tuple with the LastHeartbeat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContentAppStatusResponse) GetLastHeartbeatOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastHeartbeat) { + return nil, false + } + return o.LastHeartbeat, true +} + +// HasLastHeartbeat returns a boolean if a field has been set. +func (o *ContentAppStatusResponse) HasLastHeartbeat() bool { + if o != nil && !IsNil(o.LastHeartbeat) { + return true + } + + return false +} + +// SetLastHeartbeat gets a reference to the given time.Time and assigns it to the LastHeartbeat field. +func (o *ContentAppStatusResponse) SetLastHeartbeat(v time.Time) { + o.LastHeartbeat = &v +} + +func (o ContentAppStatusResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContentAppStatusResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.LastHeartbeat) { + toSerialize["last_heartbeat"] = o.LastHeartbeat + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContentAppStatusResponse) UnmarshalJSON(bytes []byte) (err error) { + varContentAppStatusResponse := _ContentAppStatusResponse{} + + if err = json.Unmarshal(bytes, &varContentAppStatusResponse); err == nil { + *o = ContentAppStatusResponse(varContentAppStatusResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "last_heartbeat") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContentAppStatusResponse struct { + value *ContentAppStatusResponse + isSet bool +} + +func (v NullableContentAppStatusResponse) Get() *ContentAppStatusResponse { + return v.value +} + +func (v *NullableContentAppStatusResponse) Set(val *ContentAppStatusResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContentAppStatusResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContentAppStatusResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContentAppStatusResponse(val *ContentAppStatusResponse) *NullableContentAppStatusResponse { + return &NullableContentAppStatusResponse{value: val, isSet: true} +} + +func (v NullableContentAppStatusResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContentAppStatusResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_guard_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_guard_response.go new file mode 100644 index 0000000000..50a62ca70e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_guard_response.go @@ -0,0 +1,268 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ContentGuardResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContentGuardResponse{} + +// ContentGuardResponse Base serializer for use with :class:`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. +type ContentGuardResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The unique name. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ContentGuardResponse ContentGuardResponse + +// NewContentGuardResponse instantiates a new ContentGuardResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContentGuardResponse(name string) *ContentGuardResponse { + this := ContentGuardResponse{} + this.Name = name + return &this +} + +// NewContentGuardResponseWithDefaults instantiates a new ContentGuardResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContentGuardResponseWithDefaults() *ContentGuardResponse { + this := ContentGuardResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ContentGuardResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContentGuardResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ContentGuardResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ContentGuardResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ContentGuardResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContentGuardResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ContentGuardResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ContentGuardResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *ContentGuardResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContentGuardResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContentGuardResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContentGuardResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContentGuardResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ContentGuardResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ContentGuardResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ContentGuardResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ContentGuardResponse) UnsetDescription() { + o.Description.Unset() +} + +func (o ContentGuardResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContentGuardResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContentGuardResponse) UnmarshalJSON(bytes []byte) (err error) { + varContentGuardResponse := _ContentGuardResponse{} + + if err = json.Unmarshal(bytes, &varContentGuardResponse); err == nil { + *o = ContentGuardResponse(varContentGuardResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContentGuardResponse struct { + value *ContentGuardResponse + isSet bool +} + +func (v NullableContentGuardResponse) Get() *ContentGuardResponse { + return v.value +} + +func (v *NullableContentGuardResponse) Set(val *ContentGuardResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContentGuardResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContentGuardResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContentGuardResponse(val *ContentGuardResponse) *NullableContentGuardResponse { + return &NullableContentGuardResponse{value: val, isSet: true} +} + +func (v NullableContentGuardResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContentGuardResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_redirect_content_guard.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_redirect_content_guard.go new file mode 100644 index 0000000000..a63ff48144 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_redirect_content_guard.go @@ -0,0 +1,192 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ContentRedirectContentGuard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContentRedirectContentGuard{} + +// ContentRedirectContentGuard A serializer for ContentRedirectContentGuard. +type ContentRedirectContentGuard struct { + // The unique name. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ContentRedirectContentGuard ContentRedirectContentGuard + +// NewContentRedirectContentGuard instantiates a new ContentRedirectContentGuard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContentRedirectContentGuard(name string) *ContentRedirectContentGuard { + this := ContentRedirectContentGuard{} + this.Name = name + return &this +} + +// NewContentRedirectContentGuardWithDefaults instantiates a new ContentRedirectContentGuard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContentRedirectContentGuardWithDefaults() *ContentRedirectContentGuard { + this := ContentRedirectContentGuard{} + return &this +} + +// GetName returns the Name field value +func (o *ContentRedirectContentGuard) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContentRedirectContentGuard) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContentRedirectContentGuard) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContentRedirectContentGuard) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContentRedirectContentGuard) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ContentRedirectContentGuard) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ContentRedirectContentGuard) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ContentRedirectContentGuard) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ContentRedirectContentGuard) UnsetDescription() { + o.Description.Unset() +} + +func (o ContentRedirectContentGuard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContentRedirectContentGuard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContentRedirectContentGuard) UnmarshalJSON(bytes []byte) (err error) { + varContentRedirectContentGuard := _ContentRedirectContentGuard{} + + if err = json.Unmarshal(bytes, &varContentRedirectContentGuard); err == nil { + *o = ContentRedirectContentGuard(varContentRedirectContentGuard) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContentRedirectContentGuard struct { + value *ContentRedirectContentGuard + isSet bool +} + +func (v NullableContentRedirectContentGuard) Get() *ContentRedirectContentGuard { + return v.value +} + +func (v *NullableContentRedirectContentGuard) Set(val *ContentRedirectContentGuard) { + v.value = val + v.isSet = true +} + +func (v NullableContentRedirectContentGuard) IsSet() bool { + return v.isSet +} + +func (v *NullableContentRedirectContentGuard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContentRedirectContentGuard(val *ContentRedirectContentGuard) *NullableContentRedirectContentGuard { + return &NullableContentRedirectContentGuard{value: val, isSet: true} +} + +func (v NullableContentRedirectContentGuard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContentRedirectContentGuard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_redirect_content_guard_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_redirect_content_guard_response.go new file mode 100644 index 0000000000..3b696a1c17 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_redirect_content_guard_response.go @@ -0,0 +1,268 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ContentRedirectContentGuardResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContentRedirectContentGuardResponse{} + +// ContentRedirectContentGuardResponse A serializer for ContentRedirectContentGuard. +type ContentRedirectContentGuardResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The unique name. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ContentRedirectContentGuardResponse ContentRedirectContentGuardResponse + +// NewContentRedirectContentGuardResponse instantiates a new ContentRedirectContentGuardResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContentRedirectContentGuardResponse(name string) *ContentRedirectContentGuardResponse { + this := ContentRedirectContentGuardResponse{} + this.Name = name + return &this +} + +// NewContentRedirectContentGuardResponseWithDefaults instantiates a new ContentRedirectContentGuardResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContentRedirectContentGuardResponseWithDefaults() *ContentRedirectContentGuardResponse { + this := ContentRedirectContentGuardResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ContentRedirectContentGuardResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContentRedirectContentGuardResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ContentRedirectContentGuardResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ContentRedirectContentGuardResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ContentRedirectContentGuardResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContentRedirectContentGuardResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ContentRedirectContentGuardResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ContentRedirectContentGuardResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *ContentRedirectContentGuardResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContentRedirectContentGuardResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContentRedirectContentGuardResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ContentRedirectContentGuardResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContentRedirectContentGuardResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ContentRedirectContentGuardResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ContentRedirectContentGuardResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ContentRedirectContentGuardResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ContentRedirectContentGuardResponse) UnsetDescription() { + o.Description.Unset() +} + +func (o ContentRedirectContentGuardResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContentRedirectContentGuardResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContentRedirectContentGuardResponse) UnmarshalJSON(bytes []byte) (err error) { + varContentRedirectContentGuardResponse := _ContentRedirectContentGuardResponse{} + + if err = json.Unmarshal(bytes, &varContentRedirectContentGuardResponse); err == nil { + *o = ContentRedirectContentGuardResponse(varContentRedirectContentGuardResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContentRedirectContentGuardResponse struct { + value *ContentRedirectContentGuardResponse + isSet bool +} + +func (v NullableContentRedirectContentGuardResponse) Get() *ContentRedirectContentGuardResponse { + return v.value +} + +func (v *NullableContentRedirectContentGuardResponse) Set(val *ContentRedirectContentGuardResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContentRedirectContentGuardResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContentRedirectContentGuardResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContentRedirectContentGuardResponse(val *ContentRedirectContentGuardResponse) *NullableContentRedirectContentGuardResponse { + return &NullableContentRedirectContentGuardResponse{value: val, isSet: true} +} + +func (v NullableContentRedirectContentGuardResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContentRedirectContentGuardResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_settings_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_settings_response.go new file mode 100644 index 0000000000..5a35e04b25 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_settings_response.go @@ -0,0 +1,173 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ContentSettingsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContentSettingsResponse{} + +// ContentSettingsResponse Serializer for information about content-app-settings for the pulp instance +type ContentSettingsResponse struct { + // The CONTENT_ORIGIN setting for this Pulp instance + ContentOrigin string `json:"content_origin"` + // The CONTENT_PATH_PREFIX setting for this Pulp instance + ContentPathPrefix string `json:"content_path_prefix"` + AdditionalProperties map[string]interface{} +} + +type _ContentSettingsResponse ContentSettingsResponse + +// NewContentSettingsResponse instantiates a new ContentSettingsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContentSettingsResponse(contentOrigin string, contentPathPrefix string) *ContentSettingsResponse { + this := ContentSettingsResponse{} + this.ContentOrigin = contentOrigin + this.ContentPathPrefix = contentPathPrefix + return &this +} + +// NewContentSettingsResponseWithDefaults instantiates a new ContentSettingsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContentSettingsResponseWithDefaults() *ContentSettingsResponse { + this := ContentSettingsResponse{} + return &this +} + +// GetContentOrigin returns the ContentOrigin field value +func (o *ContentSettingsResponse) GetContentOrigin() string { + if o == nil { + var ret string + return ret + } + + return o.ContentOrigin +} + +// GetContentOriginOk returns a tuple with the ContentOrigin field value +// and a boolean to check if the value has been set. +func (o *ContentSettingsResponse) GetContentOriginOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentOrigin, true +} + +// SetContentOrigin sets field value +func (o *ContentSettingsResponse) SetContentOrigin(v string) { + o.ContentOrigin = v +} + +// GetContentPathPrefix returns the ContentPathPrefix field value +func (o *ContentSettingsResponse) GetContentPathPrefix() string { + if o == nil { + var ret string + return ret + } + + return o.ContentPathPrefix +} + +// GetContentPathPrefixOk returns a tuple with the ContentPathPrefix field value +// and a boolean to check if the value has been set. +func (o *ContentSettingsResponse) GetContentPathPrefixOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentPathPrefix, true +} + +// SetContentPathPrefix sets field value +func (o *ContentSettingsResponse) SetContentPathPrefix(v string) { + o.ContentPathPrefix = v +} + +func (o ContentSettingsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContentSettingsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["content_origin"] = o.ContentOrigin + toSerialize["content_path_prefix"] = o.ContentPathPrefix + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContentSettingsResponse) UnmarshalJSON(bytes []byte) (err error) { + varContentSettingsResponse := _ContentSettingsResponse{} + + if err = json.Unmarshal(bytes, &varContentSettingsResponse); err == nil { + *o = ContentSettingsResponse(varContentSettingsResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "content_origin") + delete(additionalProperties, "content_path_prefix") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContentSettingsResponse struct { + value *ContentSettingsResponse + isSet bool +} + +func (v NullableContentSettingsResponse) Get() *ContentSettingsResponse { + return v.value +} + +func (v *NullableContentSettingsResponse) Set(val *ContentSettingsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContentSettingsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContentSettingsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContentSettingsResponse(val *ContentSettingsResponse) *NullableContentSettingsResponse { + return &NullableContentSettingsResponse{value: val, isSet: true} +} + +func (v NullableContentSettingsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContentSettingsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_summary_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_summary_response.go new file mode 100644 index 0000000000..2bc657d908 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_content_summary_response.go @@ -0,0 +1,199 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ContentSummaryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContentSummaryResponse{} + +// ContentSummaryResponse Serializer for the RepositoryVersion content summary +type ContentSummaryResponse struct { + Added map[string]map[string]interface{} `json:"added"` + Removed map[string]map[string]interface{} `json:"removed"` + Present map[string]map[string]interface{} `json:"present"` + AdditionalProperties map[string]interface{} +} + +type _ContentSummaryResponse ContentSummaryResponse + +// NewContentSummaryResponse instantiates a new ContentSummaryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContentSummaryResponse(added map[string]map[string]interface{}, removed map[string]map[string]interface{}, present map[string]map[string]interface{}) *ContentSummaryResponse { + this := ContentSummaryResponse{} + this.Added = added + this.Removed = removed + this.Present = present + return &this +} + +// NewContentSummaryResponseWithDefaults instantiates a new ContentSummaryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContentSummaryResponseWithDefaults() *ContentSummaryResponse { + this := ContentSummaryResponse{} + return &this +} + +// GetAdded returns the Added field value +func (o *ContentSummaryResponse) GetAdded() map[string]map[string]interface{} { + if o == nil { + var ret map[string]map[string]interface{} + return ret + } + + return o.Added +} + +// GetAddedOk returns a tuple with the Added field value +// and a boolean to check if the value has been set. +func (o *ContentSummaryResponse) GetAddedOk() (map[string]map[string]interface{}, bool) { + if o == nil { + return map[string]map[string]interface{}{}, false + } + return o.Added, true +} + +// SetAdded sets field value +func (o *ContentSummaryResponse) SetAdded(v map[string]map[string]interface{}) { + o.Added = v +} + +// GetRemoved returns the Removed field value +func (o *ContentSummaryResponse) GetRemoved() map[string]map[string]interface{} { + if o == nil { + var ret map[string]map[string]interface{} + return ret + } + + return o.Removed +} + +// GetRemovedOk returns a tuple with the Removed field value +// and a boolean to check if the value has been set. +func (o *ContentSummaryResponse) GetRemovedOk() (map[string]map[string]interface{}, bool) { + if o == nil { + return map[string]map[string]interface{}{}, false + } + return o.Removed, true +} + +// SetRemoved sets field value +func (o *ContentSummaryResponse) SetRemoved(v map[string]map[string]interface{}) { + o.Removed = v +} + +// GetPresent returns the Present field value +func (o *ContentSummaryResponse) GetPresent() map[string]map[string]interface{} { + if o == nil { + var ret map[string]map[string]interface{} + return ret + } + + return o.Present +} + +// GetPresentOk returns a tuple with the Present field value +// and a boolean to check if the value has been set. +func (o *ContentSummaryResponse) GetPresentOk() (map[string]map[string]interface{}, bool) { + if o == nil { + return map[string]map[string]interface{}{}, false + } + return o.Present, true +} + +// SetPresent sets field value +func (o *ContentSummaryResponse) SetPresent(v map[string]map[string]interface{}) { + o.Present = v +} + +func (o ContentSummaryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContentSummaryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["added"] = o.Added + toSerialize["removed"] = o.Removed + toSerialize["present"] = o.Present + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ContentSummaryResponse) UnmarshalJSON(bytes []byte) (err error) { + varContentSummaryResponse := _ContentSummaryResponse{} + + if err = json.Unmarshal(bytes, &varContentSummaryResponse); err == nil { + *o = ContentSummaryResponse(varContentSummaryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "added") + delete(additionalProperties, "removed") + delete(additionalProperties, "present") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableContentSummaryResponse struct { + value *ContentSummaryResponse + isSet bool +} + +func (v NullableContentSummaryResponse) Get() *ContentSummaryResponse { + return v.value +} + +func (v *NullableContentSummaryResponse) Set(val *ContentSummaryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableContentSummaryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableContentSummaryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContentSummaryResponse(val *ContentSummaryResponse) *NullableContentSummaryResponse { + return &NullableContentSummaryResponse{value: val, isSet: true} +} + +func (v NullableContentSummaryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContentSummaryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_copy.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_copy.go new file mode 100644 index 0000000000..a6638e4b03 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_copy.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the Copy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Copy{} + +// Copy A serializer for Content Copy API. +type Copy struct { + // A JSON document describing sources, destinations, and content to be copied + Config map[string]interface{} `json:"config"` + AdditionalProperties map[string]interface{} +} + +type _Copy Copy + +// NewCopy instantiates a new Copy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCopy(config map[string]interface{}) *Copy { + this := Copy{} + this.Config = config + return &this +} + +// NewCopyWithDefaults instantiates a new Copy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCopyWithDefaults() *Copy { + this := Copy{} + return &this +} + +// GetConfig returns the Config field value +func (o *Copy) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *Copy) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *Copy) SetConfig(v map[string]interface{}) { + o.Config = v +} + +func (o Copy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Copy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Copy) UnmarshalJSON(bytes []byte) (err error) { + varCopy := _Copy{} + + if err = json.Unmarshal(bytes, &varCopy); err == nil { + *o = Copy(varCopy) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "config") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCopy struct { + value *Copy + isSet bool +} + +func (v NullableCopy) Get() *Copy { + return v.value +} + +func (v *NullableCopy) Set(val *Copy) { + v.value = val + v.isSet = true +} + +func (v NullableCopy) IsSet() bool { + return v.isSet +} + +func (v *NullableCopy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCopy(val *Copy) *NullableCopy { + return &NullableCopy{value: val, isSet: true} +} + +func (v NullableCopy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCopy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_database_connection_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_database_connection_response.go new file mode 100644 index 0000000000..92ae35d8b8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_database_connection_response.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the DatabaseConnectionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatabaseConnectionResponse{} + +// DatabaseConnectionResponse Serializer for the database connection information +type DatabaseConnectionResponse struct { + // Info about whether the app can connect to the database + Connected bool `json:"connected"` + AdditionalProperties map[string]interface{} +} + +type _DatabaseConnectionResponse DatabaseConnectionResponse + +// NewDatabaseConnectionResponse instantiates a new DatabaseConnectionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatabaseConnectionResponse(connected bool) *DatabaseConnectionResponse { + this := DatabaseConnectionResponse{} + this.Connected = connected + return &this +} + +// NewDatabaseConnectionResponseWithDefaults instantiates a new DatabaseConnectionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatabaseConnectionResponseWithDefaults() *DatabaseConnectionResponse { + this := DatabaseConnectionResponse{} + return &this +} + +// GetConnected returns the Connected field value +func (o *DatabaseConnectionResponse) GetConnected() bool { + if o == nil { + var ret bool + return ret + } + + return o.Connected +} + +// GetConnectedOk returns a tuple with the Connected field value +// and a boolean to check if the value has been set. +func (o *DatabaseConnectionResponse) GetConnectedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Connected, true +} + +// SetConnected sets field value +func (o *DatabaseConnectionResponse) SetConnected(v bool) { + o.Connected = v +} + +func (o DatabaseConnectionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatabaseConnectionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["connected"] = o.Connected + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DatabaseConnectionResponse) UnmarshalJSON(bytes []byte) (err error) { + varDatabaseConnectionResponse := _DatabaseConnectionResponse{} + + if err = json.Unmarshal(bytes, &varDatabaseConnectionResponse); err == nil { + *o = DatabaseConnectionResponse(varDatabaseConnectionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "connected") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDatabaseConnectionResponse struct { + value *DatabaseConnectionResponse + isSet bool +} + +func (v NullableDatabaseConnectionResponse) Get() *DatabaseConnectionResponse { + return v.value +} + +func (v *NullableDatabaseConnectionResponse) Set(val *DatabaseConnectionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatabaseConnectionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatabaseConnectionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatabaseConnectionResponse(val *DatabaseConnectionResponse) *NullableDatabaseConnectionResponse { + return &NullableDatabaseConnectionResponse{value: val, isSet: true} +} + +func (v NullableDatabaseConnectionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatabaseConnectionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_distribution.go new file mode 100644 index 0000000000..dfc9a5ee5c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_distribution.go @@ -0,0 +1,396 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the DebAptDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebAptDistribution{} + +// DebAptDistribution Serializer for AptDistributions. +type DebAptDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebAptDistribution DebAptDistribution + +// NewDebAptDistribution instantiates a new DebAptDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebAptDistribution(basePath string, name string) *DebAptDistribution { + this := DebAptDistribution{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + return &this +} + +// NewDebAptDistributionWithDefaults instantiates a new DebAptDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebAptDistributionWithDefaults() *DebAptDistribution { + this := DebAptDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value +func (o *DebAptDistribution) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *DebAptDistribution) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *DebAptDistribution) SetBasePath(v string) { + o.BasePath = v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *DebAptDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *DebAptDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *DebAptDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *DebAptDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *DebAptDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *DebAptDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *DebAptDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *DebAptDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *DebAptDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *DebAptDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *DebAptDistribution) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DebAptDistribution) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DebAptDistribution) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebAptDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *DebAptDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *DebAptDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *DebAptDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptDistribution) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptDistribution) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *DebAptDistribution) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *DebAptDistribution) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *DebAptDistribution) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *DebAptDistribution) UnsetPublication() { + o.Publication.Unset() +} + +func (o DebAptDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebAptDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["base_path"] = o.BasePath + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebAptDistribution) UnmarshalJSON(bytes []byte) (err error) { + varDebAptDistribution := _DebAptDistribution{} + + if err = json.Unmarshal(bytes, &varDebAptDistribution); err == nil { + *o = DebAptDistribution(varDebAptDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebAptDistribution struct { + value *DebAptDistribution + isSet bool +} + +func (v NullableDebAptDistribution) Get() *DebAptDistribution { + return v.value +} + +func (v *NullableDebAptDistribution) Set(val *DebAptDistribution) { + v.value = val + v.isSet = true +} + +func (v NullableDebAptDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullableDebAptDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebAptDistribution(val *DebAptDistribution) *NullableDebAptDistribution { + return &NullableDebAptDistribution{value: val, isSet: true} +} + +func (v NullableDebAptDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebAptDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_distribution_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_distribution_response.go new file mode 100644 index 0000000000..e1a29052ac --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_distribution_response.go @@ -0,0 +1,510 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebAptDistributionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebAptDistributionResponse{} + +// DebAptDistributionResponse Serializer for AptDistributions. +type DebAptDistributionResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // The URL for accessing the publication as defined by this distribution. + BaseUrl *string `json:"base_url,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebAptDistributionResponse DebAptDistributionResponse + +// NewDebAptDistributionResponse instantiates a new DebAptDistributionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebAptDistributionResponse(basePath string, name string) *DebAptDistributionResponse { + this := DebAptDistributionResponse{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + return &this +} + +// NewDebAptDistributionResponseWithDefaults instantiates a new DebAptDistributionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebAptDistributionResponseWithDefaults() *DebAptDistributionResponse { + this := DebAptDistributionResponse{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebAptDistributionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptDistributionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebAptDistributionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebAptDistributionResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebAptDistributionResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptDistributionResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebAptDistributionResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebAptDistributionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetBasePath returns the BasePath field value +func (o *DebAptDistributionResponse) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *DebAptDistributionResponse) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *DebAptDistributionResponse) SetBasePath(v string) { + o.BasePath = v +} + +// GetBaseUrl returns the BaseUrl field value if set, zero value otherwise. +func (o *DebAptDistributionResponse) GetBaseUrl() string { + if o == nil || IsNil(o.BaseUrl) { + var ret string + return ret + } + return *o.BaseUrl +} + +// GetBaseUrlOk returns a tuple with the BaseUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptDistributionResponse) GetBaseUrlOk() (*string, bool) { + if o == nil || IsNil(o.BaseUrl) { + return nil, false + } + return o.BaseUrl, true +} + +// HasBaseUrl returns a boolean if a field has been set. +func (o *DebAptDistributionResponse) HasBaseUrl() bool { + if o != nil && !IsNil(o.BaseUrl) { + return true + } + + return false +} + +// SetBaseUrl gets a reference to the given string and assigns it to the BaseUrl field. +func (o *DebAptDistributionResponse) SetBaseUrl(v string) { + o.BaseUrl = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptDistributionResponse) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptDistributionResponse) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *DebAptDistributionResponse) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *DebAptDistributionResponse) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *DebAptDistributionResponse) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *DebAptDistributionResponse) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *DebAptDistributionResponse) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptDistributionResponse) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *DebAptDistributionResponse) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *DebAptDistributionResponse) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *DebAptDistributionResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *DebAptDistributionResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *DebAptDistributionResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *DebAptDistributionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DebAptDistributionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DebAptDistributionResponse) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptDistributionResponse) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptDistributionResponse) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebAptDistributionResponse) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *DebAptDistributionResponse) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *DebAptDistributionResponse) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *DebAptDistributionResponse) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptDistributionResponse) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptDistributionResponse) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *DebAptDistributionResponse) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *DebAptDistributionResponse) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *DebAptDistributionResponse) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *DebAptDistributionResponse) UnsetPublication() { + o.Publication.Unset() +} + +func (o DebAptDistributionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebAptDistributionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["base_path"] = o.BasePath + if !IsNil(o.BaseUrl) { + toSerialize["base_url"] = o.BaseUrl + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebAptDistributionResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebAptDistributionResponse := _DebAptDistributionResponse{} + + if err = json.Unmarshal(bytes, &varDebAptDistributionResponse); err == nil { + *o = DebAptDistributionResponse(varDebAptDistributionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "base_path") + delete(additionalProperties, "base_url") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebAptDistributionResponse struct { + value *DebAptDistributionResponse + isSet bool +} + +func (v NullableDebAptDistributionResponse) Get() *DebAptDistributionResponse { + return v.value +} + +func (v *NullableDebAptDistributionResponse) Set(val *DebAptDistributionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebAptDistributionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebAptDistributionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebAptDistributionResponse(val *DebAptDistributionResponse) *NullableDebAptDistributionResponse { + return &NullableDebAptDistributionResponse{value: val, isSet: true} +} + +func (v NullableDebAptDistributionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebAptDistributionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_publication.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_publication.go new file mode 100644 index 0000000000..c4dd196de3 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_publication.go @@ -0,0 +1,312 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the DebAptPublication type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebAptPublication{} + +// DebAptPublication A Serializer for AptPublication. +type DebAptPublication struct { + RepositoryVersion *string `json:"repository_version,omitempty"` + // A URI of the repository to be published. + Repository *string `json:"repository,omitempty"` + // Activate simple publishing mode (all packages in one release component). + Simple *bool `json:"simple,omitempty"` + // Activate structured publishing mode. + Structured *bool `json:"structured,omitempty"` + // Sign Release files with this signing key + SigningService *string `json:"signing_service,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebAptPublication DebAptPublication + +// NewDebAptPublication instantiates a new DebAptPublication object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebAptPublication() *DebAptPublication { + this := DebAptPublication{} + var simple bool = false + this.Simple = &simple + var structured bool = false + this.Structured = &structured + return &this +} + +// NewDebAptPublicationWithDefaults instantiates a new DebAptPublication object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebAptPublicationWithDefaults() *DebAptPublication { + this := DebAptPublication{} + var simple bool = false + this.Simple = &simple + var structured bool = false + this.Structured = &structured + return &this +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *DebAptPublication) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptPublication) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *DebAptPublication) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *DebAptPublication) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebAptPublication) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptPublication) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebAptPublication) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebAptPublication) SetRepository(v string) { + o.Repository = &v +} + +// GetSimple returns the Simple field value if set, zero value otherwise. +func (o *DebAptPublication) GetSimple() bool { + if o == nil || IsNil(o.Simple) { + var ret bool + return ret + } + return *o.Simple +} + +// GetSimpleOk returns a tuple with the Simple field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptPublication) GetSimpleOk() (*bool, bool) { + if o == nil || IsNil(o.Simple) { + return nil, false + } + return o.Simple, true +} + +// HasSimple returns a boolean if a field has been set. +func (o *DebAptPublication) HasSimple() bool { + if o != nil && !IsNil(o.Simple) { + return true + } + + return false +} + +// SetSimple gets a reference to the given bool and assigns it to the Simple field. +func (o *DebAptPublication) SetSimple(v bool) { + o.Simple = &v +} + +// GetStructured returns the Structured field value if set, zero value otherwise. +func (o *DebAptPublication) GetStructured() bool { + if o == nil || IsNil(o.Structured) { + var ret bool + return ret + } + return *o.Structured +} + +// GetStructuredOk returns a tuple with the Structured field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptPublication) GetStructuredOk() (*bool, bool) { + if o == nil || IsNil(o.Structured) { + return nil, false + } + return o.Structured, true +} + +// HasStructured returns a boolean if a field has been set. +func (o *DebAptPublication) HasStructured() bool { + if o != nil && !IsNil(o.Structured) { + return true + } + + return false +} + +// SetStructured gets a reference to the given bool and assigns it to the Structured field. +func (o *DebAptPublication) SetStructured(v bool) { + o.Structured = &v +} + +// GetSigningService returns the SigningService field value if set, zero value otherwise. +func (o *DebAptPublication) GetSigningService() string { + if o == nil || IsNil(o.SigningService) { + var ret string + return ret + } + return *o.SigningService +} + +// GetSigningServiceOk returns a tuple with the SigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptPublication) GetSigningServiceOk() (*string, bool) { + if o == nil || IsNil(o.SigningService) { + return nil, false + } + return o.SigningService, true +} + +// HasSigningService returns a boolean if a field has been set. +func (o *DebAptPublication) HasSigningService() bool { + if o != nil && !IsNil(o.SigningService) { + return true + } + + return false +} + +// SetSigningService gets a reference to the given string and assigns it to the SigningService field. +func (o *DebAptPublication) SetSigningService(v string) { + o.SigningService = &v +} + +func (o DebAptPublication) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebAptPublication) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.Simple) { + toSerialize["simple"] = o.Simple + } + if !IsNil(o.Structured) { + toSerialize["structured"] = o.Structured + } + if !IsNil(o.SigningService) { + toSerialize["signing_service"] = o.SigningService + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebAptPublication) UnmarshalJSON(bytes []byte) (err error) { + varDebAptPublication := _DebAptPublication{} + + if err = json.Unmarshal(bytes, &varDebAptPublication); err == nil { + *o = DebAptPublication(varDebAptPublication) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository_version") + delete(additionalProperties, "repository") + delete(additionalProperties, "simple") + delete(additionalProperties, "structured") + delete(additionalProperties, "signing_service") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebAptPublication struct { + value *DebAptPublication + isSet bool +} + +func (v NullableDebAptPublication) Get() *DebAptPublication { + return v.value +} + +func (v *NullableDebAptPublication) Set(val *DebAptPublication) { + v.value = val + v.isSet = true +} + +func (v NullableDebAptPublication) IsSet() bool { + return v.isSet +} + +func (v *NullableDebAptPublication) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebAptPublication(val *DebAptPublication) *NullableDebAptPublication { + return &NullableDebAptPublication{value: val, isSet: true} +} + +func (v NullableDebAptPublication) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebAptPublication) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_publication_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_publication_response.go new file mode 100644 index 0000000000..dfc09a731e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_publication_response.go @@ -0,0 +1,388 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebAptPublicationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebAptPublicationResponse{} + +// DebAptPublicationResponse A Serializer for AptPublication. +type DebAptPublicationResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + RepositoryVersion *string `json:"repository_version,omitempty"` + // A URI of the repository to be published. + Repository *string `json:"repository,omitempty"` + // Activate simple publishing mode (all packages in one release component). + Simple *bool `json:"simple,omitempty"` + // Activate structured publishing mode. + Structured *bool `json:"structured,omitempty"` + // Sign Release files with this signing key + SigningService *string `json:"signing_service,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebAptPublicationResponse DebAptPublicationResponse + +// NewDebAptPublicationResponse instantiates a new DebAptPublicationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebAptPublicationResponse() *DebAptPublicationResponse { + this := DebAptPublicationResponse{} + var simple bool = false + this.Simple = &simple + var structured bool = false + this.Structured = &structured + return &this +} + +// NewDebAptPublicationResponseWithDefaults instantiates a new DebAptPublicationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebAptPublicationResponseWithDefaults() *DebAptPublicationResponse { + this := DebAptPublicationResponse{} + var simple bool = false + this.Simple = &simple + var structured bool = false + this.Structured = &structured + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebAptPublicationResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptPublicationResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebAptPublicationResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebAptPublicationResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebAptPublicationResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptPublicationResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebAptPublicationResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebAptPublicationResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *DebAptPublicationResponse) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptPublicationResponse) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *DebAptPublicationResponse) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *DebAptPublicationResponse) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebAptPublicationResponse) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptPublicationResponse) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebAptPublicationResponse) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebAptPublicationResponse) SetRepository(v string) { + o.Repository = &v +} + +// GetSimple returns the Simple field value if set, zero value otherwise. +func (o *DebAptPublicationResponse) GetSimple() bool { + if o == nil || IsNil(o.Simple) { + var ret bool + return ret + } + return *o.Simple +} + +// GetSimpleOk returns a tuple with the Simple field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptPublicationResponse) GetSimpleOk() (*bool, bool) { + if o == nil || IsNil(o.Simple) { + return nil, false + } + return o.Simple, true +} + +// HasSimple returns a boolean if a field has been set. +func (o *DebAptPublicationResponse) HasSimple() bool { + if o != nil && !IsNil(o.Simple) { + return true + } + + return false +} + +// SetSimple gets a reference to the given bool and assigns it to the Simple field. +func (o *DebAptPublicationResponse) SetSimple(v bool) { + o.Simple = &v +} + +// GetStructured returns the Structured field value if set, zero value otherwise. +func (o *DebAptPublicationResponse) GetStructured() bool { + if o == nil || IsNil(o.Structured) { + var ret bool + return ret + } + return *o.Structured +} + +// GetStructuredOk returns a tuple with the Structured field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptPublicationResponse) GetStructuredOk() (*bool, bool) { + if o == nil || IsNil(o.Structured) { + return nil, false + } + return o.Structured, true +} + +// HasStructured returns a boolean if a field has been set. +func (o *DebAptPublicationResponse) HasStructured() bool { + if o != nil && !IsNil(o.Structured) { + return true + } + + return false +} + +// SetStructured gets a reference to the given bool and assigns it to the Structured field. +func (o *DebAptPublicationResponse) SetStructured(v bool) { + o.Structured = &v +} + +// GetSigningService returns the SigningService field value if set, zero value otherwise. +func (o *DebAptPublicationResponse) GetSigningService() string { + if o == nil || IsNil(o.SigningService) { + var ret string + return ret + } + return *o.SigningService +} + +// GetSigningServiceOk returns a tuple with the SigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptPublicationResponse) GetSigningServiceOk() (*string, bool) { + if o == nil || IsNil(o.SigningService) { + return nil, false + } + return o.SigningService, true +} + +// HasSigningService returns a boolean if a field has been set. +func (o *DebAptPublicationResponse) HasSigningService() bool { + if o != nil && !IsNil(o.SigningService) { + return true + } + + return false +} + +// SetSigningService gets a reference to the given string and assigns it to the SigningService field. +func (o *DebAptPublicationResponse) SetSigningService(v string) { + o.SigningService = &v +} + +func (o DebAptPublicationResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebAptPublicationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.Simple) { + toSerialize["simple"] = o.Simple + } + if !IsNil(o.Structured) { + toSerialize["structured"] = o.Structured + } + if !IsNil(o.SigningService) { + toSerialize["signing_service"] = o.SigningService + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebAptPublicationResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebAptPublicationResponse := _DebAptPublicationResponse{} + + if err = json.Unmarshal(bytes, &varDebAptPublicationResponse); err == nil { + *o = DebAptPublicationResponse(varDebAptPublicationResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "repository") + delete(additionalProperties, "simple") + delete(additionalProperties, "structured") + delete(additionalProperties, "signing_service") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebAptPublicationResponse struct { + value *DebAptPublicationResponse + isSet bool +} + +func (v NullableDebAptPublicationResponse) Get() *DebAptPublicationResponse { + return v.value +} + +func (v *NullableDebAptPublicationResponse) Set(val *DebAptPublicationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebAptPublicationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebAptPublicationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebAptPublicationResponse(val *DebAptPublicationResponse) *NullableDebAptPublicationResponse { + return &NullableDebAptPublicationResponse{value: val, isSet: true} +} + +func (v NullableDebAptPublicationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebAptPublicationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_remote.go new file mode 100644 index 0000000000..ddc5a421b5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_remote.go @@ -0,0 +1,1372 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the DebAptRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebAptRemote{} + +// DebAptRemote A Serializer for AptRemote. +type DebAptRemote struct { + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // Whitespace separated list of distributions to sync. The distribution is the path from the repository root to the \"Release\" file you want to access. This is often, but not always, equal to either the codename or the suite of the release you want to sync. If the repository you are trying to sync uses \"flat repository format\", the distribution must end with a \"/\". Based on \"/etc/apt/sources.list\" syntax. + Distributions string `json:"distributions"` + // Whitespace separatet list of components to sync. If none are supplied, all that are available will be synchronized. Leave blank for repositores using \"flat repository format\". + Components NullableString `json:"components,omitempty"` + // Whitespace separated list of architectures to sync If none are supplied, all that are available will be synchronized. A list of valid architecture specification strings can be found by running \"dpkg-architecture -L\". A sync will download the intersection of the list of architectures provided via this field and those provided by the relevant \"Release\" file. Architecture=\"all\" is always synchronized and does not need to be provided here. + Architectures NullableString `json:"architectures,omitempty"` + // Sync source packages + SyncSources *bool `json:"sync_sources,omitempty"` + // Sync installer packages + SyncUdebs *bool `json:"sync_udebs,omitempty"` + // Sync installer files + SyncInstaller *bool `json:"sync_installer,omitempty"` + // Gpg public key to verify origin releases against + Gpgkey NullableString `json:"gpgkey,omitempty"` + // By default, upstream repositories that declare architectures and corresponding package indices in their Release files without actually publishing them, will fail to synchronize. Set this flag to True to allow the synchronization of such \"partial mirrors\" instead. Alternatively, you could make your remote filter by architectures for which the upstream repository does have indices. + IgnoreMissingPackageIndices *bool `json:"ignore_missing_package_indices,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebAptRemote DebAptRemote + +// NewDebAptRemote instantiates a new DebAptRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebAptRemote(name string, url string, distributions string) *DebAptRemote { + this := DebAptRemote{} + this.Name = name + this.Url = url + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + this.Distributions = distributions + return &this +} + +// NewDebAptRemoteWithDefaults instantiates a new DebAptRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebAptRemoteWithDefaults() *DebAptRemote { + this := DebAptRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value +func (o *DebAptRemote) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DebAptRemote) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DebAptRemote) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *DebAptRemote) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *DebAptRemote) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *DebAptRemote) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *DebAptRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *DebAptRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *DebAptRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *DebAptRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *DebAptRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *DebAptRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *DebAptRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *DebAptRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *DebAptRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *DebAptRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *DebAptRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *DebAptRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *DebAptRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *DebAptRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *DebAptRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *DebAptRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *DebAptRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *DebAptRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *DebAptRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *DebAptRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *DebAptRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *DebAptRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *DebAptRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *DebAptRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *DebAptRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *DebAptRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *DebAptRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *DebAptRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *DebAptRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *DebAptRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *DebAptRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *DebAptRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *DebAptRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *DebAptRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *DebAptRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *DebAptRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *DebAptRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *DebAptRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *DebAptRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *DebAptRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *DebAptRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *DebAptRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *DebAptRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *DebAptRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *DebAptRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *DebAptRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *DebAptRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *DebAptRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *DebAptRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *DebAptRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *DebAptRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *DebAptRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *DebAptRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *DebAptRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *DebAptRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *DebAptRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *DebAptRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *DebAptRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *DebAptRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *DebAptRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *DebAptRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *DebAptRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *DebAptRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *DebAptRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *DebAptRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *DebAptRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *DebAptRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *DebAptRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *DebAptRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *DebAptRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *DebAptRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *DebAptRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetDistributions returns the Distributions field value +func (o *DebAptRemote) GetDistributions() string { + if o == nil { + var ret string + return ret + } + + return o.Distributions +} + +// GetDistributionsOk returns a tuple with the Distributions field value +// and a boolean to check if the value has been set. +func (o *DebAptRemote) GetDistributionsOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Distributions, true +} + +// SetDistributions sets field value +func (o *DebAptRemote) SetDistributions(v string) { + o.Distributions = v +} + +// GetComponents returns the Components field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetComponents() string { + if o == nil || IsNil(o.Components.Get()) { + var ret string + return ret + } + return *o.Components.Get() +} + +// GetComponentsOk returns a tuple with the Components field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetComponentsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Components.Get(), o.Components.IsSet() +} + +// HasComponents returns a boolean if a field has been set. +func (o *DebAptRemote) HasComponents() bool { + if o != nil && o.Components.IsSet() { + return true + } + + return false +} + +// SetComponents gets a reference to the given NullableString and assigns it to the Components field. +func (o *DebAptRemote) SetComponents(v string) { + o.Components.Set(&v) +} +// SetComponentsNil sets the value for Components to be an explicit nil +func (o *DebAptRemote) SetComponentsNil() { + o.Components.Set(nil) +} + +// UnsetComponents ensures that no value is present for Components, not even an explicit nil +func (o *DebAptRemote) UnsetComponents() { + o.Components.Unset() +} + +// GetArchitectures returns the Architectures field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetArchitectures() string { + if o == nil || IsNil(o.Architectures.Get()) { + var ret string + return ret + } + return *o.Architectures.Get() +} + +// GetArchitecturesOk returns a tuple with the Architectures field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetArchitecturesOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Architectures.Get(), o.Architectures.IsSet() +} + +// HasArchitectures returns a boolean if a field has been set. +func (o *DebAptRemote) HasArchitectures() bool { + if o != nil && o.Architectures.IsSet() { + return true + } + + return false +} + +// SetArchitectures gets a reference to the given NullableString and assigns it to the Architectures field. +func (o *DebAptRemote) SetArchitectures(v string) { + o.Architectures.Set(&v) +} +// SetArchitecturesNil sets the value for Architectures to be an explicit nil +func (o *DebAptRemote) SetArchitecturesNil() { + o.Architectures.Set(nil) +} + +// UnsetArchitectures ensures that no value is present for Architectures, not even an explicit nil +func (o *DebAptRemote) UnsetArchitectures() { + o.Architectures.Unset() +} + +// GetSyncSources returns the SyncSources field value if set, zero value otherwise. +func (o *DebAptRemote) GetSyncSources() bool { + if o == nil || IsNil(o.SyncSources) { + var ret bool + return ret + } + return *o.SyncSources +} + +// GetSyncSourcesOk returns a tuple with the SyncSources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemote) GetSyncSourcesOk() (*bool, bool) { + if o == nil || IsNil(o.SyncSources) { + return nil, false + } + return o.SyncSources, true +} + +// HasSyncSources returns a boolean if a field has been set. +func (o *DebAptRemote) HasSyncSources() bool { + if o != nil && !IsNil(o.SyncSources) { + return true + } + + return false +} + +// SetSyncSources gets a reference to the given bool and assigns it to the SyncSources field. +func (o *DebAptRemote) SetSyncSources(v bool) { + o.SyncSources = &v +} + +// GetSyncUdebs returns the SyncUdebs field value if set, zero value otherwise. +func (o *DebAptRemote) GetSyncUdebs() bool { + if o == nil || IsNil(o.SyncUdebs) { + var ret bool + return ret + } + return *o.SyncUdebs +} + +// GetSyncUdebsOk returns a tuple with the SyncUdebs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemote) GetSyncUdebsOk() (*bool, bool) { + if o == nil || IsNil(o.SyncUdebs) { + return nil, false + } + return o.SyncUdebs, true +} + +// HasSyncUdebs returns a boolean if a field has been set. +func (o *DebAptRemote) HasSyncUdebs() bool { + if o != nil && !IsNil(o.SyncUdebs) { + return true + } + + return false +} + +// SetSyncUdebs gets a reference to the given bool and assigns it to the SyncUdebs field. +func (o *DebAptRemote) SetSyncUdebs(v bool) { + o.SyncUdebs = &v +} + +// GetSyncInstaller returns the SyncInstaller field value if set, zero value otherwise. +func (o *DebAptRemote) GetSyncInstaller() bool { + if o == nil || IsNil(o.SyncInstaller) { + var ret bool + return ret + } + return *o.SyncInstaller +} + +// GetSyncInstallerOk returns a tuple with the SyncInstaller field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemote) GetSyncInstallerOk() (*bool, bool) { + if o == nil || IsNil(o.SyncInstaller) { + return nil, false + } + return o.SyncInstaller, true +} + +// HasSyncInstaller returns a boolean if a field has been set. +func (o *DebAptRemote) HasSyncInstaller() bool { + if o != nil && !IsNil(o.SyncInstaller) { + return true + } + + return false +} + +// SetSyncInstaller gets a reference to the given bool and assigns it to the SyncInstaller field. +func (o *DebAptRemote) SetSyncInstaller(v bool) { + o.SyncInstaller = &v +} + +// GetGpgkey returns the Gpgkey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemote) GetGpgkey() string { + if o == nil || IsNil(o.Gpgkey.Get()) { + var ret string + return ret + } + return *o.Gpgkey.Get() +} + +// GetGpgkeyOk returns a tuple with the Gpgkey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemote) GetGpgkeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Gpgkey.Get(), o.Gpgkey.IsSet() +} + +// HasGpgkey returns a boolean if a field has been set. +func (o *DebAptRemote) HasGpgkey() bool { + if o != nil && o.Gpgkey.IsSet() { + return true + } + + return false +} + +// SetGpgkey gets a reference to the given NullableString and assigns it to the Gpgkey field. +func (o *DebAptRemote) SetGpgkey(v string) { + o.Gpgkey.Set(&v) +} +// SetGpgkeyNil sets the value for Gpgkey to be an explicit nil +func (o *DebAptRemote) SetGpgkeyNil() { + o.Gpgkey.Set(nil) +} + +// UnsetGpgkey ensures that no value is present for Gpgkey, not even an explicit nil +func (o *DebAptRemote) UnsetGpgkey() { + o.Gpgkey.Unset() +} + +// GetIgnoreMissingPackageIndices returns the IgnoreMissingPackageIndices field value if set, zero value otherwise. +func (o *DebAptRemote) GetIgnoreMissingPackageIndices() bool { + if o == nil || IsNil(o.IgnoreMissingPackageIndices) { + var ret bool + return ret + } + return *o.IgnoreMissingPackageIndices +} + +// GetIgnoreMissingPackageIndicesOk returns a tuple with the IgnoreMissingPackageIndices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemote) GetIgnoreMissingPackageIndicesOk() (*bool, bool) { + if o == nil || IsNil(o.IgnoreMissingPackageIndices) { + return nil, false + } + return o.IgnoreMissingPackageIndices, true +} + +// HasIgnoreMissingPackageIndices returns a boolean if a field has been set. +func (o *DebAptRemote) HasIgnoreMissingPackageIndices() bool { + if o != nil && !IsNil(o.IgnoreMissingPackageIndices) { + return true + } + + return false +} + +// SetIgnoreMissingPackageIndices gets a reference to the given bool and assigns it to the IgnoreMissingPackageIndices field. +func (o *DebAptRemote) SetIgnoreMissingPackageIndices(v bool) { + o.IgnoreMissingPackageIndices = &v +} + +func (o DebAptRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebAptRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + toSerialize["distributions"] = o.Distributions + if o.Components.IsSet() { + toSerialize["components"] = o.Components.Get() + } + if o.Architectures.IsSet() { + toSerialize["architectures"] = o.Architectures.Get() + } + if !IsNil(o.SyncSources) { + toSerialize["sync_sources"] = o.SyncSources + } + if !IsNil(o.SyncUdebs) { + toSerialize["sync_udebs"] = o.SyncUdebs + } + if !IsNil(o.SyncInstaller) { + toSerialize["sync_installer"] = o.SyncInstaller + } + if o.Gpgkey.IsSet() { + toSerialize["gpgkey"] = o.Gpgkey.Get() + } + if !IsNil(o.IgnoreMissingPackageIndices) { + toSerialize["ignore_missing_package_indices"] = o.IgnoreMissingPackageIndices + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebAptRemote) UnmarshalJSON(bytes []byte) (err error) { + varDebAptRemote := _DebAptRemote{} + + if err = json.Unmarshal(bytes, &varDebAptRemote); err == nil { + *o = DebAptRemote(varDebAptRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "distributions") + delete(additionalProperties, "components") + delete(additionalProperties, "architectures") + delete(additionalProperties, "sync_sources") + delete(additionalProperties, "sync_udebs") + delete(additionalProperties, "sync_installer") + delete(additionalProperties, "gpgkey") + delete(additionalProperties, "ignore_missing_package_indices") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebAptRemote struct { + value *DebAptRemote + isSet bool +} + +func (v NullableDebAptRemote) Get() *DebAptRemote { + return v.value +} + +func (v *NullableDebAptRemote) Set(val *DebAptRemote) { + v.value = val + v.isSet = true +} + +func (v NullableDebAptRemote) IsSet() bool { + return v.isSet +} + +func (v *NullableDebAptRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebAptRemote(val *DebAptRemote) *NullableDebAptRemote { + return &NullableDebAptRemote{value: val, isSet: true} +} + +func (v NullableDebAptRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebAptRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_remote_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_remote_response.go new file mode 100644 index 0000000000..2690d928c0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_remote_response.go @@ -0,0 +1,1284 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebAptRemoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebAptRemoteResponse{} + +// DebAptRemoteResponse A Serializer for AptRemote. +type DebAptRemoteResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + // Whitespace separated list of distributions to sync. The distribution is the path from the repository root to the \"Release\" file you want to access. This is often, but not always, equal to either the codename or the suite of the release you want to sync. If the repository you are trying to sync uses \"flat repository format\", the distribution must end with a \"/\". Based on \"/etc/apt/sources.list\" syntax. + Distributions string `json:"distributions"` + // Whitespace separatet list of components to sync. If none are supplied, all that are available will be synchronized. Leave blank for repositores using \"flat repository format\". + Components NullableString `json:"components,omitempty"` + // Whitespace separated list of architectures to sync If none are supplied, all that are available will be synchronized. A list of valid architecture specification strings can be found by running \"dpkg-architecture -L\". A sync will download the intersection of the list of architectures provided via this field and those provided by the relevant \"Release\" file. Architecture=\"all\" is always synchronized and does not need to be provided here. + Architectures NullableString `json:"architectures,omitempty"` + // Sync source packages + SyncSources *bool `json:"sync_sources,omitempty"` + // Sync installer packages + SyncUdebs *bool `json:"sync_udebs,omitempty"` + // Sync installer files + SyncInstaller *bool `json:"sync_installer,omitempty"` + // Gpg public key to verify origin releases against + Gpgkey NullableString `json:"gpgkey,omitempty"` + // By default, upstream repositories that declare architectures and corresponding package indices in their Release files without actually publishing them, will fail to synchronize. Set this flag to True to allow the synchronization of such \"partial mirrors\" instead. Alternatively, you could make your remote filter by architectures for which the upstream repository does have indices. + IgnoreMissingPackageIndices *bool `json:"ignore_missing_package_indices,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebAptRemoteResponse DebAptRemoteResponse + +// NewDebAptRemoteResponse instantiates a new DebAptRemoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebAptRemoteResponse(name string, url string, distributions string) *DebAptRemoteResponse { + this := DebAptRemoteResponse{} + this.Name = name + this.Url = url + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + this.Distributions = distributions + return &this +} + +// NewDebAptRemoteResponseWithDefaults instantiates a new DebAptRemoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebAptRemoteResponseWithDefaults() *DebAptRemoteResponse { + this := DebAptRemoteResponse{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebAptRemoteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebAptRemoteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebAptRemoteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebAptRemoteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *DebAptRemoteResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DebAptRemoteResponse) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *DebAptRemoteResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *DebAptRemoteResponse) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemoteResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemoteResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *DebAptRemoteResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *DebAptRemoteResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *DebAptRemoteResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemoteResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemoteResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *DebAptRemoteResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *DebAptRemoteResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *DebAptRemoteResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *DebAptRemoteResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *DebAptRemoteResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemoteResponse) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemoteResponse) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *DebAptRemoteResponse) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *DebAptRemoteResponse) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *DebAptRemoteResponse) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *DebAptRemoteResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *DebAptRemoteResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *DebAptRemoteResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *DebAptRemoteResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemoteResponse) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemoteResponse) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *DebAptRemoteResponse) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *DebAptRemoteResponse) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *DebAptRemoteResponse) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemoteResponse) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemoteResponse) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *DebAptRemoteResponse) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *DebAptRemoteResponse) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *DebAptRemoteResponse) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *DebAptRemoteResponse) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *DebAptRemoteResponse) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemoteResponse) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemoteResponse) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *DebAptRemoteResponse) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *DebAptRemoteResponse) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *DebAptRemoteResponse) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemoteResponse) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemoteResponse) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *DebAptRemoteResponse) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *DebAptRemoteResponse) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *DebAptRemoteResponse) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemoteResponse) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemoteResponse) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *DebAptRemoteResponse) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *DebAptRemoteResponse) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *DebAptRemoteResponse) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemoteResponse) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemoteResponse) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *DebAptRemoteResponse) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *DebAptRemoteResponse) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *DebAptRemoteResponse) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *DebAptRemoteResponse) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *DebAptRemoteResponse) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemoteResponse) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemoteResponse) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *DebAptRemoteResponse) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *DebAptRemoteResponse) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *DebAptRemoteResponse) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *DebAptRemoteResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *DebAptRemoteResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +// GetDistributions returns the Distributions field value +func (o *DebAptRemoteResponse) GetDistributions() string { + if o == nil { + var ret string + return ret + } + + return o.Distributions +} + +// GetDistributionsOk returns a tuple with the Distributions field value +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetDistributionsOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Distributions, true +} + +// SetDistributions sets field value +func (o *DebAptRemoteResponse) SetDistributions(v string) { + o.Distributions = v +} + +// GetComponents returns the Components field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemoteResponse) GetComponents() string { + if o == nil || IsNil(o.Components.Get()) { + var ret string + return ret + } + return *o.Components.Get() +} + +// GetComponentsOk returns a tuple with the Components field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemoteResponse) GetComponentsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Components.Get(), o.Components.IsSet() +} + +// HasComponents returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasComponents() bool { + if o != nil && o.Components.IsSet() { + return true + } + + return false +} + +// SetComponents gets a reference to the given NullableString and assigns it to the Components field. +func (o *DebAptRemoteResponse) SetComponents(v string) { + o.Components.Set(&v) +} +// SetComponentsNil sets the value for Components to be an explicit nil +func (o *DebAptRemoteResponse) SetComponentsNil() { + o.Components.Set(nil) +} + +// UnsetComponents ensures that no value is present for Components, not even an explicit nil +func (o *DebAptRemoteResponse) UnsetComponents() { + o.Components.Unset() +} + +// GetArchitectures returns the Architectures field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemoteResponse) GetArchitectures() string { + if o == nil || IsNil(o.Architectures.Get()) { + var ret string + return ret + } + return *o.Architectures.Get() +} + +// GetArchitecturesOk returns a tuple with the Architectures field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemoteResponse) GetArchitecturesOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Architectures.Get(), o.Architectures.IsSet() +} + +// HasArchitectures returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasArchitectures() bool { + if o != nil && o.Architectures.IsSet() { + return true + } + + return false +} + +// SetArchitectures gets a reference to the given NullableString and assigns it to the Architectures field. +func (o *DebAptRemoteResponse) SetArchitectures(v string) { + o.Architectures.Set(&v) +} +// SetArchitecturesNil sets the value for Architectures to be an explicit nil +func (o *DebAptRemoteResponse) SetArchitecturesNil() { + o.Architectures.Set(nil) +} + +// UnsetArchitectures ensures that no value is present for Architectures, not even an explicit nil +func (o *DebAptRemoteResponse) UnsetArchitectures() { + o.Architectures.Unset() +} + +// GetSyncSources returns the SyncSources field value if set, zero value otherwise. +func (o *DebAptRemoteResponse) GetSyncSources() bool { + if o == nil || IsNil(o.SyncSources) { + var ret bool + return ret + } + return *o.SyncSources +} + +// GetSyncSourcesOk returns a tuple with the SyncSources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetSyncSourcesOk() (*bool, bool) { + if o == nil || IsNil(o.SyncSources) { + return nil, false + } + return o.SyncSources, true +} + +// HasSyncSources returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasSyncSources() bool { + if o != nil && !IsNil(o.SyncSources) { + return true + } + + return false +} + +// SetSyncSources gets a reference to the given bool and assigns it to the SyncSources field. +func (o *DebAptRemoteResponse) SetSyncSources(v bool) { + o.SyncSources = &v +} + +// GetSyncUdebs returns the SyncUdebs field value if set, zero value otherwise. +func (o *DebAptRemoteResponse) GetSyncUdebs() bool { + if o == nil || IsNil(o.SyncUdebs) { + var ret bool + return ret + } + return *o.SyncUdebs +} + +// GetSyncUdebsOk returns a tuple with the SyncUdebs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetSyncUdebsOk() (*bool, bool) { + if o == nil || IsNil(o.SyncUdebs) { + return nil, false + } + return o.SyncUdebs, true +} + +// HasSyncUdebs returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasSyncUdebs() bool { + if o != nil && !IsNil(o.SyncUdebs) { + return true + } + + return false +} + +// SetSyncUdebs gets a reference to the given bool and assigns it to the SyncUdebs field. +func (o *DebAptRemoteResponse) SetSyncUdebs(v bool) { + o.SyncUdebs = &v +} + +// GetSyncInstaller returns the SyncInstaller field value if set, zero value otherwise. +func (o *DebAptRemoteResponse) GetSyncInstaller() bool { + if o == nil || IsNil(o.SyncInstaller) { + var ret bool + return ret + } + return *o.SyncInstaller +} + +// GetSyncInstallerOk returns a tuple with the SyncInstaller field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetSyncInstallerOk() (*bool, bool) { + if o == nil || IsNil(o.SyncInstaller) { + return nil, false + } + return o.SyncInstaller, true +} + +// HasSyncInstaller returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasSyncInstaller() bool { + if o != nil && !IsNil(o.SyncInstaller) { + return true + } + + return false +} + +// SetSyncInstaller gets a reference to the given bool and assigns it to the SyncInstaller field. +func (o *DebAptRemoteResponse) SetSyncInstaller(v bool) { + o.SyncInstaller = &v +} + +// GetGpgkey returns the Gpgkey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRemoteResponse) GetGpgkey() string { + if o == nil || IsNil(o.Gpgkey.Get()) { + var ret string + return ret + } + return *o.Gpgkey.Get() +} + +// GetGpgkeyOk returns a tuple with the Gpgkey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRemoteResponse) GetGpgkeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Gpgkey.Get(), o.Gpgkey.IsSet() +} + +// HasGpgkey returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasGpgkey() bool { + if o != nil && o.Gpgkey.IsSet() { + return true + } + + return false +} + +// SetGpgkey gets a reference to the given NullableString and assigns it to the Gpgkey field. +func (o *DebAptRemoteResponse) SetGpgkey(v string) { + o.Gpgkey.Set(&v) +} +// SetGpgkeyNil sets the value for Gpgkey to be an explicit nil +func (o *DebAptRemoteResponse) SetGpgkeyNil() { + o.Gpgkey.Set(nil) +} + +// UnsetGpgkey ensures that no value is present for Gpgkey, not even an explicit nil +func (o *DebAptRemoteResponse) UnsetGpgkey() { + o.Gpgkey.Unset() +} + +// GetIgnoreMissingPackageIndices returns the IgnoreMissingPackageIndices field value if set, zero value otherwise. +func (o *DebAptRemoteResponse) GetIgnoreMissingPackageIndices() bool { + if o == nil || IsNil(o.IgnoreMissingPackageIndices) { + var ret bool + return ret + } + return *o.IgnoreMissingPackageIndices +} + +// GetIgnoreMissingPackageIndicesOk returns a tuple with the IgnoreMissingPackageIndices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRemoteResponse) GetIgnoreMissingPackageIndicesOk() (*bool, bool) { + if o == nil || IsNil(o.IgnoreMissingPackageIndices) { + return nil, false + } + return o.IgnoreMissingPackageIndices, true +} + +// HasIgnoreMissingPackageIndices returns a boolean if a field has been set. +func (o *DebAptRemoteResponse) HasIgnoreMissingPackageIndices() bool { + if o != nil && !IsNil(o.IgnoreMissingPackageIndices) { + return true + } + + return false +} + +// SetIgnoreMissingPackageIndices gets a reference to the given bool and assigns it to the IgnoreMissingPackageIndices field. +func (o *DebAptRemoteResponse) SetIgnoreMissingPackageIndices(v bool) { + o.IgnoreMissingPackageIndices = &v +} + +func (o DebAptRemoteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebAptRemoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + toSerialize["distributions"] = o.Distributions + if o.Components.IsSet() { + toSerialize["components"] = o.Components.Get() + } + if o.Architectures.IsSet() { + toSerialize["architectures"] = o.Architectures.Get() + } + if !IsNil(o.SyncSources) { + toSerialize["sync_sources"] = o.SyncSources + } + if !IsNil(o.SyncUdebs) { + toSerialize["sync_udebs"] = o.SyncUdebs + } + if !IsNil(o.SyncInstaller) { + toSerialize["sync_installer"] = o.SyncInstaller + } + if o.Gpgkey.IsSet() { + toSerialize["gpgkey"] = o.Gpgkey.Get() + } + if !IsNil(o.IgnoreMissingPackageIndices) { + toSerialize["ignore_missing_package_indices"] = o.IgnoreMissingPackageIndices + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebAptRemoteResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebAptRemoteResponse := _DebAptRemoteResponse{} + + if err = json.Unmarshal(bytes, &varDebAptRemoteResponse); err == nil { + *o = DebAptRemoteResponse(varDebAptRemoteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "hidden_fields") + delete(additionalProperties, "distributions") + delete(additionalProperties, "components") + delete(additionalProperties, "architectures") + delete(additionalProperties, "sync_sources") + delete(additionalProperties, "sync_udebs") + delete(additionalProperties, "sync_installer") + delete(additionalProperties, "gpgkey") + delete(additionalProperties, "ignore_missing_package_indices") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebAptRemoteResponse struct { + value *DebAptRemoteResponse + isSet bool +} + +func (v NullableDebAptRemoteResponse) Get() *DebAptRemoteResponse { + return v.value +} + +func (v *NullableDebAptRemoteResponse) Set(val *DebAptRemoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebAptRemoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebAptRemoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebAptRemoteResponse(val *DebAptRemoteResponse) *NullableDebAptRemoteResponse { + return &NullableDebAptRemoteResponse{value: val, isSet: true} +} + +func (v NullableDebAptRemoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebAptRemoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_repository.go new file mode 100644 index 0000000000..f02b1b535f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_repository.go @@ -0,0 +1,325 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the DebAptRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebAptRepository{} + +// DebAptRepository A Serializer for AptRepository. +type DebAptRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebAptRepository DebAptRepository + +// NewDebAptRepository instantiates a new DebAptRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebAptRepository(name string) *DebAptRepository { + this := DebAptRepository{} + this.Name = name + return &this +} + +// NewDebAptRepositoryWithDefaults instantiates a new DebAptRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebAptRepositoryWithDefaults() *DebAptRepository { + this := DebAptRepository{} + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *DebAptRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *DebAptRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *DebAptRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *DebAptRepository) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DebAptRepository) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DebAptRepository) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *DebAptRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *DebAptRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *DebAptRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *DebAptRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *DebAptRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *DebAptRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *DebAptRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *DebAptRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *DebAptRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *DebAptRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *DebAptRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *DebAptRepository) UnsetRemote() { + o.Remote.Unset() +} + +func (o DebAptRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebAptRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebAptRepository) UnmarshalJSON(bytes []byte) (err error) { + varDebAptRepository := _DebAptRepository{} + + if err = json.Unmarshal(bytes, &varDebAptRepository); err == nil { + *o = DebAptRepository(varDebAptRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebAptRepository struct { + value *DebAptRepository + isSet bool +} + +func (v NullableDebAptRepository) Get() *DebAptRepository { + return v.value +} + +func (v *NullableDebAptRepository) Set(val *DebAptRepository) { + v.value = val + v.isSet = true +} + +func (v NullableDebAptRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableDebAptRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebAptRepository(val *DebAptRepository) *NullableDebAptRepository { + return &NullableDebAptRepository{value: val, isSet: true} +} + +func (v NullableDebAptRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebAptRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_repository_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_repository_response.go new file mode 100644 index 0000000000..8cb110c54c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_apt_repository_response.go @@ -0,0 +1,475 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebAptRepositoryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebAptRepositoryResponse{} + +// DebAptRepositoryResponse A Serializer for AptRepository. +type DebAptRepositoryResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + VersionsHref *string `json:"versions_href,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + LatestVersionHref *string `json:"latest_version_href,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebAptRepositoryResponse DebAptRepositoryResponse + +// NewDebAptRepositoryResponse instantiates a new DebAptRepositoryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebAptRepositoryResponse(name string) *DebAptRepositoryResponse { + this := DebAptRepositoryResponse{} + this.Name = name + return &this +} + +// NewDebAptRepositoryResponseWithDefaults instantiates a new DebAptRepositoryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebAptRepositoryResponseWithDefaults() *DebAptRepositoryResponse { + this := DebAptRepositoryResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebAptRepositoryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRepositoryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebAptRepositoryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebAptRepositoryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebAptRepositoryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRepositoryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebAptRepositoryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebAptRepositoryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetVersionsHref returns the VersionsHref field value if set, zero value otherwise. +func (o *DebAptRepositoryResponse) GetVersionsHref() string { + if o == nil || IsNil(o.VersionsHref) { + var ret string + return ret + } + return *o.VersionsHref +} + +// GetVersionsHrefOk returns a tuple with the VersionsHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRepositoryResponse) GetVersionsHrefOk() (*string, bool) { + if o == nil || IsNil(o.VersionsHref) { + return nil, false + } + return o.VersionsHref, true +} + +// HasVersionsHref returns a boolean if a field has been set. +func (o *DebAptRepositoryResponse) HasVersionsHref() bool { + if o != nil && !IsNil(o.VersionsHref) { + return true + } + + return false +} + +// SetVersionsHref gets a reference to the given string and assigns it to the VersionsHref field. +func (o *DebAptRepositoryResponse) SetVersionsHref(v string) { + o.VersionsHref = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *DebAptRepositoryResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRepositoryResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *DebAptRepositoryResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *DebAptRepositoryResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetLatestVersionHref returns the LatestVersionHref field value if set, zero value otherwise. +func (o *DebAptRepositoryResponse) GetLatestVersionHref() string { + if o == nil || IsNil(o.LatestVersionHref) { + var ret string + return ret + } + return *o.LatestVersionHref +} + +// GetLatestVersionHrefOk returns a tuple with the LatestVersionHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebAptRepositoryResponse) GetLatestVersionHrefOk() (*string, bool) { + if o == nil || IsNil(o.LatestVersionHref) { + return nil, false + } + return o.LatestVersionHref, true +} + +// HasLatestVersionHref returns a boolean if a field has been set. +func (o *DebAptRepositoryResponse) HasLatestVersionHref() bool { + if o != nil && !IsNil(o.LatestVersionHref) { + return true + } + + return false +} + +// SetLatestVersionHref gets a reference to the given string and assigns it to the LatestVersionHref field. +func (o *DebAptRepositoryResponse) SetLatestVersionHref(v string) { + o.LatestVersionHref = &v +} + +// GetName returns the Name field value +func (o *DebAptRepositoryResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DebAptRepositoryResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DebAptRepositoryResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRepositoryResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRepositoryResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *DebAptRepositoryResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *DebAptRepositoryResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *DebAptRepositoryResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *DebAptRepositoryResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRepositoryResponse) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRepositoryResponse) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *DebAptRepositoryResponse) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *DebAptRepositoryResponse) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *DebAptRepositoryResponse) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *DebAptRepositoryResponse) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DebAptRepositoryResponse) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DebAptRepositoryResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *DebAptRepositoryResponse) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *DebAptRepositoryResponse) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *DebAptRepositoryResponse) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *DebAptRepositoryResponse) UnsetRemote() { + o.Remote.Unset() +} + +func (o DebAptRepositoryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebAptRepositoryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.VersionsHref) { + toSerialize["versions_href"] = o.VersionsHref + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.LatestVersionHref) { + toSerialize["latest_version_href"] = o.LatestVersionHref + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebAptRepositoryResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebAptRepositoryResponse := _DebAptRepositoryResponse{} + + if err = json.Unmarshal(bytes, &varDebAptRepositoryResponse); err == nil { + *o = DebAptRepositoryResponse(varDebAptRepositoryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "versions_href") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "latest_version_href") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebAptRepositoryResponse struct { + value *DebAptRepositoryResponse + isSet bool +} + +func (v NullableDebAptRepositoryResponse) Get() *DebAptRepositoryResponse { + return v.value +} + +func (v *NullableDebAptRepositoryResponse) Set(val *DebAptRepositoryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebAptRepositoryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebAptRepositoryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebAptRepositoryResponse(val *DebAptRepositoryResponse) *NullableDebAptRepositoryResponse { + return &NullableDebAptRepositoryResponse{value: val, isSet: true} +} + +func (v NullableDebAptRepositoryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebAptRepositoryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_generic_content.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_generic_content.go new file mode 100644 index 0000000000..7045d9c78e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_generic_content.go @@ -0,0 +1,297 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the DebGenericContent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebGenericContent{} + +// DebGenericContent A serializer for GenericContent. +type DebGenericContent struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // Path where the artifact is located relative to distributions base_path + RelativePath string `json:"relative_path"` + // An uploaded file that may be turned into the artifact of the content unit. + File **os.File `json:"file,omitempty"` + // An uncommitted upload that may be turned into the artifact of the content unit. + Upload *string `json:"upload,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebGenericContent DebGenericContent + +// NewDebGenericContent instantiates a new DebGenericContent object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebGenericContent(relativePath string) *DebGenericContent { + this := DebGenericContent{} + this.RelativePath = relativePath + return &this +} + +// NewDebGenericContentWithDefaults instantiates a new DebGenericContent object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebGenericContentWithDefaults() *DebGenericContent { + this := DebGenericContent{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebGenericContent) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebGenericContent) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebGenericContent) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebGenericContent) SetRepository(v string) { + o.Repository = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *DebGenericContent) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebGenericContent) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *DebGenericContent) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *DebGenericContent) SetArtifact(v string) { + o.Artifact = &v +} + +// GetRelativePath returns the RelativePath field value +func (o *DebGenericContent) GetRelativePath() string { + if o == nil { + var ret string + return ret + } + + return o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value +// and a boolean to check if the value has been set. +func (o *DebGenericContent) GetRelativePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RelativePath, true +} + +// SetRelativePath sets field value +func (o *DebGenericContent) SetRelativePath(v string) { + o.RelativePath = v +} + +// GetFile returns the File field value if set, zero value otherwise. +func (o *DebGenericContent) GetFile() *os.File { + if o == nil || IsNil(o.File) { + var ret *os.File + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebGenericContent) GetFileOk() (**os.File, bool) { + if o == nil || IsNil(o.File) { + return nil, false + } + return o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *DebGenericContent) HasFile() bool { + if o != nil && !IsNil(o.File) { + return true + } + + return false +} + +// SetFile gets a reference to the given *os.File and assigns it to the File field. +func (o *DebGenericContent) SetFile(v *os.File) { + o.File = &v +} + +// GetUpload returns the Upload field value if set, zero value otherwise. +func (o *DebGenericContent) GetUpload() string { + if o == nil || IsNil(o.Upload) { + var ret string + return ret + } + return *o.Upload +} + +// GetUploadOk returns a tuple with the Upload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebGenericContent) GetUploadOk() (*string, bool) { + if o == nil || IsNil(o.Upload) { + return nil, false + } + return o.Upload, true +} + +// HasUpload returns a boolean if a field has been set. +func (o *DebGenericContent) HasUpload() bool { + if o != nil && !IsNil(o.Upload) { + return true + } + + return false +} + +// SetUpload gets a reference to the given string and assigns it to the Upload field. +func (o *DebGenericContent) SetUpload(v string) { + o.Upload = &v +} + +func (o DebGenericContent) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebGenericContent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + toSerialize["relative_path"] = o.RelativePath + if !IsNil(o.File) { + toSerialize["file"] = o.File + } + if !IsNil(o.Upload) { + toSerialize["upload"] = o.Upload + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebGenericContent) UnmarshalJSON(bytes []byte) (err error) { + varDebGenericContent := _DebGenericContent{} + + if err = json.Unmarshal(bytes, &varDebGenericContent); err == nil { + *o = DebGenericContent(varDebGenericContent) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "file") + delete(additionalProperties, "upload") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebGenericContent struct { + value *DebGenericContent + isSet bool +} + +func (v NullableDebGenericContent) Get() *DebGenericContent { + return v.value +} + +func (v *NullableDebGenericContent) Set(val *DebGenericContent) { + v.value = val + v.isSet = true +} + +func (v NullableDebGenericContent) IsSet() bool { + return v.isSet +} + +func (v *NullableDebGenericContent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebGenericContent(val *DebGenericContent) *NullableDebGenericContent { + return &NullableDebGenericContent{value: val, isSet: true} +} + +func (v NullableDebGenericContent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebGenericContent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_generic_content_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_generic_content_response.go new file mode 100644 index 0000000000..33f92de6e8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_generic_content_response.go @@ -0,0 +1,486 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebGenericContentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebGenericContentResponse{} + +// DebGenericContentResponse A serializer for GenericContent. +type DebGenericContentResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // Path where the artifact is located relative to distributions base_path + RelativePath string `json:"relative_path"` + // The MD5 checksum if available. + Md5 *string `json:"md5,omitempty"` + // The SHA-1 checksum if available. + Sha1 *string `json:"sha1,omitempty"` + // The SHA-224 checksum if available. + Sha224 *string `json:"sha224,omitempty"` + // The SHA-256 checksum if available. + Sha256 *string `json:"sha256,omitempty"` + // The SHA-384 checksum if available. + Sha384 *string `json:"sha384,omitempty"` + // The SHA-512 checksum if available. + Sha512 *string `json:"sha512,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebGenericContentResponse DebGenericContentResponse + +// NewDebGenericContentResponse instantiates a new DebGenericContentResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebGenericContentResponse(relativePath string) *DebGenericContentResponse { + this := DebGenericContentResponse{} + this.RelativePath = relativePath + return &this +} + +// NewDebGenericContentResponseWithDefaults instantiates a new DebGenericContentResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebGenericContentResponseWithDefaults() *DebGenericContentResponse { + this := DebGenericContentResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebGenericContentResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebGenericContentResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebGenericContentResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebGenericContentResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebGenericContentResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebGenericContentResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebGenericContentResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebGenericContentResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *DebGenericContentResponse) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebGenericContentResponse) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *DebGenericContentResponse) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *DebGenericContentResponse) SetArtifact(v string) { + o.Artifact = &v +} + +// GetRelativePath returns the RelativePath field value +func (o *DebGenericContentResponse) GetRelativePath() string { + if o == nil { + var ret string + return ret + } + + return o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value +// and a boolean to check if the value has been set. +func (o *DebGenericContentResponse) GetRelativePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RelativePath, true +} + +// SetRelativePath sets field value +func (o *DebGenericContentResponse) SetRelativePath(v string) { + o.RelativePath = v +} + +// GetMd5 returns the Md5 field value if set, zero value otherwise. +func (o *DebGenericContentResponse) GetMd5() string { + if o == nil || IsNil(o.Md5) { + var ret string + return ret + } + return *o.Md5 +} + +// GetMd5Ok returns a tuple with the Md5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebGenericContentResponse) GetMd5Ok() (*string, bool) { + if o == nil || IsNil(o.Md5) { + return nil, false + } + return o.Md5, true +} + +// HasMd5 returns a boolean if a field has been set. +func (o *DebGenericContentResponse) HasMd5() bool { + if o != nil && !IsNil(o.Md5) { + return true + } + + return false +} + +// SetMd5 gets a reference to the given string and assigns it to the Md5 field. +func (o *DebGenericContentResponse) SetMd5(v string) { + o.Md5 = &v +} + +// GetSha1 returns the Sha1 field value if set, zero value otherwise. +func (o *DebGenericContentResponse) GetSha1() string { + if o == nil || IsNil(o.Sha1) { + var ret string + return ret + } + return *o.Sha1 +} + +// GetSha1Ok returns a tuple with the Sha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebGenericContentResponse) GetSha1Ok() (*string, bool) { + if o == nil || IsNil(o.Sha1) { + return nil, false + } + return o.Sha1, true +} + +// HasSha1 returns a boolean if a field has been set. +func (o *DebGenericContentResponse) HasSha1() bool { + if o != nil && !IsNil(o.Sha1) { + return true + } + + return false +} + +// SetSha1 gets a reference to the given string and assigns it to the Sha1 field. +func (o *DebGenericContentResponse) SetSha1(v string) { + o.Sha1 = &v +} + +// GetSha224 returns the Sha224 field value if set, zero value otherwise. +func (o *DebGenericContentResponse) GetSha224() string { + if o == nil || IsNil(o.Sha224) { + var ret string + return ret + } + return *o.Sha224 +} + +// GetSha224Ok returns a tuple with the Sha224 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebGenericContentResponse) GetSha224Ok() (*string, bool) { + if o == nil || IsNil(o.Sha224) { + return nil, false + } + return o.Sha224, true +} + +// HasSha224 returns a boolean if a field has been set. +func (o *DebGenericContentResponse) HasSha224() bool { + if o != nil && !IsNil(o.Sha224) { + return true + } + + return false +} + +// SetSha224 gets a reference to the given string and assigns it to the Sha224 field. +func (o *DebGenericContentResponse) SetSha224(v string) { + o.Sha224 = &v +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise. +func (o *DebGenericContentResponse) GetSha256() string { + if o == nil || IsNil(o.Sha256) { + var ret string + return ret + } + return *o.Sha256 +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebGenericContentResponse) GetSha256Ok() (*string, bool) { + if o == nil || IsNil(o.Sha256) { + return nil, false + } + return o.Sha256, true +} + +// HasSha256 returns a boolean if a field has been set. +func (o *DebGenericContentResponse) HasSha256() bool { + if o != nil && !IsNil(o.Sha256) { + return true + } + + return false +} + +// SetSha256 gets a reference to the given string and assigns it to the Sha256 field. +func (o *DebGenericContentResponse) SetSha256(v string) { + o.Sha256 = &v +} + +// GetSha384 returns the Sha384 field value if set, zero value otherwise. +func (o *DebGenericContentResponse) GetSha384() string { + if o == nil || IsNil(o.Sha384) { + var ret string + return ret + } + return *o.Sha384 +} + +// GetSha384Ok returns a tuple with the Sha384 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebGenericContentResponse) GetSha384Ok() (*string, bool) { + if o == nil || IsNil(o.Sha384) { + return nil, false + } + return o.Sha384, true +} + +// HasSha384 returns a boolean if a field has been set. +func (o *DebGenericContentResponse) HasSha384() bool { + if o != nil && !IsNil(o.Sha384) { + return true + } + + return false +} + +// SetSha384 gets a reference to the given string and assigns it to the Sha384 field. +func (o *DebGenericContentResponse) SetSha384(v string) { + o.Sha384 = &v +} + +// GetSha512 returns the Sha512 field value if set, zero value otherwise. +func (o *DebGenericContentResponse) GetSha512() string { + if o == nil || IsNil(o.Sha512) { + var ret string + return ret + } + return *o.Sha512 +} + +// GetSha512Ok returns a tuple with the Sha512 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebGenericContentResponse) GetSha512Ok() (*string, bool) { + if o == nil || IsNil(o.Sha512) { + return nil, false + } + return o.Sha512, true +} + +// HasSha512 returns a boolean if a field has been set. +func (o *DebGenericContentResponse) HasSha512() bool { + if o != nil && !IsNil(o.Sha512) { + return true + } + + return false +} + +// SetSha512 gets a reference to the given string and assigns it to the Sha512 field. +func (o *DebGenericContentResponse) SetSha512(v string) { + o.Sha512 = &v +} + +func (o DebGenericContentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebGenericContentResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + toSerialize["relative_path"] = o.RelativePath + if !IsNil(o.Md5) { + toSerialize["md5"] = o.Md5 + } + if !IsNil(o.Sha1) { + toSerialize["sha1"] = o.Sha1 + } + if !IsNil(o.Sha224) { + toSerialize["sha224"] = o.Sha224 + } + if !IsNil(o.Sha256) { + toSerialize["sha256"] = o.Sha256 + } + if !IsNil(o.Sha384) { + toSerialize["sha384"] = o.Sha384 + } + if !IsNil(o.Sha512) { + toSerialize["sha512"] = o.Sha512 + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebGenericContentResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebGenericContentResponse := _DebGenericContentResponse{} + + if err = json.Unmarshal(bytes, &varDebGenericContentResponse); err == nil { + *o = DebGenericContentResponse(varDebGenericContentResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "md5") + delete(additionalProperties, "sha1") + delete(additionalProperties, "sha224") + delete(additionalProperties, "sha256") + delete(additionalProperties, "sha384") + delete(additionalProperties, "sha512") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebGenericContentResponse struct { + value *DebGenericContentResponse + isSet bool +} + +func (v NullableDebGenericContentResponse) Get() *DebGenericContentResponse { + return v.value +} + +func (v *NullableDebGenericContentResponse) Set(val *DebGenericContentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebGenericContentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebGenericContentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebGenericContentResponse(val *DebGenericContentResponse) *NullableDebGenericContentResponse { + return &NullableDebGenericContentResponse{value: val, isSet: true} +} + +func (v NullableDebGenericContentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebGenericContentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_file_index.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_file_index.go new file mode 100644 index 0000000000..3065347835 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_file_index.go @@ -0,0 +1,278 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the DebInstallerFileIndex type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebInstallerFileIndex{} + +// DebInstallerFileIndex A serializer for InstallerFileIndex. +type DebInstallerFileIndex struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // A dict mapping relative paths inside the Content to the correspondingArtifact URLs. E.g.: {'relative/path': '/artifacts/1/' + Artifacts map[string]interface{} `json:"artifacts"` + // Component of the component - architecture combination. + Component string `json:"component"` + // Architecture of the component - architecture combination. + Architecture string `json:"architecture"` + // Path of directory containing MD5SUMS and SHA256SUMS relative to url. + RelativePath *string `json:"relative_path,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebInstallerFileIndex DebInstallerFileIndex + +// NewDebInstallerFileIndex instantiates a new DebInstallerFileIndex object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebInstallerFileIndex(artifacts map[string]interface{}, component string, architecture string) *DebInstallerFileIndex { + this := DebInstallerFileIndex{} + this.Artifacts = artifacts + this.Component = component + this.Architecture = architecture + return &this +} + +// NewDebInstallerFileIndexWithDefaults instantiates a new DebInstallerFileIndex object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebInstallerFileIndexWithDefaults() *DebInstallerFileIndex { + this := DebInstallerFileIndex{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebInstallerFileIndex) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerFileIndex) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebInstallerFileIndex) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebInstallerFileIndex) SetRepository(v string) { + o.Repository = &v +} + +// GetArtifacts returns the Artifacts field value +func (o *DebInstallerFileIndex) GetArtifacts() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Artifacts +} + +// GetArtifactsOk returns a tuple with the Artifacts field value +// and a boolean to check if the value has been set. +func (o *DebInstallerFileIndex) GetArtifactsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Artifacts, true +} + +// SetArtifacts sets field value +func (o *DebInstallerFileIndex) SetArtifacts(v map[string]interface{}) { + o.Artifacts = v +} + +// GetComponent returns the Component field value +func (o *DebInstallerFileIndex) GetComponent() string { + if o == nil { + var ret string + return ret + } + + return o.Component +} + +// GetComponentOk returns a tuple with the Component field value +// and a boolean to check if the value has been set. +func (o *DebInstallerFileIndex) GetComponentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Component, true +} + +// SetComponent sets field value +func (o *DebInstallerFileIndex) SetComponent(v string) { + o.Component = v +} + +// GetArchitecture returns the Architecture field value +func (o *DebInstallerFileIndex) GetArchitecture() string { + if o == nil { + var ret string + return ret + } + + return o.Architecture +} + +// GetArchitectureOk returns a tuple with the Architecture field value +// and a boolean to check if the value has been set. +func (o *DebInstallerFileIndex) GetArchitectureOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Architecture, true +} + +// SetArchitecture sets field value +func (o *DebInstallerFileIndex) SetArchitecture(v string) { + o.Architecture = v +} + +// GetRelativePath returns the RelativePath field value if set, zero value otherwise. +func (o *DebInstallerFileIndex) GetRelativePath() string { + if o == nil || IsNil(o.RelativePath) { + var ret string + return ret + } + return *o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerFileIndex) GetRelativePathOk() (*string, bool) { + if o == nil || IsNil(o.RelativePath) { + return nil, false + } + return o.RelativePath, true +} + +// HasRelativePath returns a boolean if a field has been set. +func (o *DebInstallerFileIndex) HasRelativePath() bool { + if o != nil && !IsNil(o.RelativePath) { + return true + } + + return false +} + +// SetRelativePath gets a reference to the given string and assigns it to the RelativePath field. +func (o *DebInstallerFileIndex) SetRelativePath(v string) { + o.RelativePath = &v +} + +func (o DebInstallerFileIndex) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebInstallerFileIndex) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["artifacts"] = o.Artifacts + toSerialize["component"] = o.Component + toSerialize["architecture"] = o.Architecture + if !IsNil(o.RelativePath) { + toSerialize["relative_path"] = o.RelativePath + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebInstallerFileIndex) UnmarshalJSON(bytes []byte) (err error) { + varDebInstallerFileIndex := _DebInstallerFileIndex{} + + if err = json.Unmarshal(bytes, &varDebInstallerFileIndex); err == nil { + *o = DebInstallerFileIndex(varDebInstallerFileIndex) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "artifacts") + delete(additionalProperties, "component") + delete(additionalProperties, "architecture") + delete(additionalProperties, "relative_path") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebInstallerFileIndex struct { + value *DebInstallerFileIndex + isSet bool +} + +func (v NullableDebInstallerFileIndex) Get() *DebInstallerFileIndex { + return v.value +} + +func (v *NullableDebInstallerFileIndex) Set(val *DebInstallerFileIndex) { + v.value = val + v.isSet = true +} + +func (v NullableDebInstallerFileIndex) IsSet() bool { + return v.isSet +} + +func (v *NullableDebInstallerFileIndex) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebInstallerFileIndex(val *DebInstallerFileIndex) *NullableDebInstallerFileIndex { + return &NullableDebInstallerFileIndex{value: val, isSet: true} +} + +func (v NullableDebInstallerFileIndex) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebInstallerFileIndex) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_file_index_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_file_index_response.go new file mode 100644 index 0000000000..0ed1bbd20d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_file_index_response.go @@ -0,0 +1,316 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebInstallerFileIndexResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebInstallerFileIndexResponse{} + +// DebInstallerFileIndexResponse A serializer for InstallerFileIndex. +type DebInstallerFileIndexResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A dict mapping relative paths inside the Content to the correspondingArtifact URLs. E.g.: {'relative/path': '/artifacts/1/' + Artifacts map[string]interface{} `json:"artifacts"` + // Component of the component - architecture combination. + Component string `json:"component"` + // Architecture of the component - architecture combination. + Architecture string `json:"architecture"` + // Path of directory containing MD5SUMS and SHA256SUMS relative to url. + RelativePath *string `json:"relative_path,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebInstallerFileIndexResponse DebInstallerFileIndexResponse + +// NewDebInstallerFileIndexResponse instantiates a new DebInstallerFileIndexResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebInstallerFileIndexResponse(artifacts map[string]interface{}, component string, architecture string) *DebInstallerFileIndexResponse { + this := DebInstallerFileIndexResponse{} + this.Artifacts = artifacts + this.Component = component + this.Architecture = architecture + return &this +} + +// NewDebInstallerFileIndexResponseWithDefaults instantiates a new DebInstallerFileIndexResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebInstallerFileIndexResponseWithDefaults() *DebInstallerFileIndexResponse { + this := DebInstallerFileIndexResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebInstallerFileIndexResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerFileIndexResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebInstallerFileIndexResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebInstallerFileIndexResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebInstallerFileIndexResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerFileIndexResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebInstallerFileIndexResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebInstallerFileIndexResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifacts returns the Artifacts field value +func (o *DebInstallerFileIndexResponse) GetArtifacts() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Artifacts +} + +// GetArtifactsOk returns a tuple with the Artifacts field value +// and a boolean to check if the value has been set. +func (o *DebInstallerFileIndexResponse) GetArtifactsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Artifacts, true +} + +// SetArtifacts sets field value +func (o *DebInstallerFileIndexResponse) SetArtifacts(v map[string]interface{}) { + o.Artifacts = v +} + +// GetComponent returns the Component field value +func (o *DebInstallerFileIndexResponse) GetComponent() string { + if o == nil { + var ret string + return ret + } + + return o.Component +} + +// GetComponentOk returns a tuple with the Component field value +// and a boolean to check if the value has been set. +func (o *DebInstallerFileIndexResponse) GetComponentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Component, true +} + +// SetComponent sets field value +func (o *DebInstallerFileIndexResponse) SetComponent(v string) { + o.Component = v +} + +// GetArchitecture returns the Architecture field value +func (o *DebInstallerFileIndexResponse) GetArchitecture() string { + if o == nil { + var ret string + return ret + } + + return o.Architecture +} + +// GetArchitectureOk returns a tuple with the Architecture field value +// and a boolean to check if the value has been set. +func (o *DebInstallerFileIndexResponse) GetArchitectureOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Architecture, true +} + +// SetArchitecture sets field value +func (o *DebInstallerFileIndexResponse) SetArchitecture(v string) { + o.Architecture = v +} + +// GetRelativePath returns the RelativePath field value if set, zero value otherwise. +func (o *DebInstallerFileIndexResponse) GetRelativePath() string { + if o == nil || IsNil(o.RelativePath) { + var ret string + return ret + } + return *o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerFileIndexResponse) GetRelativePathOk() (*string, bool) { + if o == nil || IsNil(o.RelativePath) { + return nil, false + } + return o.RelativePath, true +} + +// HasRelativePath returns a boolean if a field has been set. +func (o *DebInstallerFileIndexResponse) HasRelativePath() bool { + if o != nil && !IsNil(o.RelativePath) { + return true + } + + return false +} + +// SetRelativePath gets a reference to the given string and assigns it to the RelativePath field. +func (o *DebInstallerFileIndexResponse) SetRelativePath(v string) { + o.RelativePath = &v +} + +func (o DebInstallerFileIndexResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebInstallerFileIndexResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifacts"] = o.Artifacts + toSerialize["component"] = o.Component + toSerialize["architecture"] = o.Architecture + if !IsNil(o.RelativePath) { + toSerialize["relative_path"] = o.RelativePath + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebInstallerFileIndexResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebInstallerFileIndexResponse := _DebInstallerFileIndexResponse{} + + if err = json.Unmarshal(bytes, &varDebInstallerFileIndexResponse); err == nil { + *o = DebInstallerFileIndexResponse(varDebInstallerFileIndexResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifacts") + delete(additionalProperties, "component") + delete(additionalProperties, "architecture") + delete(additionalProperties, "relative_path") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebInstallerFileIndexResponse struct { + value *DebInstallerFileIndexResponse + isSet bool +} + +func (v NullableDebInstallerFileIndexResponse) Get() *DebInstallerFileIndexResponse { + return v.value +} + +func (v *NullableDebInstallerFileIndexResponse) Set(val *DebInstallerFileIndexResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebInstallerFileIndexResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebInstallerFileIndexResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebInstallerFileIndexResponse(val *DebInstallerFileIndexResponse) *NullableDebInstallerFileIndexResponse { + return &NullableDebInstallerFileIndexResponse{value: val, isSet: true} +} + +func (v NullableDebInstallerFileIndexResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebInstallerFileIndexResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_package.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_package.go new file mode 100644 index 0000000000..962638d894 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_package.go @@ -0,0 +1,306 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the DebInstallerPackage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebInstallerPackage{} + +// DebInstallerPackage A Serializer for InstallerPackage. +type DebInstallerPackage struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // Path where the artifact is located relative to distributions base_path + RelativePath *string `json:"relative_path,omitempty"` + // An uploaded file that may be turned into the artifact of the content unit. + File **os.File `json:"file,omitempty"` + // An uncommitted upload that may be turned into the artifact of the content unit. + Upload *string `json:"upload,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebInstallerPackage DebInstallerPackage + +// NewDebInstallerPackage instantiates a new DebInstallerPackage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebInstallerPackage() *DebInstallerPackage { + this := DebInstallerPackage{} + return &this +} + +// NewDebInstallerPackageWithDefaults instantiates a new DebInstallerPackage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebInstallerPackageWithDefaults() *DebInstallerPackage { + this := DebInstallerPackage{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebInstallerPackage) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackage) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebInstallerPackage) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebInstallerPackage) SetRepository(v string) { + o.Repository = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *DebInstallerPackage) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackage) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *DebInstallerPackage) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *DebInstallerPackage) SetArtifact(v string) { + o.Artifact = &v +} + +// GetRelativePath returns the RelativePath field value if set, zero value otherwise. +func (o *DebInstallerPackage) GetRelativePath() string { + if o == nil || IsNil(o.RelativePath) { + var ret string + return ret + } + return *o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackage) GetRelativePathOk() (*string, bool) { + if o == nil || IsNil(o.RelativePath) { + return nil, false + } + return o.RelativePath, true +} + +// HasRelativePath returns a boolean if a field has been set. +func (o *DebInstallerPackage) HasRelativePath() bool { + if o != nil && !IsNil(o.RelativePath) { + return true + } + + return false +} + +// SetRelativePath gets a reference to the given string and assigns it to the RelativePath field. +func (o *DebInstallerPackage) SetRelativePath(v string) { + o.RelativePath = &v +} + +// GetFile returns the File field value if set, zero value otherwise. +func (o *DebInstallerPackage) GetFile() *os.File { + if o == nil || IsNil(o.File) { + var ret *os.File + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackage) GetFileOk() (**os.File, bool) { + if o == nil || IsNil(o.File) { + return nil, false + } + return o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *DebInstallerPackage) HasFile() bool { + if o != nil && !IsNil(o.File) { + return true + } + + return false +} + +// SetFile gets a reference to the given *os.File and assigns it to the File field. +func (o *DebInstallerPackage) SetFile(v *os.File) { + o.File = &v +} + +// GetUpload returns the Upload field value if set, zero value otherwise. +func (o *DebInstallerPackage) GetUpload() string { + if o == nil || IsNil(o.Upload) { + var ret string + return ret + } + return *o.Upload +} + +// GetUploadOk returns a tuple with the Upload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackage) GetUploadOk() (*string, bool) { + if o == nil || IsNil(o.Upload) { + return nil, false + } + return o.Upload, true +} + +// HasUpload returns a boolean if a field has been set. +func (o *DebInstallerPackage) HasUpload() bool { + if o != nil && !IsNil(o.Upload) { + return true + } + + return false +} + +// SetUpload gets a reference to the given string and assigns it to the Upload field. +func (o *DebInstallerPackage) SetUpload(v string) { + o.Upload = &v +} + +func (o DebInstallerPackage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebInstallerPackage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + if !IsNil(o.RelativePath) { + toSerialize["relative_path"] = o.RelativePath + } + if !IsNil(o.File) { + toSerialize["file"] = o.File + } + if !IsNil(o.Upload) { + toSerialize["upload"] = o.Upload + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebInstallerPackage) UnmarshalJSON(bytes []byte) (err error) { + varDebInstallerPackage := _DebInstallerPackage{} + + if err = json.Unmarshal(bytes, &varDebInstallerPackage); err == nil { + *o = DebInstallerPackage(varDebInstallerPackage) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "file") + delete(additionalProperties, "upload") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebInstallerPackage struct { + value *DebInstallerPackage + isSet bool +} + +func (v NullableDebInstallerPackage) Get() *DebInstallerPackage { + return v.value +} + +func (v *NullableDebInstallerPackage) Set(val *DebInstallerPackage) { + v.value = val + v.isSet = true +} + +func (v NullableDebInstallerPackage) IsSet() bool { + return v.isSet +} + +func (v *NullableDebInstallerPackage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebInstallerPackage(val *DebInstallerPackage) *NullableDebInstallerPackage { + return &NullableDebInstallerPackage{value: val, isSet: true} +} + +func (v NullableDebInstallerPackage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebInstallerPackage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_package_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_package_response.go new file mode 100644 index 0000000000..071fa9d9e5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_installer_package_response.go @@ -0,0 +1,1568 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebInstallerPackageResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebInstallerPackageResponse{} + +// DebInstallerPackageResponse A Serializer for InstallerPackage. +type DebInstallerPackageResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // Path where the artifact is located relative to distributions base_path + RelativePath *string `json:"relative_path,omitempty"` + // The MD5 checksum if available. + Md5 *string `json:"md5,omitempty"` + // The SHA-1 checksum if available. + Sha1 *string `json:"sha1,omitempty"` + // The SHA-224 checksum if available. + Sha224 *string `json:"sha224,omitempty"` + // The SHA-256 checksum if available. + Sha256 *string `json:"sha256,omitempty"` + // The SHA-384 checksum if available. + Sha384 *string `json:"sha384,omitempty"` + // The SHA-512 checksum if available. + Sha512 *string `json:"sha512,omitempty"` + Package *string `json:"package,omitempty"` + Source *string `json:"source,omitempty"` + Version *string `json:"version,omitempty"` + Architecture *string `json:"architecture,omitempty"` + Section *string `json:"section,omitempty"` + Priority *string `json:"priority,omitempty"` + Origin *string `json:"origin,omitempty"` + Tag *string `json:"tag,omitempty"` + Bugs *string `json:"bugs,omitempty"` + Essential *string `json:"essential,omitempty"` + BuildEssential *string `json:"build_essential,omitempty"` + InstalledSize *string `json:"installed_size,omitempty"` + Maintainer *string `json:"maintainer,omitempty"` + OriginalMaintainer *string `json:"original_maintainer,omitempty"` + Description *string `json:"description,omitempty"` + DescriptionMd5 *string `json:"description_md5,omitempty"` + Homepage *string `json:"homepage,omitempty"` + BuiltUsing *string `json:"built_using,omitempty"` + AutoBuiltPackage *string `json:"auto_built_package,omitempty"` + MultiArch *string `json:"multi_arch,omitempty"` + Breaks *string `json:"breaks,omitempty"` + Conflicts *string `json:"conflicts,omitempty"` + Depends *string `json:"depends,omitempty"` + Recommends *string `json:"recommends,omitempty"` + Suggests *string `json:"suggests,omitempty"` + Enhances *string `json:"enhances,omitempty"` + PreDepends *string `json:"pre_depends,omitempty"` + Provides *string `json:"provides,omitempty"` + Replaces *string `json:"replaces,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebInstallerPackageResponse DebInstallerPackageResponse + +// NewDebInstallerPackageResponse instantiates a new DebInstallerPackageResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebInstallerPackageResponse() *DebInstallerPackageResponse { + this := DebInstallerPackageResponse{} + return &this +} + +// NewDebInstallerPackageResponseWithDefaults instantiates a new DebInstallerPackageResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebInstallerPackageResponseWithDefaults() *DebInstallerPackageResponse { + this := DebInstallerPackageResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebInstallerPackageResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebInstallerPackageResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *DebInstallerPackageResponse) SetArtifact(v string) { + o.Artifact = &v +} + +// GetRelativePath returns the RelativePath field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetRelativePath() string { + if o == nil || IsNil(o.RelativePath) { + var ret string + return ret + } + return *o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetRelativePathOk() (*string, bool) { + if o == nil || IsNil(o.RelativePath) { + return nil, false + } + return o.RelativePath, true +} + +// HasRelativePath returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasRelativePath() bool { + if o != nil && !IsNil(o.RelativePath) { + return true + } + + return false +} + +// SetRelativePath gets a reference to the given string and assigns it to the RelativePath field. +func (o *DebInstallerPackageResponse) SetRelativePath(v string) { + o.RelativePath = &v +} + +// GetMd5 returns the Md5 field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetMd5() string { + if o == nil || IsNil(o.Md5) { + var ret string + return ret + } + return *o.Md5 +} + +// GetMd5Ok returns a tuple with the Md5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetMd5Ok() (*string, bool) { + if o == nil || IsNil(o.Md5) { + return nil, false + } + return o.Md5, true +} + +// HasMd5 returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasMd5() bool { + if o != nil && !IsNil(o.Md5) { + return true + } + + return false +} + +// SetMd5 gets a reference to the given string and assigns it to the Md5 field. +func (o *DebInstallerPackageResponse) SetMd5(v string) { + o.Md5 = &v +} + +// GetSha1 returns the Sha1 field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetSha1() string { + if o == nil || IsNil(o.Sha1) { + var ret string + return ret + } + return *o.Sha1 +} + +// GetSha1Ok returns a tuple with the Sha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetSha1Ok() (*string, bool) { + if o == nil || IsNil(o.Sha1) { + return nil, false + } + return o.Sha1, true +} + +// HasSha1 returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasSha1() bool { + if o != nil && !IsNil(o.Sha1) { + return true + } + + return false +} + +// SetSha1 gets a reference to the given string and assigns it to the Sha1 field. +func (o *DebInstallerPackageResponse) SetSha1(v string) { + o.Sha1 = &v +} + +// GetSha224 returns the Sha224 field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetSha224() string { + if o == nil || IsNil(o.Sha224) { + var ret string + return ret + } + return *o.Sha224 +} + +// GetSha224Ok returns a tuple with the Sha224 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetSha224Ok() (*string, bool) { + if o == nil || IsNil(o.Sha224) { + return nil, false + } + return o.Sha224, true +} + +// HasSha224 returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasSha224() bool { + if o != nil && !IsNil(o.Sha224) { + return true + } + + return false +} + +// SetSha224 gets a reference to the given string and assigns it to the Sha224 field. +func (o *DebInstallerPackageResponse) SetSha224(v string) { + o.Sha224 = &v +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetSha256() string { + if o == nil || IsNil(o.Sha256) { + var ret string + return ret + } + return *o.Sha256 +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetSha256Ok() (*string, bool) { + if o == nil || IsNil(o.Sha256) { + return nil, false + } + return o.Sha256, true +} + +// HasSha256 returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasSha256() bool { + if o != nil && !IsNil(o.Sha256) { + return true + } + + return false +} + +// SetSha256 gets a reference to the given string and assigns it to the Sha256 field. +func (o *DebInstallerPackageResponse) SetSha256(v string) { + o.Sha256 = &v +} + +// GetSha384 returns the Sha384 field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetSha384() string { + if o == nil || IsNil(o.Sha384) { + var ret string + return ret + } + return *o.Sha384 +} + +// GetSha384Ok returns a tuple with the Sha384 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetSha384Ok() (*string, bool) { + if o == nil || IsNil(o.Sha384) { + return nil, false + } + return o.Sha384, true +} + +// HasSha384 returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasSha384() bool { + if o != nil && !IsNil(o.Sha384) { + return true + } + + return false +} + +// SetSha384 gets a reference to the given string and assigns it to the Sha384 field. +func (o *DebInstallerPackageResponse) SetSha384(v string) { + o.Sha384 = &v +} + +// GetSha512 returns the Sha512 field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetSha512() string { + if o == nil || IsNil(o.Sha512) { + var ret string + return ret + } + return *o.Sha512 +} + +// GetSha512Ok returns a tuple with the Sha512 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetSha512Ok() (*string, bool) { + if o == nil || IsNil(o.Sha512) { + return nil, false + } + return o.Sha512, true +} + +// HasSha512 returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasSha512() bool { + if o != nil && !IsNil(o.Sha512) { + return true + } + + return false +} + +// SetSha512 gets a reference to the given string and assigns it to the Sha512 field. +func (o *DebInstallerPackageResponse) SetSha512(v string) { + o.Sha512 = &v +} + +// GetPackage returns the Package field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetPackage() string { + if o == nil || IsNil(o.Package) { + var ret string + return ret + } + return *o.Package +} + +// GetPackageOk returns a tuple with the Package field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetPackageOk() (*string, bool) { + if o == nil || IsNil(o.Package) { + return nil, false + } + return o.Package, true +} + +// HasPackage returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasPackage() bool { + if o != nil && !IsNil(o.Package) { + return true + } + + return false +} + +// SetPackage gets a reference to the given string and assigns it to the Package field. +func (o *DebInstallerPackageResponse) SetPackage(v string) { + o.Package = &v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *DebInstallerPackageResponse) SetSource(v string) { + o.Source = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *DebInstallerPackageResponse) SetVersion(v string) { + o.Version = &v +} + +// GetArchitecture returns the Architecture field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetArchitecture() string { + if o == nil || IsNil(o.Architecture) { + var ret string + return ret + } + return *o.Architecture +} + +// GetArchitectureOk returns a tuple with the Architecture field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetArchitectureOk() (*string, bool) { + if o == nil || IsNil(o.Architecture) { + return nil, false + } + return o.Architecture, true +} + +// HasArchitecture returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasArchitecture() bool { + if o != nil && !IsNil(o.Architecture) { + return true + } + + return false +} + +// SetArchitecture gets a reference to the given string and assigns it to the Architecture field. +func (o *DebInstallerPackageResponse) SetArchitecture(v string) { + o.Architecture = &v +} + +// GetSection returns the Section field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetSection() string { + if o == nil || IsNil(o.Section) { + var ret string + return ret + } + return *o.Section +} + +// GetSectionOk returns a tuple with the Section field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetSectionOk() (*string, bool) { + if o == nil || IsNil(o.Section) { + return nil, false + } + return o.Section, true +} + +// HasSection returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasSection() bool { + if o != nil && !IsNil(o.Section) { + return true + } + + return false +} + +// SetSection gets a reference to the given string and assigns it to the Section field. +func (o *DebInstallerPackageResponse) SetSection(v string) { + o.Section = &v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetPriority() string { + if o == nil || IsNil(o.Priority) { + var ret string + return ret + } + return *o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetPriorityOk() (*string, bool) { + if o == nil || IsNil(o.Priority) { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasPriority() bool { + if o != nil && !IsNil(o.Priority) { + return true + } + + return false +} + +// SetPriority gets a reference to the given string and assigns it to the Priority field. +func (o *DebInstallerPackageResponse) SetPriority(v string) { + o.Priority = &v +} + +// GetOrigin returns the Origin field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetOrigin() string { + if o == nil || IsNil(o.Origin) { + var ret string + return ret + } + return *o.Origin +} + +// GetOriginOk returns a tuple with the Origin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetOriginOk() (*string, bool) { + if o == nil || IsNil(o.Origin) { + return nil, false + } + return o.Origin, true +} + +// HasOrigin returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasOrigin() bool { + if o != nil && !IsNil(o.Origin) { + return true + } + + return false +} + +// SetOrigin gets a reference to the given string and assigns it to the Origin field. +func (o *DebInstallerPackageResponse) SetOrigin(v string) { + o.Origin = &v +} + +// GetTag returns the Tag field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetTag() string { + if o == nil || IsNil(o.Tag) { + var ret string + return ret + } + return *o.Tag +} + +// GetTagOk returns a tuple with the Tag field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetTagOk() (*string, bool) { + if o == nil || IsNil(o.Tag) { + return nil, false + } + return o.Tag, true +} + +// HasTag returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasTag() bool { + if o != nil && !IsNil(o.Tag) { + return true + } + + return false +} + +// SetTag gets a reference to the given string and assigns it to the Tag field. +func (o *DebInstallerPackageResponse) SetTag(v string) { + o.Tag = &v +} + +// GetBugs returns the Bugs field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetBugs() string { + if o == nil || IsNil(o.Bugs) { + var ret string + return ret + } + return *o.Bugs +} + +// GetBugsOk returns a tuple with the Bugs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetBugsOk() (*string, bool) { + if o == nil || IsNil(o.Bugs) { + return nil, false + } + return o.Bugs, true +} + +// HasBugs returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasBugs() bool { + if o != nil && !IsNil(o.Bugs) { + return true + } + + return false +} + +// SetBugs gets a reference to the given string and assigns it to the Bugs field. +func (o *DebInstallerPackageResponse) SetBugs(v string) { + o.Bugs = &v +} + +// GetEssential returns the Essential field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetEssential() string { + if o == nil || IsNil(o.Essential) { + var ret string + return ret + } + return *o.Essential +} + +// GetEssentialOk returns a tuple with the Essential field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetEssentialOk() (*string, bool) { + if o == nil || IsNil(o.Essential) { + return nil, false + } + return o.Essential, true +} + +// HasEssential returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasEssential() bool { + if o != nil && !IsNil(o.Essential) { + return true + } + + return false +} + +// SetEssential gets a reference to the given string and assigns it to the Essential field. +func (o *DebInstallerPackageResponse) SetEssential(v string) { + o.Essential = &v +} + +// GetBuildEssential returns the BuildEssential field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetBuildEssential() string { + if o == nil || IsNil(o.BuildEssential) { + var ret string + return ret + } + return *o.BuildEssential +} + +// GetBuildEssentialOk returns a tuple with the BuildEssential field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetBuildEssentialOk() (*string, bool) { + if o == nil || IsNil(o.BuildEssential) { + return nil, false + } + return o.BuildEssential, true +} + +// HasBuildEssential returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasBuildEssential() bool { + if o != nil && !IsNil(o.BuildEssential) { + return true + } + + return false +} + +// SetBuildEssential gets a reference to the given string and assigns it to the BuildEssential field. +func (o *DebInstallerPackageResponse) SetBuildEssential(v string) { + o.BuildEssential = &v +} + +// GetInstalledSize returns the InstalledSize field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetInstalledSize() string { + if o == nil || IsNil(o.InstalledSize) { + var ret string + return ret + } + return *o.InstalledSize +} + +// GetInstalledSizeOk returns a tuple with the InstalledSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetInstalledSizeOk() (*string, bool) { + if o == nil || IsNil(o.InstalledSize) { + return nil, false + } + return o.InstalledSize, true +} + +// HasInstalledSize returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasInstalledSize() bool { + if o != nil && !IsNil(o.InstalledSize) { + return true + } + + return false +} + +// SetInstalledSize gets a reference to the given string and assigns it to the InstalledSize field. +func (o *DebInstallerPackageResponse) SetInstalledSize(v string) { + o.InstalledSize = &v +} + +// GetMaintainer returns the Maintainer field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetMaintainer() string { + if o == nil || IsNil(o.Maintainer) { + var ret string + return ret + } + return *o.Maintainer +} + +// GetMaintainerOk returns a tuple with the Maintainer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetMaintainerOk() (*string, bool) { + if o == nil || IsNil(o.Maintainer) { + return nil, false + } + return o.Maintainer, true +} + +// HasMaintainer returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasMaintainer() bool { + if o != nil && !IsNil(o.Maintainer) { + return true + } + + return false +} + +// SetMaintainer gets a reference to the given string and assigns it to the Maintainer field. +func (o *DebInstallerPackageResponse) SetMaintainer(v string) { + o.Maintainer = &v +} + +// GetOriginalMaintainer returns the OriginalMaintainer field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetOriginalMaintainer() string { + if o == nil || IsNil(o.OriginalMaintainer) { + var ret string + return ret + } + return *o.OriginalMaintainer +} + +// GetOriginalMaintainerOk returns a tuple with the OriginalMaintainer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetOriginalMaintainerOk() (*string, bool) { + if o == nil || IsNil(o.OriginalMaintainer) { + return nil, false + } + return o.OriginalMaintainer, true +} + +// HasOriginalMaintainer returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasOriginalMaintainer() bool { + if o != nil && !IsNil(o.OriginalMaintainer) { + return true + } + + return false +} + +// SetOriginalMaintainer gets a reference to the given string and assigns it to the OriginalMaintainer field. +func (o *DebInstallerPackageResponse) SetOriginalMaintainer(v string) { + o.OriginalMaintainer = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *DebInstallerPackageResponse) SetDescription(v string) { + o.Description = &v +} + +// GetDescriptionMd5 returns the DescriptionMd5 field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetDescriptionMd5() string { + if o == nil || IsNil(o.DescriptionMd5) { + var ret string + return ret + } + return *o.DescriptionMd5 +} + +// GetDescriptionMd5Ok returns a tuple with the DescriptionMd5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetDescriptionMd5Ok() (*string, bool) { + if o == nil || IsNil(o.DescriptionMd5) { + return nil, false + } + return o.DescriptionMd5, true +} + +// HasDescriptionMd5 returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasDescriptionMd5() bool { + if o != nil && !IsNil(o.DescriptionMd5) { + return true + } + + return false +} + +// SetDescriptionMd5 gets a reference to the given string and assigns it to the DescriptionMd5 field. +func (o *DebInstallerPackageResponse) SetDescriptionMd5(v string) { + o.DescriptionMd5 = &v +} + +// GetHomepage returns the Homepage field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetHomepage() string { + if o == nil || IsNil(o.Homepage) { + var ret string + return ret + } + return *o.Homepage +} + +// GetHomepageOk returns a tuple with the Homepage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetHomepageOk() (*string, bool) { + if o == nil || IsNil(o.Homepage) { + return nil, false + } + return o.Homepage, true +} + +// HasHomepage returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasHomepage() bool { + if o != nil && !IsNil(o.Homepage) { + return true + } + + return false +} + +// SetHomepage gets a reference to the given string and assigns it to the Homepage field. +func (o *DebInstallerPackageResponse) SetHomepage(v string) { + o.Homepage = &v +} + +// GetBuiltUsing returns the BuiltUsing field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetBuiltUsing() string { + if o == nil || IsNil(o.BuiltUsing) { + var ret string + return ret + } + return *o.BuiltUsing +} + +// GetBuiltUsingOk returns a tuple with the BuiltUsing field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetBuiltUsingOk() (*string, bool) { + if o == nil || IsNil(o.BuiltUsing) { + return nil, false + } + return o.BuiltUsing, true +} + +// HasBuiltUsing returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasBuiltUsing() bool { + if o != nil && !IsNil(o.BuiltUsing) { + return true + } + + return false +} + +// SetBuiltUsing gets a reference to the given string and assigns it to the BuiltUsing field. +func (o *DebInstallerPackageResponse) SetBuiltUsing(v string) { + o.BuiltUsing = &v +} + +// GetAutoBuiltPackage returns the AutoBuiltPackage field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetAutoBuiltPackage() string { + if o == nil || IsNil(o.AutoBuiltPackage) { + var ret string + return ret + } + return *o.AutoBuiltPackage +} + +// GetAutoBuiltPackageOk returns a tuple with the AutoBuiltPackage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetAutoBuiltPackageOk() (*string, bool) { + if o == nil || IsNil(o.AutoBuiltPackage) { + return nil, false + } + return o.AutoBuiltPackage, true +} + +// HasAutoBuiltPackage returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasAutoBuiltPackage() bool { + if o != nil && !IsNil(o.AutoBuiltPackage) { + return true + } + + return false +} + +// SetAutoBuiltPackage gets a reference to the given string and assigns it to the AutoBuiltPackage field. +func (o *DebInstallerPackageResponse) SetAutoBuiltPackage(v string) { + o.AutoBuiltPackage = &v +} + +// GetMultiArch returns the MultiArch field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetMultiArch() string { + if o == nil || IsNil(o.MultiArch) { + var ret string + return ret + } + return *o.MultiArch +} + +// GetMultiArchOk returns a tuple with the MultiArch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetMultiArchOk() (*string, bool) { + if o == nil || IsNil(o.MultiArch) { + return nil, false + } + return o.MultiArch, true +} + +// HasMultiArch returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasMultiArch() bool { + if o != nil && !IsNil(o.MultiArch) { + return true + } + + return false +} + +// SetMultiArch gets a reference to the given string and assigns it to the MultiArch field. +func (o *DebInstallerPackageResponse) SetMultiArch(v string) { + o.MultiArch = &v +} + +// GetBreaks returns the Breaks field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetBreaks() string { + if o == nil || IsNil(o.Breaks) { + var ret string + return ret + } + return *o.Breaks +} + +// GetBreaksOk returns a tuple with the Breaks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetBreaksOk() (*string, bool) { + if o == nil || IsNil(o.Breaks) { + return nil, false + } + return o.Breaks, true +} + +// HasBreaks returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasBreaks() bool { + if o != nil && !IsNil(o.Breaks) { + return true + } + + return false +} + +// SetBreaks gets a reference to the given string and assigns it to the Breaks field. +func (o *DebInstallerPackageResponse) SetBreaks(v string) { + o.Breaks = &v +} + +// GetConflicts returns the Conflicts field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetConflicts() string { + if o == nil || IsNil(o.Conflicts) { + var ret string + return ret + } + return *o.Conflicts +} + +// GetConflictsOk returns a tuple with the Conflicts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetConflictsOk() (*string, bool) { + if o == nil || IsNil(o.Conflicts) { + return nil, false + } + return o.Conflicts, true +} + +// HasConflicts returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasConflicts() bool { + if o != nil && !IsNil(o.Conflicts) { + return true + } + + return false +} + +// SetConflicts gets a reference to the given string and assigns it to the Conflicts field. +func (o *DebInstallerPackageResponse) SetConflicts(v string) { + o.Conflicts = &v +} + +// GetDepends returns the Depends field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetDepends() string { + if o == nil || IsNil(o.Depends) { + var ret string + return ret + } + return *o.Depends +} + +// GetDependsOk returns a tuple with the Depends field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetDependsOk() (*string, bool) { + if o == nil || IsNil(o.Depends) { + return nil, false + } + return o.Depends, true +} + +// HasDepends returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasDepends() bool { + if o != nil && !IsNil(o.Depends) { + return true + } + + return false +} + +// SetDepends gets a reference to the given string and assigns it to the Depends field. +func (o *DebInstallerPackageResponse) SetDepends(v string) { + o.Depends = &v +} + +// GetRecommends returns the Recommends field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetRecommends() string { + if o == nil || IsNil(o.Recommends) { + var ret string + return ret + } + return *o.Recommends +} + +// GetRecommendsOk returns a tuple with the Recommends field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetRecommendsOk() (*string, bool) { + if o == nil || IsNil(o.Recommends) { + return nil, false + } + return o.Recommends, true +} + +// HasRecommends returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasRecommends() bool { + if o != nil && !IsNil(o.Recommends) { + return true + } + + return false +} + +// SetRecommends gets a reference to the given string and assigns it to the Recommends field. +func (o *DebInstallerPackageResponse) SetRecommends(v string) { + o.Recommends = &v +} + +// GetSuggests returns the Suggests field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetSuggests() string { + if o == nil || IsNil(o.Suggests) { + var ret string + return ret + } + return *o.Suggests +} + +// GetSuggestsOk returns a tuple with the Suggests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetSuggestsOk() (*string, bool) { + if o == nil || IsNil(o.Suggests) { + return nil, false + } + return o.Suggests, true +} + +// HasSuggests returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasSuggests() bool { + if o != nil && !IsNil(o.Suggests) { + return true + } + + return false +} + +// SetSuggests gets a reference to the given string and assigns it to the Suggests field. +func (o *DebInstallerPackageResponse) SetSuggests(v string) { + o.Suggests = &v +} + +// GetEnhances returns the Enhances field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetEnhances() string { + if o == nil || IsNil(o.Enhances) { + var ret string + return ret + } + return *o.Enhances +} + +// GetEnhancesOk returns a tuple with the Enhances field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetEnhancesOk() (*string, bool) { + if o == nil || IsNil(o.Enhances) { + return nil, false + } + return o.Enhances, true +} + +// HasEnhances returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasEnhances() bool { + if o != nil && !IsNil(o.Enhances) { + return true + } + + return false +} + +// SetEnhances gets a reference to the given string and assigns it to the Enhances field. +func (o *DebInstallerPackageResponse) SetEnhances(v string) { + o.Enhances = &v +} + +// GetPreDepends returns the PreDepends field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetPreDepends() string { + if o == nil || IsNil(o.PreDepends) { + var ret string + return ret + } + return *o.PreDepends +} + +// GetPreDependsOk returns a tuple with the PreDepends field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetPreDependsOk() (*string, bool) { + if o == nil || IsNil(o.PreDepends) { + return nil, false + } + return o.PreDepends, true +} + +// HasPreDepends returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasPreDepends() bool { + if o != nil && !IsNil(o.PreDepends) { + return true + } + + return false +} + +// SetPreDepends gets a reference to the given string and assigns it to the PreDepends field. +func (o *DebInstallerPackageResponse) SetPreDepends(v string) { + o.PreDepends = &v +} + +// GetProvides returns the Provides field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetProvides() string { + if o == nil || IsNil(o.Provides) { + var ret string + return ret + } + return *o.Provides +} + +// GetProvidesOk returns a tuple with the Provides field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetProvidesOk() (*string, bool) { + if o == nil || IsNil(o.Provides) { + return nil, false + } + return o.Provides, true +} + +// HasProvides returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasProvides() bool { + if o != nil && !IsNil(o.Provides) { + return true + } + + return false +} + +// SetProvides gets a reference to the given string and assigns it to the Provides field. +func (o *DebInstallerPackageResponse) SetProvides(v string) { + o.Provides = &v +} + +// GetReplaces returns the Replaces field value if set, zero value otherwise. +func (o *DebInstallerPackageResponse) GetReplaces() string { + if o == nil || IsNil(o.Replaces) { + var ret string + return ret + } + return *o.Replaces +} + +// GetReplacesOk returns a tuple with the Replaces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebInstallerPackageResponse) GetReplacesOk() (*string, bool) { + if o == nil || IsNil(o.Replaces) { + return nil, false + } + return o.Replaces, true +} + +// HasReplaces returns a boolean if a field has been set. +func (o *DebInstallerPackageResponse) HasReplaces() bool { + if o != nil && !IsNil(o.Replaces) { + return true + } + + return false +} + +// SetReplaces gets a reference to the given string and assigns it to the Replaces field. +func (o *DebInstallerPackageResponse) SetReplaces(v string) { + o.Replaces = &v +} + +func (o DebInstallerPackageResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebInstallerPackageResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + if !IsNil(o.RelativePath) { + toSerialize["relative_path"] = o.RelativePath + } + if !IsNil(o.Md5) { + toSerialize["md5"] = o.Md5 + } + if !IsNil(o.Sha1) { + toSerialize["sha1"] = o.Sha1 + } + if !IsNil(o.Sha224) { + toSerialize["sha224"] = o.Sha224 + } + if !IsNil(o.Sha256) { + toSerialize["sha256"] = o.Sha256 + } + if !IsNil(o.Sha384) { + toSerialize["sha384"] = o.Sha384 + } + if !IsNil(o.Sha512) { + toSerialize["sha512"] = o.Sha512 + } + if !IsNil(o.Package) { + toSerialize["package"] = o.Package + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.Architecture) { + toSerialize["architecture"] = o.Architecture + } + if !IsNil(o.Section) { + toSerialize["section"] = o.Section + } + if !IsNil(o.Priority) { + toSerialize["priority"] = o.Priority + } + if !IsNil(o.Origin) { + toSerialize["origin"] = o.Origin + } + if !IsNil(o.Tag) { + toSerialize["tag"] = o.Tag + } + if !IsNil(o.Bugs) { + toSerialize["bugs"] = o.Bugs + } + if !IsNil(o.Essential) { + toSerialize["essential"] = o.Essential + } + if !IsNil(o.BuildEssential) { + toSerialize["build_essential"] = o.BuildEssential + } + if !IsNil(o.InstalledSize) { + toSerialize["installed_size"] = o.InstalledSize + } + if !IsNil(o.Maintainer) { + toSerialize["maintainer"] = o.Maintainer + } + if !IsNil(o.OriginalMaintainer) { + toSerialize["original_maintainer"] = o.OriginalMaintainer + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.DescriptionMd5) { + toSerialize["description_md5"] = o.DescriptionMd5 + } + if !IsNil(o.Homepage) { + toSerialize["homepage"] = o.Homepage + } + if !IsNil(o.BuiltUsing) { + toSerialize["built_using"] = o.BuiltUsing + } + if !IsNil(o.AutoBuiltPackage) { + toSerialize["auto_built_package"] = o.AutoBuiltPackage + } + if !IsNil(o.MultiArch) { + toSerialize["multi_arch"] = o.MultiArch + } + if !IsNil(o.Breaks) { + toSerialize["breaks"] = o.Breaks + } + if !IsNil(o.Conflicts) { + toSerialize["conflicts"] = o.Conflicts + } + if !IsNil(o.Depends) { + toSerialize["depends"] = o.Depends + } + if !IsNil(o.Recommends) { + toSerialize["recommends"] = o.Recommends + } + if !IsNil(o.Suggests) { + toSerialize["suggests"] = o.Suggests + } + if !IsNil(o.Enhances) { + toSerialize["enhances"] = o.Enhances + } + if !IsNil(o.PreDepends) { + toSerialize["pre_depends"] = o.PreDepends + } + if !IsNil(o.Provides) { + toSerialize["provides"] = o.Provides + } + if !IsNil(o.Replaces) { + toSerialize["replaces"] = o.Replaces + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebInstallerPackageResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebInstallerPackageResponse := _DebInstallerPackageResponse{} + + if err = json.Unmarshal(bytes, &varDebInstallerPackageResponse); err == nil { + *o = DebInstallerPackageResponse(varDebInstallerPackageResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "md5") + delete(additionalProperties, "sha1") + delete(additionalProperties, "sha224") + delete(additionalProperties, "sha256") + delete(additionalProperties, "sha384") + delete(additionalProperties, "sha512") + delete(additionalProperties, "package") + delete(additionalProperties, "source") + delete(additionalProperties, "version") + delete(additionalProperties, "architecture") + delete(additionalProperties, "section") + delete(additionalProperties, "priority") + delete(additionalProperties, "origin") + delete(additionalProperties, "tag") + delete(additionalProperties, "bugs") + delete(additionalProperties, "essential") + delete(additionalProperties, "build_essential") + delete(additionalProperties, "installed_size") + delete(additionalProperties, "maintainer") + delete(additionalProperties, "original_maintainer") + delete(additionalProperties, "description") + delete(additionalProperties, "description_md5") + delete(additionalProperties, "homepage") + delete(additionalProperties, "built_using") + delete(additionalProperties, "auto_built_package") + delete(additionalProperties, "multi_arch") + delete(additionalProperties, "breaks") + delete(additionalProperties, "conflicts") + delete(additionalProperties, "depends") + delete(additionalProperties, "recommends") + delete(additionalProperties, "suggests") + delete(additionalProperties, "enhances") + delete(additionalProperties, "pre_depends") + delete(additionalProperties, "provides") + delete(additionalProperties, "replaces") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebInstallerPackageResponse struct { + value *DebInstallerPackageResponse + isSet bool +} + +func (v NullableDebInstallerPackageResponse) Get() *DebInstallerPackageResponse { + return v.value +} + +func (v *NullableDebInstallerPackageResponse) Set(val *DebInstallerPackageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebInstallerPackageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebInstallerPackageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebInstallerPackageResponse(val *DebInstallerPackageResponse) *NullableDebInstallerPackageResponse { + return &NullableDebInstallerPackageResponse{value: val, isSet: true} +} + +func (v NullableDebInstallerPackageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebInstallerPackageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package.go new file mode 100644 index 0000000000..83f4fcaf21 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package.go @@ -0,0 +1,382 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the DebPackage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebPackage{} + +// DebPackage A Serializer for Package. +type DebPackage struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // Path where the artifact is located relative to distributions base_path + RelativePath *string `json:"relative_path,omitempty"` + // An uploaded file that may be turned into the artifact of the content unit. + File **os.File `json:"file,omitempty"` + // An uncommitted upload that may be turned into the artifact of the content unit. + Upload *string `json:"upload,omitempty"` + // Name of the distribution. + Distribution *string `json:"distribution,omitempty"` + // Name of the component. + Component *string `json:"component,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebPackage DebPackage + +// NewDebPackage instantiates a new DebPackage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebPackage() *DebPackage { + this := DebPackage{} + return &this +} + +// NewDebPackageWithDefaults instantiates a new DebPackage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebPackageWithDefaults() *DebPackage { + this := DebPackage{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebPackage) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackage) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebPackage) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebPackage) SetRepository(v string) { + o.Repository = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *DebPackage) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackage) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *DebPackage) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *DebPackage) SetArtifact(v string) { + o.Artifact = &v +} + +// GetRelativePath returns the RelativePath field value if set, zero value otherwise. +func (o *DebPackage) GetRelativePath() string { + if o == nil || IsNil(o.RelativePath) { + var ret string + return ret + } + return *o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackage) GetRelativePathOk() (*string, bool) { + if o == nil || IsNil(o.RelativePath) { + return nil, false + } + return o.RelativePath, true +} + +// HasRelativePath returns a boolean if a field has been set. +func (o *DebPackage) HasRelativePath() bool { + if o != nil && !IsNil(o.RelativePath) { + return true + } + + return false +} + +// SetRelativePath gets a reference to the given string and assigns it to the RelativePath field. +func (o *DebPackage) SetRelativePath(v string) { + o.RelativePath = &v +} + +// GetFile returns the File field value if set, zero value otherwise. +func (o *DebPackage) GetFile() *os.File { + if o == nil || IsNil(o.File) { + var ret *os.File + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackage) GetFileOk() (**os.File, bool) { + if o == nil || IsNil(o.File) { + return nil, false + } + return o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *DebPackage) HasFile() bool { + if o != nil && !IsNil(o.File) { + return true + } + + return false +} + +// SetFile gets a reference to the given *os.File and assigns it to the File field. +func (o *DebPackage) SetFile(v *os.File) { + o.File = &v +} + +// GetUpload returns the Upload field value if set, zero value otherwise. +func (o *DebPackage) GetUpload() string { + if o == nil || IsNil(o.Upload) { + var ret string + return ret + } + return *o.Upload +} + +// GetUploadOk returns a tuple with the Upload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackage) GetUploadOk() (*string, bool) { + if o == nil || IsNil(o.Upload) { + return nil, false + } + return o.Upload, true +} + +// HasUpload returns a boolean if a field has been set. +func (o *DebPackage) HasUpload() bool { + if o != nil && !IsNil(o.Upload) { + return true + } + + return false +} + +// SetUpload gets a reference to the given string and assigns it to the Upload field. +func (o *DebPackage) SetUpload(v string) { + o.Upload = &v +} + +// GetDistribution returns the Distribution field value if set, zero value otherwise. +func (o *DebPackage) GetDistribution() string { + if o == nil || IsNil(o.Distribution) { + var ret string + return ret + } + return *o.Distribution +} + +// GetDistributionOk returns a tuple with the Distribution field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackage) GetDistributionOk() (*string, bool) { + if o == nil || IsNil(o.Distribution) { + return nil, false + } + return o.Distribution, true +} + +// HasDistribution returns a boolean if a field has been set. +func (o *DebPackage) HasDistribution() bool { + if o != nil && !IsNil(o.Distribution) { + return true + } + + return false +} + +// SetDistribution gets a reference to the given string and assigns it to the Distribution field. +func (o *DebPackage) SetDistribution(v string) { + o.Distribution = &v +} + +// GetComponent returns the Component field value if set, zero value otherwise. +func (o *DebPackage) GetComponent() string { + if o == nil || IsNil(o.Component) { + var ret string + return ret + } + return *o.Component +} + +// GetComponentOk returns a tuple with the Component field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackage) GetComponentOk() (*string, bool) { + if o == nil || IsNil(o.Component) { + return nil, false + } + return o.Component, true +} + +// HasComponent returns a boolean if a field has been set. +func (o *DebPackage) HasComponent() bool { + if o != nil && !IsNil(o.Component) { + return true + } + + return false +} + +// SetComponent gets a reference to the given string and assigns it to the Component field. +func (o *DebPackage) SetComponent(v string) { + o.Component = &v +} + +func (o DebPackage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebPackage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + if !IsNil(o.RelativePath) { + toSerialize["relative_path"] = o.RelativePath + } + if !IsNil(o.File) { + toSerialize["file"] = o.File + } + if !IsNil(o.Upload) { + toSerialize["upload"] = o.Upload + } + if !IsNil(o.Distribution) { + toSerialize["distribution"] = o.Distribution + } + if !IsNil(o.Component) { + toSerialize["component"] = o.Component + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebPackage) UnmarshalJSON(bytes []byte) (err error) { + varDebPackage := _DebPackage{} + + if err = json.Unmarshal(bytes, &varDebPackage); err == nil { + *o = DebPackage(varDebPackage) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "file") + delete(additionalProperties, "upload") + delete(additionalProperties, "distribution") + delete(additionalProperties, "component") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebPackage struct { + value *DebPackage + isSet bool +} + +func (v NullableDebPackage) Get() *DebPackage { + return v.value +} + +func (v *NullableDebPackage) Set(val *DebPackage) { + v.value = val + v.isSet = true +} + +func (v NullableDebPackage) IsSet() bool { + return v.isSet +} + +func (v *NullableDebPackage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebPackage(val *DebPackage) *NullableDebPackage { + return &NullableDebPackage{value: val, isSet: true} +} + +func (v NullableDebPackage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebPackage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_index.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_index.go new file mode 100644 index 0000000000..dae84e69ba --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_index.go @@ -0,0 +1,296 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the DebPackageIndex type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebPackageIndex{} + +// DebPackageIndex A serializer for PackageIndex. +type DebPackageIndex struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // A dict mapping relative paths inside the Content to the correspondingArtifact URLs. E.g.: {'relative/path': '/artifacts/1/' + Artifacts map[string]interface{} `json:"artifacts"` + // Component of the component - architecture combination. + Component *string `json:"component,omitempty"` + // Architecture of the component - architecture combination. + Architecture *string `json:"architecture,omitempty"` + // Path of file relative to url. + RelativePath *string `json:"relative_path,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebPackageIndex DebPackageIndex + +// NewDebPackageIndex instantiates a new DebPackageIndex object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebPackageIndex(artifacts map[string]interface{}) *DebPackageIndex { + this := DebPackageIndex{} + this.Artifacts = artifacts + return &this +} + +// NewDebPackageIndexWithDefaults instantiates a new DebPackageIndex object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebPackageIndexWithDefaults() *DebPackageIndex { + this := DebPackageIndex{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebPackageIndex) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageIndex) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebPackageIndex) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebPackageIndex) SetRepository(v string) { + o.Repository = &v +} + +// GetArtifacts returns the Artifacts field value +func (o *DebPackageIndex) GetArtifacts() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Artifacts +} + +// GetArtifactsOk returns a tuple with the Artifacts field value +// and a boolean to check if the value has been set. +func (o *DebPackageIndex) GetArtifactsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Artifacts, true +} + +// SetArtifacts sets field value +func (o *DebPackageIndex) SetArtifacts(v map[string]interface{}) { + o.Artifacts = v +} + +// GetComponent returns the Component field value if set, zero value otherwise. +func (o *DebPackageIndex) GetComponent() string { + if o == nil || IsNil(o.Component) { + var ret string + return ret + } + return *o.Component +} + +// GetComponentOk returns a tuple with the Component field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageIndex) GetComponentOk() (*string, bool) { + if o == nil || IsNil(o.Component) { + return nil, false + } + return o.Component, true +} + +// HasComponent returns a boolean if a field has been set. +func (o *DebPackageIndex) HasComponent() bool { + if o != nil && !IsNil(o.Component) { + return true + } + + return false +} + +// SetComponent gets a reference to the given string and assigns it to the Component field. +func (o *DebPackageIndex) SetComponent(v string) { + o.Component = &v +} + +// GetArchitecture returns the Architecture field value if set, zero value otherwise. +func (o *DebPackageIndex) GetArchitecture() string { + if o == nil || IsNil(o.Architecture) { + var ret string + return ret + } + return *o.Architecture +} + +// GetArchitectureOk returns a tuple with the Architecture field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageIndex) GetArchitectureOk() (*string, bool) { + if o == nil || IsNil(o.Architecture) { + return nil, false + } + return o.Architecture, true +} + +// HasArchitecture returns a boolean if a field has been set. +func (o *DebPackageIndex) HasArchitecture() bool { + if o != nil && !IsNil(o.Architecture) { + return true + } + + return false +} + +// SetArchitecture gets a reference to the given string and assigns it to the Architecture field. +func (o *DebPackageIndex) SetArchitecture(v string) { + o.Architecture = &v +} + +// GetRelativePath returns the RelativePath field value if set, zero value otherwise. +func (o *DebPackageIndex) GetRelativePath() string { + if o == nil || IsNil(o.RelativePath) { + var ret string + return ret + } + return *o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageIndex) GetRelativePathOk() (*string, bool) { + if o == nil || IsNil(o.RelativePath) { + return nil, false + } + return o.RelativePath, true +} + +// HasRelativePath returns a boolean if a field has been set. +func (o *DebPackageIndex) HasRelativePath() bool { + if o != nil && !IsNil(o.RelativePath) { + return true + } + + return false +} + +// SetRelativePath gets a reference to the given string and assigns it to the RelativePath field. +func (o *DebPackageIndex) SetRelativePath(v string) { + o.RelativePath = &v +} + +func (o DebPackageIndex) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebPackageIndex) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["artifacts"] = o.Artifacts + if !IsNil(o.Component) { + toSerialize["component"] = o.Component + } + if !IsNil(o.Architecture) { + toSerialize["architecture"] = o.Architecture + } + if !IsNil(o.RelativePath) { + toSerialize["relative_path"] = o.RelativePath + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebPackageIndex) UnmarshalJSON(bytes []byte) (err error) { + varDebPackageIndex := _DebPackageIndex{} + + if err = json.Unmarshal(bytes, &varDebPackageIndex); err == nil { + *o = DebPackageIndex(varDebPackageIndex) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "artifacts") + delete(additionalProperties, "component") + delete(additionalProperties, "architecture") + delete(additionalProperties, "relative_path") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebPackageIndex struct { + value *DebPackageIndex + isSet bool +} + +func (v NullableDebPackageIndex) Get() *DebPackageIndex { + return v.value +} + +func (v *NullableDebPackageIndex) Set(val *DebPackageIndex) { + v.value = val + v.isSet = true +} + +func (v NullableDebPackageIndex) IsSet() bool { + return v.isSet +} + +func (v *NullableDebPackageIndex) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebPackageIndex(val *DebPackageIndex) *NullableDebPackageIndex { + return &NullableDebPackageIndex{value: val, isSet: true} +} + +func (v NullableDebPackageIndex) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebPackageIndex) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_index_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_index_response.go new file mode 100644 index 0000000000..e150207529 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_index_response.go @@ -0,0 +1,334 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebPackageIndexResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebPackageIndexResponse{} + +// DebPackageIndexResponse A serializer for PackageIndex. +type DebPackageIndexResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A dict mapping relative paths inside the Content to the correspondingArtifact URLs. E.g.: {'relative/path': '/artifacts/1/' + Artifacts map[string]interface{} `json:"artifacts"` + // Component of the component - architecture combination. + Component *string `json:"component,omitempty"` + // Architecture of the component - architecture combination. + Architecture *string `json:"architecture,omitempty"` + // Path of file relative to url. + RelativePath *string `json:"relative_path,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebPackageIndexResponse DebPackageIndexResponse + +// NewDebPackageIndexResponse instantiates a new DebPackageIndexResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebPackageIndexResponse(artifacts map[string]interface{}) *DebPackageIndexResponse { + this := DebPackageIndexResponse{} + this.Artifacts = artifacts + return &this +} + +// NewDebPackageIndexResponseWithDefaults instantiates a new DebPackageIndexResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebPackageIndexResponseWithDefaults() *DebPackageIndexResponse { + this := DebPackageIndexResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebPackageIndexResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageIndexResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebPackageIndexResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebPackageIndexResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebPackageIndexResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageIndexResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebPackageIndexResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebPackageIndexResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifacts returns the Artifacts field value +func (o *DebPackageIndexResponse) GetArtifacts() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Artifacts +} + +// GetArtifactsOk returns a tuple with the Artifacts field value +// and a boolean to check if the value has been set. +func (o *DebPackageIndexResponse) GetArtifactsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Artifacts, true +} + +// SetArtifacts sets field value +func (o *DebPackageIndexResponse) SetArtifacts(v map[string]interface{}) { + o.Artifacts = v +} + +// GetComponent returns the Component field value if set, zero value otherwise. +func (o *DebPackageIndexResponse) GetComponent() string { + if o == nil || IsNil(o.Component) { + var ret string + return ret + } + return *o.Component +} + +// GetComponentOk returns a tuple with the Component field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageIndexResponse) GetComponentOk() (*string, bool) { + if o == nil || IsNil(o.Component) { + return nil, false + } + return o.Component, true +} + +// HasComponent returns a boolean if a field has been set. +func (o *DebPackageIndexResponse) HasComponent() bool { + if o != nil && !IsNil(o.Component) { + return true + } + + return false +} + +// SetComponent gets a reference to the given string and assigns it to the Component field. +func (o *DebPackageIndexResponse) SetComponent(v string) { + o.Component = &v +} + +// GetArchitecture returns the Architecture field value if set, zero value otherwise. +func (o *DebPackageIndexResponse) GetArchitecture() string { + if o == nil || IsNil(o.Architecture) { + var ret string + return ret + } + return *o.Architecture +} + +// GetArchitectureOk returns a tuple with the Architecture field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageIndexResponse) GetArchitectureOk() (*string, bool) { + if o == nil || IsNil(o.Architecture) { + return nil, false + } + return o.Architecture, true +} + +// HasArchitecture returns a boolean if a field has been set. +func (o *DebPackageIndexResponse) HasArchitecture() bool { + if o != nil && !IsNil(o.Architecture) { + return true + } + + return false +} + +// SetArchitecture gets a reference to the given string and assigns it to the Architecture field. +func (o *DebPackageIndexResponse) SetArchitecture(v string) { + o.Architecture = &v +} + +// GetRelativePath returns the RelativePath field value if set, zero value otherwise. +func (o *DebPackageIndexResponse) GetRelativePath() string { + if o == nil || IsNil(o.RelativePath) { + var ret string + return ret + } + return *o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageIndexResponse) GetRelativePathOk() (*string, bool) { + if o == nil || IsNil(o.RelativePath) { + return nil, false + } + return o.RelativePath, true +} + +// HasRelativePath returns a boolean if a field has been set. +func (o *DebPackageIndexResponse) HasRelativePath() bool { + if o != nil && !IsNil(o.RelativePath) { + return true + } + + return false +} + +// SetRelativePath gets a reference to the given string and assigns it to the RelativePath field. +func (o *DebPackageIndexResponse) SetRelativePath(v string) { + o.RelativePath = &v +} + +func (o DebPackageIndexResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebPackageIndexResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifacts"] = o.Artifacts + if !IsNil(o.Component) { + toSerialize["component"] = o.Component + } + if !IsNil(o.Architecture) { + toSerialize["architecture"] = o.Architecture + } + if !IsNil(o.RelativePath) { + toSerialize["relative_path"] = o.RelativePath + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebPackageIndexResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebPackageIndexResponse := _DebPackageIndexResponse{} + + if err = json.Unmarshal(bytes, &varDebPackageIndexResponse); err == nil { + *o = DebPackageIndexResponse(varDebPackageIndexResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifacts") + delete(additionalProperties, "component") + delete(additionalProperties, "architecture") + delete(additionalProperties, "relative_path") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebPackageIndexResponse struct { + value *DebPackageIndexResponse + isSet bool +} + +func (v NullableDebPackageIndexResponse) Get() *DebPackageIndexResponse { + return v.value +} + +func (v *NullableDebPackageIndexResponse) Set(val *DebPackageIndexResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebPackageIndexResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebPackageIndexResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebPackageIndexResponse(val *DebPackageIndexResponse) *NullableDebPackageIndexResponse { + return &NullableDebPackageIndexResponse{value: val, isSet: true} +} + +func (v NullableDebPackageIndexResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebPackageIndexResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_release_component.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_release_component.go new file mode 100644 index 0000000000..37b970e6c4 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_release_component.go @@ -0,0 +1,211 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the DebPackageReleaseComponent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebPackageReleaseComponent{} + +// DebPackageReleaseComponent A Serializer for PackageReleaseComponent. +type DebPackageReleaseComponent struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Package that is contained in release_comonent. + Package string `json:"package"` + // ReleaseComponent this package is contained in. + ReleaseComponent string `json:"release_component"` + AdditionalProperties map[string]interface{} +} + +type _DebPackageReleaseComponent DebPackageReleaseComponent + +// NewDebPackageReleaseComponent instantiates a new DebPackageReleaseComponent object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebPackageReleaseComponent(package_ string, releaseComponent string) *DebPackageReleaseComponent { + this := DebPackageReleaseComponent{} + this.Package = package_ + this.ReleaseComponent = releaseComponent + return &this +} + +// NewDebPackageReleaseComponentWithDefaults instantiates a new DebPackageReleaseComponent object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebPackageReleaseComponentWithDefaults() *DebPackageReleaseComponent { + this := DebPackageReleaseComponent{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebPackageReleaseComponent) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageReleaseComponent) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebPackageReleaseComponent) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebPackageReleaseComponent) SetRepository(v string) { + o.Repository = &v +} + +// GetPackage returns the Package field value +func (o *DebPackageReleaseComponent) GetPackage() string { + if o == nil { + var ret string + return ret + } + + return o.Package +} + +// GetPackageOk returns a tuple with the Package field value +// and a boolean to check if the value has been set. +func (o *DebPackageReleaseComponent) GetPackageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Package, true +} + +// SetPackage sets field value +func (o *DebPackageReleaseComponent) SetPackage(v string) { + o.Package = v +} + +// GetReleaseComponent returns the ReleaseComponent field value +func (o *DebPackageReleaseComponent) GetReleaseComponent() string { + if o == nil { + var ret string + return ret + } + + return o.ReleaseComponent +} + +// GetReleaseComponentOk returns a tuple with the ReleaseComponent field value +// and a boolean to check if the value has been set. +func (o *DebPackageReleaseComponent) GetReleaseComponentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ReleaseComponent, true +} + +// SetReleaseComponent sets field value +func (o *DebPackageReleaseComponent) SetReleaseComponent(v string) { + o.ReleaseComponent = v +} + +func (o DebPackageReleaseComponent) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebPackageReleaseComponent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["package"] = o.Package + toSerialize["release_component"] = o.ReleaseComponent + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebPackageReleaseComponent) UnmarshalJSON(bytes []byte) (err error) { + varDebPackageReleaseComponent := _DebPackageReleaseComponent{} + + if err = json.Unmarshal(bytes, &varDebPackageReleaseComponent); err == nil { + *o = DebPackageReleaseComponent(varDebPackageReleaseComponent) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "package") + delete(additionalProperties, "release_component") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebPackageReleaseComponent struct { + value *DebPackageReleaseComponent + isSet bool +} + +func (v NullableDebPackageReleaseComponent) Get() *DebPackageReleaseComponent { + return v.value +} + +func (v *NullableDebPackageReleaseComponent) Set(val *DebPackageReleaseComponent) { + v.value = val + v.isSet = true +} + +func (v NullableDebPackageReleaseComponent) IsSet() bool { + return v.isSet +} + +func (v *NullableDebPackageReleaseComponent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebPackageReleaseComponent(val *DebPackageReleaseComponent) *NullableDebPackageReleaseComponent { + return &NullableDebPackageReleaseComponent{value: val, isSet: true} +} + +func (v NullableDebPackageReleaseComponent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebPackageReleaseComponent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_release_component_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_release_component_response.go new file mode 100644 index 0000000000..5cecb2aff1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_release_component_response.go @@ -0,0 +1,249 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebPackageReleaseComponentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebPackageReleaseComponentResponse{} + +// DebPackageReleaseComponentResponse A Serializer for PackageReleaseComponent. +type DebPackageReleaseComponentResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Package that is contained in release_comonent. + Package string `json:"package"` + // ReleaseComponent this package is contained in. + ReleaseComponent string `json:"release_component"` + AdditionalProperties map[string]interface{} +} + +type _DebPackageReleaseComponentResponse DebPackageReleaseComponentResponse + +// NewDebPackageReleaseComponentResponse instantiates a new DebPackageReleaseComponentResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebPackageReleaseComponentResponse(package_ string, releaseComponent string) *DebPackageReleaseComponentResponse { + this := DebPackageReleaseComponentResponse{} + this.Package = package_ + this.ReleaseComponent = releaseComponent + return &this +} + +// NewDebPackageReleaseComponentResponseWithDefaults instantiates a new DebPackageReleaseComponentResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebPackageReleaseComponentResponseWithDefaults() *DebPackageReleaseComponentResponse { + this := DebPackageReleaseComponentResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebPackageReleaseComponentResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageReleaseComponentResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebPackageReleaseComponentResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebPackageReleaseComponentResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebPackageReleaseComponentResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageReleaseComponentResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebPackageReleaseComponentResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebPackageReleaseComponentResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetPackage returns the Package field value +func (o *DebPackageReleaseComponentResponse) GetPackage() string { + if o == nil { + var ret string + return ret + } + + return o.Package +} + +// GetPackageOk returns a tuple with the Package field value +// and a boolean to check if the value has been set. +func (o *DebPackageReleaseComponentResponse) GetPackageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Package, true +} + +// SetPackage sets field value +func (o *DebPackageReleaseComponentResponse) SetPackage(v string) { + o.Package = v +} + +// GetReleaseComponent returns the ReleaseComponent field value +func (o *DebPackageReleaseComponentResponse) GetReleaseComponent() string { + if o == nil { + var ret string + return ret + } + + return o.ReleaseComponent +} + +// GetReleaseComponentOk returns a tuple with the ReleaseComponent field value +// and a boolean to check if the value has been set. +func (o *DebPackageReleaseComponentResponse) GetReleaseComponentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ReleaseComponent, true +} + +// SetReleaseComponent sets field value +func (o *DebPackageReleaseComponentResponse) SetReleaseComponent(v string) { + o.ReleaseComponent = v +} + +func (o DebPackageReleaseComponentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebPackageReleaseComponentResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["package"] = o.Package + toSerialize["release_component"] = o.ReleaseComponent + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebPackageReleaseComponentResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebPackageReleaseComponentResponse := _DebPackageReleaseComponentResponse{} + + if err = json.Unmarshal(bytes, &varDebPackageReleaseComponentResponse); err == nil { + *o = DebPackageReleaseComponentResponse(varDebPackageReleaseComponentResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "package") + delete(additionalProperties, "release_component") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebPackageReleaseComponentResponse struct { + value *DebPackageReleaseComponentResponse + isSet bool +} + +func (v NullableDebPackageReleaseComponentResponse) Get() *DebPackageReleaseComponentResponse { + return v.value +} + +func (v *NullableDebPackageReleaseComponentResponse) Set(val *DebPackageReleaseComponentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebPackageReleaseComponentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebPackageReleaseComponentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebPackageReleaseComponentResponse(val *DebPackageReleaseComponentResponse) *NullableDebPackageReleaseComponentResponse { + return &NullableDebPackageReleaseComponentResponse{value: val, isSet: true} +} + +func (v NullableDebPackageReleaseComponentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebPackageReleaseComponentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_response.go new file mode 100644 index 0000000000..f1b025e487 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_package_response.go @@ -0,0 +1,1644 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebPackageResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebPackageResponse{} + +// DebPackageResponse A Serializer for Package. +type DebPackageResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // Path where the artifact is located relative to distributions base_path + RelativePath *string `json:"relative_path,omitempty"` + // Name of the distribution. + Distribution *string `json:"distribution,omitempty"` + // Name of the component. + Component *string `json:"component,omitempty"` + // The MD5 checksum if available. + Md5 *string `json:"md5,omitempty"` + // The SHA-1 checksum if available. + Sha1 *string `json:"sha1,omitempty"` + // The SHA-224 checksum if available. + Sha224 *string `json:"sha224,omitempty"` + // The SHA-256 checksum if available. + Sha256 *string `json:"sha256,omitempty"` + // The SHA-384 checksum if available. + Sha384 *string `json:"sha384,omitempty"` + // The SHA-512 checksum if available. + Sha512 *string `json:"sha512,omitempty"` + Package *string `json:"package,omitempty"` + Source *string `json:"source,omitempty"` + Version *string `json:"version,omitempty"` + Architecture *string `json:"architecture,omitempty"` + Section *string `json:"section,omitempty"` + Priority *string `json:"priority,omitempty"` + Origin *string `json:"origin,omitempty"` + Tag *string `json:"tag,omitempty"` + Bugs *string `json:"bugs,omitempty"` + Essential *string `json:"essential,omitempty"` + BuildEssential *string `json:"build_essential,omitempty"` + InstalledSize *string `json:"installed_size,omitempty"` + Maintainer *string `json:"maintainer,omitempty"` + OriginalMaintainer *string `json:"original_maintainer,omitempty"` + Description *string `json:"description,omitempty"` + DescriptionMd5 *string `json:"description_md5,omitempty"` + Homepage *string `json:"homepage,omitempty"` + BuiltUsing *string `json:"built_using,omitempty"` + AutoBuiltPackage *string `json:"auto_built_package,omitempty"` + MultiArch *string `json:"multi_arch,omitempty"` + Breaks *string `json:"breaks,omitempty"` + Conflicts *string `json:"conflicts,omitempty"` + Depends *string `json:"depends,omitempty"` + Recommends *string `json:"recommends,omitempty"` + Suggests *string `json:"suggests,omitempty"` + Enhances *string `json:"enhances,omitempty"` + PreDepends *string `json:"pre_depends,omitempty"` + Provides *string `json:"provides,omitempty"` + Replaces *string `json:"replaces,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebPackageResponse DebPackageResponse + +// NewDebPackageResponse instantiates a new DebPackageResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebPackageResponse() *DebPackageResponse { + this := DebPackageResponse{} + return &this +} + +// NewDebPackageResponseWithDefaults instantiates a new DebPackageResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebPackageResponseWithDefaults() *DebPackageResponse { + this := DebPackageResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebPackageResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebPackageResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebPackageResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebPackageResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebPackageResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebPackageResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *DebPackageResponse) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *DebPackageResponse) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *DebPackageResponse) SetArtifact(v string) { + o.Artifact = &v +} + +// GetRelativePath returns the RelativePath field value if set, zero value otherwise. +func (o *DebPackageResponse) GetRelativePath() string { + if o == nil || IsNil(o.RelativePath) { + var ret string + return ret + } + return *o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetRelativePathOk() (*string, bool) { + if o == nil || IsNil(o.RelativePath) { + return nil, false + } + return o.RelativePath, true +} + +// HasRelativePath returns a boolean if a field has been set. +func (o *DebPackageResponse) HasRelativePath() bool { + if o != nil && !IsNil(o.RelativePath) { + return true + } + + return false +} + +// SetRelativePath gets a reference to the given string and assigns it to the RelativePath field. +func (o *DebPackageResponse) SetRelativePath(v string) { + o.RelativePath = &v +} + +// GetDistribution returns the Distribution field value if set, zero value otherwise. +func (o *DebPackageResponse) GetDistribution() string { + if o == nil || IsNil(o.Distribution) { + var ret string + return ret + } + return *o.Distribution +} + +// GetDistributionOk returns a tuple with the Distribution field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetDistributionOk() (*string, bool) { + if o == nil || IsNil(o.Distribution) { + return nil, false + } + return o.Distribution, true +} + +// HasDistribution returns a boolean if a field has been set. +func (o *DebPackageResponse) HasDistribution() bool { + if o != nil && !IsNil(o.Distribution) { + return true + } + + return false +} + +// SetDistribution gets a reference to the given string and assigns it to the Distribution field. +func (o *DebPackageResponse) SetDistribution(v string) { + o.Distribution = &v +} + +// GetComponent returns the Component field value if set, zero value otherwise. +func (o *DebPackageResponse) GetComponent() string { + if o == nil || IsNil(o.Component) { + var ret string + return ret + } + return *o.Component +} + +// GetComponentOk returns a tuple with the Component field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetComponentOk() (*string, bool) { + if o == nil || IsNil(o.Component) { + return nil, false + } + return o.Component, true +} + +// HasComponent returns a boolean if a field has been set. +func (o *DebPackageResponse) HasComponent() bool { + if o != nil && !IsNil(o.Component) { + return true + } + + return false +} + +// SetComponent gets a reference to the given string and assigns it to the Component field. +func (o *DebPackageResponse) SetComponent(v string) { + o.Component = &v +} + +// GetMd5 returns the Md5 field value if set, zero value otherwise. +func (o *DebPackageResponse) GetMd5() string { + if o == nil || IsNil(o.Md5) { + var ret string + return ret + } + return *o.Md5 +} + +// GetMd5Ok returns a tuple with the Md5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetMd5Ok() (*string, bool) { + if o == nil || IsNil(o.Md5) { + return nil, false + } + return o.Md5, true +} + +// HasMd5 returns a boolean if a field has been set. +func (o *DebPackageResponse) HasMd5() bool { + if o != nil && !IsNil(o.Md5) { + return true + } + + return false +} + +// SetMd5 gets a reference to the given string and assigns it to the Md5 field. +func (o *DebPackageResponse) SetMd5(v string) { + o.Md5 = &v +} + +// GetSha1 returns the Sha1 field value if set, zero value otherwise. +func (o *DebPackageResponse) GetSha1() string { + if o == nil || IsNil(o.Sha1) { + var ret string + return ret + } + return *o.Sha1 +} + +// GetSha1Ok returns a tuple with the Sha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetSha1Ok() (*string, bool) { + if o == nil || IsNil(o.Sha1) { + return nil, false + } + return o.Sha1, true +} + +// HasSha1 returns a boolean if a field has been set. +func (o *DebPackageResponse) HasSha1() bool { + if o != nil && !IsNil(o.Sha1) { + return true + } + + return false +} + +// SetSha1 gets a reference to the given string and assigns it to the Sha1 field. +func (o *DebPackageResponse) SetSha1(v string) { + o.Sha1 = &v +} + +// GetSha224 returns the Sha224 field value if set, zero value otherwise. +func (o *DebPackageResponse) GetSha224() string { + if o == nil || IsNil(o.Sha224) { + var ret string + return ret + } + return *o.Sha224 +} + +// GetSha224Ok returns a tuple with the Sha224 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetSha224Ok() (*string, bool) { + if o == nil || IsNil(o.Sha224) { + return nil, false + } + return o.Sha224, true +} + +// HasSha224 returns a boolean if a field has been set. +func (o *DebPackageResponse) HasSha224() bool { + if o != nil && !IsNil(o.Sha224) { + return true + } + + return false +} + +// SetSha224 gets a reference to the given string and assigns it to the Sha224 field. +func (o *DebPackageResponse) SetSha224(v string) { + o.Sha224 = &v +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise. +func (o *DebPackageResponse) GetSha256() string { + if o == nil || IsNil(o.Sha256) { + var ret string + return ret + } + return *o.Sha256 +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetSha256Ok() (*string, bool) { + if o == nil || IsNil(o.Sha256) { + return nil, false + } + return o.Sha256, true +} + +// HasSha256 returns a boolean if a field has been set. +func (o *DebPackageResponse) HasSha256() bool { + if o != nil && !IsNil(o.Sha256) { + return true + } + + return false +} + +// SetSha256 gets a reference to the given string and assigns it to the Sha256 field. +func (o *DebPackageResponse) SetSha256(v string) { + o.Sha256 = &v +} + +// GetSha384 returns the Sha384 field value if set, zero value otherwise. +func (o *DebPackageResponse) GetSha384() string { + if o == nil || IsNil(o.Sha384) { + var ret string + return ret + } + return *o.Sha384 +} + +// GetSha384Ok returns a tuple with the Sha384 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetSha384Ok() (*string, bool) { + if o == nil || IsNil(o.Sha384) { + return nil, false + } + return o.Sha384, true +} + +// HasSha384 returns a boolean if a field has been set. +func (o *DebPackageResponse) HasSha384() bool { + if o != nil && !IsNil(o.Sha384) { + return true + } + + return false +} + +// SetSha384 gets a reference to the given string and assigns it to the Sha384 field. +func (o *DebPackageResponse) SetSha384(v string) { + o.Sha384 = &v +} + +// GetSha512 returns the Sha512 field value if set, zero value otherwise. +func (o *DebPackageResponse) GetSha512() string { + if o == nil || IsNil(o.Sha512) { + var ret string + return ret + } + return *o.Sha512 +} + +// GetSha512Ok returns a tuple with the Sha512 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetSha512Ok() (*string, bool) { + if o == nil || IsNil(o.Sha512) { + return nil, false + } + return o.Sha512, true +} + +// HasSha512 returns a boolean if a field has been set. +func (o *DebPackageResponse) HasSha512() bool { + if o != nil && !IsNil(o.Sha512) { + return true + } + + return false +} + +// SetSha512 gets a reference to the given string and assigns it to the Sha512 field. +func (o *DebPackageResponse) SetSha512(v string) { + o.Sha512 = &v +} + +// GetPackage returns the Package field value if set, zero value otherwise. +func (o *DebPackageResponse) GetPackage() string { + if o == nil || IsNil(o.Package) { + var ret string + return ret + } + return *o.Package +} + +// GetPackageOk returns a tuple with the Package field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetPackageOk() (*string, bool) { + if o == nil || IsNil(o.Package) { + return nil, false + } + return o.Package, true +} + +// HasPackage returns a boolean if a field has been set. +func (o *DebPackageResponse) HasPackage() bool { + if o != nil && !IsNil(o.Package) { + return true + } + + return false +} + +// SetPackage gets a reference to the given string and assigns it to the Package field. +func (o *DebPackageResponse) SetPackage(v string) { + o.Package = &v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *DebPackageResponse) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *DebPackageResponse) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *DebPackageResponse) SetSource(v string) { + o.Source = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *DebPackageResponse) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *DebPackageResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *DebPackageResponse) SetVersion(v string) { + o.Version = &v +} + +// GetArchitecture returns the Architecture field value if set, zero value otherwise. +func (o *DebPackageResponse) GetArchitecture() string { + if o == nil || IsNil(o.Architecture) { + var ret string + return ret + } + return *o.Architecture +} + +// GetArchitectureOk returns a tuple with the Architecture field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetArchitectureOk() (*string, bool) { + if o == nil || IsNil(o.Architecture) { + return nil, false + } + return o.Architecture, true +} + +// HasArchitecture returns a boolean if a field has been set. +func (o *DebPackageResponse) HasArchitecture() bool { + if o != nil && !IsNil(o.Architecture) { + return true + } + + return false +} + +// SetArchitecture gets a reference to the given string and assigns it to the Architecture field. +func (o *DebPackageResponse) SetArchitecture(v string) { + o.Architecture = &v +} + +// GetSection returns the Section field value if set, zero value otherwise. +func (o *DebPackageResponse) GetSection() string { + if o == nil || IsNil(o.Section) { + var ret string + return ret + } + return *o.Section +} + +// GetSectionOk returns a tuple with the Section field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetSectionOk() (*string, bool) { + if o == nil || IsNil(o.Section) { + return nil, false + } + return o.Section, true +} + +// HasSection returns a boolean if a field has been set. +func (o *DebPackageResponse) HasSection() bool { + if o != nil && !IsNil(o.Section) { + return true + } + + return false +} + +// SetSection gets a reference to the given string and assigns it to the Section field. +func (o *DebPackageResponse) SetSection(v string) { + o.Section = &v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *DebPackageResponse) GetPriority() string { + if o == nil || IsNil(o.Priority) { + var ret string + return ret + } + return *o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetPriorityOk() (*string, bool) { + if o == nil || IsNil(o.Priority) { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *DebPackageResponse) HasPriority() bool { + if o != nil && !IsNil(o.Priority) { + return true + } + + return false +} + +// SetPriority gets a reference to the given string and assigns it to the Priority field. +func (o *DebPackageResponse) SetPriority(v string) { + o.Priority = &v +} + +// GetOrigin returns the Origin field value if set, zero value otherwise. +func (o *DebPackageResponse) GetOrigin() string { + if o == nil || IsNil(o.Origin) { + var ret string + return ret + } + return *o.Origin +} + +// GetOriginOk returns a tuple with the Origin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetOriginOk() (*string, bool) { + if o == nil || IsNil(o.Origin) { + return nil, false + } + return o.Origin, true +} + +// HasOrigin returns a boolean if a field has been set. +func (o *DebPackageResponse) HasOrigin() bool { + if o != nil && !IsNil(o.Origin) { + return true + } + + return false +} + +// SetOrigin gets a reference to the given string and assigns it to the Origin field. +func (o *DebPackageResponse) SetOrigin(v string) { + o.Origin = &v +} + +// GetTag returns the Tag field value if set, zero value otherwise. +func (o *DebPackageResponse) GetTag() string { + if o == nil || IsNil(o.Tag) { + var ret string + return ret + } + return *o.Tag +} + +// GetTagOk returns a tuple with the Tag field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetTagOk() (*string, bool) { + if o == nil || IsNil(o.Tag) { + return nil, false + } + return o.Tag, true +} + +// HasTag returns a boolean if a field has been set. +func (o *DebPackageResponse) HasTag() bool { + if o != nil && !IsNil(o.Tag) { + return true + } + + return false +} + +// SetTag gets a reference to the given string and assigns it to the Tag field. +func (o *DebPackageResponse) SetTag(v string) { + o.Tag = &v +} + +// GetBugs returns the Bugs field value if set, zero value otherwise. +func (o *DebPackageResponse) GetBugs() string { + if o == nil || IsNil(o.Bugs) { + var ret string + return ret + } + return *o.Bugs +} + +// GetBugsOk returns a tuple with the Bugs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetBugsOk() (*string, bool) { + if o == nil || IsNil(o.Bugs) { + return nil, false + } + return o.Bugs, true +} + +// HasBugs returns a boolean if a field has been set. +func (o *DebPackageResponse) HasBugs() bool { + if o != nil && !IsNil(o.Bugs) { + return true + } + + return false +} + +// SetBugs gets a reference to the given string and assigns it to the Bugs field. +func (o *DebPackageResponse) SetBugs(v string) { + o.Bugs = &v +} + +// GetEssential returns the Essential field value if set, zero value otherwise. +func (o *DebPackageResponse) GetEssential() string { + if o == nil || IsNil(o.Essential) { + var ret string + return ret + } + return *o.Essential +} + +// GetEssentialOk returns a tuple with the Essential field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetEssentialOk() (*string, bool) { + if o == nil || IsNil(o.Essential) { + return nil, false + } + return o.Essential, true +} + +// HasEssential returns a boolean if a field has been set. +func (o *DebPackageResponse) HasEssential() bool { + if o != nil && !IsNil(o.Essential) { + return true + } + + return false +} + +// SetEssential gets a reference to the given string and assigns it to the Essential field. +func (o *DebPackageResponse) SetEssential(v string) { + o.Essential = &v +} + +// GetBuildEssential returns the BuildEssential field value if set, zero value otherwise. +func (o *DebPackageResponse) GetBuildEssential() string { + if o == nil || IsNil(o.BuildEssential) { + var ret string + return ret + } + return *o.BuildEssential +} + +// GetBuildEssentialOk returns a tuple with the BuildEssential field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetBuildEssentialOk() (*string, bool) { + if o == nil || IsNil(o.BuildEssential) { + return nil, false + } + return o.BuildEssential, true +} + +// HasBuildEssential returns a boolean if a field has been set. +func (o *DebPackageResponse) HasBuildEssential() bool { + if o != nil && !IsNil(o.BuildEssential) { + return true + } + + return false +} + +// SetBuildEssential gets a reference to the given string and assigns it to the BuildEssential field. +func (o *DebPackageResponse) SetBuildEssential(v string) { + o.BuildEssential = &v +} + +// GetInstalledSize returns the InstalledSize field value if set, zero value otherwise. +func (o *DebPackageResponse) GetInstalledSize() string { + if o == nil || IsNil(o.InstalledSize) { + var ret string + return ret + } + return *o.InstalledSize +} + +// GetInstalledSizeOk returns a tuple with the InstalledSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetInstalledSizeOk() (*string, bool) { + if o == nil || IsNil(o.InstalledSize) { + return nil, false + } + return o.InstalledSize, true +} + +// HasInstalledSize returns a boolean if a field has been set. +func (o *DebPackageResponse) HasInstalledSize() bool { + if o != nil && !IsNil(o.InstalledSize) { + return true + } + + return false +} + +// SetInstalledSize gets a reference to the given string and assigns it to the InstalledSize field. +func (o *DebPackageResponse) SetInstalledSize(v string) { + o.InstalledSize = &v +} + +// GetMaintainer returns the Maintainer field value if set, zero value otherwise. +func (o *DebPackageResponse) GetMaintainer() string { + if o == nil || IsNil(o.Maintainer) { + var ret string + return ret + } + return *o.Maintainer +} + +// GetMaintainerOk returns a tuple with the Maintainer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetMaintainerOk() (*string, bool) { + if o == nil || IsNil(o.Maintainer) { + return nil, false + } + return o.Maintainer, true +} + +// HasMaintainer returns a boolean if a field has been set. +func (o *DebPackageResponse) HasMaintainer() bool { + if o != nil && !IsNil(o.Maintainer) { + return true + } + + return false +} + +// SetMaintainer gets a reference to the given string and assigns it to the Maintainer field. +func (o *DebPackageResponse) SetMaintainer(v string) { + o.Maintainer = &v +} + +// GetOriginalMaintainer returns the OriginalMaintainer field value if set, zero value otherwise. +func (o *DebPackageResponse) GetOriginalMaintainer() string { + if o == nil || IsNil(o.OriginalMaintainer) { + var ret string + return ret + } + return *o.OriginalMaintainer +} + +// GetOriginalMaintainerOk returns a tuple with the OriginalMaintainer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetOriginalMaintainerOk() (*string, bool) { + if o == nil || IsNil(o.OriginalMaintainer) { + return nil, false + } + return o.OriginalMaintainer, true +} + +// HasOriginalMaintainer returns a boolean if a field has been set. +func (o *DebPackageResponse) HasOriginalMaintainer() bool { + if o != nil && !IsNil(o.OriginalMaintainer) { + return true + } + + return false +} + +// SetOriginalMaintainer gets a reference to the given string and assigns it to the OriginalMaintainer field. +func (o *DebPackageResponse) SetOriginalMaintainer(v string) { + o.OriginalMaintainer = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *DebPackageResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *DebPackageResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *DebPackageResponse) SetDescription(v string) { + o.Description = &v +} + +// GetDescriptionMd5 returns the DescriptionMd5 field value if set, zero value otherwise. +func (o *DebPackageResponse) GetDescriptionMd5() string { + if o == nil || IsNil(o.DescriptionMd5) { + var ret string + return ret + } + return *o.DescriptionMd5 +} + +// GetDescriptionMd5Ok returns a tuple with the DescriptionMd5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetDescriptionMd5Ok() (*string, bool) { + if o == nil || IsNil(o.DescriptionMd5) { + return nil, false + } + return o.DescriptionMd5, true +} + +// HasDescriptionMd5 returns a boolean if a field has been set. +func (o *DebPackageResponse) HasDescriptionMd5() bool { + if o != nil && !IsNil(o.DescriptionMd5) { + return true + } + + return false +} + +// SetDescriptionMd5 gets a reference to the given string and assigns it to the DescriptionMd5 field. +func (o *DebPackageResponse) SetDescriptionMd5(v string) { + o.DescriptionMd5 = &v +} + +// GetHomepage returns the Homepage field value if set, zero value otherwise. +func (o *DebPackageResponse) GetHomepage() string { + if o == nil || IsNil(o.Homepage) { + var ret string + return ret + } + return *o.Homepage +} + +// GetHomepageOk returns a tuple with the Homepage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetHomepageOk() (*string, bool) { + if o == nil || IsNil(o.Homepage) { + return nil, false + } + return o.Homepage, true +} + +// HasHomepage returns a boolean if a field has been set. +func (o *DebPackageResponse) HasHomepage() bool { + if o != nil && !IsNil(o.Homepage) { + return true + } + + return false +} + +// SetHomepage gets a reference to the given string and assigns it to the Homepage field. +func (o *DebPackageResponse) SetHomepage(v string) { + o.Homepage = &v +} + +// GetBuiltUsing returns the BuiltUsing field value if set, zero value otherwise. +func (o *DebPackageResponse) GetBuiltUsing() string { + if o == nil || IsNil(o.BuiltUsing) { + var ret string + return ret + } + return *o.BuiltUsing +} + +// GetBuiltUsingOk returns a tuple with the BuiltUsing field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetBuiltUsingOk() (*string, bool) { + if o == nil || IsNil(o.BuiltUsing) { + return nil, false + } + return o.BuiltUsing, true +} + +// HasBuiltUsing returns a boolean if a field has been set. +func (o *DebPackageResponse) HasBuiltUsing() bool { + if o != nil && !IsNil(o.BuiltUsing) { + return true + } + + return false +} + +// SetBuiltUsing gets a reference to the given string and assigns it to the BuiltUsing field. +func (o *DebPackageResponse) SetBuiltUsing(v string) { + o.BuiltUsing = &v +} + +// GetAutoBuiltPackage returns the AutoBuiltPackage field value if set, zero value otherwise. +func (o *DebPackageResponse) GetAutoBuiltPackage() string { + if o == nil || IsNil(o.AutoBuiltPackage) { + var ret string + return ret + } + return *o.AutoBuiltPackage +} + +// GetAutoBuiltPackageOk returns a tuple with the AutoBuiltPackage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetAutoBuiltPackageOk() (*string, bool) { + if o == nil || IsNil(o.AutoBuiltPackage) { + return nil, false + } + return o.AutoBuiltPackage, true +} + +// HasAutoBuiltPackage returns a boolean if a field has been set. +func (o *DebPackageResponse) HasAutoBuiltPackage() bool { + if o != nil && !IsNil(o.AutoBuiltPackage) { + return true + } + + return false +} + +// SetAutoBuiltPackage gets a reference to the given string and assigns it to the AutoBuiltPackage field. +func (o *DebPackageResponse) SetAutoBuiltPackage(v string) { + o.AutoBuiltPackage = &v +} + +// GetMultiArch returns the MultiArch field value if set, zero value otherwise. +func (o *DebPackageResponse) GetMultiArch() string { + if o == nil || IsNil(o.MultiArch) { + var ret string + return ret + } + return *o.MultiArch +} + +// GetMultiArchOk returns a tuple with the MultiArch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetMultiArchOk() (*string, bool) { + if o == nil || IsNil(o.MultiArch) { + return nil, false + } + return o.MultiArch, true +} + +// HasMultiArch returns a boolean if a field has been set. +func (o *DebPackageResponse) HasMultiArch() bool { + if o != nil && !IsNil(o.MultiArch) { + return true + } + + return false +} + +// SetMultiArch gets a reference to the given string and assigns it to the MultiArch field. +func (o *DebPackageResponse) SetMultiArch(v string) { + o.MultiArch = &v +} + +// GetBreaks returns the Breaks field value if set, zero value otherwise. +func (o *DebPackageResponse) GetBreaks() string { + if o == nil || IsNil(o.Breaks) { + var ret string + return ret + } + return *o.Breaks +} + +// GetBreaksOk returns a tuple with the Breaks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetBreaksOk() (*string, bool) { + if o == nil || IsNil(o.Breaks) { + return nil, false + } + return o.Breaks, true +} + +// HasBreaks returns a boolean if a field has been set. +func (o *DebPackageResponse) HasBreaks() bool { + if o != nil && !IsNil(o.Breaks) { + return true + } + + return false +} + +// SetBreaks gets a reference to the given string and assigns it to the Breaks field. +func (o *DebPackageResponse) SetBreaks(v string) { + o.Breaks = &v +} + +// GetConflicts returns the Conflicts field value if set, zero value otherwise. +func (o *DebPackageResponse) GetConflicts() string { + if o == nil || IsNil(o.Conflicts) { + var ret string + return ret + } + return *o.Conflicts +} + +// GetConflictsOk returns a tuple with the Conflicts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetConflictsOk() (*string, bool) { + if o == nil || IsNil(o.Conflicts) { + return nil, false + } + return o.Conflicts, true +} + +// HasConflicts returns a boolean if a field has been set. +func (o *DebPackageResponse) HasConflicts() bool { + if o != nil && !IsNil(o.Conflicts) { + return true + } + + return false +} + +// SetConflicts gets a reference to the given string and assigns it to the Conflicts field. +func (o *DebPackageResponse) SetConflicts(v string) { + o.Conflicts = &v +} + +// GetDepends returns the Depends field value if set, zero value otherwise. +func (o *DebPackageResponse) GetDepends() string { + if o == nil || IsNil(o.Depends) { + var ret string + return ret + } + return *o.Depends +} + +// GetDependsOk returns a tuple with the Depends field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetDependsOk() (*string, bool) { + if o == nil || IsNil(o.Depends) { + return nil, false + } + return o.Depends, true +} + +// HasDepends returns a boolean if a field has been set. +func (o *DebPackageResponse) HasDepends() bool { + if o != nil && !IsNil(o.Depends) { + return true + } + + return false +} + +// SetDepends gets a reference to the given string and assigns it to the Depends field. +func (o *DebPackageResponse) SetDepends(v string) { + o.Depends = &v +} + +// GetRecommends returns the Recommends field value if set, zero value otherwise. +func (o *DebPackageResponse) GetRecommends() string { + if o == nil || IsNil(o.Recommends) { + var ret string + return ret + } + return *o.Recommends +} + +// GetRecommendsOk returns a tuple with the Recommends field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetRecommendsOk() (*string, bool) { + if o == nil || IsNil(o.Recommends) { + return nil, false + } + return o.Recommends, true +} + +// HasRecommends returns a boolean if a field has been set. +func (o *DebPackageResponse) HasRecommends() bool { + if o != nil && !IsNil(o.Recommends) { + return true + } + + return false +} + +// SetRecommends gets a reference to the given string and assigns it to the Recommends field. +func (o *DebPackageResponse) SetRecommends(v string) { + o.Recommends = &v +} + +// GetSuggests returns the Suggests field value if set, zero value otherwise. +func (o *DebPackageResponse) GetSuggests() string { + if o == nil || IsNil(o.Suggests) { + var ret string + return ret + } + return *o.Suggests +} + +// GetSuggestsOk returns a tuple with the Suggests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetSuggestsOk() (*string, bool) { + if o == nil || IsNil(o.Suggests) { + return nil, false + } + return o.Suggests, true +} + +// HasSuggests returns a boolean if a field has been set. +func (o *DebPackageResponse) HasSuggests() bool { + if o != nil && !IsNil(o.Suggests) { + return true + } + + return false +} + +// SetSuggests gets a reference to the given string and assigns it to the Suggests field. +func (o *DebPackageResponse) SetSuggests(v string) { + o.Suggests = &v +} + +// GetEnhances returns the Enhances field value if set, zero value otherwise. +func (o *DebPackageResponse) GetEnhances() string { + if o == nil || IsNil(o.Enhances) { + var ret string + return ret + } + return *o.Enhances +} + +// GetEnhancesOk returns a tuple with the Enhances field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetEnhancesOk() (*string, bool) { + if o == nil || IsNil(o.Enhances) { + return nil, false + } + return o.Enhances, true +} + +// HasEnhances returns a boolean if a field has been set. +func (o *DebPackageResponse) HasEnhances() bool { + if o != nil && !IsNil(o.Enhances) { + return true + } + + return false +} + +// SetEnhances gets a reference to the given string and assigns it to the Enhances field. +func (o *DebPackageResponse) SetEnhances(v string) { + o.Enhances = &v +} + +// GetPreDepends returns the PreDepends field value if set, zero value otherwise. +func (o *DebPackageResponse) GetPreDepends() string { + if o == nil || IsNil(o.PreDepends) { + var ret string + return ret + } + return *o.PreDepends +} + +// GetPreDependsOk returns a tuple with the PreDepends field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetPreDependsOk() (*string, bool) { + if o == nil || IsNil(o.PreDepends) { + return nil, false + } + return o.PreDepends, true +} + +// HasPreDepends returns a boolean if a field has been set. +func (o *DebPackageResponse) HasPreDepends() bool { + if o != nil && !IsNil(o.PreDepends) { + return true + } + + return false +} + +// SetPreDepends gets a reference to the given string and assigns it to the PreDepends field. +func (o *DebPackageResponse) SetPreDepends(v string) { + o.PreDepends = &v +} + +// GetProvides returns the Provides field value if set, zero value otherwise. +func (o *DebPackageResponse) GetProvides() string { + if o == nil || IsNil(o.Provides) { + var ret string + return ret + } + return *o.Provides +} + +// GetProvidesOk returns a tuple with the Provides field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetProvidesOk() (*string, bool) { + if o == nil || IsNil(o.Provides) { + return nil, false + } + return o.Provides, true +} + +// HasProvides returns a boolean if a field has been set. +func (o *DebPackageResponse) HasProvides() bool { + if o != nil && !IsNil(o.Provides) { + return true + } + + return false +} + +// SetProvides gets a reference to the given string and assigns it to the Provides field. +func (o *DebPackageResponse) SetProvides(v string) { + o.Provides = &v +} + +// GetReplaces returns the Replaces field value if set, zero value otherwise. +func (o *DebPackageResponse) GetReplaces() string { + if o == nil || IsNil(o.Replaces) { + var ret string + return ret + } + return *o.Replaces +} + +// GetReplacesOk returns a tuple with the Replaces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebPackageResponse) GetReplacesOk() (*string, bool) { + if o == nil || IsNil(o.Replaces) { + return nil, false + } + return o.Replaces, true +} + +// HasReplaces returns a boolean if a field has been set. +func (o *DebPackageResponse) HasReplaces() bool { + if o != nil && !IsNil(o.Replaces) { + return true + } + + return false +} + +// SetReplaces gets a reference to the given string and assigns it to the Replaces field. +func (o *DebPackageResponse) SetReplaces(v string) { + o.Replaces = &v +} + +func (o DebPackageResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebPackageResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + if !IsNil(o.RelativePath) { + toSerialize["relative_path"] = o.RelativePath + } + if !IsNil(o.Distribution) { + toSerialize["distribution"] = o.Distribution + } + if !IsNil(o.Component) { + toSerialize["component"] = o.Component + } + if !IsNil(o.Md5) { + toSerialize["md5"] = o.Md5 + } + if !IsNil(o.Sha1) { + toSerialize["sha1"] = o.Sha1 + } + if !IsNil(o.Sha224) { + toSerialize["sha224"] = o.Sha224 + } + if !IsNil(o.Sha256) { + toSerialize["sha256"] = o.Sha256 + } + if !IsNil(o.Sha384) { + toSerialize["sha384"] = o.Sha384 + } + if !IsNil(o.Sha512) { + toSerialize["sha512"] = o.Sha512 + } + if !IsNil(o.Package) { + toSerialize["package"] = o.Package + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.Architecture) { + toSerialize["architecture"] = o.Architecture + } + if !IsNil(o.Section) { + toSerialize["section"] = o.Section + } + if !IsNil(o.Priority) { + toSerialize["priority"] = o.Priority + } + if !IsNil(o.Origin) { + toSerialize["origin"] = o.Origin + } + if !IsNil(o.Tag) { + toSerialize["tag"] = o.Tag + } + if !IsNil(o.Bugs) { + toSerialize["bugs"] = o.Bugs + } + if !IsNil(o.Essential) { + toSerialize["essential"] = o.Essential + } + if !IsNil(o.BuildEssential) { + toSerialize["build_essential"] = o.BuildEssential + } + if !IsNil(o.InstalledSize) { + toSerialize["installed_size"] = o.InstalledSize + } + if !IsNil(o.Maintainer) { + toSerialize["maintainer"] = o.Maintainer + } + if !IsNil(o.OriginalMaintainer) { + toSerialize["original_maintainer"] = o.OriginalMaintainer + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.DescriptionMd5) { + toSerialize["description_md5"] = o.DescriptionMd5 + } + if !IsNil(o.Homepage) { + toSerialize["homepage"] = o.Homepage + } + if !IsNil(o.BuiltUsing) { + toSerialize["built_using"] = o.BuiltUsing + } + if !IsNil(o.AutoBuiltPackage) { + toSerialize["auto_built_package"] = o.AutoBuiltPackage + } + if !IsNil(o.MultiArch) { + toSerialize["multi_arch"] = o.MultiArch + } + if !IsNil(o.Breaks) { + toSerialize["breaks"] = o.Breaks + } + if !IsNil(o.Conflicts) { + toSerialize["conflicts"] = o.Conflicts + } + if !IsNil(o.Depends) { + toSerialize["depends"] = o.Depends + } + if !IsNil(o.Recommends) { + toSerialize["recommends"] = o.Recommends + } + if !IsNil(o.Suggests) { + toSerialize["suggests"] = o.Suggests + } + if !IsNil(o.Enhances) { + toSerialize["enhances"] = o.Enhances + } + if !IsNil(o.PreDepends) { + toSerialize["pre_depends"] = o.PreDepends + } + if !IsNil(o.Provides) { + toSerialize["provides"] = o.Provides + } + if !IsNil(o.Replaces) { + toSerialize["replaces"] = o.Replaces + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebPackageResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebPackageResponse := _DebPackageResponse{} + + if err = json.Unmarshal(bytes, &varDebPackageResponse); err == nil { + *o = DebPackageResponse(varDebPackageResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "distribution") + delete(additionalProperties, "component") + delete(additionalProperties, "md5") + delete(additionalProperties, "sha1") + delete(additionalProperties, "sha224") + delete(additionalProperties, "sha256") + delete(additionalProperties, "sha384") + delete(additionalProperties, "sha512") + delete(additionalProperties, "package") + delete(additionalProperties, "source") + delete(additionalProperties, "version") + delete(additionalProperties, "architecture") + delete(additionalProperties, "section") + delete(additionalProperties, "priority") + delete(additionalProperties, "origin") + delete(additionalProperties, "tag") + delete(additionalProperties, "bugs") + delete(additionalProperties, "essential") + delete(additionalProperties, "build_essential") + delete(additionalProperties, "installed_size") + delete(additionalProperties, "maintainer") + delete(additionalProperties, "original_maintainer") + delete(additionalProperties, "description") + delete(additionalProperties, "description_md5") + delete(additionalProperties, "homepage") + delete(additionalProperties, "built_using") + delete(additionalProperties, "auto_built_package") + delete(additionalProperties, "multi_arch") + delete(additionalProperties, "breaks") + delete(additionalProperties, "conflicts") + delete(additionalProperties, "depends") + delete(additionalProperties, "recommends") + delete(additionalProperties, "suggests") + delete(additionalProperties, "enhances") + delete(additionalProperties, "pre_depends") + delete(additionalProperties, "provides") + delete(additionalProperties, "replaces") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebPackageResponse struct { + value *DebPackageResponse + isSet bool +} + +func (v NullableDebPackageResponse) Get() *DebPackageResponse { + return v.value +} + +func (v *NullableDebPackageResponse) Set(val *DebPackageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebPackageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebPackageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebPackageResponse(val *DebPackageResponse) *NullableDebPackageResponse { + return &NullableDebPackageResponse{value: val, isSet: true} +} + +func (v NullableDebPackageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebPackageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release.go new file mode 100644 index 0000000000..523e0ecd6b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release.go @@ -0,0 +1,237 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the DebRelease type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebRelease{} + +// DebRelease A Serializer for Release. +type DebRelease struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + Codename string `json:"codename"` + Suite string `json:"suite"` + Distribution string `json:"distribution"` + AdditionalProperties map[string]interface{} +} + +type _DebRelease DebRelease + +// NewDebRelease instantiates a new DebRelease object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebRelease(codename string, suite string, distribution string) *DebRelease { + this := DebRelease{} + this.Codename = codename + this.Suite = suite + this.Distribution = distribution + return &this +} + +// NewDebReleaseWithDefaults instantiates a new DebRelease object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebReleaseWithDefaults() *DebRelease { + this := DebRelease{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebRelease) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebRelease) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebRelease) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebRelease) SetRepository(v string) { + o.Repository = &v +} + +// GetCodename returns the Codename field value +func (o *DebRelease) GetCodename() string { + if o == nil { + var ret string + return ret + } + + return o.Codename +} + +// GetCodenameOk returns a tuple with the Codename field value +// and a boolean to check if the value has been set. +func (o *DebRelease) GetCodenameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Codename, true +} + +// SetCodename sets field value +func (o *DebRelease) SetCodename(v string) { + o.Codename = v +} + +// GetSuite returns the Suite field value +func (o *DebRelease) GetSuite() string { + if o == nil { + var ret string + return ret + } + + return o.Suite +} + +// GetSuiteOk returns a tuple with the Suite field value +// and a boolean to check if the value has been set. +func (o *DebRelease) GetSuiteOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Suite, true +} + +// SetSuite sets field value +func (o *DebRelease) SetSuite(v string) { + o.Suite = v +} + +// GetDistribution returns the Distribution field value +func (o *DebRelease) GetDistribution() string { + if o == nil { + var ret string + return ret + } + + return o.Distribution +} + +// GetDistributionOk returns a tuple with the Distribution field value +// and a boolean to check if the value has been set. +func (o *DebRelease) GetDistributionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Distribution, true +} + +// SetDistribution sets field value +func (o *DebRelease) SetDistribution(v string) { + o.Distribution = v +} + +func (o DebRelease) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebRelease) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["codename"] = o.Codename + toSerialize["suite"] = o.Suite + toSerialize["distribution"] = o.Distribution + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebRelease) UnmarshalJSON(bytes []byte) (err error) { + varDebRelease := _DebRelease{} + + if err = json.Unmarshal(bytes, &varDebRelease); err == nil { + *o = DebRelease(varDebRelease) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "codename") + delete(additionalProperties, "suite") + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebRelease struct { + value *DebRelease + isSet bool +} + +func (v NullableDebRelease) Get() *DebRelease { + return v.value +} + +func (v *NullableDebRelease) Set(val *DebRelease) { + v.value = val + v.isSet = true +} + +func (v NullableDebRelease) IsSet() bool { + return v.isSet +} + +func (v *NullableDebRelease) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebRelease(val *DebRelease) *NullableDebRelease { + return &NullableDebRelease{value: val, isSet: true} +} + +func (v NullableDebRelease) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebRelease) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_architecture.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_architecture.go new file mode 100644 index 0000000000..a8944d5cca --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_architecture.go @@ -0,0 +1,267 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the DebReleaseArchitecture type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebReleaseArchitecture{} + +// DebReleaseArchitecture A Serializer for ReleaseArchitecture. +type DebReleaseArchitecture struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Name of the architecture. + Architecture string `json:"architecture"` + // Name of the distribution. + Distribution string `json:"distribution"` + Codename string `json:"codename"` + Suite string `json:"suite"` + AdditionalProperties map[string]interface{} +} + +type _DebReleaseArchitecture DebReleaseArchitecture + +// NewDebReleaseArchitecture instantiates a new DebReleaseArchitecture object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebReleaseArchitecture(architecture string, distribution string, codename string, suite string) *DebReleaseArchitecture { + this := DebReleaseArchitecture{} + this.Architecture = architecture + this.Distribution = distribution + this.Codename = codename + this.Suite = suite + return &this +} + +// NewDebReleaseArchitectureWithDefaults instantiates a new DebReleaseArchitecture object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebReleaseArchitectureWithDefaults() *DebReleaseArchitecture { + this := DebReleaseArchitecture{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebReleaseArchitecture) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseArchitecture) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebReleaseArchitecture) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebReleaseArchitecture) SetRepository(v string) { + o.Repository = &v +} + +// GetArchitecture returns the Architecture field value +func (o *DebReleaseArchitecture) GetArchitecture() string { + if o == nil { + var ret string + return ret + } + + return o.Architecture +} + +// GetArchitectureOk returns a tuple with the Architecture field value +// and a boolean to check if the value has been set. +func (o *DebReleaseArchitecture) GetArchitectureOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Architecture, true +} + +// SetArchitecture sets field value +func (o *DebReleaseArchitecture) SetArchitecture(v string) { + o.Architecture = v +} + +// GetDistribution returns the Distribution field value +func (o *DebReleaseArchitecture) GetDistribution() string { + if o == nil { + var ret string + return ret + } + + return o.Distribution +} + +// GetDistributionOk returns a tuple with the Distribution field value +// and a boolean to check if the value has been set. +func (o *DebReleaseArchitecture) GetDistributionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Distribution, true +} + +// SetDistribution sets field value +func (o *DebReleaseArchitecture) SetDistribution(v string) { + o.Distribution = v +} + +// GetCodename returns the Codename field value +func (o *DebReleaseArchitecture) GetCodename() string { + if o == nil { + var ret string + return ret + } + + return o.Codename +} + +// GetCodenameOk returns a tuple with the Codename field value +// and a boolean to check if the value has been set. +func (o *DebReleaseArchitecture) GetCodenameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Codename, true +} + +// SetCodename sets field value +func (o *DebReleaseArchitecture) SetCodename(v string) { + o.Codename = v +} + +// GetSuite returns the Suite field value +func (o *DebReleaseArchitecture) GetSuite() string { + if o == nil { + var ret string + return ret + } + + return o.Suite +} + +// GetSuiteOk returns a tuple with the Suite field value +// and a boolean to check if the value has been set. +func (o *DebReleaseArchitecture) GetSuiteOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Suite, true +} + +// SetSuite sets field value +func (o *DebReleaseArchitecture) SetSuite(v string) { + o.Suite = v +} + +func (o DebReleaseArchitecture) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebReleaseArchitecture) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["architecture"] = o.Architecture + toSerialize["distribution"] = o.Distribution + toSerialize["codename"] = o.Codename + toSerialize["suite"] = o.Suite + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebReleaseArchitecture) UnmarshalJSON(bytes []byte) (err error) { + varDebReleaseArchitecture := _DebReleaseArchitecture{} + + if err = json.Unmarshal(bytes, &varDebReleaseArchitecture); err == nil { + *o = DebReleaseArchitecture(varDebReleaseArchitecture) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "architecture") + delete(additionalProperties, "distribution") + delete(additionalProperties, "codename") + delete(additionalProperties, "suite") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebReleaseArchitecture struct { + value *DebReleaseArchitecture + isSet bool +} + +func (v NullableDebReleaseArchitecture) Get() *DebReleaseArchitecture { + return v.value +} + +func (v *NullableDebReleaseArchitecture) Set(val *DebReleaseArchitecture) { + v.value = val + v.isSet = true +} + +func (v NullableDebReleaseArchitecture) IsSet() bool { + return v.isSet +} + +func (v *NullableDebReleaseArchitecture) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebReleaseArchitecture(val *DebReleaseArchitecture) *NullableDebReleaseArchitecture { + return &NullableDebReleaseArchitecture{value: val, isSet: true} +} + +func (v NullableDebReleaseArchitecture) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebReleaseArchitecture) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_architecture_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_architecture_response.go new file mode 100644 index 0000000000..64ebe11379 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_architecture_response.go @@ -0,0 +1,305 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebReleaseArchitectureResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebReleaseArchitectureResponse{} + +// DebReleaseArchitectureResponse A Serializer for ReleaseArchitecture. +type DebReleaseArchitectureResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Name of the architecture. + Architecture string `json:"architecture"` + // Name of the distribution. + Distribution string `json:"distribution"` + Codename string `json:"codename"` + Suite string `json:"suite"` + AdditionalProperties map[string]interface{} +} + +type _DebReleaseArchitectureResponse DebReleaseArchitectureResponse + +// NewDebReleaseArchitectureResponse instantiates a new DebReleaseArchitectureResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebReleaseArchitectureResponse(architecture string, distribution string, codename string, suite string) *DebReleaseArchitectureResponse { + this := DebReleaseArchitectureResponse{} + this.Architecture = architecture + this.Distribution = distribution + this.Codename = codename + this.Suite = suite + return &this +} + +// NewDebReleaseArchitectureResponseWithDefaults instantiates a new DebReleaseArchitectureResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebReleaseArchitectureResponseWithDefaults() *DebReleaseArchitectureResponse { + this := DebReleaseArchitectureResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebReleaseArchitectureResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseArchitectureResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebReleaseArchitectureResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebReleaseArchitectureResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebReleaseArchitectureResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseArchitectureResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebReleaseArchitectureResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebReleaseArchitectureResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArchitecture returns the Architecture field value +func (o *DebReleaseArchitectureResponse) GetArchitecture() string { + if o == nil { + var ret string + return ret + } + + return o.Architecture +} + +// GetArchitectureOk returns a tuple with the Architecture field value +// and a boolean to check if the value has been set. +func (o *DebReleaseArchitectureResponse) GetArchitectureOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Architecture, true +} + +// SetArchitecture sets field value +func (o *DebReleaseArchitectureResponse) SetArchitecture(v string) { + o.Architecture = v +} + +// GetDistribution returns the Distribution field value +func (o *DebReleaseArchitectureResponse) GetDistribution() string { + if o == nil { + var ret string + return ret + } + + return o.Distribution +} + +// GetDistributionOk returns a tuple with the Distribution field value +// and a boolean to check if the value has been set. +func (o *DebReleaseArchitectureResponse) GetDistributionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Distribution, true +} + +// SetDistribution sets field value +func (o *DebReleaseArchitectureResponse) SetDistribution(v string) { + o.Distribution = v +} + +// GetCodename returns the Codename field value +func (o *DebReleaseArchitectureResponse) GetCodename() string { + if o == nil { + var ret string + return ret + } + + return o.Codename +} + +// GetCodenameOk returns a tuple with the Codename field value +// and a boolean to check if the value has been set. +func (o *DebReleaseArchitectureResponse) GetCodenameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Codename, true +} + +// SetCodename sets field value +func (o *DebReleaseArchitectureResponse) SetCodename(v string) { + o.Codename = v +} + +// GetSuite returns the Suite field value +func (o *DebReleaseArchitectureResponse) GetSuite() string { + if o == nil { + var ret string + return ret + } + + return o.Suite +} + +// GetSuiteOk returns a tuple with the Suite field value +// and a boolean to check if the value has been set. +func (o *DebReleaseArchitectureResponse) GetSuiteOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Suite, true +} + +// SetSuite sets field value +func (o *DebReleaseArchitectureResponse) SetSuite(v string) { + o.Suite = v +} + +func (o DebReleaseArchitectureResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebReleaseArchitectureResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["architecture"] = o.Architecture + toSerialize["distribution"] = o.Distribution + toSerialize["codename"] = o.Codename + toSerialize["suite"] = o.Suite + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebReleaseArchitectureResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebReleaseArchitectureResponse := _DebReleaseArchitectureResponse{} + + if err = json.Unmarshal(bytes, &varDebReleaseArchitectureResponse); err == nil { + *o = DebReleaseArchitectureResponse(varDebReleaseArchitectureResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "architecture") + delete(additionalProperties, "distribution") + delete(additionalProperties, "codename") + delete(additionalProperties, "suite") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebReleaseArchitectureResponse struct { + value *DebReleaseArchitectureResponse + isSet bool +} + +func (v NullableDebReleaseArchitectureResponse) Get() *DebReleaseArchitectureResponse { + return v.value +} + +func (v *NullableDebReleaseArchitectureResponse) Set(val *DebReleaseArchitectureResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebReleaseArchitectureResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebReleaseArchitectureResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebReleaseArchitectureResponse(val *DebReleaseArchitectureResponse) *NullableDebReleaseArchitectureResponse { + return &NullableDebReleaseArchitectureResponse{value: val, isSet: true} +} + +func (v NullableDebReleaseArchitectureResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebReleaseArchitectureResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_component.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_component.go new file mode 100644 index 0000000000..d88aea2bbd --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_component.go @@ -0,0 +1,267 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the DebReleaseComponent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebReleaseComponent{} + +// DebReleaseComponent A Serializer for ReleaseComponent. +type DebReleaseComponent struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Name of the component. + Component string `json:"component"` + // Name of the distribution. + Distribution string `json:"distribution"` + Codename string `json:"codename"` + Suite string `json:"suite"` + AdditionalProperties map[string]interface{} +} + +type _DebReleaseComponent DebReleaseComponent + +// NewDebReleaseComponent instantiates a new DebReleaseComponent object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebReleaseComponent(component string, distribution string, codename string, suite string) *DebReleaseComponent { + this := DebReleaseComponent{} + this.Component = component + this.Distribution = distribution + this.Codename = codename + this.Suite = suite + return &this +} + +// NewDebReleaseComponentWithDefaults instantiates a new DebReleaseComponent object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebReleaseComponentWithDefaults() *DebReleaseComponent { + this := DebReleaseComponent{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebReleaseComponent) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseComponent) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebReleaseComponent) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebReleaseComponent) SetRepository(v string) { + o.Repository = &v +} + +// GetComponent returns the Component field value +func (o *DebReleaseComponent) GetComponent() string { + if o == nil { + var ret string + return ret + } + + return o.Component +} + +// GetComponentOk returns a tuple with the Component field value +// and a boolean to check if the value has been set. +func (o *DebReleaseComponent) GetComponentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Component, true +} + +// SetComponent sets field value +func (o *DebReleaseComponent) SetComponent(v string) { + o.Component = v +} + +// GetDistribution returns the Distribution field value +func (o *DebReleaseComponent) GetDistribution() string { + if o == nil { + var ret string + return ret + } + + return o.Distribution +} + +// GetDistributionOk returns a tuple with the Distribution field value +// and a boolean to check if the value has been set. +func (o *DebReleaseComponent) GetDistributionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Distribution, true +} + +// SetDistribution sets field value +func (o *DebReleaseComponent) SetDistribution(v string) { + o.Distribution = v +} + +// GetCodename returns the Codename field value +func (o *DebReleaseComponent) GetCodename() string { + if o == nil { + var ret string + return ret + } + + return o.Codename +} + +// GetCodenameOk returns a tuple with the Codename field value +// and a boolean to check if the value has been set. +func (o *DebReleaseComponent) GetCodenameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Codename, true +} + +// SetCodename sets field value +func (o *DebReleaseComponent) SetCodename(v string) { + o.Codename = v +} + +// GetSuite returns the Suite field value +func (o *DebReleaseComponent) GetSuite() string { + if o == nil { + var ret string + return ret + } + + return o.Suite +} + +// GetSuiteOk returns a tuple with the Suite field value +// and a boolean to check if the value has been set. +func (o *DebReleaseComponent) GetSuiteOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Suite, true +} + +// SetSuite sets field value +func (o *DebReleaseComponent) SetSuite(v string) { + o.Suite = v +} + +func (o DebReleaseComponent) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebReleaseComponent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["component"] = o.Component + toSerialize["distribution"] = o.Distribution + toSerialize["codename"] = o.Codename + toSerialize["suite"] = o.Suite + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebReleaseComponent) UnmarshalJSON(bytes []byte) (err error) { + varDebReleaseComponent := _DebReleaseComponent{} + + if err = json.Unmarshal(bytes, &varDebReleaseComponent); err == nil { + *o = DebReleaseComponent(varDebReleaseComponent) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "component") + delete(additionalProperties, "distribution") + delete(additionalProperties, "codename") + delete(additionalProperties, "suite") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebReleaseComponent struct { + value *DebReleaseComponent + isSet bool +} + +func (v NullableDebReleaseComponent) Get() *DebReleaseComponent { + return v.value +} + +func (v *NullableDebReleaseComponent) Set(val *DebReleaseComponent) { + v.value = val + v.isSet = true +} + +func (v NullableDebReleaseComponent) IsSet() bool { + return v.isSet +} + +func (v *NullableDebReleaseComponent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebReleaseComponent(val *DebReleaseComponent) *NullableDebReleaseComponent { + return &NullableDebReleaseComponent{value: val, isSet: true} +} + +func (v NullableDebReleaseComponent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebReleaseComponent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_component_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_component_response.go new file mode 100644 index 0000000000..8eecb6b2a8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_component_response.go @@ -0,0 +1,305 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebReleaseComponentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebReleaseComponentResponse{} + +// DebReleaseComponentResponse A Serializer for ReleaseComponent. +type DebReleaseComponentResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Name of the component. + Component string `json:"component"` + // Name of the distribution. + Distribution string `json:"distribution"` + Codename string `json:"codename"` + Suite string `json:"suite"` + AdditionalProperties map[string]interface{} +} + +type _DebReleaseComponentResponse DebReleaseComponentResponse + +// NewDebReleaseComponentResponse instantiates a new DebReleaseComponentResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebReleaseComponentResponse(component string, distribution string, codename string, suite string) *DebReleaseComponentResponse { + this := DebReleaseComponentResponse{} + this.Component = component + this.Distribution = distribution + this.Codename = codename + this.Suite = suite + return &this +} + +// NewDebReleaseComponentResponseWithDefaults instantiates a new DebReleaseComponentResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebReleaseComponentResponseWithDefaults() *DebReleaseComponentResponse { + this := DebReleaseComponentResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebReleaseComponentResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseComponentResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebReleaseComponentResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebReleaseComponentResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebReleaseComponentResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseComponentResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebReleaseComponentResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebReleaseComponentResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetComponent returns the Component field value +func (o *DebReleaseComponentResponse) GetComponent() string { + if o == nil { + var ret string + return ret + } + + return o.Component +} + +// GetComponentOk returns a tuple with the Component field value +// and a boolean to check if the value has been set. +func (o *DebReleaseComponentResponse) GetComponentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Component, true +} + +// SetComponent sets field value +func (o *DebReleaseComponentResponse) SetComponent(v string) { + o.Component = v +} + +// GetDistribution returns the Distribution field value +func (o *DebReleaseComponentResponse) GetDistribution() string { + if o == nil { + var ret string + return ret + } + + return o.Distribution +} + +// GetDistributionOk returns a tuple with the Distribution field value +// and a boolean to check if the value has been set. +func (o *DebReleaseComponentResponse) GetDistributionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Distribution, true +} + +// SetDistribution sets field value +func (o *DebReleaseComponentResponse) SetDistribution(v string) { + o.Distribution = v +} + +// GetCodename returns the Codename field value +func (o *DebReleaseComponentResponse) GetCodename() string { + if o == nil { + var ret string + return ret + } + + return o.Codename +} + +// GetCodenameOk returns a tuple with the Codename field value +// and a boolean to check if the value has been set. +func (o *DebReleaseComponentResponse) GetCodenameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Codename, true +} + +// SetCodename sets field value +func (o *DebReleaseComponentResponse) SetCodename(v string) { + o.Codename = v +} + +// GetSuite returns the Suite field value +func (o *DebReleaseComponentResponse) GetSuite() string { + if o == nil { + var ret string + return ret + } + + return o.Suite +} + +// GetSuiteOk returns a tuple with the Suite field value +// and a boolean to check if the value has been set. +func (o *DebReleaseComponentResponse) GetSuiteOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Suite, true +} + +// SetSuite sets field value +func (o *DebReleaseComponentResponse) SetSuite(v string) { + o.Suite = v +} + +func (o DebReleaseComponentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebReleaseComponentResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["component"] = o.Component + toSerialize["distribution"] = o.Distribution + toSerialize["codename"] = o.Codename + toSerialize["suite"] = o.Suite + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebReleaseComponentResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebReleaseComponentResponse := _DebReleaseComponentResponse{} + + if err = json.Unmarshal(bytes, &varDebReleaseComponentResponse); err == nil { + *o = DebReleaseComponentResponse(varDebReleaseComponentResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "component") + delete(additionalProperties, "distribution") + delete(additionalProperties, "codename") + delete(additionalProperties, "suite") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebReleaseComponentResponse struct { + value *DebReleaseComponentResponse + isSet bool +} + +func (v NullableDebReleaseComponentResponse) Get() *DebReleaseComponentResponse { + return v.value +} + +func (v *NullableDebReleaseComponentResponse) Set(val *DebReleaseComponentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebReleaseComponentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebReleaseComponentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebReleaseComponentResponse(val *DebReleaseComponentResponse) *NullableDebReleaseComponentResponse { + return &NullableDebReleaseComponentResponse{value: val, isSet: true} +} + +func (v NullableDebReleaseComponentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebReleaseComponentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_file.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_file.go new file mode 100644 index 0000000000..2ef25a1531 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_file.go @@ -0,0 +1,325 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the DebReleaseFile type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebReleaseFile{} + +// DebReleaseFile A serializer for ReleaseFile. +type DebReleaseFile struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // A dict mapping relative paths inside the Content to the correspondingArtifact URLs. E.g.: {'relative/path': '/artifacts/1/' + Artifacts map[string]interface{} `json:"artifacts"` + // Codename of the release, i.e. \"buster\". + Codename *string `json:"codename,omitempty"` + // Suite of the release, i.e. \"stable\". + Suite *string `json:"suite,omitempty"` + // Distribution of the release, i.e. \"stable/updates\". + Distribution string `json:"distribution"` + // Path of file relative to url. + RelativePath *string `json:"relative_path,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebReleaseFile DebReleaseFile + +// NewDebReleaseFile instantiates a new DebReleaseFile object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebReleaseFile(artifacts map[string]interface{}, distribution string) *DebReleaseFile { + this := DebReleaseFile{} + this.Artifacts = artifacts + this.Distribution = distribution + return &this +} + +// NewDebReleaseFileWithDefaults instantiates a new DebReleaseFile object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebReleaseFileWithDefaults() *DebReleaseFile { + this := DebReleaseFile{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebReleaseFile) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseFile) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebReleaseFile) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebReleaseFile) SetRepository(v string) { + o.Repository = &v +} + +// GetArtifacts returns the Artifacts field value +func (o *DebReleaseFile) GetArtifacts() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Artifacts +} + +// GetArtifactsOk returns a tuple with the Artifacts field value +// and a boolean to check if the value has been set. +func (o *DebReleaseFile) GetArtifactsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Artifacts, true +} + +// SetArtifacts sets field value +func (o *DebReleaseFile) SetArtifacts(v map[string]interface{}) { + o.Artifacts = v +} + +// GetCodename returns the Codename field value if set, zero value otherwise. +func (o *DebReleaseFile) GetCodename() string { + if o == nil || IsNil(o.Codename) { + var ret string + return ret + } + return *o.Codename +} + +// GetCodenameOk returns a tuple with the Codename field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseFile) GetCodenameOk() (*string, bool) { + if o == nil || IsNil(o.Codename) { + return nil, false + } + return o.Codename, true +} + +// HasCodename returns a boolean if a field has been set. +func (o *DebReleaseFile) HasCodename() bool { + if o != nil && !IsNil(o.Codename) { + return true + } + + return false +} + +// SetCodename gets a reference to the given string and assigns it to the Codename field. +func (o *DebReleaseFile) SetCodename(v string) { + o.Codename = &v +} + +// GetSuite returns the Suite field value if set, zero value otherwise. +func (o *DebReleaseFile) GetSuite() string { + if o == nil || IsNil(o.Suite) { + var ret string + return ret + } + return *o.Suite +} + +// GetSuiteOk returns a tuple with the Suite field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseFile) GetSuiteOk() (*string, bool) { + if o == nil || IsNil(o.Suite) { + return nil, false + } + return o.Suite, true +} + +// HasSuite returns a boolean if a field has been set. +func (o *DebReleaseFile) HasSuite() bool { + if o != nil && !IsNil(o.Suite) { + return true + } + + return false +} + +// SetSuite gets a reference to the given string and assigns it to the Suite field. +func (o *DebReleaseFile) SetSuite(v string) { + o.Suite = &v +} + +// GetDistribution returns the Distribution field value +func (o *DebReleaseFile) GetDistribution() string { + if o == nil { + var ret string + return ret + } + + return o.Distribution +} + +// GetDistributionOk returns a tuple with the Distribution field value +// and a boolean to check if the value has been set. +func (o *DebReleaseFile) GetDistributionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Distribution, true +} + +// SetDistribution sets field value +func (o *DebReleaseFile) SetDistribution(v string) { + o.Distribution = v +} + +// GetRelativePath returns the RelativePath field value if set, zero value otherwise. +func (o *DebReleaseFile) GetRelativePath() string { + if o == nil || IsNil(o.RelativePath) { + var ret string + return ret + } + return *o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseFile) GetRelativePathOk() (*string, bool) { + if o == nil || IsNil(o.RelativePath) { + return nil, false + } + return o.RelativePath, true +} + +// HasRelativePath returns a boolean if a field has been set. +func (o *DebReleaseFile) HasRelativePath() bool { + if o != nil && !IsNil(o.RelativePath) { + return true + } + + return false +} + +// SetRelativePath gets a reference to the given string and assigns it to the RelativePath field. +func (o *DebReleaseFile) SetRelativePath(v string) { + o.RelativePath = &v +} + +func (o DebReleaseFile) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebReleaseFile) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["artifacts"] = o.Artifacts + if !IsNil(o.Codename) { + toSerialize["codename"] = o.Codename + } + if !IsNil(o.Suite) { + toSerialize["suite"] = o.Suite + } + toSerialize["distribution"] = o.Distribution + if !IsNil(o.RelativePath) { + toSerialize["relative_path"] = o.RelativePath + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebReleaseFile) UnmarshalJSON(bytes []byte) (err error) { + varDebReleaseFile := _DebReleaseFile{} + + if err = json.Unmarshal(bytes, &varDebReleaseFile); err == nil { + *o = DebReleaseFile(varDebReleaseFile) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "artifacts") + delete(additionalProperties, "codename") + delete(additionalProperties, "suite") + delete(additionalProperties, "distribution") + delete(additionalProperties, "relative_path") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebReleaseFile struct { + value *DebReleaseFile + isSet bool +} + +func (v NullableDebReleaseFile) Get() *DebReleaseFile { + return v.value +} + +func (v *NullableDebReleaseFile) Set(val *DebReleaseFile) { + v.value = val + v.isSet = true +} + +func (v NullableDebReleaseFile) IsSet() bool { + return v.isSet +} + +func (v *NullableDebReleaseFile) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebReleaseFile(val *DebReleaseFile) *NullableDebReleaseFile { + return &NullableDebReleaseFile{value: val, isSet: true} +} + +func (v NullableDebReleaseFile) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebReleaseFile) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_file_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_file_response.go new file mode 100644 index 0000000000..56846dee6a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_file_response.go @@ -0,0 +1,363 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebReleaseFileResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebReleaseFileResponse{} + +// DebReleaseFileResponse A serializer for ReleaseFile. +type DebReleaseFileResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A dict mapping relative paths inside the Content to the correspondingArtifact URLs. E.g.: {'relative/path': '/artifacts/1/' + Artifacts map[string]interface{} `json:"artifacts"` + // Codename of the release, i.e. \"buster\". + Codename *string `json:"codename,omitempty"` + // Suite of the release, i.e. \"stable\". + Suite *string `json:"suite,omitempty"` + // Distribution of the release, i.e. \"stable/updates\". + Distribution string `json:"distribution"` + // Path of file relative to url. + RelativePath *string `json:"relative_path,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebReleaseFileResponse DebReleaseFileResponse + +// NewDebReleaseFileResponse instantiates a new DebReleaseFileResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebReleaseFileResponse(artifacts map[string]interface{}, distribution string) *DebReleaseFileResponse { + this := DebReleaseFileResponse{} + this.Artifacts = artifacts + this.Distribution = distribution + return &this +} + +// NewDebReleaseFileResponseWithDefaults instantiates a new DebReleaseFileResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebReleaseFileResponseWithDefaults() *DebReleaseFileResponse { + this := DebReleaseFileResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebReleaseFileResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseFileResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebReleaseFileResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebReleaseFileResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebReleaseFileResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseFileResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebReleaseFileResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebReleaseFileResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifacts returns the Artifacts field value +func (o *DebReleaseFileResponse) GetArtifacts() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Artifacts +} + +// GetArtifactsOk returns a tuple with the Artifacts field value +// and a boolean to check if the value has been set. +func (o *DebReleaseFileResponse) GetArtifactsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Artifacts, true +} + +// SetArtifacts sets field value +func (o *DebReleaseFileResponse) SetArtifacts(v map[string]interface{}) { + o.Artifacts = v +} + +// GetCodename returns the Codename field value if set, zero value otherwise. +func (o *DebReleaseFileResponse) GetCodename() string { + if o == nil || IsNil(o.Codename) { + var ret string + return ret + } + return *o.Codename +} + +// GetCodenameOk returns a tuple with the Codename field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseFileResponse) GetCodenameOk() (*string, bool) { + if o == nil || IsNil(o.Codename) { + return nil, false + } + return o.Codename, true +} + +// HasCodename returns a boolean if a field has been set. +func (o *DebReleaseFileResponse) HasCodename() bool { + if o != nil && !IsNil(o.Codename) { + return true + } + + return false +} + +// SetCodename gets a reference to the given string and assigns it to the Codename field. +func (o *DebReleaseFileResponse) SetCodename(v string) { + o.Codename = &v +} + +// GetSuite returns the Suite field value if set, zero value otherwise. +func (o *DebReleaseFileResponse) GetSuite() string { + if o == nil || IsNil(o.Suite) { + var ret string + return ret + } + return *o.Suite +} + +// GetSuiteOk returns a tuple with the Suite field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseFileResponse) GetSuiteOk() (*string, bool) { + if o == nil || IsNil(o.Suite) { + return nil, false + } + return o.Suite, true +} + +// HasSuite returns a boolean if a field has been set. +func (o *DebReleaseFileResponse) HasSuite() bool { + if o != nil && !IsNil(o.Suite) { + return true + } + + return false +} + +// SetSuite gets a reference to the given string and assigns it to the Suite field. +func (o *DebReleaseFileResponse) SetSuite(v string) { + o.Suite = &v +} + +// GetDistribution returns the Distribution field value +func (o *DebReleaseFileResponse) GetDistribution() string { + if o == nil { + var ret string + return ret + } + + return o.Distribution +} + +// GetDistributionOk returns a tuple with the Distribution field value +// and a boolean to check if the value has been set. +func (o *DebReleaseFileResponse) GetDistributionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Distribution, true +} + +// SetDistribution sets field value +func (o *DebReleaseFileResponse) SetDistribution(v string) { + o.Distribution = v +} + +// GetRelativePath returns the RelativePath field value if set, zero value otherwise. +func (o *DebReleaseFileResponse) GetRelativePath() string { + if o == nil || IsNil(o.RelativePath) { + var ret string + return ret + } + return *o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseFileResponse) GetRelativePathOk() (*string, bool) { + if o == nil || IsNil(o.RelativePath) { + return nil, false + } + return o.RelativePath, true +} + +// HasRelativePath returns a boolean if a field has been set. +func (o *DebReleaseFileResponse) HasRelativePath() bool { + if o != nil && !IsNil(o.RelativePath) { + return true + } + + return false +} + +// SetRelativePath gets a reference to the given string and assigns it to the RelativePath field. +func (o *DebReleaseFileResponse) SetRelativePath(v string) { + o.RelativePath = &v +} + +func (o DebReleaseFileResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebReleaseFileResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifacts"] = o.Artifacts + if !IsNil(o.Codename) { + toSerialize["codename"] = o.Codename + } + if !IsNil(o.Suite) { + toSerialize["suite"] = o.Suite + } + toSerialize["distribution"] = o.Distribution + if !IsNil(o.RelativePath) { + toSerialize["relative_path"] = o.RelativePath + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebReleaseFileResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebReleaseFileResponse := _DebReleaseFileResponse{} + + if err = json.Unmarshal(bytes, &varDebReleaseFileResponse); err == nil { + *o = DebReleaseFileResponse(varDebReleaseFileResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifacts") + delete(additionalProperties, "codename") + delete(additionalProperties, "suite") + delete(additionalProperties, "distribution") + delete(additionalProperties, "relative_path") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebReleaseFileResponse struct { + value *DebReleaseFileResponse + isSet bool +} + +func (v NullableDebReleaseFileResponse) Get() *DebReleaseFileResponse { + return v.value +} + +func (v *NullableDebReleaseFileResponse) Set(val *DebReleaseFileResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebReleaseFileResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebReleaseFileResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebReleaseFileResponse(val *DebReleaseFileResponse) *NullableDebReleaseFileResponse { + return &NullableDebReleaseFileResponse{value: val, isSet: true} +} + +func (v NullableDebReleaseFileResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebReleaseFileResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_response.go new file mode 100644 index 0000000000..ed05913b1c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_release_response.go @@ -0,0 +1,275 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebReleaseResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebReleaseResponse{} + +// DebReleaseResponse A Serializer for Release. +type DebReleaseResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + Codename string `json:"codename"` + Suite string `json:"suite"` + Distribution string `json:"distribution"` + AdditionalProperties map[string]interface{} +} + +type _DebReleaseResponse DebReleaseResponse + +// NewDebReleaseResponse instantiates a new DebReleaseResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebReleaseResponse(codename string, suite string, distribution string) *DebReleaseResponse { + this := DebReleaseResponse{} + this.Codename = codename + this.Suite = suite + this.Distribution = distribution + return &this +} + +// NewDebReleaseResponseWithDefaults instantiates a new DebReleaseResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebReleaseResponseWithDefaults() *DebReleaseResponse { + this := DebReleaseResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebReleaseResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebReleaseResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebReleaseResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebReleaseResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebReleaseResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebReleaseResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebReleaseResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetCodename returns the Codename field value +func (o *DebReleaseResponse) GetCodename() string { + if o == nil { + var ret string + return ret + } + + return o.Codename +} + +// GetCodenameOk returns a tuple with the Codename field value +// and a boolean to check if the value has been set. +func (o *DebReleaseResponse) GetCodenameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Codename, true +} + +// SetCodename sets field value +func (o *DebReleaseResponse) SetCodename(v string) { + o.Codename = v +} + +// GetSuite returns the Suite field value +func (o *DebReleaseResponse) GetSuite() string { + if o == nil { + var ret string + return ret + } + + return o.Suite +} + +// GetSuiteOk returns a tuple with the Suite field value +// and a boolean to check if the value has been set. +func (o *DebReleaseResponse) GetSuiteOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Suite, true +} + +// SetSuite sets field value +func (o *DebReleaseResponse) SetSuite(v string) { + o.Suite = v +} + +// GetDistribution returns the Distribution field value +func (o *DebReleaseResponse) GetDistribution() string { + if o == nil { + var ret string + return ret + } + + return o.Distribution +} + +// GetDistributionOk returns a tuple with the Distribution field value +// and a boolean to check if the value has been set. +func (o *DebReleaseResponse) GetDistributionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Distribution, true +} + +// SetDistribution sets field value +func (o *DebReleaseResponse) SetDistribution(v string) { + o.Distribution = v +} + +func (o DebReleaseResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebReleaseResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["codename"] = o.Codename + toSerialize["suite"] = o.Suite + toSerialize["distribution"] = o.Distribution + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebReleaseResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebReleaseResponse := _DebReleaseResponse{} + + if err = json.Unmarshal(bytes, &varDebReleaseResponse); err == nil { + *o = DebReleaseResponse(varDebReleaseResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "codename") + delete(additionalProperties, "suite") + delete(additionalProperties, "distribution") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebReleaseResponse struct { + value *DebReleaseResponse + isSet bool +} + +func (v NullableDebReleaseResponse) Get() *DebReleaseResponse { + return v.value +} + +func (v *NullableDebReleaseResponse) Set(val *DebReleaseResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebReleaseResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebReleaseResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebReleaseResponse(val *DebReleaseResponse) *NullableDebReleaseResponse { + return &NullableDebReleaseResponse{value: val, isSet: true} +} + +func (v NullableDebReleaseResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebReleaseResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_verbatim_publication.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_verbatim_publication.go new file mode 100644 index 0000000000..b1b808ea41 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_verbatim_publication.go @@ -0,0 +1,190 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the DebVerbatimPublication type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebVerbatimPublication{} + +// DebVerbatimPublication A Serializer for VerbatimPublication. +type DebVerbatimPublication struct { + RepositoryVersion *string `json:"repository_version,omitempty"` + // A URI of the repository to be published. + Repository *string `json:"repository,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebVerbatimPublication DebVerbatimPublication + +// NewDebVerbatimPublication instantiates a new DebVerbatimPublication object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebVerbatimPublication() *DebVerbatimPublication { + this := DebVerbatimPublication{} + return &this +} + +// NewDebVerbatimPublicationWithDefaults instantiates a new DebVerbatimPublication object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebVerbatimPublicationWithDefaults() *DebVerbatimPublication { + this := DebVerbatimPublication{} + return &this +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *DebVerbatimPublication) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebVerbatimPublication) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *DebVerbatimPublication) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *DebVerbatimPublication) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebVerbatimPublication) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebVerbatimPublication) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebVerbatimPublication) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebVerbatimPublication) SetRepository(v string) { + o.Repository = &v +} + +func (o DebVerbatimPublication) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebVerbatimPublication) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebVerbatimPublication) UnmarshalJSON(bytes []byte) (err error) { + varDebVerbatimPublication := _DebVerbatimPublication{} + + if err = json.Unmarshal(bytes, &varDebVerbatimPublication); err == nil { + *o = DebVerbatimPublication(varDebVerbatimPublication) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository_version") + delete(additionalProperties, "repository") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebVerbatimPublication struct { + value *DebVerbatimPublication + isSet bool +} + +func (v NullableDebVerbatimPublication) Get() *DebVerbatimPublication { + return v.value +} + +func (v *NullableDebVerbatimPublication) Set(val *DebVerbatimPublication) { + v.value = val + v.isSet = true +} + +func (v NullableDebVerbatimPublication) IsSet() bool { + return v.isSet +} + +func (v *NullableDebVerbatimPublication) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebVerbatimPublication(val *DebVerbatimPublication) *NullableDebVerbatimPublication { + return &NullableDebVerbatimPublication{value: val, isSet: true} +} + +func (v NullableDebVerbatimPublication) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebVerbatimPublication) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_verbatim_publication_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_verbatim_publication_response.go new file mode 100644 index 0000000000..e4c14b69ac --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_deb_verbatim_publication_response.go @@ -0,0 +1,266 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DebVerbatimPublicationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DebVerbatimPublicationResponse{} + +// DebVerbatimPublicationResponse A Serializer for VerbatimPublication. +type DebVerbatimPublicationResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + RepositoryVersion *string `json:"repository_version,omitempty"` + // A URI of the repository to be published. + Repository *string `json:"repository,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DebVerbatimPublicationResponse DebVerbatimPublicationResponse + +// NewDebVerbatimPublicationResponse instantiates a new DebVerbatimPublicationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDebVerbatimPublicationResponse() *DebVerbatimPublicationResponse { + this := DebVerbatimPublicationResponse{} + return &this +} + +// NewDebVerbatimPublicationResponseWithDefaults instantiates a new DebVerbatimPublicationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDebVerbatimPublicationResponseWithDefaults() *DebVerbatimPublicationResponse { + this := DebVerbatimPublicationResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DebVerbatimPublicationResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebVerbatimPublicationResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DebVerbatimPublicationResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DebVerbatimPublicationResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DebVerbatimPublicationResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebVerbatimPublicationResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DebVerbatimPublicationResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DebVerbatimPublicationResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *DebVerbatimPublicationResponse) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebVerbatimPublicationResponse) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *DebVerbatimPublicationResponse) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *DebVerbatimPublicationResponse) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *DebVerbatimPublicationResponse) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DebVerbatimPublicationResponse) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *DebVerbatimPublicationResponse) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *DebVerbatimPublicationResponse) SetRepository(v string) { + o.Repository = &v +} + +func (o DebVerbatimPublicationResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DebVerbatimPublicationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DebVerbatimPublicationResponse) UnmarshalJSON(bytes []byte) (err error) { + varDebVerbatimPublicationResponse := _DebVerbatimPublicationResponse{} + + if err = json.Unmarshal(bytes, &varDebVerbatimPublicationResponse); err == nil { + *o = DebVerbatimPublicationResponse(varDebVerbatimPublicationResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "repository") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDebVerbatimPublicationResponse struct { + value *DebVerbatimPublicationResponse + isSet bool +} + +func (v NullableDebVerbatimPublicationResponse) Get() *DebVerbatimPublicationResponse { + return v.value +} + +func (v *NullableDebVerbatimPublicationResponse) Set(val *DebVerbatimPublicationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDebVerbatimPublicationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDebVerbatimPublicationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDebVerbatimPublicationResponse(val *DebVerbatimPublicationResponse) *NullableDebVerbatimPublicationResponse { + return &NullableDebVerbatimPublicationResponse{value: val, isSet: true} +} + +func (v NullableDebVerbatimPublicationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDebVerbatimPublicationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_distribution_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_distribution_response.go new file mode 100644 index 0000000000..400249680a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_distribution_response.go @@ -0,0 +1,462 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DistributionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DistributionResponse{} + +// DistributionResponse The Serializer for the Distribution model. The serializer deliberately omits the `publication` and `repository_version` field due to plugins typically requiring one or the other but not both. To include the ``publication`` field, it is recommended plugins define the field:: publication = DetailRelatedField( required=False, help_text=_(\"Publication to be served\"), view_name_pattern=r\"publications(-.*_/.*)?-detail\", queryset=models.Publication.objects.exclude(complete=False), allow_null=True, ) To include the ``repository_version`` field, it is recommended plugins define the field:: repository_version = RepositoryVersionRelatedField( required=False, help_text=_(\"RepositoryVersion to be served\"), allow_null=True ) Additionally, the serializer omits the ``remote`` field, which is used for pull-through caching feature and only by plugins which use publications. Plugins implementing a pull-through caching should define the field in their derived serializer class like this:: remote = DetailRelatedField( required=False, help_text=_('Remote that can be used to fetch content when using pull-through caching.'), queryset=models.Remote.objects.all(), allow_null=True ) +type DistributionResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // The URL for accessing the publication as defined by this distribution. + BaseUrl *string `json:"base_url,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DistributionResponse DistributionResponse + +// NewDistributionResponse instantiates a new DistributionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDistributionResponse(basePath string, name string) *DistributionResponse { + this := DistributionResponse{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + return &this +} + +// NewDistributionResponseWithDefaults instantiates a new DistributionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDistributionResponseWithDefaults() *DistributionResponse { + this := DistributionResponse{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DistributionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DistributionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DistributionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DistributionResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DistributionResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DistributionResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DistributionResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DistributionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetBasePath returns the BasePath field value +func (o *DistributionResponse) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *DistributionResponse) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *DistributionResponse) SetBasePath(v string) { + o.BasePath = v +} + +// GetBaseUrl returns the BaseUrl field value if set, zero value otherwise. +func (o *DistributionResponse) GetBaseUrl() string { + if o == nil || IsNil(o.BaseUrl) { + var ret string + return ret + } + return *o.BaseUrl +} + +// GetBaseUrlOk returns a tuple with the BaseUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DistributionResponse) GetBaseUrlOk() (*string, bool) { + if o == nil || IsNil(o.BaseUrl) { + return nil, false + } + return o.BaseUrl, true +} + +// HasBaseUrl returns a boolean if a field has been set. +func (o *DistributionResponse) HasBaseUrl() bool { + if o != nil && !IsNil(o.BaseUrl) { + return true + } + + return false +} + +// SetBaseUrl gets a reference to the given string and assigns it to the BaseUrl field. +func (o *DistributionResponse) SetBaseUrl(v string) { + o.BaseUrl = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DistributionResponse) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DistributionResponse) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *DistributionResponse) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *DistributionResponse) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *DistributionResponse) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *DistributionResponse) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *DistributionResponse) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DistributionResponse) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *DistributionResponse) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *DistributionResponse) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *DistributionResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DistributionResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *DistributionResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *DistributionResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *DistributionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DistributionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DistributionResponse) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DistributionResponse) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DistributionResponse) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *DistributionResponse) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *DistributionResponse) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *DistributionResponse) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *DistributionResponse) UnsetRepository() { + o.Repository.Unset() +} + +func (o DistributionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DistributionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["base_path"] = o.BasePath + if !IsNil(o.BaseUrl) { + toSerialize["base_url"] = o.BaseUrl + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DistributionResponse) UnmarshalJSON(bytes []byte) (err error) { + varDistributionResponse := _DistributionResponse{} + + if err = json.Unmarshal(bytes, &varDistributionResponse); err == nil { + *o = DistributionResponse(varDistributionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "base_path") + delete(additionalProperties, "base_url") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDistributionResponse struct { + value *DistributionResponse + isSet bool +} + +func (v NullableDistributionResponse) Get() *DistributionResponse { + return v.value +} + +func (v *NullableDistributionResponse) Set(val *DistributionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDistributionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDistributionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDistributionResponse(val *DistributionResponse) *NullableDistributionResponse { + return &NullableDistributionResponse{value: val, isSet: true} +} + +func (v NullableDistributionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDistributionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_domain.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_domain.go new file mode 100644 index 0000000000..a794ba6a2b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_domain.go @@ -0,0 +1,333 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the Domain type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Domain{} + +// Domain Serializer for Domain. +type Domain struct { + // A name for this domain. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + StorageClass StorageClassEnum `json:"storage_class"` + // Settings for storage class. + StorageSettings map[string]interface{} `json:"storage_settings"` + // Boolean to have the content app redirect to object storage. + RedirectToObjectStorage *bool `json:"redirect_to_object_storage,omitempty"` + // Boolean to hide distributions with a content guard in the content app. + HideGuardedDistributions *bool `json:"hide_guarded_distributions,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Domain Domain + +// NewDomain instantiates a new Domain object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDomain(name string, storageClass StorageClassEnum, storageSettings map[string]interface{}) *Domain { + this := Domain{} + this.Name = name + this.StorageClass = storageClass + this.StorageSettings = storageSettings + var redirectToObjectStorage bool = true + this.RedirectToObjectStorage = &redirectToObjectStorage + var hideGuardedDistributions bool = false + this.HideGuardedDistributions = &hideGuardedDistributions + return &this +} + +// NewDomainWithDefaults instantiates a new Domain object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDomainWithDefaults() *Domain { + this := Domain{} + var redirectToObjectStorage bool = true + this.RedirectToObjectStorage = &redirectToObjectStorage + var hideGuardedDistributions bool = false + this.HideGuardedDistributions = &hideGuardedDistributions + return &this +} + +// GetName returns the Name field value +func (o *Domain) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Domain) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Domain) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Domain) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Domain) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *Domain) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *Domain) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *Domain) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *Domain) UnsetDescription() { + o.Description.Unset() +} + +// GetStorageClass returns the StorageClass field value +func (o *Domain) GetStorageClass() StorageClassEnum { + if o == nil { + var ret StorageClassEnum + return ret + } + + return o.StorageClass +} + +// GetStorageClassOk returns a tuple with the StorageClass field value +// and a boolean to check if the value has been set. +func (o *Domain) GetStorageClassOk() (*StorageClassEnum, bool) { + if o == nil { + return nil, false + } + return &o.StorageClass, true +} + +// SetStorageClass sets field value +func (o *Domain) SetStorageClass(v StorageClassEnum) { + o.StorageClass = v +} + +// GetStorageSettings returns the StorageSettings field value +func (o *Domain) GetStorageSettings() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.StorageSettings +} + +// GetStorageSettingsOk returns a tuple with the StorageSettings field value +// and a boolean to check if the value has been set. +func (o *Domain) GetStorageSettingsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.StorageSettings, true +} + +// SetStorageSettings sets field value +func (o *Domain) SetStorageSettings(v map[string]interface{}) { + o.StorageSettings = v +} + +// GetRedirectToObjectStorage returns the RedirectToObjectStorage field value if set, zero value otherwise. +func (o *Domain) GetRedirectToObjectStorage() bool { + if o == nil || IsNil(o.RedirectToObjectStorage) { + var ret bool + return ret + } + return *o.RedirectToObjectStorage +} + +// GetRedirectToObjectStorageOk returns a tuple with the RedirectToObjectStorage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Domain) GetRedirectToObjectStorageOk() (*bool, bool) { + if o == nil || IsNil(o.RedirectToObjectStorage) { + return nil, false + } + return o.RedirectToObjectStorage, true +} + +// HasRedirectToObjectStorage returns a boolean if a field has been set. +func (o *Domain) HasRedirectToObjectStorage() bool { + if o != nil && !IsNil(o.RedirectToObjectStorage) { + return true + } + + return false +} + +// SetRedirectToObjectStorage gets a reference to the given bool and assigns it to the RedirectToObjectStorage field. +func (o *Domain) SetRedirectToObjectStorage(v bool) { + o.RedirectToObjectStorage = &v +} + +// GetHideGuardedDistributions returns the HideGuardedDistributions field value if set, zero value otherwise. +func (o *Domain) GetHideGuardedDistributions() bool { + if o == nil || IsNil(o.HideGuardedDistributions) { + var ret bool + return ret + } + return *o.HideGuardedDistributions +} + +// GetHideGuardedDistributionsOk returns a tuple with the HideGuardedDistributions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Domain) GetHideGuardedDistributionsOk() (*bool, bool) { + if o == nil || IsNil(o.HideGuardedDistributions) { + return nil, false + } + return o.HideGuardedDistributions, true +} + +// HasHideGuardedDistributions returns a boolean if a field has been set. +func (o *Domain) HasHideGuardedDistributions() bool { + if o != nil && !IsNil(o.HideGuardedDistributions) { + return true + } + + return false +} + +// SetHideGuardedDistributions gets a reference to the given bool and assigns it to the HideGuardedDistributions field. +func (o *Domain) SetHideGuardedDistributions(v bool) { + o.HideGuardedDistributions = &v +} + +func (o Domain) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Domain) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["storage_class"] = o.StorageClass + toSerialize["storage_settings"] = o.StorageSettings + if !IsNil(o.RedirectToObjectStorage) { + toSerialize["redirect_to_object_storage"] = o.RedirectToObjectStorage + } + if !IsNil(o.HideGuardedDistributions) { + toSerialize["hide_guarded_distributions"] = o.HideGuardedDistributions + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Domain) UnmarshalJSON(bytes []byte) (err error) { + varDomain := _Domain{} + + if err = json.Unmarshal(bytes, &varDomain); err == nil { + *o = Domain(varDomain) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "storage_class") + delete(additionalProperties, "storage_settings") + delete(additionalProperties, "redirect_to_object_storage") + delete(additionalProperties, "hide_guarded_distributions") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDomain struct { + value *Domain + isSet bool +} + +func (v NullableDomain) Get() *Domain { + return v.value +} + +func (v *NullableDomain) Set(val *Domain) { + v.value = val + v.isSet = true +} + +func (v NullableDomain) IsSet() bool { + return v.isSet +} + +func (v *NullableDomain) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomain(val *Domain) *NullableDomain { + return &NullableDomain{value: val, isSet: true} +} + +func (v NullableDomain) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomain) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_domain_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_domain_response.go new file mode 100644 index 0000000000..34ef05c159 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_domain_response.go @@ -0,0 +1,409 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the DomainResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainResponse{} + +// DomainResponse Serializer for Domain. +type DomainResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A name for this domain. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + StorageClass StorageClassEnum `json:"storage_class"` + // Settings for storage class. + StorageSettings map[string]interface{} `json:"storage_settings"` + // Boolean to have the content app redirect to object storage. + RedirectToObjectStorage *bool `json:"redirect_to_object_storage,omitempty"` + // Boolean to hide distributions with a content guard in the content app. + HideGuardedDistributions *bool `json:"hide_guarded_distributions,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DomainResponse DomainResponse + +// NewDomainResponse instantiates a new DomainResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDomainResponse(name string, storageClass StorageClassEnum, storageSettings map[string]interface{}) *DomainResponse { + this := DomainResponse{} + this.Name = name + this.StorageClass = storageClass + this.StorageSettings = storageSettings + var redirectToObjectStorage bool = true + this.RedirectToObjectStorage = &redirectToObjectStorage + var hideGuardedDistributions bool = false + this.HideGuardedDistributions = &hideGuardedDistributions + return &this +} + +// NewDomainResponseWithDefaults instantiates a new DomainResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDomainResponseWithDefaults() *DomainResponse { + this := DomainResponse{} + var redirectToObjectStorage bool = true + this.RedirectToObjectStorage = &redirectToObjectStorage + var hideGuardedDistributions bool = false + this.HideGuardedDistributions = &hideGuardedDistributions + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *DomainResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *DomainResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *DomainResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *DomainResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *DomainResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *DomainResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *DomainResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DomainResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DomainResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DomainResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DomainResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *DomainResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *DomainResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *DomainResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *DomainResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetStorageClass returns the StorageClass field value +func (o *DomainResponse) GetStorageClass() StorageClassEnum { + if o == nil { + var ret StorageClassEnum + return ret + } + + return o.StorageClass +} + +// GetStorageClassOk returns a tuple with the StorageClass field value +// and a boolean to check if the value has been set. +func (o *DomainResponse) GetStorageClassOk() (*StorageClassEnum, bool) { + if o == nil { + return nil, false + } + return &o.StorageClass, true +} + +// SetStorageClass sets field value +func (o *DomainResponse) SetStorageClass(v StorageClassEnum) { + o.StorageClass = v +} + +// GetStorageSettings returns the StorageSettings field value +func (o *DomainResponse) GetStorageSettings() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.StorageSettings +} + +// GetStorageSettingsOk returns a tuple with the StorageSettings field value +// and a boolean to check if the value has been set. +func (o *DomainResponse) GetStorageSettingsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.StorageSettings, true +} + +// SetStorageSettings sets field value +func (o *DomainResponse) SetStorageSettings(v map[string]interface{}) { + o.StorageSettings = v +} + +// GetRedirectToObjectStorage returns the RedirectToObjectStorage field value if set, zero value otherwise. +func (o *DomainResponse) GetRedirectToObjectStorage() bool { + if o == nil || IsNil(o.RedirectToObjectStorage) { + var ret bool + return ret + } + return *o.RedirectToObjectStorage +} + +// GetRedirectToObjectStorageOk returns a tuple with the RedirectToObjectStorage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainResponse) GetRedirectToObjectStorageOk() (*bool, bool) { + if o == nil || IsNil(o.RedirectToObjectStorage) { + return nil, false + } + return o.RedirectToObjectStorage, true +} + +// HasRedirectToObjectStorage returns a boolean if a field has been set. +func (o *DomainResponse) HasRedirectToObjectStorage() bool { + if o != nil && !IsNil(o.RedirectToObjectStorage) { + return true + } + + return false +} + +// SetRedirectToObjectStorage gets a reference to the given bool and assigns it to the RedirectToObjectStorage field. +func (o *DomainResponse) SetRedirectToObjectStorage(v bool) { + o.RedirectToObjectStorage = &v +} + +// GetHideGuardedDistributions returns the HideGuardedDistributions field value if set, zero value otherwise. +func (o *DomainResponse) GetHideGuardedDistributions() bool { + if o == nil || IsNil(o.HideGuardedDistributions) { + var ret bool + return ret + } + return *o.HideGuardedDistributions +} + +// GetHideGuardedDistributionsOk returns a tuple with the HideGuardedDistributions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainResponse) GetHideGuardedDistributionsOk() (*bool, bool) { + if o == nil || IsNil(o.HideGuardedDistributions) { + return nil, false + } + return o.HideGuardedDistributions, true +} + +// HasHideGuardedDistributions returns a boolean if a field has been set. +func (o *DomainResponse) HasHideGuardedDistributions() bool { + if o != nil && !IsNil(o.HideGuardedDistributions) { + return true + } + + return false +} + +// SetHideGuardedDistributions gets a reference to the given bool and assigns it to the HideGuardedDistributions field. +func (o *DomainResponse) SetHideGuardedDistributions(v bool) { + o.HideGuardedDistributions = &v +} + +func (o DomainResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["storage_class"] = o.StorageClass + toSerialize["storage_settings"] = o.StorageSettings + if !IsNil(o.RedirectToObjectStorage) { + toSerialize["redirect_to_object_storage"] = o.RedirectToObjectStorage + } + if !IsNil(o.HideGuardedDistributions) { + toSerialize["hide_guarded_distributions"] = o.HideGuardedDistributions + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DomainResponse) UnmarshalJSON(bytes []byte) (err error) { + varDomainResponse := _DomainResponse{} + + if err = json.Unmarshal(bytes, &varDomainResponse); err == nil { + *o = DomainResponse(varDomainResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "storage_class") + delete(additionalProperties, "storage_settings") + delete(additionalProperties, "redirect_to_object_storage") + delete(additionalProperties, "hide_guarded_distributions") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDomainResponse struct { + value *DomainResponse + isSet bool +} + +func (v NullableDomainResponse) Get() *DomainResponse { + return v.value +} + +func (v *NullableDomainResponse) Set(val *DomainResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDomainResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainResponse(val *DomainResponse) *NullableDomainResponse { + return &NullableDomainResponse{value: val, isSet: true} +} + +func (v NullableDomainResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_evaluation_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_evaluation_response.go new file mode 100644 index 0000000000..fb3c4b6b89 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_evaluation_response.go @@ -0,0 +1,202 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the EvaluationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EvaluationResponse{} + +// EvaluationResponse Results from evaluating a proposed parameter to a PulpImport call. +type EvaluationResponse struct { + // Parameter value being evaluated. + Context string `json:"context"` + // True if evaluation passed, false otherwise. + IsValid bool `json:"is_valid"` + // Messages describing results of all evaluations done. May be an empty list. + Messages []string `json:"messages"` + AdditionalProperties map[string]interface{} +} + +type _EvaluationResponse EvaluationResponse + +// NewEvaluationResponse instantiates a new EvaluationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewEvaluationResponse(context string, isValid bool, messages []string) *EvaluationResponse { + this := EvaluationResponse{} + this.Context = context + this.IsValid = isValid + this.Messages = messages + return &this +} + +// NewEvaluationResponseWithDefaults instantiates a new EvaluationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewEvaluationResponseWithDefaults() *EvaluationResponse { + this := EvaluationResponse{} + return &this +} + +// GetContext returns the Context field value +func (o *EvaluationResponse) GetContext() string { + if o == nil { + var ret string + return ret + } + + return o.Context +} + +// GetContextOk returns a tuple with the Context field value +// and a boolean to check if the value has been set. +func (o *EvaluationResponse) GetContextOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Context, true +} + +// SetContext sets field value +func (o *EvaluationResponse) SetContext(v string) { + o.Context = v +} + +// GetIsValid returns the IsValid field value +func (o *EvaluationResponse) GetIsValid() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsValid +} + +// GetIsValidOk returns a tuple with the IsValid field value +// and a boolean to check if the value has been set. +func (o *EvaluationResponse) GetIsValidOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsValid, true +} + +// SetIsValid sets field value +func (o *EvaluationResponse) SetIsValid(v bool) { + o.IsValid = v +} + +// GetMessages returns the Messages field value +func (o *EvaluationResponse) GetMessages() []string { + if o == nil { + var ret []string + return ret + } + + return o.Messages +} + +// GetMessagesOk returns a tuple with the Messages field value +// and a boolean to check if the value has been set. +func (o *EvaluationResponse) GetMessagesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Messages, true +} + +// SetMessages sets field value +func (o *EvaluationResponse) SetMessages(v []string) { + o.Messages = v +} + +func (o EvaluationResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EvaluationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["context"] = o.Context + toSerialize["is_valid"] = o.IsValid + toSerialize["messages"] = o.Messages + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *EvaluationResponse) UnmarshalJSON(bytes []byte) (err error) { + varEvaluationResponse := _EvaluationResponse{} + + if err = json.Unmarshal(bytes, &varEvaluationResponse); err == nil { + *o = EvaluationResponse(varEvaluationResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "context") + delete(additionalProperties, "is_valid") + delete(additionalProperties, "messages") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableEvaluationResponse struct { + value *EvaluationResponse + isSet bool +} + +func (v NullableEvaluationResponse) Get() *EvaluationResponse { + return v.value +} + +func (v *NullableEvaluationResponse) Set(val *EvaluationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableEvaluationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableEvaluationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvaluationResponse(val *EvaluationResponse) *NullableEvaluationResponse { + return &NullableEvaluationResponse{value: val, isSet: true} +} + +func (v NullableEvaluationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvaluationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_exclude_platforms_enum.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_exclude_platforms_enum.go new file mode 100644 index 0000000000..6b2c706e94 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_exclude_platforms_enum.go @@ -0,0 +1,116 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "fmt" +) + +// ExcludePlatformsEnum * `windows` - windows * `macos` - macos * `freebsd` - freebsd * `linux` - linux +type ExcludePlatformsEnum string + +// List of ExcludePlatformsEnum +const ( + EXCLUDEPLATFORMSENUM_WINDOWS ExcludePlatformsEnum = "windows" + EXCLUDEPLATFORMSENUM_MACOS ExcludePlatformsEnum = "macos" + EXCLUDEPLATFORMSENUM_FREEBSD ExcludePlatformsEnum = "freebsd" + EXCLUDEPLATFORMSENUM_LINUX ExcludePlatformsEnum = "linux" +) + +// All allowed values of ExcludePlatformsEnum enum +var AllowedExcludePlatformsEnumEnumValues = []ExcludePlatformsEnum{ + "windows", + "macos", + "freebsd", + "linux", +} + +func (v *ExcludePlatformsEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ExcludePlatformsEnum(value) + for _, existing := range AllowedExcludePlatformsEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ExcludePlatformsEnum", value) +} + +// NewExcludePlatformsEnumFromValue returns a pointer to a valid ExcludePlatformsEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewExcludePlatformsEnumFromValue(v string) (*ExcludePlatformsEnum, error) { + ev := ExcludePlatformsEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ExcludePlatformsEnum: valid values are %v", v, AllowedExcludePlatformsEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ExcludePlatformsEnum) IsValid() bool { + for _, existing := range AllowedExcludePlatformsEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ExcludePlatformsEnum value +func (v ExcludePlatformsEnum) Ptr() *ExcludePlatformsEnum { + return &v +} + +type NullableExcludePlatformsEnum struct { + value *ExcludePlatformsEnum + isSet bool +} + +func (v NullableExcludePlatformsEnum) Get() *ExcludePlatformsEnum { + return v.value +} + +func (v *NullableExcludePlatformsEnum) Set(val *ExcludePlatformsEnum) { + v.value = val + v.isSet = true +} + +func (v NullableExcludePlatformsEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableExcludePlatformsEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExcludePlatformsEnum(val *ExcludePlatformsEnum) *NullableExcludePlatformsEnum { + return &NullableExcludePlatformsEnum{value: val, isSet: true} +} + +func (v NullableExcludePlatformsEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExcludePlatformsEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_alternate_content_source.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_alternate_content_source.go new file mode 100644 index 0000000000..e2dbeb55cf --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_alternate_content_source.go @@ -0,0 +1,260 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the FileFileAlternateContentSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileFileAlternateContentSource{} + +// FileFileAlternateContentSource Serializer for File alternate content source. +type FileFileAlternateContentSource struct { + // Name of Alternate Content Source. + Name string `json:"name"` + // Date of last refresh of AlternateContentSource. + LastRefreshed NullableTime `json:"last_refreshed,omitempty"` + // List of paths that will be appended to the Remote url when searching for content. + Paths []string `json:"paths,omitempty"` + // The remote to provide alternate content source. + Remote string `json:"remote"` + AdditionalProperties map[string]interface{} +} + +type _FileFileAlternateContentSource FileFileAlternateContentSource + +// NewFileFileAlternateContentSource instantiates a new FileFileAlternateContentSource object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileFileAlternateContentSource(name string, remote string) *FileFileAlternateContentSource { + this := FileFileAlternateContentSource{} + this.Name = name + this.Remote = remote + return &this +} + +// NewFileFileAlternateContentSourceWithDefaults instantiates a new FileFileAlternateContentSource object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileFileAlternateContentSourceWithDefaults() *FileFileAlternateContentSource { + this := FileFileAlternateContentSource{} + return &this +} + +// GetName returns the Name field value +func (o *FileFileAlternateContentSource) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FileFileAlternateContentSource) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FileFileAlternateContentSource) SetName(v string) { + o.Name = v +} + +// GetLastRefreshed returns the LastRefreshed field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileAlternateContentSource) GetLastRefreshed() time.Time { + if o == nil || IsNil(o.LastRefreshed.Get()) { + var ret time.Time + return ret + } + return *o.LastRefreshed.Get() +} + +// GetLastRefreshedOk returns a tuple with the LastRefreshed field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileAlternateContentSource) GetLastRefreshedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastRefreshed.Get(), o.LastRefreshed.IsSet() +} + +// HasLastRefreshed returns a boolean if a field has been set. +func (o *FileFileAlternateContentSource) HasLastRefreshed() bool { + if o != nil && o.LastRefreshed.IsSet() { + return true + } + + return false +} + +// SetLastRefreshed gets a reference to the given NullableTime and assigns it to the LastRefreshed field. +func (o *FileFileAlternateContentSource) SetLastRefreshed(v time.Time) { + o.LastRefreshed.Set(&v) +} +// SetLastRefreshedNil sets the value for LastRefreshed to be an explicit nil +func (o *FileFileAlternateContentSource) SetLastRefreshedNil() { + o.LastRefreshed.Set(nil) +} + +// UnsetLastRefreshed ensures that no value is present for LastRefreshed, not even an explicit nil +func (o *FileFileAlternateContentSource) UnsetLastRefreshed() { + o.LastRefreshed.Unset() +} + +// GetPaths returns the Paths field value if set, zero value otherwise. +func (o *FileFileAlternateContentSource) GetPaths() []string { + if o == nil || IsNil(o.Paths) { + var ret []string + return ret + } + return o.Paths +} + +// GetPathsOk returns a tuple with the Paths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileAlternateContentSource) GetPathsOk() ([]string, bool) { + if o == nil || IsNil(o.Paths) { + return nil, false + } + return o.Paths, true +} + +// HasPaths returns a boolean if a field has been set. +func (o *FileFileAlternateContentSource) HasPaths() bool { + if o != nil && !IsNil(o.Paths) { + return true + } + + return false +} + +// SetPaths gets a reference to the given []string and assigns it to the Paths field. +func (o *FileFileAlternateContentSource) SetPaths(v []string) { + o.Paths = v +} + +// GetRemote returns the Remote field value +func (o *FileFileAlternateContentSource) GetRemote() string { + if o == nil { + var ret string + return ret + } + + return o.Remote +} + +// GetRemoteOk returns a tuple with the Remote field value +// and a boolean to check if the value has been set. +func (o *FileFileAlternateContentSource) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Remote, true +} + +// SetRemote sets field value +func (o *FileFileAlternateContentSource) SetRemote(v string) { + o.Remote = v +} + +func (o FileFileAlternateContentSource) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileFileAlternateContentSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.LastRefreshed.IsSet() { + toSerialize["last_refreshed"] = o.LastRefreshed.Get() + } + if !IsNil(o.Paths) { + toSerialize["paths"] = o.Paths + } + toSerialize["remote"] = o.Remote + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FileFileAlternateContentSource) UnmarshalJSON(bytes []byte) (err error) { + varFileFileAlternateContentSource := _FileFileAlternateContentSource{} + + if err = json.Unmarshal(bytes, &varFileFileAlternateContentSource); err == nil { + *o = FileFileAlternateContentSource(varFileFileAlternateContentSource) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "last_refreshed") + delete(additionalProperties, "paths") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFileFileAlternateContentSource struct { + value *FileFileAlternateContentSource + isSet bool +} + +func (v NullableFileFileAlternateContentSource) Get() *FileFileAlternateContentSource { + return v.value +} + +func (v *NullableFileFileAlternateContentSource) Set(val *FileFileAlternateContentSource) { + v.value = val + v.isSet = true +} + +func (v NullableFileFileAlternateContentSource) IsSet() bool { + return v.isSet +} + +func (v *NullableFileFileAlternateContentSource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileFileAlternateContentSource(val *FileFileAlternateContentSource) *NullableFileFileAlternateContentSource { + return &NullableFileFileAlternateContentSource{value: val, isSet: true} +} + +func (v NullableFileFileAlternateContentSource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileFileAlternateContentSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_alternate_content_source_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_alternate_content_source_response.go new file mode 100644 index 0000000000..60d3598d9d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_alternate_content_source_response.go @@ -0,0 +1,335 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the FileFileAlternateContentSourceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileFileAlternateContentSourceResponse{} + +// FileFileAlternateContentSourceResponse Serializer for File alternate content source. +type FileFileAlternateContentSourceResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Name of Alternate Content Source. + Name string `json:"name"` + // Date of last refresh of AlternateContentSource. + LastRefreshed NullableTime `json:"last_refreshed,omitempty"` + // List of paths that will be appended to the Remote url when searching for content. + Paths []string `json:"paths,omitempty"` + // The remote to provide alternate content source. + Remote string `json:"remote"` + AdditionalProperties map[string]interface{} +} + +type _FileFileAlternateContentSourceResponse FileFileAlternateContentSourceResponse + +// NewFileFileAlternateContentSourceResponse instantiates a new FileFileAlternateContentSourceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileFileAlternateContentSourceResponse(name string, remote string) *FileFileAlternateContentSourceResponse { + this := FileFileAlternateContentSourceResponse{} + this.Name = name + this.Remote = remote + return &this +} + +// NewFileFileAlternateContentSourceResponseWithDefaults instantiates a new FileFileAlternateContentSourceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileFileAlternateContentSourceResponseWithDefaults() *FileFileAlternateContentSourceResponse { + this := FileFileAlternateContentSourceResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *FileFileAlternateContentSourceResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileAlternateContentSourceResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *FileFileAlternateContentSourceResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *FileFileAlternateContentSourceResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *FileFileAlternateContentSourceResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileAlternateContentSourceResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *FileFileAlternateContentSourceResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *FileFileAlternateContentSourceResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *FileFileAlternateContentSourceResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FileFileAlternateContentSourceResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FileFileAlternateContentSourceResponse) SetName(v string) { + o.Name = v +} + +// GetLastRefreshed returns the LastRefreshed field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileAlternateContentSourceResponse) GetLastRefreshed() time.Time { + if o == nil || IsNil(o.LastRefreshed.Get()) { + var ret time.Time + return ret + } + return *o.LastRefreshed.Get() +} + +// GetLastRefreshedOk returns a tuple with the LastRefreshed field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileAlternateContentSourceResponse) GetLastRefreshedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastRefreshed.Get(), o.LastRefreshed.IsSet() +} + +// HasLastRefreshed returns a boolean if a field has been set. +func (o *FileFileAlternateContentSourceResponse) HasLastRefreshed() bool { + if o != nil && o.LastRefreshed.IsSet() { + return true + } + + return false +} + +// SetLastRefreshed gets a reference to the given NullableTime and assigns it to the LastRefreshed field. +func (o *FileFileAlternateContentSourceResponse) SetLastRefreshed(v time.Time) { + o.LastRefreshed.Set(&v) +} +// SetLastRefreshedNil sets the value for LastRefreshed to be an explicit nil +func (o *FileFileAlternateContentSourceResponse) SetLastRefreshedNil() { + o.LastRefreshed.Set(nil) +} + +// UnsetLastRefreshed ensures that no value is present for LastRefreshed, not even an explicit nil +func (o *FileFileAlternateContentSourceResponse) UnsetLastRefreshed() { + o.LastRefreshed.Unset() +} + +// GetPaths returns the Paths field value if set, zero value otherwise. +func (o *FileFileAlternateContentSourceResponse) GetPaths() []string { + if o == nil || IsNil(o.Paths) { + var ret []string + return ret + } + return o.Paths +} + +// GetPathsOk returns a tuple with the Paths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileAlternateContentSourceResponse) GetPathsOk() ([]string, bool) { + if o == nil || IsNil(o.Paths) { + return nil, false + } + return o.Paths, true +} + +// HasPaths returns a boolean if a field has been set. +func (o *FileFileAlternateContentSourceResponse) HasPaths() bool { + if o != nil && !IsNil(o.Paths) { + return true + } + + return false +} + +// SetPaths gets a reference to the given []string and assigns it to the Paths field. +func (o *FileFileAlternateContentSourceResponse) SetPaths(v []string) { + o.Paths = v +} + +// GetRemote returns the Remote field value +func (o *FileFileAlternateContentSourceResponse) GetRemote() string { + if o == nil { + var ret string + return ret + } + + return o.Remote +} + +// GetRemoteOk returns a tuple with the Remote field value +// and a boolean to check if the value has been set. +func (o *FileFileAlternateContentSourceResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Remote, true +} + +// SetRemote sets field value +func (o *FileFileAlternateContentSourceResponse) SetRemote(v string) { + o.Remote = v +} + +func (o FileFileAlternateContentSourceResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileFileAlternateContentSourceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + if o.LastRefreshed.IsSet() { + toSerialize["last_refreshed"] = o.LastRefreshed.Get() + } + if !IsNil(o.Paths) { + toSerialize["paths"] = o.Paths + } + toSerialize["remote"] = o.Remote + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FileFileAlternateContentSourceResponse) UnmarshalJSON(bytes []byte) (err error) { + varFileFileAlternateContentSourceResponse := _FileFileAlternateContentSourceResponse{} + + if err = json.Unmarshal(bytes, &varFileFileAlternateContentSourceResponse); err == nil { + *o = FileFileAlternateContentSourceResponse(varFileFileAlternateContentSourceResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "last_refreshed") + delete(additionalProperties, "paths") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFileFileAlternateContentSourceResponse struct { + value *FileFileAlternateContentSourceResponse + isSet bool +} + +func (v NullableFileFileAlternateContentSourceResponse) Get() *FileFileAlternateContentSourceResponse { + return v.value +} + +func (v *NullableFileFileAlternateContentSourceResponse) Set(val *FileFileAlternateContentSourceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFileFileAlternateContentSourceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFileFileAlternateContentSourceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileFileAlternateContentSourceResponse(val *FileFileAlternateContentSourceResponse) *NullableFileFileAlternateContentSourceResponse { + return &NullableFileFileAlternateContentSourceResponse{value: val, isSet: true} +} + +func (v NullableFileFileAlternateContentSourceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileFileAlternateContentSourceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_content.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_content.go new file mode 100644 index 0000000000..8d2239f1aa --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_content.go @@ -0,0 +1,297 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the FileFileContent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileFileContent{} + +// FileFileContent Serializer for File Content. +type FileFileContent struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // Path where the artifact is located relative to distributions base_path + RelativePath string `json:"relative_path"` + // An uploaded file that may be turned into the artifact of the content unit. + File **os.File `json:"file,omitempty"` + // An uncommitted upload that may be turned into the artifact of the content unit. + Upload *string `json:"upload,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FileFileContent FileFileContent + +// NewFileFileContent instantiates a new FileFileContent object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileFileContent(relativePath string) *FileFileContent { + this := FileFileContent{} + this.RelativePath = relativePath + return &this +} + +// NewFileFileContentWithDefaults instantiates a new FileFileContent object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileFileContentWithDefaults() *FileFileContent { + this := FileFileContent{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *FileFileContent) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileContent) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *FileFileContent) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *FileFileContent) SetRepository(v string) { + o.Repository = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *FileFileContent) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileContent) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *FileFileContent) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *FileFileContent) SetArtifact(v string) { + o.Artifact = &v +} + +// GetRelativePath returns the RelativePath field value +func (o *FileFileContent) GetRelativePath() string { + if o == nil { + var ret string + return ret + } + + return o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value +// and a boolean to check if the value has been set. +func (o *FileFileContent) GetRelativePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RelativePath, true +} + +// SetRelativePath sets field value +func (o *FileFileContent) SetRelativePath(v string) { + o.RelativePath = v +} + +// GetFile returns the File field value if set, zero value otherwise. +func (o *FileFileContent) GetFile() *os.File { + if o == nil || IsNil(o.File) { + var ret *os.File + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileContent) GetFileOk() (**os.File, bool) { + if o == nil || IsNil(o.File) { + return nil, false + } + return o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *FileFileContent) HasFile() bool { + if o != nil && !IsNil(o.File) { + return true + } + + return false +} + +// SetFile gets a reference to the given *os.File and assigns it to the File field. +func (o *FileFileContent) SetFile(v *os.File) { + o.File = &v +} + +// GetUpload returns the Upload field value if set, zero value otherwise. +func (o *FileFileContent) GetUpload() string { + if o == nil || IsNil(o.Upload) { + var ret string + return ret + } + return *o.Upload +} + +// GetUploadOk returns a tuple with the Upload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileContent) GetUploadOk() (*string, bool) { + if o == nil || IsNil(o.Upload) { + return nil, false + } + return o.Upload, true +} + +// HasUpload returns a boolean if a field has been set. +func (o *FileFileContent) HasUpload() bool { + if o != nil && !IsNil(o.Upload) { + return true + } + + return false +} + +// SetUpload gets a reference to the given string and assigns it to the Upload field. +func (o *FileFileContent) SetUpload(v string) { + o.Upload = &v +} + +func (o FileFileContent) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileFileContent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + toSerialize["relative_path"] = o.RelativePath + if !IsNil(o.File) { + toSerialize["file"] = o.File + } + if !IsNil(o.Upload) { + toSerialize["upload"] = o.Upload + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FileFileContent) UnmarshalJSON(bytes []byte) (err error) { + varFileFileContent := _FileFileContent{} + + if err = json.Unmarshal(bytes, &varFileFileContent); err == nil { + *o = FileFileContent(varFileFileContent) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "file") + delete(additionalProperties, "upload") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFileFileContent struct { + value *FileFileContent + isSet bool +} + +func (v NullableFileFileContent) Get() *FileFileContent { + return v.value +} + +func (v *NullableFileFileContent) Set(val *FileFileContent) { + v.value = val + v.isSet = true +} + +func (v NullableFileFileContent) IsSet() bool { + return v.isSet +} + +func (v *NullableFileFileContent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileFileContent(val *FileFileContent) *NullableFileFileContent { + return &NullableFileFileContent{value: val, isSet: true} +} + +func (v NullableFileFileContent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileFileContent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_content_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_content_response.go new file mode 100644 index 0000000000..815d5b0e11 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_content_response.go @@ -0,0 +1,486 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the FileFileContentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileFileContentResponse{} + +// FileFileContentResponse Serializer for File Content. +type FileFileContentResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // Path where the artifact is located relative to distributions base_path + RelativePath string `json:"relative_path"` + // The MD5 checksum if available. + Md5 *string `json:"md5,omitempty"` + // The SHA-1 checksum if available. + Sha1 *string `json:"sha1,omitempty"` + // The SHA-224 checksum if available. + Sha224 *string `json:"sha224,omitempty"` + // The SHA-256 checksum if available. + Sha256 *string `json:"sha256,omitempty"` + // The SHA-384 checksum if available. + Sha384 *string `json:"sha384,omitempty"` + // The SHA-512 checksum if available. + Sha512 *string `json:"sha512,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FileFileContentResponse FileFileContentResponse + +// NewFileFileContentResponse instantiates a new FileFileContentResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileFileContentResponse(relativePath string) *FileFileContentResponse { + this := FileFileContentResponse{} + this.RelativePath = relativePath + return &this +} + +// NewFileFileContentResponseWithDefaults instantiates a new FileFileContentResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileFileContentResponseWithDefaults() *FileFileContentResponse { + this := FileFileContentResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *FileFileContentResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileContentResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *FileFileContentResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *FileFileContentResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *FileFileContentResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileContentResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *FileFileContentResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *FileFileContentResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *FileFileContentResponse) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileContentResponse) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *FileFileContentResponse) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *FileFileContentResponse) SetArtifact(v string) { + o.Artifact = &v +} + +// GetRelativePath returns the RelativePath field value +func (o *FileFileContentResponse) GetRelativePath() string { + if o == nil { + var ret string + return ret + } + + return o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value +// and a boolean to check if the value has been set. +func (o *FileFileContentResponse) GetRelativePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RelativePath, true +} + +// SetRelativePath sets field value +func (o *FileFileContentResponse) SetRelativePath(v string) { + o.RelativePath = v +} + +// GetMd5 returns the Md5 field value if set, zero value otherwise. +func (o *FileFileContentResponse) GetMd5() string { + if o == nil || IsNil(o.Md5) { + var ret string + return ret + } + return *o.Md5 +} + +// GetMd5Ok returns a tuple with the Md5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileContentResponse) GetMd5Ok() (*string, bool) { + if o == nil || IsNil(o.Md5) { + return nil, false + } + return o.Md5, true +} + +// HasMd5 returns a boolean if a field has been set. +func (o *FileFileContentResponse) HasMd5() bool { + if o != nil && !IsNil(o.Md5) { + return true + } + + return false +} + +// SetMd5 gets a reference to the given string and assigns it to the Md5 field. +func (o *FileFileContentResponse) SetMd5(v string) { + o.Md5 = &v +} + +// GetSha1 returns the Sha1 field value if set, zero value otherwise. +func (o *FileFileContentResponse) GetSha1() string { + if o == nil || IsNil(o.Sha1) { + var ret string + return ret + } + return *o.Sha1 +} + +// GetSha1Ok returns a tuple with the Sha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileContentResponse) GetSha1Ok() (*string, bool) { + if o == nil || IsNil(o.Sha1) { + return nil, false + } + return o.Sha1, true +} + +// HasSha1 returns a boolean if a field has been set. +func (o *FileFileContentResponse) HasSha1() bool { + if o != nil && !IsNil(o.Sha1) { + return true + } + + return false +} + +// SetSha1 gets a reference to the given string and assigns it to the Sha1 field. +func (o *FileFileContentResponse) SetSha1(v string) { + o.Sha1 = &v +} + +// GetSha224 returns the Sha224 field value if set, zero value otherwise. +func (o *FileFileContentResponse) GetSha224() string { + if o == nil || IsNil(o.Sha224) { + var ret string + return ret + } + return *o.Sha224 +} + +// GetSha224Ok returns a tuple with the Sha224 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileContentResponse) GetSha224Ok() (*string, bool) { + if o == nil || IsNil(o.Sha224) { + return nil, false + } + return o.Sha224, true +} + +// HasSha224 returns a boolean if a field has been set. +func (o *FileFileContentResponse) HasSha224() bool { + if o != nil && !IsNil(o.Sha224) { + return true + } + + return false +} + +// SetSha224 gets a reference to the given string and assigns it to the Sha224 field. +func (o *FileFileContentResponse) SetSha224(v string) { + o.Sha224 = &v +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise. +func (o *FileFileContentResponse) GetSha256() string { + if o == nil || IsNil(o.Sha256) { + var ret string + return ret + } + return *o.Sha256 +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileContentResponse) GetSha256Ok() (*string, bool) { + if o == nil || IsNil(o.Sha256) { + return nil, false + } + return o.Sha256, true +} + +// HasSha256 returns a boolean if a field has been set. +func (o *FileFileContentResponse) HasSha256() bool { + if o != nil && !IsNil(o.Sha256) { + return true + } + + return false +} + +// SetSha256 gets a reference to the given string and assigns it to the Sha256 field. +func (o *FileFileContentResponse) SetSha256(v string) { + o.Sha256 = &v +} + +// GetSha384 returns the Sha384 field value if set, zero value otherwise. +func (o *FileFileContentResponse) GetSha384() string { + if o == nil || IsNil(o.Sha384) { + var ret string + return ret + } + return *o.Sha384 +} + +// GetSha384Ok returns a tuple with the Sha384 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileContentResponse) GetSha384Ok() (*string, bool) { + if o == nil || IsNil(o.Sha384) { + return nil, false + } + return o.Sha384, true +} + +// HasSha384 returns a boolean if a field has been set. +func (o *FileFileContentResponse) HasSha384() bool { + if o != nil && !IsNil(o.Sha384) { + return true + } + + return false +} + +// SetSha384 gets a reference to the given string and assigns it to the Sha384 field. +func (o *FileFileContentResponse) SetSha384(v string) { + o.Sha384 = &v +} + +// GetSha512 returns the Sha512 field value if set, zero value otherwise. +func (o *FileFileContentResponse) GetSha512() string { + if o == nil || IsNil(o.Sha512) { + var ret string + return ret + } + return *o.Sha512 +} + +// GetSha512Ok returns a tuple with the Sha512 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileContentResponse) GetSha512Ok() (*string, bool) { + if o == nil || IsNil(o.Sha512) { + return nil, false + } + return o.Sha512, true +} + +// HasSha512 returns a boolean if a field has been set. +func (o *FileFileContentResponse) HasSha512() bool { + if o != nil && !IsNil(o.Sha512) { + return true + } + + return false +} + +// SetSha512 gets a reference to the given string and assigns it to the Sha512 field. +func (o *FileFileContentResponse) SetSha512(v string) { + o.Sha512 = &v +} + +func (o FileFileContentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileFileContentResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + toSerialize["relative_path"] = o.RelativePath + if !IsNil(o.Md5) { + toSerialize["md5"] = o.Md5 + } + if !IsNil(o.Sha1) { + toSerialize["sha1"] = o.Sha1 + } + if !IsNil(o.Sha224) { + toSerialize["sha224"] = o.Sha224 + } + if !IsNil(o.Sha256) { + toSerialize["sha256"] = o.Sha256 + } + if !IsNil(o.Sha384) { + toSerialize["sha384"] = o.Sha384 + } + if !IsNil(o.Sha512) { + toSerialize["sha512"] = o.Sha512 + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FileFileContentResponse) UnmarshalJSON(bytes []byte) (err error) { + varFileFileContentResponse := _FileFileContentResponse{} + + if err = json.Unmarshal(bytes, &varFileFileContentResponse); err == nil { + *o = FileFileContentResponse(varFileFileContentResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "md5") + delete(additionalProperties, "sha1") + delete(additionalProperties, "sha224") + delete(additionalProperties, "sha256") + delete(additionalProperties, "sha384") + delete(additionalProperties, "sha512") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFileFileContentResponse struct { + value *FileFileContentResponse + isSet bool +} + +func (v NullableFileFileContentResponse) Get() *FileFileContentResponse { + return v.value +} + +func (v *NullableFileFileContentResponse) Set(val *FileFileContentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFileFileContentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFileFileContentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileFileContentResponse(val *FileFileContentResponse) *NullableFileFileContentResponse { + return &NullableFileFileContentResponse{value: val, isSet: true} +} + +func (v NullableFileFileContentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileFileContentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_distribution.go new file mode 100644 index 0000000000..c3674657cf --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_distribution.go @@ -0,0 +1,396 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the FileFileDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileFileDistribution{} + +// FileFileDistribution Serializer for File Distributions. +type FileFileDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FileFileDistribution FileFileDistribution + +// NewFileFileDistribution instantiates a new FileFileDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileFileDistribution(basePath string, name string) *FileFileDistribution { + this := FileFileDistribution{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + return &this +} + +// NewFileFileDistributionWithDefaults instantiates a new FileFileDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileFileDistributionWithDefaults() *FileFileDistribution { + this := FileFileDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value +func (o *FileFileDistribution) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *FileFileDistribution) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *FileFileDistribution) SetBasePath(v string) { + o.BasePath = v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *FileFileDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *FileFileDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *FileFileDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *FileFileDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *FileFileDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *FileFileDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *FileFileDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *FileFileDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *FileFileDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *FileFileDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *FileFileDistribution) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FileFileDistribution) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FileFileDistribution) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *FileFileDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *FileFileDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *FileFileDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *FileFileDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileDistribution) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileDistribution) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *FileFileDistribution) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *FileFileDistribution) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *FileFileDistribution) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *FileFileDistribution) UnsetPublication() { + o.Publication.Unset() +} + +func (o FileFileDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileFileDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["base_path"] = o.BasePath + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FileFileDistribution) UnmarshalJSON(bytes []byte) (err error) { + varFileFileDistribution := _FileFileDistribution{} + + if err = json.Unmarshal(bytes, &varFileFileDistribution); err == nil { + *o = FileFileDistribution(varFileFileDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFileFileDistribution struct { + value *FileFileDistribution + isSet bool +} + +func (v NullableFileFileDistribution) Get() *FileFileDistribution { + return v.value +} + +func (v *NullableFileFileDistribution) Set(val *FileFileDistribution) { + v.value = val + v.isSet = true +} + +func (v NullableFileFileDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullableFileFileDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileFileDistribution(val *FileFileDistribution) *NullableFileFileDistribution { + return &NullableFileFileDistribution{value: val, isSet: true} +} + +func (v NullableFileFileDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileFileDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_distribution_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_distribution_response.go new file mode 100644 index 0000000000..db2b4f3e63 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_distribution_response.go @@ -0,0 +1,510 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the FileFileDistributionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileFileDistributionResponse{} + +// FileFileDistributionResponse Serializer for File Distributions. +type FileFileDistributionResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // The URL for accessing the publication as defined by this distribution. + BaseUrl *string `json:"base_url,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FileFileDistributionResponse FileFileDistributionResponse + +// NewFileFileDistributionResponse instantiates a new FileFileDistributionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileFileDistributionResponse(basePath string, name string) *FileFileDistributionResponse { + this := FileFileDistributionResponse{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + return &this +} + +// NewFileFileDistributionResponseWithDefaults instantiates a new FileFileDistributionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileFileDistributionResponseWithDefaults() *FileFileDistributionResponse { + this := FileFileDistributionResponse{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *FileFileDistributionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileDistributionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *FileFileDistributionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *FileFileDistributionResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *FileFileDistributionResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileDistributionResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *FileFileDistributionResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *FileFileDistributionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetBasePath returns the BasePath field value +func (o *FileFileDistributionResponse) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *FileFileDistributionResponse) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *FileFileDistributionResponse) SetBasePath(v string) { + o.BasePath = v +} + +// GetBaseUrl returns the BaseUrl field value if set, zero value otherwise. +func (o *FileFileDistributionResponse) GetBaseUrl() string { + if o == nil || IsNil(o.BaseUrl) { + var ret string + return ret + } + return *o.BaseUrl +} + +// GetBaseUrlOk returns a tuple with the BaseUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileDistributionResponse) GetBaseUrlOk() (*string, bool) { + if o == nil || IsNil(o.BaseUrl) { + return nil, false + } + return o.BaseUrl, true +} + +// HasBaseUrl returns a boolean if a field has been set. +func (o *FileFileDistributionResponse) HasBaseUrl() bool { + if o != nil && !IsNil(o.BaseUrl) { + return true + } + + return false +} + +// SetBaseUrl gets a reference to the given string and assigns it to the BaseUrl field. +func (o *FileFileDistributionResponse) SetBaseUrl(v string) { + o.BaseUrl = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileDistributionResponse) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileDistributionResponse) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *FileFileDistributionResponse) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *FileFileDistributionResponse) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *FileFileDistributionResponse) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *FileFileDistributionResponse) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *FileFileDistributionResponse) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileDistributionResponse) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *FileFileDistributionResponse) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *FileFileDistributionResponse) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *FileFileDistributionResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *FileFileDistributionResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *FileFileDistributionResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *FileFileDistributionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FileFileDistributionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FileFileDistributionResponse) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileDistributionResponse) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileDistributionResponse) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *FileFileDistributionResponse) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *FileFileDistributionResponse) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *FileFileDistributionResponse) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *FileFileDistributionResponse) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileDistributionResponse) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileDistributionResponse) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *FileFileDistributionResponse) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *FileFileDistributionResponse) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *FileFileDistributionResponse) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *FileFileDistributionResponse) UnsetPublication() { + o.Publication.Unset() +} + +func (o FileFileDistributionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileFileDistributionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["base_path"] = o.BasePath + if !IsNil(o.BaseUrl) { + toSerialize["base_url"] = o.BaseUrl + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FileFileDistributionResponse) UnmarshalJSON(bytes []byte) (err error) { + varFileFileDistributionResponse := _FileFileDistributionResponse{} + + if err = json.Unmarshal(bytes, &varFileFileDistributionResponse); err == nil { + *o = FileFileDistributionResponse(varFileFileDistributionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "base_path") + delete(additionalProperties, "base_url") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFileFileDistributionResponse struct { + value *FileFileDistributionResponse + isSet bool +} + +func (v NullableFileFileDistributionResponse) Get() *FileFileDistributionResponse { + return v.value +} + +func (v *NullableFileFileDistributionResponse) Set(val *FileFileDistributionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFileFileDistributionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFileFileDistributionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileFileDistributionResponse(val *FileFileDistributionResponse) *NullableFileFileDistributionResponse { + return &NullableFileFileDistributionResponse{value: val, isSet: true} +} + +func (v NullableFileFileDistributionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileFileDistributionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_publication.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_publication.go new file mode 100644 index 0000000000..bf8662ff31 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_publication.go @@ -0,0 +1,242 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the FileFilePublication type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileFilePublication{} + +// FileFilePublication Serializer for File Publications. +type FileFilePublication struct { + RepositoryVersion *string `json:"repository_version,omitempty"` + // A URI of the repository to be published. + Repository *string `json:"repository,omitempty"` + // Filename to use for manifest file containing metadata for all the files. + Manifest NullableString `json:"manifest,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FileFilePublication FileFilePublication + +// NewFileFilePublication instantiates a new FileFilePublication object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileFilePublication() *FileFilePublication { + this := FileFilePublication{} + var manifest string = "PULP_MANIFEST" + this.Manifest = *NewNullableString(&manifest) + return &this +} + +// NewFileFilePublicationWithDefaults instantiates a new FileFilePublication object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileFilePublicationWithDefaults() *FileFilePublication { + this := FileFilePublication{} + var manifest string = "PULP_MANIFEST" + this.Manifest = *NewNullableString(&manifest) + return &this +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *FileFilePublication) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFilePublication) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *FileFilePublication) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *FileFilePublication) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *FileFilePublication) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFilePublication) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *FileFilePublication) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *FileFilePublication) SetRepository(v string) { + o.Repository = &v +} + +// GetManifest returns the Manifest field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFilePublication) GetManifest() string { + if o == nil || IsNil(o.Manifest.Get()) { + var ret string + return ret + } + return *o.Manifest.Get() +} + +// GetManifestOk returns a tuple with the Manifest field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFilePublication) GetManifestOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Manifest.Get(), o.Manifest.IsSet() +} + +// HasManifest returns a boolean if a field has been set. +func (o *FileFilePublication) HasManifest() bool { + if o != nil && o.Manifest.IsSet() { + return true + } + + return false +} + +// SetManifest gets a reference to the given NullableString and assigns it to the Manifest field. +func (o *FileFilePublication) SetManifest(v string) { + o.Manifest.Set(&v) +} +// SetManifestNil sets the value for Manifest to be an explicit nil +func (o *FileFilePublication) SetManifestNil() { + o.Manifest.Set(nil) +} + +// UnsetManifest ensures that no value is present for Manifest, not even an explicit nil +func (o *FileFilePublication) UnsetManifest() { + o.Manifest.Unset() +} + +func (o FileFilePublication) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileFilePublication) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if o.Manifest.IsSet() { + toSerialize["manifest"] = o.Manifest.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FileFilePublication) UnmarshalJSON(bytes []byte) (err error) { + varFileFilePublication := _FileFilePublication{} + + if err = json.Unmarshal(bytes, &varFileFilePublication); err == nil { + *o = FileFilePublication(varFileFilePublication) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository_version") + delete(additionalProperties, "repository") + delete(additionalProperties, "manifest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFileFilePublication struct { + value *FileFilePublication + isSet bool +} + +func (v NullableFileFilePublication) Get() *FileFilePublication { + return v.value +} + +func (v *NullableFileFilePublication) Set(val *FileFilePublication) { + v.value = val + v.isSet = true +} + +func (v NullableFileFilePublication) IsSet() bool { + return v.isSet +} + +func (v *NullableFileFilePublication) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileFilePublication(val *FileFilePublication) *NullableFileFilePublication { + return &NullableFileFilePublication{value: val, isSet: true} +} + +func (v NullableFileFilePublication) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileFilePublication) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_publication_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_publication_response.go new file mode 100644 index 0000000000..74f1363a6a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_publication_response.go @@ -0,0 +1,356 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the FileFilePublicationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileFilePublicationResponse{} + +// FileFilePublicationResponse Serializer for File Publications. +type FileFilePublicationResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + RepositoryVersion *string `json:"repository_version,omitempty"` + // A URI of the repository to be published. + Repository *string `json:"repository,omitempty"` + // This publication is currently hosted as defined by these distributions. + Distributions []string `json:"distributions,omitempty"` + // Filename to use for manifest file containing metadata for all the files. + Manifest NullableString `json:"manifest,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FileFilePublicationResponse FileFilePublicationResponse + +// NewFileFilePublicationResponse instantiates a new FileFilePublicationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileFilePublicationResponse() *FileFilePublicationResponse { + this := FileFilePublicationResponse{} + var manifest string = "PULP_MANIFEST" + this.Manifest = *NewNullableString(&manifest) + return &this +} + +// NewFileFilePublicationResponseWithDefaults instantiates a new FileFilePublicationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileFilePublicationResponseWithDefaults() *FileFilePublicationResponse { + this := FileFilePublicationResponse{} + var manifest string = "PULP_MANIFEST" + this.Manifest = *NewNullableString(&manifest) + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *FileFilePublicationResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFilePublicationResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *FileFilePublicationResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *FileFilePublicationResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *FileFilePublicationResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFilePublicationResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *FileFilePublicationResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *FileFilePublicationResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *FileFilePublicationResponse) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFilePublicationResponse) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *FileFilePublicationResponse) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *FileFilePublicationResponse) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *FileFilePublicationResponse) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFilePublicationResponse) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *FileFilePublicationResponse) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *FileFilePublicationResponse) SetRepository(v string) { + o.Repository = &v +} + +// GetDistributions returns the Distributions field value if set, zero value otherwise. +func (o *FileFilePublicationResponse) GetDistributions() []string { + if o == nil || IsNil(o.Distributions) { + var ret []string + return ret + } + return o.Distributions +} + +// GetDistributionsOk returns a tuple with the Distributions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFilePublicationResponse) GetDistributionsOk() ([]string, bool) { + if o == nil || IsNil(o.Distributions) { + return nil, false + } + return o.Distributions, true +} + +// HasDistributions returns a boolean if a field has been set. +func (o *FileFilePublicationResponse) HasDistributions() bool { + if o != nil && !IsNil(o.Distributions) { + return true + } + + return false +} + +// SetDistributions gets a reference to the given []string and assigns it to the Distributions field. +func (o *FileFilePublicationResponse) SetDistributions(v []string) { + o.Distributions = v +} + +// GetManifest returns the Manifest field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFilePublicationResponse) GetManifest() string { + if o == nil || IsNil(o.Manifest.Get()) { + var ret string + return ret + } + return *o.Manifest.Get() +} + +// GetManifestOk returns a tuple with the Manifest field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFilePublicationResponse) GetManifestOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Manifest.Get(), o.Manifest.IsSet() +} + +// HasManifest returns a boolean if a field has been set. +func (o *FileFilePublicationResponse) HasManifest() bool { + if o != nil && o.Manifest.IsSet() { + return true + } + + return false +} + +// SetManifest gets a reference to the given NullableString and assigns it to the Manifest field. +func (o *FileFilePublicationResponse) SetManifest(v string) { + o.Manifest.Set(&v) +} +// SetManifestNil sets the value for Manifest to be an explicit nil +func (o *FileFilePublicationResponse) SetManifestNil() { + o.Manifest.Set(nil) +} + +// UnsetManifest ensures that no value is present for Manifest, not even an explicit nil +func (o *FileFilePublicationResponse) UnsetManifest() { + o.Manifest.Unset() +} + +func (o FileFilePublicationResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileFilePublicationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.Distributions) { + toSerialize["distributions"] = o.Distributions + } + if o.Manifest.IsSet() { + toSerialize["manifest"] = o.Manifest.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FileFilePublicationResponse) UnmarshalJSON(bytes []byte) (err error) { + varFileFilePublicationResponse := _FileFilePublicationResponse{} + + if err = json.Unmarshal(bytes, &varFileFilePublicationResponse); err == nil { + *o = FileFilePublicationResponse(varFileFilePublicationResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "repository") + delete(additionalProperties, "distributions") + delete(additionalProperties, "manifest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFileFilePublicationResponse struct { + value *FileFilePublicationResponse + isSet bool +} + +func (v NullableFileFilePublicationResponse) Get() *FileFilePublicationResponse { + return v.value +} + +func (v *NullableFileFilePublicationResponse) Set(val *FileFilePublicationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFileFilePublicationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFileFilePublicationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileFilePublicationResponse(val *FileFilePublicationResponse) *NullableFileFilePublicationResponse { + return &NullableFileFilePublicationResponse{value: val, isSet: true} +} + +func (v NullableFileFilePublicationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileFilePublicationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_remote.go new file mode 100644 index 0000000000..5f976cd7ec --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_remote.go @@ -0,0 +1,1047 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the FileFileRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileFileRemote{} + +// FileFileRemote Serializer for File Remotes. +type FileFileRemote struct { + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FileFileRemote FileFileRemote + +// NewFileFileRemote instantiates a new FileFileRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileFileRemote(name string, url string) *FileFileRemote { + this := FileFileRemote{} + this.Name = name + this.Url = url + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewFileFileRemoteWithDefaults instantiates a new FileFileRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileFileRemoteWithDefaults() *FileFileRemote { + this := FileFileRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value +func (o *FileFileRemote) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FileFileRemote) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FileFileRemote) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *FileFileRemote) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *FileFileRemote) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *FileFileRemote) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *FileFileRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *FileFileRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *FileFileRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *FileFileRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *FileFileRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *FileFileRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *FileFileRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *FileFileRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *FileFileRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *FileFileRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *FileFileRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *FileFileRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *FileFileRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *FileFileRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *FileFileRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *FileFileRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *FileFileRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *FileFileRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *FileFileRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *FileFileRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *FileFileRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *FileFileRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *FileFileRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *FileFileRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *FileFileRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *FileFileRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *FileFileRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *FileFileRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *FileFileRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *FileFileRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *FileFileRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *FileFileRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *FileFileRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *FileFileRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *FileFileRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *FileFileRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *FileFileRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *FileFileRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *FileFileRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *FileFileRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *FileFileRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *FileFileRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *FileFileRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *FileFileRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *FileFileRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *FileFileRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *FileFileRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *FileFileRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *FileFileRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *FileFileRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *FileFileRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *FileFileRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *FileFileRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *FileFileRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *FileFileRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *FileFileRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *FileFileRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *FileFileRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *FileFileRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *FileFileRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *FileFileRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *FileFileRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *FileFileRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *FileFileRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *FileFileRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *FileFileRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *FileFileRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *FileFileRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *FileFileRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *FileFileRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *FileFileRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *FileFileRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +func (o FileFileRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileFileRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FileFileRemote) UnmarshalJSON(bytes []byte) (err error) { + varFileFileRemote := _FileFileRemote{} + + if err = json.Unmarshal(bytes, &varFileFileRemote); err == nil { + *o = FileFileRemote(varFileFileRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFileFileRemote struct { + value *FileFileRemote + isSet bool +} + +func (v NullableFileFileRemote) Get() *FileFileRemote { + return v.value +} + +func (v *NullableFileFileRemote) Set(val *FileFileRemote) { + v.value = val + v.isSet = true +} + +func (v NullableFileFileRemote) IsSet() bool { + return v.isSet +} + +func (v *NullableFileFileRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileFileRemote(val *FileFileRemote) *NullableFileFileRemote { + return &NullableFileFileRemote{value: val, isSet: true} +} + +func (v NullableFileFileRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileFileRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_remote_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_remote_response.go new file mode 100644 index 0000000000..846caf35cf --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_remote_response.go @@ -0,0 +1,959 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the FileFileRemoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileFileRemoteResponse{} + +// FileFileRemoteResponse Serializer for File Remotes. +type FileFileRemoteResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FileFileRemoteResponse FileFileRemoteResponse + +// NewFileFileRemoteResponse instantiates a new FileFileRemoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileFileRemoteResponse(name string, url string) *FileFileRemoteResponse { + this := FileFileRemoteResponse{} + this.Name = name + this.Url = url + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewFileFileRemoteResponseWithDefaults instantiates a new FileFileRemoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileFileRemoteResponseWithDefaults() *FileFileRemoteResponse { + this := FileFileRemoteResponse{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *FileFileRemoteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRemoteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *FileFileRemoteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *FileFileRemoteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRemoteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *FileFileRemoteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *FileFileRemoteResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FileFileRemoteResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FileFileRemoteResponse) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *FileFileRemoteResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *FileFileRemoteResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *FileFileRemoteResponse) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemoteResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemoteResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *FileFileRemoteResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *FileFileRemoteResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *FileFileRemoteResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemoteResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemoteResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *FileFileRemoteResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *FileFileRemoteResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *FileFileRemoteResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *FileFileRemoteResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRemoteResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *FileFileRemoteResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemoteResponse) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemoteResponse) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *FileFileRemoteResponse) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *FileFileRemoteResponse) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *FileFileRemoteResponse) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *FileFileRemoteResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRemoteResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *FileFileRemoteResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *FileFileRemoteResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRemoteResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *FileFileRemoteResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemoteResponse) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemoteResponse) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *FileFileRemoteResponse) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *FileFileRemoteResponse) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *FileFileRemoteResponse) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemoteResponse) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemoteResponse) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *FileFileRemoteResponse) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *FileFileRemoteResponse) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *FileFileRemoteResponse) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *FileFileRemoteResponse) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRemoteResponse) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *FileFileRemoteResponse) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemoteResponse) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemoteResponse) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *FileFileRemoteResponse) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *FileFileRemoteResponse) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *FileFileRemoteResponse) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemoteResponse) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemoteResponse) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *FileFileRemoteResponse) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *FileFileRemoteResponse) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *FileFileRemoteResponse) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemoteResponse) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemoteResponse) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *FileFileRemoteResponse) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *FileFileRemoteResponse) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *FileFileRemoteResponse) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemoteResponse) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemoteResponse) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *FileFileRemoteResponse) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *FileFileRemoteResponse) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *FileFileRemoteResponse) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *FileFileRemoteResponse) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRemoteResponse) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *FileFileRemoteResponse) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRemoteResponse) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRemoteResponse) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *FileFileRemoteResponse) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *FileFileRemoteResponse) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *FileFileRemoteResponse) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *FileFileRemoteResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRemoteResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *FileFileRemoteResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *FileFileRemoteResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +func (o FileFileRemoteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileFileRemoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FileFileRemoteResponse) UnmarshalJSON(bytes []byte) (err error) { + varFileFileRemoteResponse := _FileFileRemoteResponse{} + + if err = json.Unmarshal(bytes, &varFileFileRemoteResponse); err == nil { + *o = FileFileRemoteResponse(varFileFileRemoteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "hidden_fields") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFileFileRemoteResponse struct { + value *FileFileRemoteResponse + isSet bool +} + +func (v NullableFileFileRemoteResponse) Get() *FileFileRemoteResponse { + return v.value +} + +func (v *NullableFileFileRemoteResponse) Set(val *FileFileRemoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFileFileRemoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFileFileRemoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileFileRemoteResponse(val *FileFileRemoteResponse) *NullableFileFileRemoteResponse { + return &NullableFileFileRemoteResponse{value: val, isSet: true} +} + +func (v NullableFileFileRemoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileFileRemoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_repository.go new file mode 100644 index 0000000000..f5b5c18337 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_repository.go @@ -0,0 +1,419 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the FileFileRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileFileRepository{} + +// FileFileRepository Serializer for File Repositories. +type FileFileRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. + Autopublish *bool `json:"autopublish,omitempty"` + // Filename to use for manifest file containing metadata for all the files. + Manifest NullableString `json:"manifest,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FileFileRepository FileFileRepository + +// NewFileFileRepository instantiates a new FileFileRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileFileRepository(name string) *FileFileRepository { + this := FileFileRepository{} + this.Name = name + var autopublish bool = false + this.Autopublish = &autopublish + var manifest string = "PULP_MANIFEST" + this.Manifest = *NewNullableString(&manifest) + return &this +} + +// NewFileFileRepositoryWithDefaults instantiates a new FileFileRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileFileRepositoryWithDefaults() *FileFileRepository { + this := FileFileRepository{} + var autopublish bool = false + this.Autopublish = &autopublish + var manifest string = "PULP_MANIFEST" + this.Manifest = *NewNullableString(&manifest) + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *FileFileRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *FileFileRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *FileFileRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *FileFileRepository) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FileFileRepository) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FileFileRepository) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *FileFileRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *FileFileRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *FileFileRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *FileFileRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *FileFileRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *FileFileRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *FileFileRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *FileFileRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *FileFileRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *FileFileRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *FileFileRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *FileFileRepository) UnsetRemote() { + o.Remote.Unset() +} + +// GetAutopublish returns the Autopublish field value if set, zero value otherwise. +func (o *FileFileRepository) GetAutopublish() bool { + if o == nil || IsNil(o.Autopublish) { + var ret bool + return ret + } + return *o.Autopublish +} + +// GetAutopublishOk returns a tuple with the Autopublish field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRepository) GetAutopublishOk() (*bool, bool) { + if o == nil || IsNil(o.Autopublish) { + return nil, false + } + return o.Autopublish, true +} + +// HasAutopublish returns a boolean if a field has been set. +func (o *FileFileRepository) HasAutopublish() bool { + if o != nil && !IsNil(o.Autopublish) { + return true + } + + return false +} + +// SetAutopublish gets a reference to the given bool and assigns it to the Autopublish field. +func (o *FileFileRepository) SetAutopublish(v bool) { + o.Autopublish = &v +} + +// GetManifest returns the Manifest field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRepository) GetManifest() string { + if o == nil || IsNil(o.Manifest.Get()) { + var ret string + return ret + } + return *o.Manifest.Get() +} + +// GetManifestOk returns a tuple with the Manifest field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRepository) GetManifestOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Manifest.Get(), o.Manifest.IsSet() +} + +// HasManifest returns a boolean if a field has been set. +func (o *FileFileRepository) HasManifest() bool { + if o != nil && o.Manifest.IsSet() { + return true + } + + return false +} + +// SetManifest gets a reference to the given NullableString and assigns it to the Manifest field. +func (o *FileFileRepository) SetManifest(v string) { + o.Manifest.Set(&v) +} +// SetManifestNil sets the value for Manifest to be an explicit nil +func (o *FileFileRepository) SetManifestNil() { + o.Manifest.Set(nil) +} + +// UnsetManifest ensures that no value is present for Manifest, not even an explicit nil +func (o *FileFileRepository) UnsetManifest() { + o.Manifest.Unset() +} + +func (o FileFileRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileFileRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if !IsNil(o.Autopublish) { + toSerialize["autopublish"] = o.Autopublish + } + if o.Manifest.IsSet() { + toSerialize["manifest"] = o.Manifest.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FileFileRepository) UnmarshalJSON(bytes []byte) (err error) { + varFileFileRepository := _FileFileRepository{} + + if err = json.Unmarshal(bytes, &varFileFileRepository); err == nil { + *o = FileFileRepository(varFileFileRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "autopublish") + delete(additionalProperties, "manifest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFileFileRepository struct { + value *FileFileRepository + isSet bool +} + +func (v NullableFileFileRepository) Get() *FileFileRepository { + return v.value +} + +func (v *NullableFileFileRepository) Set(val *FileFileRepository) { + v.value = val + v.isSet = true +} + +func (v NullableFileFileRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableFileFileRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileFileRepository(val *FileFileRepository) *NullableFileFileRepository { + return &NullableFileFileRepository{value: val, isSet: true} +} + +func (v NullableFileFileRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileFileRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_repository_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_repository_response.go new file mode 100644 index 0000000000..83efce6740 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_file_file_repository_response.go @@ -0,0 +1,569 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the FileFileRepositoryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileFileRepositoryResponse{} + +// FileFileRepositoryResponse Serializer for File Repositories. +type FileFileRepositoryResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + VersionsHref *string `json:"versions_href,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + LatestVersionHref *string `json:"latest_version_href,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. + Autopublish *bool `json:"autopublish,omitempty"` + // Filename to use for manifest file containing metadata for all the files. + Manifest NullableString `json:"manifest,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FileFileRepositoryResponse FileFileRepositoryResponse + +// NewFileFileRepositoryResponse instantiates a new FileFileRepositoryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFileFileRepositoryResponse(name string) *FileFileRepositoryResponse { + this := FileFileRepositoryResponse{} + this.Name = name + var autopublish bool = false + this.Autopublish = &autopublish + var manifest string = "PULP_MANIFEST" + this.Manifest = *NewNullableString(&manifest) + return &this +} + +// NewFileFileRepositoryResponseWithDefaults instantiates a new FileFileRepositoryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFileFileRepositoryResponseWithDefaults() *FileFileRepositoryResponse { + this := FileFileRepositoryResponse{} + var autopublish bool = false + this.Autopublish = &autopublish + var manifest string = "PULP_MANIFEST" + this.Manifest = *NewNullableString(&manifest) + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *FileFileRepositoryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRepositoryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *FileFileRepositoryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *FileFileRepositoryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *FileFileRepositoryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRepositoryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *FileFileRepositoryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *FileFileRepositoryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetVersionsHref returns the VersionsHref field value if set, zero value otherwise. +func (o *FileFileRepositoryResponse) GetVersionsHref() string { + if o == nil || IsNil(o.VersionsHref) { + var ret string + return ret + } + return *o.VersionsHref +} + +// GetVersionsHrefOk returns a tuple with the VersionsHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRepositoryResponse) GetVersionsHrefOk() (*string, bool) { + if o == nil || IsNil(o.VersionsHref) { + return nil, false + } + return o.VersionsHref, true +} + +// HasVersionsHref returns a boolean if a field has been set. +func (o *FileFileRepositoryResponse) HasVersionsHref() bool { + if o != nil && !IsNil(o.VersionsHref) { + return true + } + + return false +} + +// SetVersionsHref gets a reference to the given string and assigns it to the VersionsHref field. +func (o *FileFileRepositoryResponse) SetVersionsHref(v string) { + o.VersionsHref = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *FileFileRepositoryResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRepositoryResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *FileFileRepositoryResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *FileFileRepositoryResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetLatestVersionHref returns the LatestVersionHref field value if set, zero value otherwise. +func (o *FileFileRepositoryResponse) GetLatestVersionHref() string { + if o == nil || IsNil(o.LatestVersionHref) { + var ret string + return ret + } + return *o.LatestVersionHref +} + +// GetLatestVersionHrefOk returns a tuple with the LatestVersionHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRepositoryResponse) GetLatestVersionHrefOk() (*string, bool) { + if o == nil || IsNil(o.LatestVersionHref) { + return nil, false + } + return o.LatestVersionHref, true +} + +// HasLatestVersionHref returns a boolean if a field has been set. +func (o *FileFileRepositoryResponse) HasLatestVersionHref() bool { + if o != nil && !IsNil(o.LatestVersionHref) { + return true + } + + return false +} + +// SetLatestVersionHref gets a reference to the given string and assigns it to the LatestVersionHref field. +func (o *FileFileRepositoryResponse) SetLatestVersionHref(v string) { + o.LatestVersionHref = &v +} + +// GetName returns the Name field value +func (o *FileFileRepositoryResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FileFileRepositoryResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FileFileRepositoryResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRepositoryResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRepositoryResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *FileFileRepositoryResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *FileFileRepositoryResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *FileFileRepositoryResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *FileFileRepositoryResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRepositoryResponse) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRepositoryResponse) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *FileFileRepositoryResponse) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *FileFileRepositoryResponse) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *FileFileRepositoryResponse) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *FileFileRepositoryResponse) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRepositoryResponse) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRepositoryResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *FileFileRepositoryResponse) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *FileFileRepositoryResponse) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *FileFileRepositoryResponse) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *FileFileRepositoryResponse) UnsetRemote() { + o.Remote.Unset() +} + +// GetAutopublish returns the Autopublish field value if set, zero value otherwise. +func (o *FileFileRepositoryResponse) GetAutopublish() bool { + if o == nil || IsNil(o.Autopublish) { + var ret bool + return ret + } + return *o.Autopublish +} + +// GetAutopublishOk returns a tuple with the Autopublish field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FileFileRepositoryResponse) GetAutopublishOk() (*bool, bool) { + if o == nil || IsNil(o.Autopublish) { + return nil, false + } + return o.Autopublish, true +} + +// HasAutopublish returns a boolean if a field has been set. +func (o *FileFileRepositoryResponse) HasAutopublish() bool { + if o != nil && !IsNil(o.Autopublish) { + return true + } + + return false +} + +// SetAutopublish gets a reference to the given bool and assigns it to the Autopublish field. +func (o *FileFileRepositoryResponse) SetAutopublish(v bool) { + o.Autopublish = &v +} + +// GetManifest returns the Manifest field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FileFileRepositoryResponse) GetManifest() string { + if o == nil || IsNil(o.Manifest.Get()) { + var ret string + return ret + } + return *o.Manifest.Get() +} + +// GetManifestOk returns a tuple with the Manifest field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FileFileRepositoryResponse) GetManifestOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Manifest.Get(), o.Manifest.IsSet() +} + +// HasManifest returns a boolean if a field has been set. +func (o *FileFileRepositoryResponse) HasManifest() bool { + if o != nil && o.Manifest.IsSet() { + return true + } + + return false +} + +// SetManifest gets a reference to the given NullableString and assigns it to the Manifest field. +func (o *FileFileRepositoryResponse) SetManifest(v string) { + o.Manifest.Set(&v) +} +// SetManifestNil sets the value for Manifest to be an explicit nil +func (o *FileFileRepositoryResponse) SetManifestNil() { + o.Manifest.Set(nil) +} + +// UnsetManifest ensures that no value is present for Manifest, not even an explicit nil +func (o *FileFileRepositoryResponse) UnsetManifest() { + o.Manifest.Unset() +} + +func (o FileFileRepositoryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileFileRepositoryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.VersionsHref) { + toSerialize["versions_href"] = o.VersionsHref + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.LatestVersionHref) { + toSerialize["latest_version_href"] = o.LatestVersionHref + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if !IsNil(o.Autopublish) { + toSerialize["autopublish"] = o.Autopublish + } + if o.Manifest.IsSet() { + toSerialize["manifest"] = o.Manifest.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FileFileRepositoryResponse) UnmarshalJSON(bytes []byte) (err error) { + varFileFileRepositoryResponse := _FileFileRepositoryResponse{} + + if err = json.Unmarshal(bytes, &varFileFileRepositoryResponse); err == nil { + *o = FileFileRepositoryResponse(varFileFileRepositoryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "versions_href") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "latest_version_href") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "autopublish") + delete(additionalProperties, "manifest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFileFileRepositoryResponse struct { + value *FileFileRepositoryResponse + isSet bool +} + +func (v NullableFileFileRepositoryResponse) Get() *FileFileRepositoryResponse { + return v.value +} + +func (v *NullableFileFileRepositoryResponse) Set(val *FileFileRepositoryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFileFileRepositoryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFileFileRepositoryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFileFileRepositoryResponse(val *FileFileRepositoryResponse) *NullableFileFileRepositoryResponse { + return &NullableFileFileRepositoryResponse{value: val, isSet: true} +} + +func (v NullableFileFileRepositoryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFileFileRepositoryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_export.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_export.go new file mode 100644 index 0000000000..61698cf79d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_export.go @@ -0,0 +1,277 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the FilesystemExport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FilesystemExport{} + +// FilesystemExport Serializer for FilesystemExports. +type FilesystemExport struct { + // A URI of the task that ran the Export. + Task NullableString `json:"task,omitempty"` + // A URI of the publication to be exported. + Publication *string `json:"publication,omitempty"` + // A URI of the repository version export. + RepositoryVersion *string `json:"repository_version,omitempty"` + // The URI of the last-exported-repo-version. + StartRepositoryVersion *string `json:"start_repository_version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FilesystemExport FilesystemExport + +// NewFilesystemExport instantiates a new FilesystemExport object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFilesystemExport() *FilesystemExport { + this := FilesystemExport{} + return &this +} + +// NewFilesystemExportWithDefaults instantiates a new FilesystemExport object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFilesystemExportWithDefaults() *FilesystemExport { + this := FilesystemExport{} + return &this +} + +// GetTask returns the Task field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FilesystemExport) GetTask() string { + if o == nil || IsNil(o.Task.Get()) { + var ret string + return ret + } + return *o.Task.Get() +} + +// GetTaskOk returns a tuple with the Task field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FilesystemExport) GetTaskOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Task.Get(), o.Task.IsSet() +} + +// HasTask returns a boolean if a field has been set. +func (o *FilesystemExport) HasTask() bool { + if o != nil && o.Task.IsSet() { + return true + } + + return false +} + +// SetTask gets a reference to the given NullableString and assigns it to the Task field. +func (o *FilesystemExport) SetTask(v string) { + o.Task.Set(&v) +} +// SetTaskNil sets the value for Task to be an explicit nil +func (o *FilesystemExport) SetTaskNil() { + o.Task.Set(nil) +} + +// UnsetTask ensures that no value is present for Task, not even an explicit nil +func (o *FilesystemExport) UnsetTask() { + o.Task.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise. +func (o *FilesystemExport) GetPublication() string { + if o == nil || IsNil(o.Publication) { + var ret string + return ret + } + return *o.Publication +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilesystemExport) GetPublicationOk() (*string, bool) { + if o == nil || IsNil(o.Publication) { + return nil, false + } + return o.Publication, true +} + +// HasPublication returns a boolean if a field has been set. +func (o *FilesystemExport) HasPublication() bool { + if o != nil && !IsNil(o.Publication) { + return true + } + + return false +} + +// SetPublication gets a reference to the given string and assigns it to the Publication field. +func (o *FilesystemExport) SetPublication(v string) { + o.Publication = &v +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *FilesystemExport) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilesystemExport) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *FilesystemExport) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *FilesystemExport) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetStartRepositoryVersion returns the StartRepositoryVersion field value if set, zero value otherwise. +func (o *FilesystemExport) GetStartRepositoryVersion() string { + if o == nil || IsNil(o.StartRepositoryVersion) { + var ret string + return ret + } + return *o.StartRepositoryVersion +} + +// GetStartRepositoryVersionOk returns a tuple with the StartRepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilesystemExport) GetStartRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.StartRepositoryVersion) { + return nil, false + } + return o.StartRepositoryVersion, true +} + +// HasStartRepositoryVersion returns a boolean if a field has been set. +func (o *FilesystemExport) HasStartRepositoryVersion() bool { + if o != nil && !IsNil(o.StartRepositoryVersion) { + return true + } + + return false +} + +// SetStartRepositoryVersion gets a reference to the given string and assigns it to the StartRepositoryVersion field. +func (o *FilesystemExport) SetStartRepositoryVersion(v string) { + o.StartRepositoryVersion = &v +} + +func (o FilesystemExport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FilesystemExport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Task.IsSet() { + toSerialize["task"] = o.Task.Get() + } + if !IsNil(o.Publication) { + toSerialize["publication"] = o.Publication + } + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.StartRepositoryVersion) { + toSerialize["start_repository_version"] = o.StartRepositoryVersion + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FilesystemExport) UnmarshalJSON(bytes []byte) (err error) { + varFilesystemExport := _FilesystemExport{} + + if err = json.Unmarshal(bytes, &varFilesystemExport); err == nil { + *o = FilesystemExport(varFilesystemExport) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "task") + delete(additionalProperties, "publication") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "start_repository_version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFilesystemExport struct { + value *FilesystemExport + isSet bool +} + +func (v NullableFilesystemExport) Get() *FilesystemExport { + return v.value +} + +func (v *NullableFilesystemExport) Set(val *FilesystemExport) { + v.value = val + v.isSet = true +} + +func (v NullableFilesystemExport) IsSet() bool { + return v.isSet +} + +func (v *NullableFilesystemExport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFilesystemExport(val *FilesystemExport) *NullableFilesystemExport { + return &NullableFilesystemExport{value: val, isSet: true} +} + +func (v NullableFilesystemExport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFilesystemExport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_export_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_export_response.go new file mode 100644 index 0000000000..39b17fda56 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_export_response.go @@ -0,0 +1,315 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the FilesystemExportResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FilesystemExportResponse{} + +// FilesystemExportResponse Serializer for FilesystemExports. +type FilesystemExportResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A URI of the task that ran the Export. + Task NullableString `json:"task,omitempty"` + // Resources that were exported. + ExportedResources []string `json:"exported_resources,omitempty"` + // Any additional parameters that were used to create the export. + Params map[string]interface{} `json:"params,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FilesystemExportResponse FilesystemExportResponse + +// NewFilesystemExportResponse instantiates a new FilesystemExportResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFilesystemExportResponse() *FilesystemExportResponse { + this := FilesystemExportResponse{} + return &this +} + +// NewFilesystemExportResponseWithDefaults instantiates a new FilesystemExportResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFilesystemExportResponseWithDefaults() *FilesystemExportResponse { + this := FilesystemExportResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *FilesystemExportResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilesystemExportResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *FilesystemExportResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *FilesystemExportResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *FilesystemExportResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilesystemExportResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *FilesystemExportResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *FilesystemExportResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetTask returns the Task field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FilesystemExportResponse) GetTask() string { + if o == nil || IsNil(o.Task.Get()) { + var ret string + return ret + } + return *o.Task.Get() +} + +// GetTaskOk returns a tuple with the Task field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FilesystemExportResponse) GetTaskOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Task.Get(), o.Task.IsSet() +} + +// HasTask returns a boolean if a field has been set. +func (o *FilesystemExportResponse) HasTask() bool { + if o != nil && o.Task.IsSet() { + return true + } + + return false +} + +// SetTask gets a reference to the given NullableString and assigns it to the Task field. +func (o *FilesystemExportResponse) SetTask(v string) { + o.Task.Set(&v) +} +// SetTaskNil sets the value for Task to be an explicit nil +func (o *FilesystemExportResponse) SetTaskNil() { + o.Task.Set(nil) +} + +// UnsetTask ensures that no value is present for Task, not even an explicit nil +func (o *FilesystemExportResponse) UnsetTask() { + o.Task.Unset() +} + +// GetExportedResources returns the ExportedResources field value if set, zero value otherwise. +func (o *FilesystemExportResponse) GetExportedResources() []string { + if o == nil || IsNil(o.ExportedResources) { + var ret []string + return ret + } + return o.ExportedResources +} + +// GetExportedResourcesOk returns a tuple with the ExportedResources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilesystemExportResponse) GetExportedResourcesOk() ([]string, bool) { + if o == nil || IsNil(o.ExportedResources) { + return nil, false + } + return o.ExportedResources, true +} + +// HasExportedResources returns a boolean if a field has been set. +func (o *FilesystemExportResponse) HasExportedResources() bool { + if o != nil && !IsNil(o.ExportedResources) { + return true + } + + return false +} + +// SetExportedResources gets a reference to the given []string and assigns it to the ExportedResources field. +func (o *FilesystemExportResponse) SetExportedResources(v []string) { + o.ExportedResources = v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *FilesystemExportResponse) GetParams() map[string]interface{} { + if o == nil || IsNil(o.Params) { + var ret map[string]interface{} + return ret + } + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilesystemExportResponse) GetParamsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Params) { + return map[string]interface{}{}, false + } + return o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *FilesystemExportResponse) HasParams() bool { + if o != nil && !IsNil(o.Params) { + return true + } + + return false +} + +// SetParams gets a reference to the given map[string]interface{} and assigns it to the Params field. +func (o *FilesystemExportResponse) SetParams(v map[string]interface{}) { + o.Params = v +} + +func (o FilesystemExportResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FilesystemExportResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if o.Task.IsSet() { + toSerialize["task"] = o.Task.Get() + } + if !IsNil(o.ExportedResources) { + toSerialize["exported_resources"] = o.ExportedResources + } + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FilesystemExportResponse) UnmarshalJSON(bytes []byte) (err error) { + varFilesystemExportResponse := _FilesystemExportResponse{} + + if err = json.Unmarshal(bytes, &varFilesystemExportResponse); err == nil { + *o = FilesystemExportResponse(varFilesystemExportResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "task") + delete(additionalProperties, "exported_resources") + delete(additionalProperties, "params") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFilesystemExportResponse struct { + value *FilesystemExportResponse + isSet bool +} + +func (v NullableFilesystemExportResponse) Get() *FilesystemExportResponse { + return v.value +} + +func (v *NullableFilesystemExportResponse) Set(val *FilesystemExportResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFilesystemExportResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFilesystemExportResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFilesystemExportResponse(val *FilesystemExportResponse) *NullableFilesystemExportResponse { + return &NullableFilesystemExportResponse{value: val, isSet: true} +} + +func (v NullableFilesystemExportResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFilesystemExportResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_exporter.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_exporter.go new file mode 100644 index 0000000000..dc8800c864 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_exporter.go @@ -0,0 +1,214 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the FilesystemExporter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FilesystemExporter{} + +// FilesystemExporter Serializer for FilesystemExporters. +type FilesystemExporter struct { + // Unique name of the file system exporter. + Name string `json:"name"` + // File system location to export to. + Path string `json:"path"` + Method *MethodEnum `json:"method,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FilesystemExporter FilesystemExporter + +// NewFilesystemExporter instantiates a new FilesystemExporter object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFilesystemExporter(name string, path string) *FilesystemExporter { + this := FilesystemExporter{} + this.Name = name + this.Path = path + var method MethodEnum = METHODENUM_WRITE + this.Method = &method + return &this +} + +// NewFilesystemExporterWithDefaults instantiates a new FilesystemExporter object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFilesystemExporterWithDefaults() *FilesystemExporter { + this := FilesystemExporter{} + var method MethodEnum = METHODENUM_WRITE + this.Method = &method + return &this +} + +// GetName returns the Name field value +func (o *FilesystemExporter) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FilesystemExporter) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FilesystemExporter) SetName(v string) { + o.Name = v +} + +// GetPath returns the Path field value +func (o *FilesystemExporter) GetPath() string { + if o == nil { + var ret string + return ret + } + + return o.Path +} + +// GetPathOk returns a tuple with the Path field value +// and a boolean to check if the value has been set. +func (o *FilesystemExporter) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Path, true +} + +// SetPath sets field value +func (o *FilesystemExporter) SetPath(v string) { + o.Path = v +} + +// GetMethod returns the Method field value if set, zero value otherwise. +func (o *FilesystemExporter) GetMethod() MethodEnum { + if o == nil || IsNil(o.Method) { + var ret MethodEnum + return ret + } + return *o.Method +} + +// GetMethodOk returns a tuple with the Method field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilesystemExporter) GetMethodOk() (*MethodEnum, bool) { + if o == nil || IsNil(o.Method) { + return nil, false + } + return o.Method, true +} + +// HasMethod returns a boolean if a field has been set. +func (o *FilesystemExporter) HasMethod() bool { + if o != nil && !IsNil(o.Method) { + return true + } + + return false +} + +// SetMethod gets a reference to the given MethodEnum and assigns it to the Method field. +func (o *FilesystemExporter) SetMethod(v MethodEnum) { + o.Method = &v +} + +func (o FilesystemExporter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FilesystemExporter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["path"] = o.Path + if !IsNil(o.Method) { + toSerialize["method"] = o.Method + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FilesystemExporter) UnmarshalJSON(bytes []byte) (err error) { + varFilesystemExporter := _FilesystemExporter{} + + if err = json.Unmarshal(bytes, &varFilesystemExporter); err == nil { + *o = FilesystemExporter(varFilesystemExporter) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "path") + delete(additionalProperties, "method") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFilesystemExporter struct { + value *FilesystemExporter + isSet bool +} + +func (v NullableFilesystemExporter) Get() *FilesystemExporter { + return v.value +} + +func (v *NullableFilesystemExporter) Set(val *FilesystemExporter) { + v.value = val + v.isSet = true +} + +func (v NullableFilesystemExporter) IsSet() bool { + return v.isSet +} + +func (v *NullableFilesystemExporter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFilesystemExporter(val *FilesystemExporter) *NullableFilesystemExporter { + return &NullableFilesystemExporter{value: val, isSet: true} +} + +func (v NullableFilesystemExporter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFilesystemExporter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_exporter_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_exporter_response.go new file mode 100644 index 0000000000..71e6f5169b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_filesystem_exporter_response.go @@ -0,0 +1,290 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the FilesystemExporterResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FilesystemExporterResponse{} + +// FilesystemExporterResponse Serializer for FilesystemExporters. +type FilesystemExporterResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Unique name of the file system exporter. + Name string `json:"name"` + // File system location to export to. + Path string `json:"path"` + Method *MethodEnum `json:"method,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FilesystemExporterResponse FilesystemExporterResponse + +// NewFilesystemExporterResponse instantiates a new FilesystemExporterResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFilesystemExporterResponse(name string, path string) *FilesystemExporterResponse { + this := FilesystemExporterResponse{} + this.Name = name + this.Path = path + var method MethodEnum = METHODENUM_WRITE + this.Method = &method + return &this +} + +// NewFilesystemExporterResponseWithDefaults instantiates a new FilesystemExporterResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFilesystemExporterResponseWithDefaults() *FilesystemExporterResponse { + this := FilesystemExporterResponse{} + var method MethodEnum = METHODENUM_WRITE + this.Method = &method + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *FilesystemExporterResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilesystemExporterResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *FilesystemExporterResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *FilesystemExporterResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *FilesystemExporterResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilesystemExporterResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *FilesystemExporterResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *FilesystemExporterResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *FilesystemExporterResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FilesystemExporterResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FilesystemExporterResponse) SetName(v string) { + o.Name = v +} + +// GetPath returns the Path field value +func (o *FilesystemExporterResponse) GetPath() string { + if o == nil { + var ret string + return ret + } + + return o.Path +} + +// GetPathOk returns a tuple with the Path field value +// and a boolean to check if the value has been set. +func (o *FilesystemExporterResponse) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Path, true +} + +// SetPath sets field value +func (o *FilesystemExporterResponse) SetPath(v string) { + o.Path = v +} + +// GetMethod returns the Method field value if set, zero value otherwise. +func (o *FilesystemExporterResponse) GetMethod() MethodEnum { + if o == nil || IsNil(o.Method) { + var ret MethodEnum + return ret + } + return *o.Method +} + +// GetMethodOk returns a tuple with the Method field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilesystemExporterResponse) GetMethodOk() (*MethodEnum, bool) { + if o == nil || IsNil(o.Method) { + return nil, false + } + return o.Method, true +} + +// HasMethod returns a boolean if a field has been set. +func (o *FilesystemExporterResponse) HasMethod() bool { + if o != nil && !IsNil(o.Method) { + return true + } + + return false +} + +// SetMethod gets a reference to the given MethodEnum and assigns it to the Method field. +func (o *FilesystemExporterResponse) SetMethod(v MethodEnum) { + o.Method = &v +} + +func (o FilesystemExporterResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FilesystemExporterResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["path"] = o.Path + if !IsNil(o.Method) { + toSerialize["method"] = o.Method + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FilesystemExporterResponse) UnmarshalJSON(bytes []byte) (err error) { + varFilesystemExporterResponse := _FilesystemExporterResponse{} + + if err = json.Unmarshal(bytes, &varFilesystemExporterResponse); err == nil { + *o = FilesystemExporterResponse(varFilesystemExporterResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "path") + delete(additionalProperties, "method") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFilesystemExporterResponse struct { + value *FilesystemExporterResponse + isSet bool +} + +func (v NullableFilesystemExporterResponse) Get() *FilesystemExporterResponse { + return v.value +} + +func (v *NullableFilesystemExporterResponse) Set(val *FilesystemExporterResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFilesystemExporterResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFilesystemExporterResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFilesystemExporterResponse(val *FilesystemExporterResponse) *NullableFilesystemExporterResponse { + return &NullableFilesystemExporterResponse{value: val, isSet: true} +} + +func (v NullableFilesystemExporterResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFilesystemExporterResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_collection.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_collection.go new file mode 100644 index 0000000000..68faff3a7c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_collection.go @@ -0,0 +1,228 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the GalaxyCollection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GalaxyCollection{} + +// GalaxyCollection A serializer for a Collection. +type GalaxyCollection struct { + Id string `json:"id"` + Name string `json:"name"` + Created time.Time `json:"created"` + Modified time.Time `json:"modified"` + AdditionalProperties map[string]interface{} +} + +type _GalaxyCollection GalaxyCollection + +// NewGalaxyCollection instantiates a new GalaxyCollection object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGalaxyCollection(id string, name string, created time.Time, modified time.Time) *GalaxyCollection { + this := GalaxyCollection{} + this.Id = id + this.Name = name + this.Created = created + this.Modified = modified + return &this +} + +// NewGalaxyCollectionWithDefaults instantiates a new GalaxyCollection object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGalaxyCollectionWithDefaults() *GalaxyCollection { + this := GalaxyCollection{} + return &this +} + +// GetId returns the Id field value +func (o *GalaxyCollection) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *GalaxyCollection) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *GalaxyCollection) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *GalaxyCollection) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GalaxyCollection) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GalaxyCollection) SetName(v string) { + o.Name = v +} + +// GetCreated returns the Created field value +func (o *GalaxyCollection) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *GalaxyCollection) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *GalaxyCollection) SetCreated(v time.Time) { + o.Created = v +} + +// GetModified returns the Modified field value +func (o *GalaxyCollection) GetModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value +// and a boolean to check if the value has been set. +func (o *GalaxyCollection) GetModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Modified, true +} + +// SetModified sets field value +func (o *GalaxyCollection) SetModified(v time.Time) { + o.Modified = v +} + +func (o GalaxyCollection) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GalaxyCollection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["created"] = o.Created + toSerialize["modified"] = o.Modified + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GalaxyCollection) UnmarshalJSON(bytes []byte) (err error) { + varGalaxyCollection := _GalaxyCollection{} + + if err = json.Unmarshal(bytes, &varGalaxyCollection); err == nil { + *o = GalaxyCollection(varGalaxyCollection) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "created") + delete(additionalProperties, "modified") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGalaxyCollection struct { + value *GalaxyCollection + isSet bool +} + +func (v NullableGalaxyCollection) Get() *GalaxyCollection { + return v.value +} + +func (v *NullableGalaxyCollection) Set(val *GalaxyCollection) { + v.value = val + v.isSet = true +} + +func (v NullableGalaxyCollection) IsSet() bool { + return v.isSet +} + +func (v *NullableGalaxyCollection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGalaxyCollection(val *GalaxyCollection) *NullableGalaxyCollection { + return &NullableGalaxyCollection{value: val, isSet: true} +} + +func (v NullableGalaxyCollection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGalaxyCollection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_collection_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_collection_response.go new file mode 100644 index 0000000000..085afaae5e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_collection_response.go @@ -0,0 +1,380 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the GalaxyCollectionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GalaxyCollectionResponse{} + +// GalaxyCollectionResponse A serializer for a Collection. +type GalaxyCollectionResponse struct { + Id string `json:"id"` + Name string `json:"name"` + // Create a namespace dict. + Namespace map[string]interface{} `json:"namespace,omitempty"` + // Get href. + Href *string `json:"href,omitempty"` + // Get versions_url. + VersionsUrl *string `json:"versions_url,omitempty"` + Created time.Time `json:"created"` + Modified time.Time `json:"modified"` + // Get latest version. + LatestVersion map[string]interface{} `json:"latest_version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GalaxyCollectionResponse GalaxyCollectionResponse + +// NewGalaxyCollectionResponse instantiates a new GalaxyCollectionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGalaxyCollectionResponse(id string, name string, created time.Time, modified time.Time) *GalaxyCollectionResponse { + this := GalaxyCollectionResponse{} + this.Id = id + this.Name = name + this.Created = created + this.Modified = modified + return &this +} + +// NewGalaxyCollectionResponseWithDefaults instantiates a new GalaxyCollectionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGalaxyCollectionResponseWithDefaults() *GalaxyCollectionResponse { + this := GalaxyCollectionResponse{} + return &this +} + +// GetId returns the Id field value +func (o *GalaxyCollectionResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *GalaxyCollectionResponse) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *GalaxyCollectionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GalaxyCollectionResponse) SetName(v string) { + o.Name = v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *GalaxyCollectionResponse) GetNamespace() map[string]interface{} { + if o == nil || IsNil(o.Namespace) { + var ret map[string]interface{} + return ret + } + return o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionResponse) GetNamespaceOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Namespace) { + return map[string]interface{}{}, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *GalaxyCollectionResponse) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given map[string]interface{} and assigns it to the Namespace field. +func (o *GalaxyCollectionResponse) SetNamespace(v map[string]interface{}) { + o.Namespace = v +} + +// GetHref returns the Href field value if set, zero value otherwise. +func (o *GalaxyCollectionResponse) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret + } + return *o.Href +} + +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionResponse) GetHrefOk() (*string, bool) { + if o == nil || IsNil(o.Href) { + return nil, false + } + return o.Href, true +} + +// HasHref returns a boolean if a field has been set. +func (o *GalaxyCollectionResponse) HasHref() bool { + if o != nil && !IsNil(o.Href) { + return true + } + + return false +} + +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *GalaxyCollectionResponse) SetHref(v string) { + o.Href = &v +} + +// GetVersionsUrl returns the VersionsUrl field value if set, zero value otherwise. +func (o *GalaxyCollectionResponse) GetVersionsUrl() string { + if o == nil || IsNil(o.VersionsUrl) { + var ret string + return ret + } + return *o.VersionsUrl +} + +// GetVersionsUrlOk returns a tuple with the VersionsUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionResponse) GetVersionsUrlOk() (*string, bool) { + if o == nil || IsNil(o.VersionsUrl) { + return nil, false + } + return o.VersionsUrl, true +} + +// HasVersionsUrl returns a boolean if a field has been set. +func (o *GalaxyCollectionResponse) HasVersionsUrl() bool { + if o != nil && !IsNil(o.VersionsUrl) { + return true + } + + return false +} + +// SetVersionsUrl gets a reference to the given string and assigns it to the VersionsUrl field. +func (o *GalaxyCollectionResponse) SetVersionsUrl(v string) { + o.VersionsUrl = &v +} + +// GetCreated returns the Created field value +func (o *GalaxyCollectionResponse) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionResponse) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *GalaxyCollectionResponse) SetCreated(v time.Time) { + o.Created = v +} + +// GetModified returns the Modified field value +func (o *GalaxyCollectionResponse) GetModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionResponse) GetModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Modified, true +} + +// SetModified sets field value +func (o *GalaxyCollectionResponse) SetModified(v time.Time) { + o.Modified = v +} + +// GetLatestVersion returns the LatestVersion field value if set, zero value otherwise. +func (o *GalaxyCollectionResponse) GetLatestVersion() map[string]interface{} { + if o == nil || IsNil(o.LatestVersion) { + var ret map[string]interface{} + return ret + } + return o.LatestVersion +} + +// GetLatestVersionOk returns a tuple with the LatestVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionResponse) GetLatestVersionOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.LatestVersion) { + return map[string]interface{}{}, false + } + return o.LatestVersion, true +} + +// HasLatestVersion returns a boolean if a field has been set. +func (o *GalaxyCollectionResponse) HasLatestVersion() bool { + if o != nil && !IsNil(o.LatestVersion) { + return true + } + + return false +} + +// SetLatestVersion gets a reference to the given map[string]interface{} and assigns it to the LatestVersion field. +func (o *GalaxyCollectionResponse) SetLatestVersion(v map[string]interface{}) { + o.LatestVersion = v +} + +func (o GalaxyCollectionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GalaxyCollectionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + if !IsNil(o.Href) { + toSerialize["href"] = o.Href + } + if !IsNil(o.VersionsUrl) { + toSerialize["versions_url"] = o.VersionsUrl + } + toSerialize["created"] = o.Created + toSerialize["modified"] = o.Modified + if !IsNil(o.LatestVersion) { + toSerialize["latest_version"] = o.LatestVersion + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GalaxyCollectionResponse) UnmarshalJSON(bytes []byte) (err error) { + varGalaxyCollectionResponse := _GalaxyCollectionResponse{} + + if err = json.Unmarshal(bytes, &varGalaxyCollectionResponse); err == nil { + *o = GalaxyCollectionResponse(varGalaxyCollectionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "namespace") + delete(additionalProperties, "href") + delete(additionalProperties, "versions_url") + delete(additionalProperties, "created") + delete(additionalProperties, "modified") + delete(additionalProperties, "latest_version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGalaxyCollectionResponse struct { + value *GalaxyCollectionResponse + isSet bool +} + +func (v NullableGalaxyCollectionResponse) Get() *GalaxyCollectionResponse { + return v.value +} + +func (v *NullableGalaxyCollectionResponse) Set(val *GalaxyCollectionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGalaxyCollectionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGalaxyCollectionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGalaxyCollectionResponse(val *GalaxyCollectionResponse) *NullableGalaxyCollectionResponse { + return &NullableGalaxyCollectionResponse{value: val, isSet: true} +} + +func (v NullableGalaxyCollectionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGalaxyCollectionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_collection_version_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_collection_version_response.go new file mode 100644 index 0000000000..5328840f36 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_collection_version_response.go @@ -0,0 +1,323 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the GalaxyCollectionVersionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GalaxyCollectionVersionResponse{} + +// GalaxyCollectionVersionResponse A serializer for a CollectionVersion. +type GalaxyCollectionVersionResponse struct { + Version string `json:"version"` + // Get href. + Href *string `json:"href,omitempty"` + // Create a namespace dict. + Namespace map[string]interface{} `json:"namespace,omitempty"` + // Create a collection dict. + Collection map[string]interface{} `json:"collection,omitempty"` + // Create an artifact dict. + Artifact map[string]interface{} `json:"artifact,omitempty"` + Metadata CollectionMetadataResponse `json:"metadata"` + AdditionalProperties map[string]interface{} +} + +type _GalaxyCollectionVersionResponse GalaxyCollectionVersionResponse + +// NewGalaxyCollectionVersionResponse instantiates a new GalaxyCollectionVersionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGalaxyCollectionVersionResponse(version string, metadata CollectionMetadataResponse) *GalaxyCollectionVersionResponse { + this := GalaxyCollectionVersionResponse{} + this.Version = version + this.Metadata = metadata + return &this +} + +// NewGalaxyCollectionVersionResponseWithDefaults instantiates a new GalaxyCollectionVersionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGalaxyCollectionVersionResponseWithDefaults() *GalaxyCollectionVersionResponse { + this := GalaxyCollectionVersionResponse{} + return &this +} + +// GetVersion returns the Version field value +func (o *GalaxyCollectionVersionResponse) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionVersionResponse) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *GalaxyCollectionVersionResponse) SetVersion(v string) { + o.Version = v +} + +// GetHref returns the Href field value if set, zero value otherwise. +func (o *GalaxyCollectionVersionResponse) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret + } + return *o.Href +} + +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionVersionResponse) GetHrefOk() (*string, bool) { + if o == nil || IsNil(o.Href) { + return nil, false + } + return o.Href, true +} + +// HasHref returns a boolean if a field has been set. +func (o *GalaxyCollectionVersionResponse) HasHref() bool { + if o != nil && !IsNil(o.Href) { + return true + } + + return false +} + +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *GalaxyCollectionVersionResponse) SetHref(v string) { + o.Href = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *GalaxyCollectionVersionResponse) GetNamespace() map[string]interface{} { + if o == nil || IsNil(o.Namespace) { + var ret map[string]interface{} + return ret + } + return o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionVersionResponse) GetNamespaceOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Namespace) { + return map[string]interface{}{}, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *GalaxyCollectionVersionResponse) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given map[string]interface{} and assigns it to the Namespace field. +func (o *GalaxyCollectionVersionResponse) SetNamespace(v map[string]interface{}) { + o.Namespace = v +} + +// GetCollection returns the Collection field value if set, zero value otherwise. +func (o *GalaxyCollectionVersionResponse) GetCollection() map[string]interface{} { + if o == nil || IsNil(o.Collection) { + var ret map[string]interface{} + return ret + } + return o.Collection +} + +// GetCollectionOk returns a tuple with the Collection field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionVersionResponse) GetCollectionOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Collection) { + return map[string]interface{}{}, false + } + return o.Collection, true +} + +// HasCollection returns a boolean if a field has been set. +func (o *GalaxyCollectionVersionResponse) HasCollection() bool { + if o != nil && !IsNil(o.Collection) { + return true + } + + return false +} + +// SetCollection gets a reference to the given map[string]interface{} and assigns it to the Collection field. +func (o *GalaxyCollectionVersionResponse) SetCollection(v map[string]interface{}) { + o.Collection = v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *GalaxyCollectionVersionResponse) GetArtifact() map[string]interface{} { + if o == nil || IsNil(o.Artifact) { + var ret map[string]interface{} + return ret + } + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionVersionResponse) GetArtifactOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Artifact) { + return map[string]interface{}{}, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *GalaxyCollectionVersionResponse) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given map[string]interface{} and assigns it to the Artifact field. +func (o *GalaxyCollectionVersionResponse) SetArtifact(v map[string]interface{}) { + o.Artifact = v +} + +// GetMetadata returns the Metadata field value +func (o *GalaxyCollectionVersionResponse) GetMetadata() CollectionMetadataResponse { + if o == nil { + var ret CollectionMetadataResponse + return ret + } + + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +func (o *GalaxyCollectionVersionResponse) GetMetadataOk() (*CollectionMetadataResponse, bool) { + if o == nil { + return nil, false + } + return &o.Metadata, true +} + +// SetMetadata sets field value +func (o *GalaxyCollectionVersionResponse) SetMetadata(v CollectionMetadataResponse) { + o.Metadata = v +} + +func (o GalaxyCollectionVersionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GalaxyCollectionVersionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["version"] = o.Version + if !IsNil(o.Href) { + toSerialize["href"] = o.Href + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + if !IsNil(o.Collection) { + toSerialize["collection"] = o.Collection + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + toSerialize["metadata"] = o.Metadata + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GalaxyCollectionVersionResponse) UnmarshalJSON(bytes []byte) (err error) { + varGalaxyCollectionVersionResponse := _GalaxyCollectionVersionResponse{} + + if err = json.Unmarshal(bytes, &varGalaxyCollectionVersionResponse); err == nil { + *o = GalaxyCollectionVersionResponse(varGalaxyCollectionVersionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "version") + delete(additionalProperties, "href") + delete(additionalProperties, "namespace") + delete(additionalProperties, "collection") + delete(additionalProperties, "artifact") + delete(additionalProperties, "metadata") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGalaxyCollectionVersionResponse struct { + value *GalaxyCollectionVersionResponse + isSet bool +} + +func (v NullableGalaxyCollectionVersionResponse) Get() *GalaxyCollectionVersionResponse { + return v.value +} + +func (v *NullableGalaxyCollectionVersionResponse) Set(val *GalaxyCollectionVersionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGalaxyCollectionVersionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGalaxyCollectionVersionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGalaxyCollectionVersionResponse(val *GalaxyCollectionVersionResponse) *NullableGalaxyCollectionVersionResponse { + return &NullableGalaxyCollectionVersionResponse{value: val, isSet: true} +} + +func (v NullableGalaxyCollectionVersionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGalaxyCollectionVersionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_role_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_role_response.go new file mode 100644 index 0000000000..2b808d5674 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_role_response.go @@ -0,0 +1,209 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the GalaxyRoleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GalaxyRoleResponse{} + +// GalaxyRoleResponse A serializer for Galaxy's representation of Roles. +type GalaxyRoleResponse struct { + // Get id. + Id *string `json:"id,omitempty"` + Name string `json:"name"` + Namespace string `json:"namespace"` + AdditionalProperties map[string]interface{} +} + +type _GalaxyRoleResponse GalaxyRoleResponse + +// NewGalaxyRoleResponse instantiates a new GalaxyRoleResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGalaxyRoleResponse(name string, namespace string) *GalaxyRoleResponse { + this := GalaxyRoleResponse{} + this.Name = name + this.Namespace = namespace + return &this +} + +// NewGalaxyRoleResponseWithDefaults instantiates a new GalaxyRoleResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGalaxyRoleResponseWithDefaults() *GalaxyRoleResponse { + this := GalaxyRoleResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GalaxyRoleResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GalaxyRoleResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GalaxyRoleResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GalaxyRoleResponse) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *GalaxyRoleResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GalaxyRoleResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GalaxyRoleResponse) SetName(v string) { + o.Name = v +} + +// GetNamespace returns the Namespace field value +func (o *GalaxyRoleResponse) GetNamespace() string { + if o == nil { + var ret string + return ret + } + + return o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value +// and a boolean to check if the value has been set. +func (o *GalaxyRoleResponse) GetNamespaceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Namespace, true +} + +// SetNamespace sets field value +func (o *GalaxyRoleResponse) SetNamespace(v string) { + o.Namespace = v +} + +func (o GalaxyRoleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GalaxyRoleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + toSerialize["namespace"] = o.Namespace + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GalaxyRoleResponse) UnmarshalJSON(bytes []byte) (err error) { + varGalaxyRoleResponse := _GalaxyRoleResponse{} + + if err = json.Unmarshal(bytes, &varGalaxyRoleResponse); err == nil { + *o = GalaxyRoleResponse(varGalaxyRoleResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "namespace") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGalaxyRoleResponse struct { + value *GalaxyRoleResponse + isSet bool +} + +func (v NullableGalaxyRoleResponse) Get() *GalaxyRoleResponse { + return v.value +} + +func (v *NullableGalaxyRoleResponse) Set(val *GalaxyRoleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGalaxyRoleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGalaxyRoleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGalaxyRoleResponse(val *GalaxyRoleResponse) *NullableGalaxyRoleResponse { + return &NullableGalaxyRoleResponse{value: val, isSet: true} +} + +func (v NullableGalaxyRoleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGalaxyRoleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_role_version_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_role_version_response.go new file mode 100644 index 0000000000..9235730b57 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_galaxy_role_version_response.go @@ -0,0 +1,181 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the GalaxyRoleVersionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GalaxyRoleVersionResponse{} + +// GalaxyRoleVersionResponse A serializer for Galaxy's representation of Role versions. +type GalaxyRoleVersionResponse struct { + Name string `json:"name"` + // Get source. + Source *string `json:"source,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GalaxyRoleVersionResponse GalaxyRoleVersionResponse + +// NewGalaxyRoleVersionResponse instantiates a new GalaxyRoleVersionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGalaxyRoleVersionResponse(name string) *GalaxyRoleVersionResponse { + this := GalaxyRoleVersionResponse{} + this.Name = name + return &this +} + +// NewGalaxyRoleVersionResponseWithDefaults instantiates a new GalaxyRoleVersionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGalaxyRoleVersionResponseWithDefaults() *GalaxyRoleVersionResponse { + this := GalaxyRoleVersionResponse{} + return &this +} + +// GetName returns the Name field value +func (o *GalaxyRoleVersionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GalaxyRoleVersionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GalaxyRoleVersionResponse) SetName(v string) { + o.Name = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *GalaxyRoleVersionResponse) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GalaxyRoleVersionResponse) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *GalaxyRoleVersionResponse) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *GalaxyRoleVersionResponse) SetSource(v string) { + o.Source = &v +} + +func (o GalaxyRoleVersionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GalaxyRoleVersionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GalaxyRoleVersionResponse) UnmarshalJSON(bytes []byte) (err error) { + varGalaxyRoleVersionResponse := _GalaxyRoleVersionResponse{} + + if err = json.Unmarshal(bytes, &varGalaxyRoleVersionResponse); err == nil { + *o = GalaxyRoleVersionResponse(varGalaxyRoleVersionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "source") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGalaxyRoleVersionResponse struct { + value *GalaxyRoleVersionResponse + isSet bool +} + +func (v NullableGalaxyRoleVersionResponse) Get() *GalaxyRoleVersionResponse { + return v.value +} + +func (v *NullableGalaxyRoleVersionResponse) Set(val *GalaxyRoleVersionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGalaxyRoleVersionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGalaxyRoleVersionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGalaxyRoleVersionResponse(val *GalaxyRoleVersionResponse) *NullableGalaxyRoleVersionResponse { + return &NullableGalaxyRoleVersionResponse{value: val, isSet: true} +} + +func (v NullableGalaxyRoleVersionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGalaxyRoleVersionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_content.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_content.go new file mode 100644 index 0000000000..879b81af03 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_content.go @@ -0,0 +1,230 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the GemGemContent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GemGemContent{} + +// GemGemContent A Serializer for GemContent. +type GemGemContent struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // An uploaded file that should be turned into the artifact of the content unit. + File **os.File `json:"file,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GemGemContent GemGemContent + +// NewGemGemContent instantiates a new GemGemContent object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGemGemContent() *GemGemContent { + this := GemGemContent{} + return &this +} + +// NewGemGemContentWithDefaults instantiates a new GemGemContent object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGemGemContentWithDefaults() *GemGemContent { + this := GemGemContent{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *GemGemContent) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemContent) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *GemGemContent) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *GemGemContent) SetRepository(v string) { + o.Repository = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *GemGemContent) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemContent) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *GemGemContent) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *GemGemContent) SetArtifact(v string) { + o.Artifact = &v +} + +// GetFile returns the File field value if set, zero value otherwise. +func (o *GemGemContent) GetFile() *os.File { + if o == nil || IsNil(o.File) { + var ret *os.File + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemContent) GetFileOk() (**os.File, bool) { + if o == nil || IsNil(o.File) { + return nil, false + } + return o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *GemGemContent) HasFile() bool { + if o != nil && !IsNil(o.File) { + return true + } + + return false +} + +// SetFile gets a reference to the given *os.File and assigns it to the File field. +func (o *GemGemContent) SetFile(v *os.File) { + o.File = &v +} + +func (o GemGemContent) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GemGemContent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + if !IsNil(o.File) { + toSerialize["file"] = o.File + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GemGemContent) UnmarshalJSON(bytes []byte) (err error) { + varGemGemContent := _GemGemContent{} + + if err = json.Unmarshal(bytes, &varGemGemContent); err == nil { + *o = GemGemContent(varGemGemContent) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "artifact") + delete(additionalProperties, "file") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGemGemContent struct { + value *GemGemContent + isSet bool +} + +func (v NullableGemGemContent) Get() *GemGemContent { + return v.value +} + +func (v *NullableGemGemContent) Set(val *GemGemContent) { + v.value = val + v.isSet = true +} + +func (v NullableGemGemContent) IsSet() bool { + return v.isSet +} + +func (v *NullableGemGemContent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGemGemContent(val *GemGemContent) *NullableGemGemContent { + return &NullableGemGemContent{value: val, isSet: true} +} + +func (v NullableGemGemContent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGemGemContent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_content_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_content_response.go new file mode 100644 index 0000000000..05e1d8e9bb --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_content_response.go @@ -0,0 +1,485 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the GemGemContentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GemGemContentResponse{} + +// GemGemContentResponse A Serializer for GemContent. +type GemGemContentResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A dict mapping relative paths inside the Content to the correspondingArtifact URLs. E.g.: {'relative/path': '/artifacts/1/' + Artifacts map[string]interface{} `json:"artifacts"` + // SHA256 checksum of the gem + Checksum *string `json:"checksum,omitempty"` + // Name of the gem + Name *string `json:"name,omitempty"` + // Version of the gem + Version *string `json:"version,omitempty"` + // Whether the gem is a prerelease + Prerelease *bool `json:"prerelease,omitempty"` + Dependencies *map[string]string `json:"dependencies,omitempty"` + // Required ruby version of the gem + RequiredRubyVersion *string `json:"required_ruby_version,omitempty"` + // Required rubygems version of the gem + RequiredRubygemsVersion *string `json:"required_rubygems_version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GemGemContentResponse GemGemContentResponse + +// NewGemGemContentResponse instantiates a new GemGemContentResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGemGemContentResponse(artifacts map[string]interface{}) *GemGemContentResponse { + this := GemGemContentResponse{} + this.Artifacts = artifacts + return &this +} + +// NewGemGemContentResponseWithDefaults instantiates a new GemGemContentResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGemGemContentResponseWithDefaults() *GemGemContentResponse { + this := GemGemContentResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *GemGemContentResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemContentResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *GemGemContentResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *GemGemContentResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *GemGemContentResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemContentResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *GemGemContentResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *GemGemContentResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifacts returns the Artifacts field value +func (o *GemGemContentResponse) GetArtifacts() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Artifacts +} + +// GetArtifactsOk returns a tuple with the Artifacts field value +// and a boolean to check if the value has been set. +func (o *GemGemContentResponse) GetArtifactsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Artifacts, true +} + +// SetArtifacts sets field value +func (o *GemGemContentResponse) SetArtifacts(v map[string]interface{}) { + o.Artifacts = v +} + +// GetChecksum returns the Checksum field value if set, zero value otherwise. +func (o *GemGemContentResponse) GetChecksum() string { + if o == nil || IsNil(o.Checksum) { + var ret string + return ret + } + return *o.Checksum +} + +// GetChecksumOk returns a tuple with the Checksum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemContentResponse) GetChecksumOk() (*string, bool) { + if o == nil || IsNil(o.Checksum) { + return nil, false + } + return o.Checksum, true +} + +// HasChecksum returns a boolean if a field has been set. +func (o *GemGemContentResponse) HasChecksum() bool { + if o != nil && !IsNil(o.Checksum) { + return true + } + + return false +} + +// SetChecksum gets a reference to the given string and assigns it to the Checksum field. +func (o *GemGemContentResponse) SetChecksum(v string) { + o.Checksum = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GemGemContentResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemContentResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GemGemContentResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GemGemContentResponse) SetName(v string) { + o.Name = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *GemGemContentResponse) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemContentResponse) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *GemGemContentResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *GemGemContentResponse) SetVersion(v string) { + o.Version = &v +} + +// GetPrerelease returns the Prerelease field value if set, zero value otherwise. +func (o *GemGemContentResponse) GetPrerelease() bool { + if o == nil || IsNil(o.Prerelease) { + var ret bool + return ret + } + return *o.Prerelease +} + +// GetPrereleaseOk returns a tuple with the Prerelease field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemContentResponse) GetPrereleaseOk() (*bool, bool) { + if o == nil || IsNil(o.Prerelease) { + return nil, false + } + return o.Prerelease, true +} + +// HasPrerelease returns a boolean if a field has been set. +func (o *GemGemContentResponse) HasPrerelease() bool { + if o != nil && !IsNil(o.Prerelease) { + return true + } + + return false +} + +// SetPrerelease gets a reference to the given bool and assigns it to the Prerelease field. +func (o *GemGemContentResponse) SetPrerelease(v bool) { + o.Prerelease = &v +} + +// GetDependencies returns the Dependencies field value if set, zero value otherwise. +func (o *GemGemContentResponse) GetDependencies() map[string]string { + if o == nil || IsNil(o.Dependencies) { + var ret map[string]string + return ret + } + return *o.Dependencies +} + +// GetDependenciesOk returns a tuple with the Dependencies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemContentResponse) GetDependenciesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Dependencies) { + return nil, false + } + return o.Dependencies, true +} + +// HasDependencies returns a boolean if a field has been set. +func (o *GemGemContentResponse) HasDependencies() bool { + if o != nil && !IsNil(o.Dependencies) { + return true + } + + return false +} + +// SetDependencies gets a reference to the given map[string]string and assigns it to the Dependencies field. +func (o *GemGemContentResponse) SetDependencies(v map[string]string) { + o.Dependencies = &v +} + +// GetRequiredRubyVersion returns the RequiredRubyVersion field value if set, zero value otherwise. +func (o *GemGemContentResponse) GetRequiredRubyVersion() string { + if o == nil || IsNil(o.RequiredRubyVersion) { + var ret string + return ret + } + return *o.RequiredRubyVersion +} + +// GetRequiredRubyVersionOk returns a tuple with the RequiredRubyVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemContentResponse) GetRequiredRubyVersionOk() (*string, bool) { + if o == nil || IsNil(o.RequiredRubyVersion) { + return nil, false + } + return o.RequiredRubyVersion, true +} + +// HasRequiredRubyVersion returns a boolean if a field has been set. +func (o *GemGemContentResponse) HasRequiredRubyVersion() bool { + if o != nil && !IsNil(o.RequiredRubyVersion) { + return true + } + + return false +} + +// SetRequiredRubyVersion gets a reference to the given string and assigns it to the RequiredRubyVersion field. +func (o *GemGemContentResponse) SetRequiredRubyVersion(v string) { + o.RequiredRubyVersion = &v +} + +// GetRequiredRubygemsVersion returns the RequiredRubygemsVersion field value if set, zero value otherwise. +func (o *GemGemContentResponse) GetRequiredRubygemsVersion() string { + if o == nil || IsNil(o.RequiredRubygemsVersion) { + var ret string + return ret + } + return *o.RequiredRubygemsVersion +} + +// GetRequiredRubygemsVersionOk returns a tuple with the RequiredRubygemsVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemContentResponse) GetRequiredRubygemsVersionOk() (*string, bool) { + if o == nil || IsNil(o.RequiredRubygemsVersion) { + return nil, false + } + return o.RequiredRubygemsVersion, true +} + +// HasRequiredRubygemsVersion returns a boolean if a field has been set. +func (o *GemGemContentResponse) HasRequiredRubygemsVersion() bool { + if o != nil && !IsNil(o.RequiredRubygemsVersion) { + return true + } + + return false +} + +// SetRequiredRubygemsVersion gets a reference to the given string and assigns it to the RequiredRubygemsVersion field. +func (o *GemGemContentResponse) SetRequiredRubygemsVersion(v string) { + o.RequiredRubygemsVersion = &v +} + +func (o GemGemContentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GemGemContentResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifacts"] = o.Artifacts + if !IsNil(o.Checksum) { + toSerialize["checksum"] = o.Checksum + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.Prerelease) { + toSerialize["prerelease"] = o.Prerelease + } + if !IsNil(o.Dependencies) { + toSerialize["dependencies"] = o.Dependencies + } + if !IsNil(o.RequiredRubyVersion) { + toSerialize["required_ruby_version"] = o.RequiredRubyVersion + } + if !IsNil(o.RequiredRubygemsVersion) { + toSerialize["required_rubygems_version"] = o.RequiredRubygemsVersion + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GemGemContentResponse) UnmarshalJSON(bytes []byte) (err error) { + varGemGemContentResponse := _GemGemContentResponse{} + + if err = json.Unmarshal(bytes, &varGemGemContentResponse); err == nil { + *o = GemGemContentResponse(varGemGemContentResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifacts") + delete(additionalProperties, "checksum") + delete(additionalProperties, "name") + delete(additionalProperties, "version") + delete(additionalProperties, "prerelease") + delete(additionalProperties, "dependencies") + delete(additionalProperties, "required_ruby_version") + delete(additionalProperties, "required_rubygems_version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGemGemContentResponse struct { + value *GemGemContentResponse + isSet bool +} + +func (v NullableGemGemContentResponse) Get() *GemGemContentResponse { + return v.value +} + +func (v *NullableGemGemContentResponse) Set(val *GemGemContentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGemGemContentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGemGemContentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGemGemContentResponse(val *GemGemContentResponse) *NullableGemGemContentResponse { + return &NullableGemGemContentResponse{value: val, isSet: true} +} + +func (v NullableGemGemContentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGemGemContentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_distribution.go new file mode 100644 index 0000000000..c8ae6dffa0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_distribution.go @@ -0,0 +1,444 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the GemGemDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GemGemDistribution{} + +// GemGemDistribution A Serializer for GemDistribution. +type GemGemDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + // Remote that can be used to fetch content when using pull-through caching. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GemGemDistribution GemGemDistribution + +// NewGemGemDistribution instantiates a new GemGemDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGemGemDistribution(basePath string, name string) *GemGemDistribution { + this := GemGemDistribution{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + return &this +} + +// NewGemGemDistributionWithDefaults instantiates a new GemGemDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGemGemDistributionWithDefaults() *GemGemDistribution { + this := GemGemDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value +func (o *GemGemDistribution) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *GemGemDistribution) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *GemGemDistribution) SetBasePath(v string) { + o.BasePath = v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *GemGemDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *GemGemDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *GemGemDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *GemGemDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *GemGemDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *GemGemDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *GemGemDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *GemGemDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *GemGemDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *GemGemDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *GemGemDistribution) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GemGemDistribution) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GemGemDistribution) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *GemGemDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *GemGemDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *GemGemDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *GemGemDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemDistribution) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemDistribution) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *GemGemDistribution) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *GemGemDistribution) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *GemGemDistribution) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *GemGemDistribution) UnsetPublication() { + o.Publication.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemDistribution) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemDistribution) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *GemGemDistribution) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *GemGemDistribution) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *GemGemDistribution) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *GemGemDistribution) UnsetRemote() { + o.Remote.Unset() +} + +func (o GemGemDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GemGemDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["base_path"] = o.BasePath + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GemGemDistribution) UnmarshalJSON(bytes []byte) (err error) { + varGemGemDistribution := _GemGemDistribution{} + + if err = json.Unmarshal(bytes, &varGemGemDistribution); err == nil { + *o = GemGemDistribution(varGemGemDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGemGemDistribution struct { + value *GemGemDistribution + isSet bool +} + +func (v NullableGemGemDistribution) Get() *GemGemDistribution { + return v.value +} + +func (v *NullableGemGemDistribution) Set(val *GemGemDistribution) { + v.value = val + v.isSet = true +} + +func (v NullableGemGemDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullableGemGemDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGemGemDistribution(val *GemGemDistribution) *NullableGemGemDistribution { + return &NullableGemGemDistribution{value: val, isSet: true} +} + +func (v NullableGemGemDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGemGemDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_distribution_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_distribution_response.go new file mode 100644 index 0000000000..173dd5d977 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_distribution_response.go @@ -0,0 +1,558 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the GemGemDistributionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GemGemDistributionResponse{} + +// GemGemDistributionResponse A Serializer for GemDistribution. +type GemGemDistributionResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // The URL for accessing the publication as defined by this distribution. + BaseUrl *string `json:"base_url,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + // Remote that can be used to fetch content when using pull-through caching. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GemGemDistributionResponse GemGemDistributionResponse + +// NewGemGemDistributionResponse instantiates a new GemGemDistributionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGemGemDistributionResponse(basePath string, name string) *GemGemDistributionResponse { + this := GemGemDistributionResponse{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + return &this +} + +// NewGemGemDistributionResponseWithDefaults instantiates a new GemGemDistributionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGemGemDistributionResponseWithDefaults() *GemGemDistributionResponse { + this := GemGemDistributionResponse{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *GemGemDistributionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemDistributionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *GemGemDistributionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *GemGemDistributionResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *GemGemDistributionResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemDistributionResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *GemGemDistributionResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *GemGemDistributionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetBasePath returns the BasePath field value +func (o *GemGemDistributionResponse) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *GemGemDistributionResponse) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *GemGemDistributionResponse) SetBasePath(v string) { + o.BasePath = v +} + +// GetBaseUrl returns the BaseUrl field value if set, zero value otherwise. +func (o *GemGemDistributionResponse) GetBaseUrl() string { + if o == nil || IsNil(o.BaseUrl) { + var ret string + return ret + } + return *o.BaseUrl +} + +// GetBaseUrlOk returns a tuple with the BaseUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemDistributionResponse) GetBaseUrlOk() (*string, bool) { + if o == nil || IsNil(o.BaseUrl) { + return nil, false + } + return o.BaseUrl, true +} + +// HasBaseUrl returns a boolean if a field has been set. +func (o *GemGemDistributionResponse) HasBaseUrl() bool { + if o != nil && !IsNil(o.BaseUrl) { + return true + } + + return false +} + +// SetBaseUrl gets a reference to the given string and assigns it to the BaseUrl field. +func (o *GemGemDistributionResponse) SetBaseUrl(v string) { + o.BaseUrl = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemDistributionResponse) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemDistributionResponse) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *GemGemDistributionResponse) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *GemGemDistributionResponse) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *GemGemDistributionResponse) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *GemGemDistributionResponse) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *GemGemDistributionResponse) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemDistributionResponse) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *GemGemDistributionResponse) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *GemGemDistributionResponse) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *GemGemDistributionResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *GemGemDistributionResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *GemGemDistributionResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *GemGemDistributionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GemGemDistributionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GemGemDistributionResponse) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemDistributionResponse) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemDistributionResponse) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *GemGemDistributionResponse) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *GemGemDistributionResponse) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *GemGemDistributionResponse) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *GemGemDistributionResponse) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemDistributionResponse) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemDistributionResponse) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *GemGemDistributionResponse) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *GemGemDistributionResponse) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *GemGemDistributionResponse) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *GemGemDistributionResponse) UnsetPublication() { + o.Publication.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemDistributionResponse) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemDistributionResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *GemGemDistributionResponse) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *GemGemDistributionResponse) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *GemGemDistributionResponse) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *GemGemDistributionResponse) UnsetRemote() { + o.Remote.Unset() +} + +func (o GemGemDistributionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GemGemDistributionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["base_path"] = o.BasePath + if !IsNil(o.BaseUrl) { + toSerialize["base_url"] = o.BaseUrl + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GemGemDistributionResponse) UnmarshalJSON(bytes []byte) (err error) { + varGemGemDistributionResponse := _GemGemDistributionResponse{} + + if err = json.Unmarshal(bytes, &varGemGemDistributionResponse); err == nil { + *o = GemGemDistributionResponse(varGemGemDistributionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "base_path") + delete(additionalProperties, "base_url") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGemGemDistributionResponse struct { + value *GemGemDistributionResponse + isSet bool +} + +func (v NullableGemGemDistributionResponse) Get() *GemGemDistributionResponse { + return v.value +} + +func (v *NullableGemGemDistributionResponse) Set(val *GemGemDistributionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGemGemDistributionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGemGemDistributionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGemGemDistributionResponse(val *GemGemDistributionResponse) *NullableGemGemDistributionResponse { + return &NullableGemGemDistributionResponse{value: val, isSet: true} +} + +func (v NullableGemGemDistributionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGemGemDistributionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_publication.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_publication.go new file mode 100644 index 0000000000..99abbee58c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_publication.go @@ -0,0 +1,190 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the GemGemPublication type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GemGemPublication{} + +// GemGemPublication A Serializer for GemPublication. +type GemGemPublication struct { + RepositoryVersion *string `json:"repository_version,omitempty"` + // A URI of the repository to be published. + Repository *string `json:"repository,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GemGemPublication GemGemPublication + +// NewGemGemPublication instantiates a new GemGemPublication object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGemGemPublication() *GemGemPublication { + this := GemGemPublication{} + return &this +} + +// NewGemGemPublicationWithDefaults instantiates a new GemGemPublication object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGemGemPublicationWithDefaults() *GemGemPublication { + this := GemGemPublication{} + return &this +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *GemGemPublication) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemPublication) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *GemGemPublication) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *GemGemPublication) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *GemGemPublication) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemPublication) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *GemGemPublication) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *GemGemPublication) SetRepository(v string) { + o.Repository = &v +} + +func (o GemGemPublication) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GemGemPublication) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GemGemPublication) UnmarshalJSON(bytes []byte) (err error) { + varGemGemPublication := _GemGemPublication{} + + if err = json.Unmarshal(bytes, &varGemGemPublication); err == nil { + *o = GemGemPublication(varGemGemPublication) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository_version") + delete(additionalProperties, "repository") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGemGemPublication struct { + value *GemGemPublication + isSet bool +} + +func (v NullableGemGemPublication) Get() *GemGemPublication { + return v.value +} + +func (v *NullableGemGemPublication) Set(val *GemGemPublication) { + v.value = val + v.isSet = true +} + +func (v NullableGemGemPublication) IsSet() bool { + return v.isSet +} + +func (v *NullableGemGemPublication) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGemGemPublication(val *GemGemPublication) *NullableGemGemPublication { + return &NullableGemGemPublication{value: val, isSet: true} +} + +func (v NullableGemGemPublication) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGemGemPublication) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_publication_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_publication_response.go new file mode 100644 index 0000000000..859d66aa78 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_publication_response.go @@ -0,0 +1,266 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the GemGemPublicationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GemGemPublicationResponse{} + +// GemGemPublicationResponse A Serializer for GemPublication. +type GemGemPublicationResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + RepositoryVersion *string `json:"repository_version,omitempty"` + // A URI of the repository to be published. + Repository *string `json:"repository,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GemGemPublicationResponse GemGemPublicationResponse + +// NewGemGemPublicationResponse instantiates a new GemGemPublicationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGemGemPublicationResponse() *GemGemPublicationResponse { + this := GemGemPublicationResponse{} + return &this +} + +// NewGemGemPublicationResponseWithDefaults instantiates a new GemGemPublicationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGemGemPublicationResponseWithDefaults() *GemGemPublicationResponse { + this := GemGemPublicationResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *GemGemPublicationResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemPublicationResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *GemGemPublicationResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *GemGemPublicationResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *GemGemPublicationResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemPublicationResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *GemGemPublicationResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *GemGemPublicationResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *GemGemPublicationResponse) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemPublicationResponse) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *GemGemPublicationResponse) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *GemGemPublicationResponse) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *GemGemPublicationResponse) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemPublicationResponse) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *GemGemPublicationResponse) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *GemGemPublicationResponse) SetRepository(v string) { + o.Repository = &v +} + +func (o GemGemPublicationResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GemGemPublicationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GemGemPublicationResponse) UnmarshalJSON(bytes []byte) (err error) { + varGemGemPublicationResponse := _GemGemPublicationResponse{} + + if err = json.Unmarshal(bytes, &varGemGemPublicationResponse); err == nil { + *o = GemGemPublicationResponse(varGemGemPublicationResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "repository") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGemGemPublicationResponse struct { + value *GemGemPublicationResponse + isSet bool +} + +func (v NullableGemGemPublicationResponse) Get() *GemGemPublicationResponse { + return v.value +} + +func (v *NullableGemGemPublicationResponse) Set(val *GemGemPublicationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGemGemPublicationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGemGemPublicationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGemGemPublicationResponse(val *GemGemPublicationResponse) *NullableGemGemPublicationResponse { + return &NullableGemGemPublicationResponse{value: val, isSet: true} +} + +func (v NullableGemGemPublicationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGemGemPublicationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_remote.go new file mode 100644 index 0000000000..a402908a19 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_remote.go @@ -0,0 +1,1164 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the GemGemRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GemGemRemote{} + +// GemGemRemote A Serializer for GemRemote. +type GemGemRemote struct { + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + Prereleases *bool `json:"prereleases,omitempty"` + Includes map[string]string `json:"includes,omitempty"` + Excludes map[string]string `json:"excludes,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GemGemRemote GemGemRemote + +// NewGemGemRemote instantiates a new GemGemRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGemGemRemote(name string, url string) *GemGemRemote { + this := GemGemRemote{} + this.Name = name + this.Url = url + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + var prereleases bool = false + this.Prereleases = &prereleases + return &this +} + +// NewGemGemRemoteWithDefaults instantiates a new GemGemRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGemGemRemoteWithDefaults() *GemGemRemote { + this := GemGemRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + var prereleases bool = false + this.Prereleases = &prereleases + return &this +} + +// GetName returns the Name field value +func (o *GemGemRemote) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GemGemRemote) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GemGemRemote) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *GemGemRemote) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *GemGemRemote) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *GemGemRemote) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *GemGemRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *GemGemRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *GemGemRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *GemGemRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *GemGemRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *GemGemRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *GemGemRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *GemGemRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *GemGemRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *GemGemRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *GemGemRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *GemGemRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *GemGemRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *GemGemRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *GemGemRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *GemGemRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *GemGemRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *GemGemRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *GemGemRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *GemGemRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *GemGemRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *GemGemRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *GemGemRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *GemGemRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *GemGemRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *GemGemRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *GemGemRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *GemGemRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *GemGemRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *GemGemRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *GemGemRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *GemGemRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *GemGemRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *GemGemRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *GemGemRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *GemGemRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *GemGemRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *GemGemRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *GemGemRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *GemGemRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *GemGemRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *GemGemRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *GemGemRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *GemGemRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *GemGemRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *GemGemRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *GemGemRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *GemGemRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *GemGemRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *GemGemRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *GemGemRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *GemGemRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *GemGemRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *GemGemRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *GemGemRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *GemGemRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *GemGemRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *GemGemRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *GemGemRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *GemGemRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *GemGemRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *GemGemRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *GemGemRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *GemGemRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *GemGemRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *GemGemRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *GemGemRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *GemGemRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *GemGemRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *GemGemRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *GemGemRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *GemGemRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetPrereleases returns the Prereleases field value if set, zero value otherwise. +func (o *GemGemRemote) GetPrereleases() bool { + if o == nil || IsNil(o.Prereleases) { + var ret bool + return ret + } + return *o.Prereleases +} + +// GetPrereleasesOk returns a tuple with the Prereleases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemote) GetPrereleasesOk() (*bool, bool) { + if o == nil || IsNil(o.Prereleases) { + return nil, false + } + return o.Prereleases, true +} + +// HasPrereleases returns a boolean if a field has been set. +func (o *GemGemRemote) HasPrereleases() bool { + if o != nil && !IsNil(o.Prereleases) { + return true + } + + return false +} + +// SetPrereleases gets a reference to the given bool and assigns it to the Prereleases field. +func (o *GemGemRemote) SetPrereleases(v bool) { + o.Prereleases = &v +} + +// GetIncludes returns the Includes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetIncludes() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + return o.Includes +} + +// GetIncludesOk returns a tuple with the Includes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetIncludesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Includes) { + return nil, false + } + return &o.Includes, true +} + +// HasIncludes returns a boolean if a field has been set. +func (o *GemGemRemote) HasIncludes() bool { + if o != nil && IsNil(o.Includes) { + return true + } + + return false +} + +// SetIncludes gets a reference to the given map[string]string and assigns it to the Includes field. +func (o *GemGemRemote) SetIncludes(v map[string]string) { + o.Includes = v +} + +// GetExcludes returns the Excludes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemote) GetExcludes() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + return o.Excludes +} + +// GetExcludesOk returns a tuple with the Excludes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemote) GetExcludesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Excludes) { + return nil, false + } + return &o.Excludes, true +} + +// HasExcludes returns a boolean if a field has been set. +func (o *GemGemRemote) HasExcludes() bool { + if o != nil && IsNil(o.Excludes) { + return true + } + + return false +} + +// SetExcludes gets a reference to the given map[string]string and assigns it to the Excludes field. +func (o *GemGemRemote) SetExcludes(v map[string]string) { + o.Excludes = v +} + +func (o GemGemRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GemGemRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.Prereleases) { + toSerialize["prereleases"] = o.Prereleases + } + if o.Includes != nil { + toSerialize["includes"] = o.Includes + } + if o.Excludes != nil { + toSerialize["excludes"] = o.Excludes + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GemGemRemote) UnmarshalJSON(bytes []byte) (err error) { + varGemGemRemote := _GemGemRemote{} + + if err = json.Unmarshal(bytes, &varGemGemRemote); err == nil { + *o = GemGemRemote(varGemGemRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "prereleases") + delete(additionalProperties, "includes") + delete(additionalProperties, "excludes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGemGemRemote struct { + value *GemGemRemote + isSet bool +} + +func (v NullableGemGemRemote) Get() *GemGemRemote { + return v.value +} + +func (v *NullableGemGemRemote) Set(val *GemGemRemote) { + v.value = val + v.isSet = true +} + +func (v NullableGemGemRemote) IsSet() bool { + return v.isSet +} + +func (v *NullableGemGemRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGemGemRemote(val *GemGemRemote) *NullableGemGemRemote { + return &NullableGemGemRemote{value: val, isSet: true} +} + +func (v NullableGemGemRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGemGemRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_remote_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_remote_response.go new file mode 100644 index 0000000000..1af8603e5e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_remote_response.go @@ -0,0 +1,1076 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the GemGemRemoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GemGemRemoteResponse{} + +// GemGemRemoteResponse A Serializer for GemRemote. +type GemGemRemoteResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + Prereleases *bool `json:"prereleases,omitempty"` + Includes map[string]string `json:"includes,omitempty"` + Excludes map[string]string `json:"excludes,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GemGemRemoteResponse GemGemRemoteResponse + +// NewGemGemRemoteResponse instantiates a new GemGemRemoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGemGemRemoteResponse(name string, url string) *GemGemRemoteResponse { + this := GemGemRemoteResponse{} + this.Name = name + this.Url = url + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + var prereleases bool = false + this.Prereleases = &prereleases + return &this +} + +// NewGemGemRemoteResponseWithDefaults instantiates a new GemGemRemoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGemGemRemoteResponseWithDefaults() *GemGemRemoteResponse { + this := GemGemRemoteResponse{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + var prereleases bool = false + this.Prereleases = &prereleases + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *GemGemRemoteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemoteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *GemGemRemoteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *GemGemRemoteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemoteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *GemGemRemoteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *GemGemRemoteResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GemGemRemoteResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GemGemRemoteResponse) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *GemGemRemoteResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *GemGemRemoteResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *GemGemRemoteResponse) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemoteResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemoteResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *GemGemRemoteResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *GemGemRemoteResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *GemGemRemoteResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemoteResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemoteResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *GemGemRemoteResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *GemGemRemoteResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *GemGemRemoteResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *GemGemRemoteResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemoteResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *GemGemRemoteResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemoteResponse) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemoteResponse) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *GemGemRemoteResponse) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *GemGemRemoteResponse) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *GemGemRemoteResponse) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *GemGemRemoteResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemoteResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *GemGemRemoteResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *GemGemRemoteResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemoteResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *GemGemRemoteResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemoteResponse) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemoteResponse) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *GemGemRemoteResponse) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *GemGemRemoteResponse) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *GemGemRemoteResponse) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemoteResponse) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemoteResponse) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *GemGemRemoteResponse) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *GemGemRemoteResponse) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *GemGemRemoteResponse) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *GemGemRemoteResponse) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemoteResponse) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *GemGemRemoteResponse) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemoteResponse) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemoteResponse) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *GemGemRemoteResponse) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *GemGemRemoteResponse) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *GemGemRemoteResponse) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemoteResponse) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemoteResponse) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *GemGemRemoteResponse) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *GemGemRemoteResponse) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *GemGemRemoteResponse) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemoteResponse) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemoteResponse) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *GemGemRemoteResponse) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *GemGemRemoteResponse) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *GemGemRemoteResponse) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemoteResponse) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemoteResponse) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *GemGemRemoteResponse) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *GemGemRemoteResponse) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *GemGemRemoteResponse) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *GemGemRemoteResponse) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemoteResponse) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *GemGemRemoteResponse) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemoteResponse) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemoteResponse) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *GemGemRemoteResponse) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *GemGemRemoteResponse) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *GemGemRemoteResponse) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *GemGemRemoteResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemoteResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *GemGemRemoteResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +// GetPrereleases returns the Prereleases field value if set, zero value otherwise. +func (o *GemGemRemoteResponse) GetPrereleases() bool { + if o == nil || IsNil(o.Prereleases) { + var ret bool + return ret + } + return *o.Prereleases +} + +// GetPrereleasesOk returns a tuple with the Prereleases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRemoteResponse) GetPrereleasesOk() (*bool, bool) { + if o == nil || IsNil(o.Prereleases) { + return nil, false + } + return o.Prereleases, true +} + +// HasPrereleases returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasPrereleases() bool { + if o != nil && !IsNil(o.Prereleases) { + return true + } + + return false +} + +// SetPrereleases gets a reference to the given bool and assigns it to the Prereleases field. +func (o *GemGemRemoteResponse) SetPrereleases(v bool) { + o.Prereleases = &v +} + +// GetIncludes returns the Includes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemoteResponse) GetIncludes() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + return o.Includes +} + +// GetIncludesOk returns a tuple with the Includes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemoteResponse) GetIncludesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Includes) { + return nil, false + } + return &o.Includes, true +} + +// HasIncludes returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasIncludes() bool { + if o != nil && IsNil(o.Includes) { + return true + } + + return false +} + +// SetIncludes gets a reference to the given map[string]string and assigns it to the Includes field. +func (o *GemGemRemoteResponse) SetIncludes(v map[string]string) { + o.Includes = v +} + +// GetExcludes returns the Excludes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRemoteResponse) GetExcludes() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + return o.Excludes +} + +// GetExcludesOk returns a tuple with the Excludes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRemoteResponse) GetExcludesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Excludes) { + return nil, false + } + return &o.Excludes, true +} + +// HasExcludes returns a boolean if a field has been set. +func (o *GemGemRemoteResponse) HasExcludes() bool { + if o != nil && IsNil(o.Excludes) { + return true + } + + return false +} + +// SetExcludes gets a reference to the given map[string]string and assigns it to the Excludes field. +func (o *GemGemRemoteResponse) SetExcludes(v map[string]string) { + o.Excludes = v +} + +func (o GemGemRemoteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GemGemRemoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + if !IsNil(o.Prereleases) { + toSerialize["prereleases"] = o.Prereleases + } + if o.Includes != nil { + toSerialize["includes"] = o.Includes + } + if o.Excludes != nil { + toSerialize["excludes"] = o.Excludes + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GemGemRemoteResponse) UnmarshalJSON(bytes []byte) (err error) { + varGemGemRemoteResponse := _GemGemRemoteResponse{} + + if err = json.Unmarshal(bytes, &varGemGemRemoteResponse); err == nil { + *o = GemGemRemoteResponse(varGemGemRemoteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "hidden_fields") + delete(additionalProperties, "prereleases") + delete(additionalProperties, "includes") + delete(additionalProperties, "excludes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGemGemRemoteResponse struct { + value *GemGemRemoteResponse + isSet bool +} + +func (v NullableGemGemRemoteResponse) Get() *GemGemRemoteResponse { + return v.value +} + +func (v *NullableGemGemRemoteResponse) Set(val *GemGemRemoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGemGemRemoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGemGemRemoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGemGemRemoteResponse(val *GemGemRemoteResponse) *NullableGemGemRemoteResponse { + return &NullableGemGemRemoteResponse{value: val, isSet: true} +} + +func (v NullableGemGemRemoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGemGemRemoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_repository.go new file mode 100644 index 0000000000..77acd486cb --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_repository.go @@ -0,0 +1,325 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the GemGemRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GemGemRepository{} + +// GemGemRepository A Serializer for GemRepository. +type GemGemRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GemGemRepository GemGemRepository + +// NewGemGemRepository instantiates a new GemGemRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGemGemRepository(name string) *GemGemRepository { + this := GemGemRepository{} + this.Name = name + return &this +} + +// NewGemGemRepositoryWithDefaults instantiates a new GemGemRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGemGemRepositoryWithDefaults() *GemGemRepository { + this := GemGemRepository{} + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *GemGemRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *GemGemRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *GemGemRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *GemGemRepository) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GemGemRepository) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GemGemRepository) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *GemGemRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *GemGemRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *GemGemRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *GemGemRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *GemGemRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *GemGemRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *GemGemRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *GemGemRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *GemGemRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *GemGemRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *GemGemRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *GemGemRepository) UnsetRemote() { + o.Remote.Unset() +} + +func (o GemGemRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GemGemRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GemGemRepository) UnmarshalJSON(bytes []byte) (err error) { + varGemGemRepository := _GemGemRepository{} + + if err = json.Unmarshal(bytes, &varGemGemRepository); err == nil { + *o = GemGemRepository(varGemGemRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGemGemRepository struct { + value *GemGemRepository + isSet bool +} + +func (v NullableGemGemRepository) Get() *GemGemRepository { + return v.value +} + +func (v *NullableGemGemRepository) Set(val *GemGemRepository) { + v.value = val + v.isSet = true +} + +func (v NullableGemGemRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableGemGemRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGemGemRepository(val *GemGemRepository) *NullableGemGemRepository { + return &NullableGemGemRepository{value: val, isSet: true} +} + +func (v NullableGemGemRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGemGemRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_repository_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_repository_response.go new file mode 100644 index 0000000000..c819e4e6a9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_gem_gem_repository_response.go @@ -0,0 +1,475 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the GemGemRepositoryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GemGemRepositoryResponse{} + +// GemGemRepositoryResponse A Serializer for GemRepository. +type GemGemRepositoryResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + VersionsHref *string `json:"versions_href,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + LatestVersionHref *string `json:"latest_version_href,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GemGemRepositoryResponse GemGemRepositoryResponse + +// NewGemGemRepositoryResponse instantiates a new GemGemRepositoryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGemGemRepositoryResponse(name string) *GemGemRepositoryResponse { + this := GemGemRepositoryResponse{} + this.Name = name + return &this +} + +// NewGemGemRepositoryResponseWithDefaults instantiates a new GemGemRepositoryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGemGemRepositoryResponseWithDefaults() *GemGemRepositoryResponse { + this := GemGemRepositoryResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *GemGemRepositoryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRepositoryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *GemGemRepositoryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *GemGemRepositoryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *GemGemRepositoryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRepositoryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *GemGemRepositoryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *GemGemRepositoryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetVersionsHref returns the VersionsHref field value if set, zero value otherwise. +func (o *GemGemRepositoryResponse) GetVersionsHref() string { + if o == nil || IsNil(o.VersionsHref) { + var ret string + return ret + } + return *o.VersionsHref +} + +// GetVersionsHrefOk returns a tuple with the VersionsHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRepositoryResponse) GetVersionsHrefOk() (*string, bool) { + if o == nil || IsNil(o.VersionsHref) { + return nil, false + } + return o.VersionsHref, true +} + +// HasVersionsHref returns a boolean if a field has been set. +func (o *GemGemRepositoryResponse) HasVersionsHref() bool { + if o != nil && !IsNil(o.VersionsHref) { + return true + } + + return false +} + +// SetVersionsHref gets a reference to the given string and assigns it to the VersionsHref field. +func (o *GemGemRepositoryResponse) SetVersionsHref(v string) { + o.VersionsHref = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *GemGemRepositoryResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRepositoryResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *GemGemRepositoryResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *GemGemRepositoryResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetLatestVersionHref returns the LatestVersionHref field value if set, zero value otherwise. +func (o *GemGemRepositoryResponse) GetLatestVersionHref() string { + if o == nil || IsNil(o.LatestVersionHref) { + var ret string + return ret + } + return *o.LatestVersionHref +} + +// GetLatestVersionHrefOk returns a tuple with the LatestVersionHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GemGemRepositoryResponse) GetLatestVersionHrefOk() (*string, bool) { + if o == nil || IsNil(o.LatestVersionHref) { + return nil, false + } + return o.LatestVersionHref, true +} + +// HasLatestVersionHref returns a boolean if a field has been set. +func (o *GemGemRepositoryResponse) HasLatestVersionHref() bool { + if o != nil && !IsNil(o.LatestVersionHref) { + return true + } + + return false +} + +// SetLatestVersionHref gets a reference to the given string and assigns it to the LatestVersionHref field. +func (o *GemGemRepositoryResponse) SetLatestVersionHref(v string) { + o.LatestVersionHref = &v +} + +// GetName returns the Name field value +func (o *GemGemRepositoryResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GemGemRepositoryResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GemGemRepositoryResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRepositoryResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRepositoryResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *GemGemRepositoryResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *GemGemRepositoryResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *GemGemRepositoryResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *GemGemRepositoryResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRepositoryResponse) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRepositoryResponse) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *GemGemRepositoryResponse) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *GemGemRepositoryResponse) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *GemGemRepositoryResponse) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *GemGemRepositoryResponse) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GemGemRepositoryResponse) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GemGemRepositoryResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *GemGemRepositoryResponse) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *GemGemRepositoryResponse) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *GemGemRepositoryResponse) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *GemGemRepositoryResponse) UnsetRemote() { + o.Remote.Unset() +} + +func (o GemGemRepositoryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GemGemRepositoryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.VersionsHref) { + toSerialize["versions_href"] = o.VersionsHref + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.LatestVersionHref) { + toSerialize["latest_version_href"] = o.LatestVersionHref + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GemGemRepositoryResponse) UnmarshalJSON(bytes []byte) (err error) { + varGemGemRepositoryResponse := _GemGemRepositoryResponse{} + + if err = json.Unmarshal(bytes, &varGemGemRepositoryResponse); err == nil { + *o = GemGemRepositoryResponse(varGemGemRepositoryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "versions_href") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "latest_version_href") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGemGemRepositoryResponse struct { + value *GemGemRepositoryResponse + isSet bool +} + +func (v NullableGemGemRepositoryResponse) Get() *GemGemRepositoryResponse { + return v.value +} + +func (v *NullableGemGemRepositoryResponse) Set(val *GemGemRepositoryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGemGemRepositoryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGemGemRepositoryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGemGemRepositoryResponse(val *GemGemRepositoryResponse) *NullableGemGemRepositoryResponse { + return &NullableGemGemRepositoryResponse{value: val, isSet: true} +} + +func (v NullableGemGemRepositoryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGemGemRepositoryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_group.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group.go new file mode 100644 index 0000000000..4c615ce595 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the Group type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Group{} + +// Group Serializer for Group. +type Group struct { + // Name + Name string `json:"name"` + AdditionalProperties map[string]interface{} +} + +type _Group Group + +// NewGroup instantiates a new Group object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroup(name string) *Group { + this := Group{} + this.Name = name + return &this +} + +// NewGroupWithDefaults instantiates a new Group object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupWithDefaults() *Group { + this := Group{} + return &this +} + +// GetName returns the Name field value +func (o *Group) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Group) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Group) SetName(v string) { + o.Name = v +} + +func (o Group) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Group) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Group) UnmarshalJSON(bytes []byte) (err error) { + varGroup := _Group{} + + if err = json.Unmarshal(bytes, &varGroup); err == nil { + *o = Group(varGroup) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGroup struct { + value *Group + isSet bool +} + +func (v NullableGroup) Get() *Group { + return v.value +} + +func (v *NullableGroup) Set(val *Group) { + v.value = val + v.isSet = true +} + +func (v NullableGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroup(val *Group) *NullableGroup { + return &NullableGroup{value: val, isSet: true} +} + +func (v NullableGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_progress_report_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_progress_report_response.go new file mode 100644 index 0000000000..11795db4aa --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_progress_report_response.go @@ -0,0 +1,315 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the GroupProgressReportResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupProgressReportResponse{} + +// GroupProgressReportResponse Base serializer for use with :class:`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. +type GroupProgressReportResponse struct { + // The message shown to the user for the group progress report. + Message *string `json:"message,omitempty"` + // Identifies the type of group progress report'. + Code *string `json:"code,omitempty"` + // The total count of items. + Total *int64 `json:"total,omitempty"` + // The count of items already processed. Defaults to 0. + Done *int64 `json:"done,omitempty"` + // The suffix to be shown with the group progress report. + Suffix NullableString `json:"suffix,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GroupProgressReportResponse GroupProgressReportResponse + +// NewGroupProgressReportResponse instantiates a new GroupProgressReportResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupProgressReportResponse() *GroupProgressReportResponse { + this := GroupProgressReportResponse{} + return &this +} + +// NewGroupProgressReportResponseWithDefaults instantiates a new GroupProgressReportResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupProgressReportResponseWithDefaults() *GroupProgressReportResponse { + this := GroupProgressReportResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *GroupProgressReportResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupProgressReportResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *GroupProgressReportResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *GroupProgressReportResponse) SetMessage(v string) { + o.Message = &v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *GroupProgressReportResponse) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupProgressReportResponse) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *GroupProgressReportResponse) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *GroupProgressReportResponse) SetCode(v string) { + o.Code = &v +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *GroupProgressReportResponse) GetTotal() int64 { + if o == nil || IsNil(o.Total) { + var ret int64 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupProgressReportResponse) GetTotalOk() (*int64, bool) { + if o == nil || IsNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *GroupProgressReportResponse) HasTotal() bool { + if o != nil && !IsNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given int64 and assigns it to the Total field. +func (o *GroupProgressReportResponse) SetTotal(v int64) { + o.Total = &v +} + +// GetDone returns the Done field value if set, zero value otherwise. +func (o *GroupProgressReportResponse) GetDone() int64 { + if o == nil || IsNil(o.Done) { + var ret int64 + return ret + } + return *o.Done +} + +// GetDoneOk returns a tuple with the Done field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupProgressReportResponse) GetDoneOk() (*int64, bool) { + if o == nil || IsNil(o.Done) { + return nil, false + } + return o.Done, true +} + +// HasDone returns a boolean if a field has been set. +func (o *GroupProgressReportResponse) HasDone() bool { + if o != nil && !IsNil(o.Done) { + return true + } + + return false +} + +// SetDone gets a reference to the given int64 and assigns it to the Done field. +func (o *GroupProgressReportResponse) SetDone(v int64) { + o.Done = &v +} + +// GetSuffix returns the Suffix field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GroupProgressReportResponse) GetSuffix() string { + if o == nil || IsNil(o.Suffix.Get()) { + var ret string + return ret + } + return *o.Suffix.Get() +} + +// GetSuffixOk returns a tuple with the Suffix field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GroupProgressReportResponse) GetSuffixOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Suffix.Get(), o.Suffix.IsSet() +} + +// HasSuffix returns a boolean if a field has been set. +func (o *GroupProgressReportResponse) HasSuffix() bool { + if o != nil && o.Suffix.IsSet() { + return true + } + + return false +} + +// SetSuffix gets a reference to the given NullableString and assigns it to the Suffix field. +func (o *GroupProgressReportResponse) SetSuffix(v string) { + o.Suffix.Set(&v) +} +// SetSuffixNil sets the value for Suffix to be an explicit nil +func (o *GroupProgressReportResponse) SetSuffixNil() { + o.Suffix.Set(nil) +} + +// UnsetSuffix ensures that no value is present for Suffix, not even an explicit nil +func (o *GroupProgressReportResponse) UnsetSuffix() { + o.Suffix.Unset() +} + +func (o GroupProgressReportResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupProgressReportResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Total) { + toSerialize["total"] = o.Total + } + if !IsNil(o.Done) { + toSerialize["done"] = o.Done + } + if o.Suffix.IsSet() { + toSerialize["suffix"] = o.Suffix.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GroupProgressReportResponse) UnmarshalJSON(bytes []byte) (err error) { + varGroupProgressReportResponse := _GroupProgressReportResponse{} + + if err = json.Unmarshal(bytes, &varGroupProgressReportResponse); err == nil { + *o = GroupProgressReportResponse(varGroupProgressReportResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "message") + delete(additionalProperties, "code") + delete(additionalProperties, "total") + delete(additionalProperties, "done") + delete(additionalProperties, "suffix") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGroupProgressReportResponse struct { + value *GroupProgressReportResponse + isSet bool +} + +func (v NullableGroupProgressReportResponse) Get() *GroupProgressReportResponse { + return v.value +} + +func (v *NullableGroupProgressReportResponse) Set(val *GroupProgressReportResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGroupProgressReportResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupProgressReportResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupProgressReportResponse(val *GroupProgressReportResponse) *NullableGroupProgressReportResponse { + return &NullableGroupProgressReportResponse{value: val, isSet: true} +} + +func (v NullableGroupProgressReportResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupProgressReportResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_response.go new file mode 100644 index 0000000000..34a024458e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_response.go @@ -0,0 +1,218 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the GroupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupResponse{} + +// GroupResponse Serializer for Group. +type GroupResponse struct { + // Name + Name string `json:"name"` + PulpHref *string `json:"pulp_href,omitempty"` + Id *int64 `json:"id,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GroupResponse GroupResponse + +// NewGroupResponse instantiates a new GroupResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupResponse(name string) *GroupResponse { + this := GroupResponse{} + this.Name = name + return &this +} + +// NewGroupResponseWithDefaults instantiates a new GroupResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupResponseWithDefaults() *GroupResponse { + this := GroupResponse{} + return &this +} + +// GetName returns the Name field value +func (o *GroupResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GroupResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GroupResponse) SetName(v string) { + o.Name = v +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *GroupResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *GroupResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *GroupResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GroupResponse) GetId() int64 { + if o == nil || IsNil(o.Id) { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupResponse) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GroupResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *GroupResponse) SetId(v int64) { + o.Id = &v +} + +func (o GroupResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GroupResponse) UnmarshalJSON(bytes []byte) (err error) { + varGroupResponse := _GroupResponse{} + + if err = json.Unmarshal(bytes, &varGroupResponse); err == nil { + *o = GroupResponse(varGroupResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGroupResponse struct { + value *GroupResponse + isSet bool +} + +func (v NullableGroupResponse) Get() *GroupResponse { + return v.value +} + +func (v *NullableGroupResponse) Set(val *GroupResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGroupResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupResponse(val *GroupResponse) *NullableGroupResponse { + return &NullableGroupResponse{value: val, isSet: true} +} + +func (v NullableGroupResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_role.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_role.go new file mode 100644 index 0000000000..199041b8b6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_role.go @@ -0,0 +1,222 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the GroupRole type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupRole{} + +// GroupRole Serializer for GroupRole. +type GroupRole struct { + Role string `json:"role"` + // pulp_href of the object for which role permissions should be asserted. If set to 'null', permissions will act on the model-level. + ContentObject NullableString `json:"content_object"` + // Domain this role should be applied on, mutually exclusive with content_object. + Domain NullableString `json:"domain,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GroupRole GroupRole + +// NewGroupRole instantiates a new GroupRole object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupRole(role string, contentObject NullableString) *GroupRole { + this := GroupRole{} + this.Role = role + this.ContentObject = contentObject + return &this +} + +// NewGroupRoleWithDefaults instantiates a new GroupRole object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupRoleWithDefaults() *GroupRole { + this := GroupRole{} + return &this +} + +// GetRole returns the Role field value +func (o *GroupRole) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *GroupRole) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *GroupRole) SetRole(v string) { + o.Role = v +} + +// GetContentObject returns the ContentObject field value +// If the value is explicit nil, the zero value for string will be returned +func (o *GroupRole) GetContentObject() string { + if o == nil || o.ContentObject.Get() == nil { + var ret string + return ret + } + + return *o.ContentObject.Get() +} + +// GetContentObjectOk returns a tuple with the ContentObject field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GroupRole) GetContentObjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentObject.Get(), o.ContentObject.IsSet() +} + +// SetContentObject sets field value +func (o *GroupRole) SetContentObject(v string) { + o.ContentObject.Set(&v) +} + +// GetDomain returns the Domain field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GroupRole) GetDomain() string { + if o == nil || IsNil(o.Domain.Get()) { + var ret string + return ret + } + return *o.Domain.Get() +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GroupRole) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Domain.Get(), o.Domain.IsSet() +} + +// HasDomain returns a boolean if a field has been set. +func (o *GroupRole) HasDomain() bool { + if o != nil && o.Domain.IsSet() { + return true + } + + return false +} + +// SetDomain gets a reference to the given NullableString and assigns it to the Domain field. +func (o *GroupRole) SetDomain(v string) { + o.Domain.Set(&v) +} +// SetDomainNil sets the value for Domain to be an explicit nil +func (o *GroupRole) SetDomainNil() { + o.Domain.Set(nil) +} + +// UnsetDomain ensures that no value is present for Domain, not even an explicit nil +func (o *GroupRole) UnsetDomain() { + o.Domain.Unset() +} + +func (o GroupRole) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupRole) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role"] = o.Role + toSerialize["content_object"] = o.ContentObject.Get() + if o.Domain.IsSet() { + toSerialize["domain"] = o.Domain.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GroupRole) UnmarshalJSON(bytes []byte) (err error) { + varGroupRole := _GroupRole{} + + if err = json.Unmarshal(bytes, &varGroupRole); err == nil { + *o = GroupRole(varGroupRole) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "role") + delete(additionalProperties, "content_object") + delete(additionalProperties, "domain") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGroupRole struct { + value *GroupRole + isSet bool +} + +func (v NullableGroupRole) Get() *GroupRole { + return v.value +} + +func (v *NullableGroupRole) Set(val *GroupRole) { + v.value = val + v.isSet = true +} + +func (v NullableGroupRole) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupRole(val *GroupRole) *NullableGroupRole { + return &NullableGroupRole{value: val, isSet: true} +} + +func (v NullableGroupRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_role_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_role_response.go new file mode 100644 index 0000000000..5f1eea438a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_role_response.go @@ -0,0 +1,372 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the GroupRoleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupRoleResponse{} + +// GroupRoleResponse Serializer for GroupRole. +type GroupRoleResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + Role string `json:"role"` + // pulp_href of the object for which role permissions should be asserted. If set to 'null', permissions will act on the model-level. + ContentObject NullableString `json:"content_object"` + Description *string `json:"description,omitempty"` + Permissions []string `json:"permissions,omitempty"` + // Domain this role should be applied on, mutually exclusive with content_object. + Domain NullableString `json:"domain,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GroupRoleResponse GroupRoleResponse + +// NewGroupRoleResponse instantiates a new GroupRoleResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupRoleResponse(role string, contentObject NullableString) *GroupRoleResponse { + this := GroupRoleResponse{} + this.Role = role + this.ContentObject = contentObject + return &this +} + +// NewGroupRoleResponseWithDefaults instantiates a new GroupRoleResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupRoleResponseWithDefaults() *GroupRoleResponse { + this := GroupRoleResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *GroupRoleResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupRoleResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *GroupRoleResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *GroupRoleResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *GroupRoleResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupRoleResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *GroupRoleResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *GroupRoleResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetRole returns the Role field value +func (o *GroupRoleResponse) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *GroupRoleResponse) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *GroupRoleResponse) SetRole(v string) { + o.Role = v +} + +// GetContentObject returns the ContentObject field value +// If the value is explicit nil, the zero value for string will be returned +func (o *GroupRoleResponse) GetContentObject() string { + if o == nil || o.ContentObject.Get() == nil { + var ret string + return ret + } + + return *o.ContentObject.Get() +} + +// GetContentObjectOk returns a tuple with the ContentObject field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GroupRoleResponse) GetContentObjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentObject.Get(), o.ContentObject.IsSet() +} + +// SetContentObject sets field value +func (o *GroupRoleResponse) SetContentObject(v string) { + o.ContentObject.Set(&v) +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *GroupRoleResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupRoleResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *GroupRoleResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *GroupRoleResponse) SetDescription(v string) { + o.Description = &v +} + +// GetPermissions returns the Permissions field value if set, zero value otherwise. +func (o *GroupRoleResponse) GetPermissions() []string { + if o == nil || IsNil(o.Permissions) { + var ret []string + return ret + } + return o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupRoleResponse) GetPermissionsOk() ([]string, bool) { + if o == nil || IsNil(o.Permissions) { + return nil, false + } + return o.Permissions, true +} + +// HasPermissions returns a boolean if a field has been set. +func (o *GroupRoleResponse) HasPermissions() bool { + if o != nil && !IsNil(o.Permissions) { + return true + } + + return false +} + +// SetPermissions gets a reference to the given []string and assigns it to the Permissions field. +func (o *GroupRoleResponse) SetPermissions(v []string) { + o.Permissions = v +} + +// GetDomain returns the Domain field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GroupRoleResponse) GetDomain() string { + if o == nil || IsNil(o.Domain.Get()) { + var ret string + return ret + } + return *o.Domain.Get() +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GroupRoleResponse) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Domain.Get(), o.Domain.IsSet() +} + +// HasDomain returns a boolean if a field has been set. +func (o *GroupRoleResponse) HasDomain() bool { + if o != nil && o.Domain.IsSet() { + return true + } + + return false +} + +// SetDomain gets a reference to the given NullableString and assigns it to the Domain field. +func (o *GroupRoleResponse) SetDomain(v string) { + o.Domain.Set(&v) +} +// SetDomainNil sets the value for Domain to be an explicit nil +func (o *GroupRoleResponse) SetDomainNil() { + o.Domain.Set(nil) +} + +// UnsetDomain ensures that no value is present for Domain, not even an explicit nil +func (o *GroupRoleResponse) UnsetDomain() { + o.Domain.Unset() +} + +func (o GroupRoleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupRoleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["role"] = o.Role + toSerialize["content_object"] = o.ContentObject.Get() + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Permissions) { + toSerialize["permissions"] = o.Permissions + } + if o.Domain.IsSet() { + toSerialize["domain"] = o.Domain.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GroupRoleResponse) UnmarshalJSON(bytes []byte) (err error) { + varGroupRoleResponse := _GroupRoleResponse{} + + if err = json.Unmarshal(bytes, &varGroupRoleResponse); err == nil { + *o = GroupRoleResponse(varGroupRoleResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "role") + delete(additionalProperties, "content_object") + delete(additionalProperties, "description") + delete(additionalProperties, "permissions") + delete(additionalProperties, "domain") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGroupRoleResponse struct { + value *GroupRoleResponse + isSet bool +} + +func (v NullableGroupRoleResponse) Get() *GroupRoleResponse { + return v.value +} + +func (v *NullableGroupRoleResponse) Set(val *GroupRoleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGroupRoleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupRoleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupRoleResponse(val *GroupRoleResponse) *NullableGroupRoleResponse { + return &NullableGroupRoleResponse{value: val, isSet: true} +} + +func (v NullableGroupRoleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupRoleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_user.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_user.go new file mode 100644 index 0000000000..dec2809bfe --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_user.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the GroupUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupUser{} + +// GroupUser Serializer for Users that belong to a Group. +type GroupUser struct { + // Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + Username string `json:"username"` + AdditionalProperties map[string]interface{} +} + +type _GroupUser GroupUser + +// NewGroupUser instantiates a new GroupUser object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupUser(username string) *GroupUser { + this := GroupUser{} + this.Username = username + return &this +} + +// NewGroupUserWithDefaults instantiates a new GroupUser object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupUserWithDefaults() *GroupUser { + this := GroupUser{} + return &this +} + +// GetUsername returns the Username field value +func (o *GroupUser) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *GroupUser) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *GroupUser) SetUsername(v string) { + o.Username = v +} + +func (o GroupUser) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GroupUser) UnmarshalJSON(bytes []byte) (err error) { + varGroupUser := _GroupUser{} + + if err = json.Unmarshal(bytes, &varGroupUser); err == nil { + *o = GroupUser(varGroupUser) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "username") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGroupUser struct { + value *GroupUser + isSet bool +} + +func (v NullableGroupUser) Get() *GroupUser { + return v.value +} + +func (v *NullableGroupUser) Set(val *GroupUser) { + v.value = val + v.isSet = true +} + +func (v NullableGroupUser) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupUser(val *GroupUser) *NullableGroupUser { + return &NullableGroupUser{value: val, isSet: true} +} + +func (v NullableGroupUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_user_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_user_response.go new file mode 100644 index 0000000000..28f4005bfd --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_group_user_response.go @@ -0,0 +1,181 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the GroupUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupUserResponse{} + +// GroupUserResponse Serializer for Users that belong to a Group. +type GroupUserResponse struct { + // Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + Username string `json:"username"` + PulpHref *string `json:"pulp_href,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _GroupUserResponse GroupUserResponse + +// NewGroupUserResponse instantiates a new GroupUserResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupUserResponse(username string) *GroupUserResponse { + this := GroupUserResponse{} + this.Username = username + return &this +} + +// NewGroupUserResponseWithDefaults instantiates a new GroupUserResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupUserResponseWithDefaults() *GroupUserResponse { + this := GroupUserResponse{} + return &this +} + +// GetUsername returns the Username field value +func (o *GroupUserResponse) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *GroupUserResponse) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *GroupUserResponse) SetUsername(v string) { + o.Username = v +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *GroupUserResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupUserResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *GroupUserResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *GroupUserResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +func (o GroupUserResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GroupUserResponse) UnmarshalJSON(bytes []byte) (err error) { + varGroupUserResponse := _GroupUserResponse{} + + if err = json.Unmarshal(bytes, &varGroupUserResponse); err == nil { + *o = GroupUserResponse(varGroupUserResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "username") + delete(additionalProperties, "pulp_href") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGroupUserResponse struct { + value *GroupUserResponse + isSet bool +} + +func (v NullableGroupUserResponse) Get() *GroupUserResponse { + return v.value +} + +func (v *NullableGroupUserResponse) Set(val *GroupUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGroupUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupUserResponse(val *GroupUserResponse) *NullableGroupUserResponse { + return &NullableGroupUserResponse{value: val, isSet: true} +} + +func (v NullableGroupUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_image_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_image_response.go new file mode 100644 index 0000000000..ee3f5c0254 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_image_response.go @@ -0,0 +1,232 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ImageResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImageResponse{} + +// ImageResponse Image serializer. +type ImageResponse struct { + // File name. + Name string `json:"name"` + // File path. + Path string `json:"path"` + // Compatible platforms. + Platforms string `json:"platforms"` + Artifact NullableArtifactResponse `json:"artifact"` + AdditionalProperties map[string]interface{} +} + +type _ImageResponse ImageResponse + +// NewImageResponse instantiates a new ImageResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImageResponse(name string, path string, platforms string, artifact NullableArtifactResponse) *ImageResponse { + this := ImageResponse{} + this.Name = name + this.Path = path + this.Platforms = platforms + this.Artifact = artifact + return &this +} + +// NewImageResponseWithDefaults instantiates a new ImageResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImageResponseWithDefaults() *ImageResponse { + this := ImageResponse{} + return &this +} + +// GetName returns the Name field value +func (o *ImageResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ImageResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ImageResponse) SetName(v string) { + o.Name = v +} + +// GetPath returns the Path field value +func (o *ImageResponse) GetPath() string { + if o == nil { + var ret string + return ret + } + + return o.Path +} + +// GetPathOk returns a tuple with the Path field value +// and a boolean to check if the value has been set. +func (o *ImageResponse) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Path, true +} + +// SetPath sets field value +func (o *ImageResponse) SetPath(v string) { + o.Path = v +} + +// GetPlatforms returns the Platforms field value +func (o *ImageResponse) GetPlatforms() string { + if o == nil { + var ret string + return ret + } + + return o.Platforms +} + +// GetPlatformsOk returns a tuple with the Platforms field value +// and a boolean to check if the value has been set. +func (o *ImageResponse) GetPlatformsOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Platforms, true +} + +// SetPlatforms sets field value +func (o *ImageResponse) SetPlatforms(v string) { + o.Platforms = v +} + +// GetArtifact returns the Artifact field value +// If the value is explicit nil, the zero value for ArtifactResponse will be returned +func (o *ImageResponse) GetArtifact() ArtifactResponse { + if o == nil || o.Artifact.Get() == nil { + var ret ArtifactResponse + return ret + } + + return *o.Artifact.Get() +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ImageResponse) GetArtifactOk() (*ArtifactResponse, bool) { + if o == nil { + return nil, false + } + return o.Artifact.Get(), o.Artifact.IsSet() +} + +// SetArtifact sets field value +func (o *ImageResponse) SetArtifact(v ArtifactResponse) { + o.Artifact.Set(&v) +} + +func (o ImageResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImageResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["path"] = o.Path + toSerialize["platforms"] = o.Platforms + toSerialize["artifact"] = o.Artifact.Get() + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ImageResponse) UnmarshalJSON(bytes []byte) (err error) { + varImageResponse := _ImageResponse{} + + if err = json.Unmarshal(bytes, &varImageResponse); err == nil { + *o = ImageResponse(varImageResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "path") + delete(additionalProperties, "platforms") + delete(additionalProperties, "artifact") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableImageResponse struct { + value *ImageResponse + isSet bool +} + +func (v NullableImageResponse) Get() *ImageResponse { + return v.value +} + +func (v *NullableImageResponse) Set(val *ImageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableImageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableImageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImageResponse(val *ImageResponse) *NullableImageResponse { + return &NullableImageResponse{value: val, isSet: true} +} + +func (v NullableImageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_import_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_import_response.go new file mode 100644 index 0000000000..ebd0771755 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_import_response.go @@ -0,0 +1,249 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the ImportResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImportResponse{} + +// ImportResponse Serializer for Imports. +type ImportResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A URI of the Task that ran the Import. + Task string `json:"task"` + // Any parameters that were used to create the import. + Params map[string]interface{} `json:"params"` + AdditionalProperties map[string]interface{} +} + +type _ImportResponse ImportResponse + +// NewImportResponse instantiates a new ImportResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImportResponse(task string, params map[string]interface{}) *ImportResponse { + this := ImportResponse{} + this.Task = task + this.Params = params + return &this +} + +// NewImportResponseWithDefaults instantiates a new ImportResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImportResponseWithDefaults() *ImportResponse { + this := ImportResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *ImportResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *ImportResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *ImportResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *ImportResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImportResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *ImportResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *ImportResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetTask returns the Task field value +func (o *ImportResponse) GetTask() string { + if o == nil { + var ret string + return ret + } + + return o.Task +} + +// GetTaskOk returns a tuple with the Task field value +// and a boolean to check if the value has been set. +func (o *ImportResponse) GetTaskOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Task, true +} + +// SetTask sets field value +func (o *ImportResponse) SetTask(v string) { + o.Task = v +} + +// GetParams returns the Params field value +func (o *ImportResponse) GetParams() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value +// and a boolean to check if the value has been set. +func (o *ImportResponse) GetParamsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Params, true +} + +// SetParams sets field value +func (o *ImportResponse) SetParams(v map[string]interface{}) { + o.Params = v +} + +func (o ImportResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImportResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["task"] = o.Task + toSerialize["params"] = o.Params + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ImportResponse) UnmarshalJSON(bytes []byte) (err error) { + varImportResponse := _ImportResponse{} + + if err = json.Unmarshal(bytes, &varImportResponse); err == nil { + *o = ImportResponse(varImportResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "task") + delete(additionalProperties, "params") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableImportResponse struct { + value *ImportResponse + isSet bool +} + +func (v NullableImportResponse) Get() *ImportResponse { + return v.value +} + +func (v *NullableImportResponse) Set(val *ImportResponse) { + v.value = val + v.isSet = true +} + +func (v NullableImportResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableImportResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImportResponse(val *ImportResponse) *NullableImportResponse { + return &NullableImportResponse{value: val, isSet: true} +} + +func (v NullableImportResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImportResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_manifest_copy.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_manifest_copy.go new file mode 100644 index 0000000000..45cfbe6e77 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_manifest_copy.go @@ -0,0 +1,267 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ManifestCopy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ManifestCopy{} + +// ManifestCopy Serializer for copying manifests from a source repository to a destination repository. +type ManifestCopy struct { + // A URI of the repository to copy content from. + SourceRepository *string `json:"source_repository,omitempty"` + // A URI of the repository version to copy content from. + SourceRepositoryVersion *string `json:"source_repository_version,omitempty"` + // A list of manifest digests to copy. + Digests []interface{} `json:"digests,omitempty"` + // A list of media_types to copy. + MediaTypes []MediaTypesEnum `json:"media_types,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ManifestCopy ManifestCopy + +// NewManifestCopy instantiates a new ManifestCopy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewManifestCopy() *ManifestCopy { + this := ManifestCopy{} + return &this +} + +// NewManifestCopyWithDefaults instantiates a new ManifestCopy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewManifestCopyWithDefaults() *ManifestCopy { + this := ManifestCopy{} + return &this +} + +// GetSourceRepository returns the SourceRepository field value if set, zero value otherwise. +func (o *ManifestCopy) GetSourceRepository() string { + if o == nil || IsNil(o.SourceRepository) { + var ret string + return ret + } + return *o.SourceRepository +} + +// GetSourceRepositoryOk returns a tuple with the SourceRepository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ManifestCopy) GetSourceRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.SourceRepository) { + return nil, false + } + return o.SourceRepository, true +} + +// HasSourceRepository returns a boolean if a field has been set. +func (o *ManifestCopy) HasSourceRepository() bool { + if o != nil && !IsNil(o.SourceRepository) { + return true + } + + return false +} + +// SetSourceRepository gets a reference to the given string and assigns it to the SourceRepository field. +func (o *ManifestCopy) SetSourceRepository(v string) { + o.SourceRepository = &v +} + +// GetSourceRepositoryVersion returns the SourceRepositoryVersion field value if set, zero value otherwise. +func (o *ManifestCopy) GetSourceRepositoryVersion() string { + if o == nil || IsNil(o.SourceRepositoryVersion) { + var ret string + return ret + } + return *o.SourceRepositoryVersion +} + +// GetSourceRepositoryVersionOk returns a tuple with the SourceRepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ManifestCopy) GetSourceRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.SourceRepositoryVersion) { + return nil, false + } + return o.SourceRepositoryVersion, true +} + +// HasSourceRepositoryVersion returns a boolean if a field has been set. +func (o *ManifestCopy) HasSourceRepositoryVersion() bool { + if o != nil && !IsNil(o.SourceRepositoryVersion) { + return true + } + + return false +} + +// SetSourceRepositoryVersion gets a reference to the given string and assigns it to the SourceRepositoryVersion field. +func (o *ManifestCopy) SetSourceRepositoryVersion(v string) { + o.SourceRepositoryVersion = &v +} + +// GetDigests returns the Digests field value if set, zero value otherwise. +func (o *ManifestCopy) GetDigests() []interface{} { + if o == nil || IsNil(o.Digests) { + var ret []interface{} + return ret + } + return o.Digests +} + +// GetDigestsOk returns a tuple with the Digests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ManifestCopy) GetDigestsOk() ([]interface{}, bool) { + if o == nil || IsNil(o.Digests) { + return nil, false + } + return o.Digests, true +} + +// HasDigests returns a boolean if a field has been set. +func (o *ManifestCopy) HasDigests() bool { + if o != nil && !IsNil(o.Digests) { + return true + } + + return false +} + +// SetDigests gets a reference to the given []interface{} and assigns it to the Digests field. +func (o *ManifestCopy) SetDigests(v []interface{}) { + o.Digests = v +} + +// GetMediaTypes returns the MediaTypes field value if set, zero value otherwise. +func (o *ManifestCopy) GetMediaTypes() []MediaTypesEnum { + if o == nil || IsNil(o.MediaTypes) { + var ret []MediaTypesEnum + return ret + } + return o.MediaTypes +} + +// GetMediaTypesOk returns a tuple with the MediaTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ManifestCopy) GetMediaTypesOk() ([]MediaTypesEnum, bool) { + if o == nil || IsNil(o.MediaTypes) { + return nil, false + } + return o.MediaTypes, true +} + +// HasMediaTypes returns a boolean if a field has been set. +func (o *ManifestCopy) HasMediaTypes() bool { + if o != nil && !IsNil(o.MediaTypes) { + return true + } + + return false +} + +// SetMediaTypes gets a reference to the given []MediaTypesEnum and assigns it to the MediaTypes field. +func (o *ManifestCopy) SetMediaTypes(v []MediaTypesEnum) { + o.MediaTypes = v +} + +func (o ManifestCopy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ManifestCopy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SourceRepository) { + toSerialize["source_repository"] = o.SourceRepository + } + if !IsNil(o.SourceRepositoryVersion) { + toSerialize["source_repository_version"] = o.SourceRepositoryVersion + } + if !IsNil(o.Digests) { + toSerialize["digests"] = o.Digests + } + if !IsNil(o.MediaTypes) { + toSerialize["media_types"] = o.MediaTypes + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ManifestCopy) UnmarshalJSON(bytes []byte) (err error) { + varManifestCopy := _ManifestCopy{} + + if err = json.Unmarshal(bytes, &varManifestCopy); err == nil { + *o = ManifestCopy(varManifestCopy) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "source_repository") + delete(additionalProperties, "source_repository_version") + delete(additionalProperties, "digests") + delete(additionalProperties, "media_types") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableManifestCopy struct { + value *ManifestCopy + isSet bool +} + +func (v NullableManifestCopy) Get() *ManifestCopy { + return v.value +} + +func (v *NullableManifestCopy) Set(val *ManifestCopy) { + v.value = val + v.isSet = true +} + +func (v NullableManifestCopy) IsSet() bool { + return v.isSet +} + +func (v *NullableManifestCopy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableManifestCopy(val *ManifestCopy) *NullableManifestCopy { + return &NullableManifestCopy{value: val, isSet: true} +} + +func (v NullableManifestCopy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableManifestCopy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_artifact.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_artifact.go new file mode 100644 index 0000000000..9a2c1886d8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_artifact.go @@ -0,0 +1,211 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the MavenMavenArtifact type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MavenMavenArtifact{} + +// MavenMavenArtifact A Serializer for MavenArtifact. +type MavenMavenArtifact struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Artifact file representing the physical content + Artifact string `json:"artifact"` + // Path where the artifact is located relative to distributions base_path + RelativePath string `json:"relative_path"` + AdditionalProperties map[string]interface{} +} + +type _MavenMavenArtifact MavenMavenArtifact + +// NewMavenMavenArtifact instantiates a new MavenMavenArtifact object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMavenMavenArtifact(artifact string, relativePath string) *MavenMavenArtifact { + this := MavenMavenArtifact{} + this.Artifact = artifact + this.RelativePath = relativePath + return &this +} + +// NewMavenMavenArtifactWithDefaults instantiates a new MavenMavenArtifact object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMavenMavenArtifactWithDefaults() *MavenMavenArtifact { + this := MavenMavenArtifact{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *MavenMavenArtifact) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenArtifact) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *MavenMavenArtifact) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *MavenMavenArtifact) SetRepository(v string) { + o.Repository = &v +} + +// GetArtifact returns the Artifact field value +func (o *MavenMavenArtifact) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *MavenMavenArtifact) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *MavenMavenArtifact) SetArtifact(v string) { + o.Artifact = v +} + +// GetRelativePath returns the RelativePath field value +func (o *MavenMavenArtifact) GetRelativePath() string { + if o == nil { + var ret string + return ret + } + + return o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value +// and a boolean to check if the value has been set. +func (o *MavenMavenArtifact) GetRelativePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RelativePath, true +} + +// SetRelativePath sets field value +func (o *MavenMavenArtifact) SetRelativePath(v string) { + o.RelativePath = v +} + +func (o MavenMavenArtifact) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MavenMavenArtifact) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["artifact"] = o.Artifact + toSerialize["relative_path"] = o.RelativePath + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MavenMavenArtifact) UnmarshalJSON(bytes []byte) (err error) { + varMavenMavenArtifact := _MavenMavenArtifact{} + + if err = json.Unmarshal(bytes, &varMavenMavenArtifact); err == nil { + *o = MavenMavenArtifact(varMavenMavenArtifact) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMavenMavenArtifact struct { + value *MavenMavenArtifact + isSet bool +} + +func (v NullableMavenMavenArtifact) Get() *MavenMavenArtifact { + return v.value +} + +func (v *NullableMavenMavenArtifact) Set(val *MavenMavenArtifact) { + v.value = val + v.isSet = true +} + +func (v NullableMavenMavenArtifact) IsSet() bool { + return v.isSet +} + +func (v *NullableMavenMavenArtifact) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMavenMavenArtifact(val *MavenMavenArtifact) *NullableMavenMavenArtifact { + return &NullableMavenMavenArtifact{value: val, isSet: true} +} + +func (v NullableMavenMavenArtifact) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMavenMavenArtifact) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_artifact_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_artifact_response.go new file mode 100644 index 0000000000..7073fabc60 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_artifact_response.go @@ -0,0 +1,372 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the MavenMavenArtifactResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MavenMavenArtifactResponse{} + +// MavenMavenArtifactResponse A Serializer for MavenArtifact. +type MavenMavenArtifactResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact string `json:"artifact"` + // Group Id of the artifact's package. + GroupId *string `json:"group_id,omitempty"` + // Artifact Id of the artifact's package. + ArtifactId *string `json:"artifact_id,omitempty"` + // Version of the artifact's package. + Version *string `json:"version,omitempty"` + // Filename of the artifact. + Filename *string `json:"filename,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MavenMavenArtifactResponse MavenMavenArtifactResponse + +// NewMavenMavenArtifactResponse instantiates a new MavenMavenArtifactResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMavenMavenArtifactResponse(artifact string) *MavenMavenArtifactResponse { + this := MavenMavenArtifactResponse{} + this.Artifact = artifact + return &this +} + +// NewMavenMavenArtifactResponseWithDefaults instantiates a new MavenMavenArtifactResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMavenMavenArtifactResponseWithDefaults() *MavenMavenArtifactResponse { + this := MavenMavenArtifactResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *MavenMavenArtifactResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenArtifactResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *MavenMavenArtifactResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *MavenMavenArtifactResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *MavenMavenArtifactResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenArtifactResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *MavenMavenArtifactResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *MavenMavenArtifactResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value +func (o *MavenMavenArtifactResponse) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *MavenMavenArtifactResponse) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *MavenMavenArtifactResponse) SetArtifact(v string) { + o.Artifact = v +} + +// GetGroupId returns the GroupId field value if set, zero value otherwise. +func (o *MavenMavenArtifactResponse) GetGroupId() string { + if o == nil || IsNil(o.GroupId) { + var ret string + return ret + } + return *o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenArtifactResponse) GetGroupIdOk() (*string, bool) { + if o == nil || IsNil(o.GroupId) { + return nil, false + } + return o.GroupId, true +} + +// HasGroupId returns a boolean if a field has been set. +func (o *MavenMavenArtifactResponse) HasGroupId() bool { + if o != nil && !IsNil(o.GroupId) { + return true + } + + return false +} + +// SetGroupId gets a reference to the given string and assigns it to the GroupId field. +func (o *MavenMavenArtifactResponse) SetGroupId(v string) { + o.GroupId = &v +} + +// GetArtifactId returns the ArtifactId field value if set, zero value otherwise. +func (o *MavenMavenArtifactResponse) GetArtifactId() string { + if o == nil || IsNil(o.ArtifactId) { + var ret string + return ret + } + return *o.ArtifactId +} + +// GetArtifactIdOk returns a tuple with the ArtifactId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenArtifactResponse) GetArtifactIdOk() (*string, bool) { + if o == nil || IsNil(o.ArtifactId) { + return nil, false + } + return o.ArtifactId, true +} + +// HasArtifactId returns a boolean if a field has been set. +func (o *MavenMavenArtifactResponse) HasArtifactId() bool { + if o != nil && !IsNil(o.ArtifactId) { + return true + } + + return false +} + +// SetArtifactId gets a reference to the given string and assigns it to the ArtifactId field. +func (o *MavenMavenArtifactResponse) SetArtifactId(v string) { + o.ArtifactId = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *MavenMavenArtifactResponse) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenArtifactResponse) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *MavenMavenArtifactResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *MavenMavenArtifactResponse) SetVersion(v string) { + o.Version = &v +} + +// GetFilename returns the Filename field value if set, zero value otherwise. +func (o *MavenMavenArtifactResponse) GetFilename() string { + if o == nil || IsNil(o.Filename) { + var ret string + return ret + } + return *o.Filename +} + +// GetFilenameOk returns a tuple with the Filename field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenArtifactResponse) GetFilenameOk() (*string, bool) { + if o == nil || IsNil(o.Filename) { + return nil, false + } + return o.Filename, true +} + +// HasFilename returns a boolean if a field has been set. +func (o *MavenMavenArtifactResponse) HasFilename() bool { + if o != nil && !IsNil(o.Filename) { + return true + } + + return false +} + +// SetFilename gets a reference to the given string and assigns it to the Filename field. +func (o *MavenMavenArtifactResponse) SetFilename(v string) { + o.Filename = &v +} + +func (o MavenMavenArtifactResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MavenMavenArtifactResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifact"] = o.Artifact + if !IsNil(o.GroupId) { + toSerialize["group_id"] = o.GroupId + } + if !IsNil(o.ArtifactId) { + toSerialize["artifact_id"] = o.ArtifactId + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.Filename) { + toSerialize["filename"] = o.Filename + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MavenMavenArtifactResponse) UnmarshalJSON(bytes []byte) (err error) { + varMavenMavenArtifactResponse := _MavenMavenArtifactResponse{} + + if err = json.Unmarshal(bytes, &varMavenMavenArtifactResponse); err == nil { + *o = MavenMavenArtifactResponse(varMavenMavenArtifactResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "group_id") + delete(additionalProperties, "artifact_id") + delete(additionalProperties, "version") + delete(additionalProperties, "filename") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMavenMavenArtifactResponse struct { + value *MavenMavenArtifactResponse + isSet bool +} + +func (v NullableMavenMavenArtifactResponse) Get() *MavenMavenArtifactResponse { + return v.value +} + +func (v *NullableMavenMavenArtifactResponse) Set(val *MavenMavenArtifactResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMavenMavenArtifactResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMavenMavenArtifactResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMavenMavenArtifactResponse(val *MavenMavenArtifactResponse) *NullableMavenMavenArtifactResponse { + return &NullableMavenMavenArtifactResponse{value: val, isSet: true} +} + +func (v NullableMavenMavenArtifactResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMavenMavenArtifactResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_distribution.go new file mode 100644 index 0000000000..3fafd91125 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_distribution.go @@ -0,0 +1,396 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the MavenMavenDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MavenMavenDistribution{} + +// MavenMavenDistribution Serializer for Maven Distributions. +type MavenMavenDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Remote that can be used to fetch content when using pull-through caching. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MavenMavenDistribution MavenMavenDistribution + +// NewMavenMavenDistribution instantiates a new MavenMavenDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMavenMavenDistribution(basePath string, name string) *MavenMavenDistribution { + this := MavenMavenDistribution{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + return &this +} + +// NewMavenMavenDistributionWithDefaults instantiates a new MavenMavenDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMavenMavenDistributionWithDefaults() *MavenMavenDistribution { + this := MavenMavenDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value +func (o *MavenMavenDistribution) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *MavenMavenDistribution) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *MavenMavenDistribution) SetBasePath(v string) { + o.BasePath = v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *MavenMavenDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *MavenMavenDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *MavenMavenDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *MavenMavenDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *MavenMavenDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *MavenMavenDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *MavenMavenDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *MavenMavenDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *MavenMavenDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *MavenMavenDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *MavenMavenDistribution) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MavenMavenDistribution) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *MavenMavenDistribution) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *MavenMavenDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *MavenMavenDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *MavenMavenDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *MavenMavenDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenDistribution) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenDistribution) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *MavenMavenDistribution) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *MavenMavenDistribution) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *MavenMavenDistribution) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *MavenMavenDistribution) UnsetRemote() { + o.Remote.Unset() +} + +func (o MavenMavenDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MavenMavenDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["base_path"] = o.BasePath + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MavenMavenDistribution) UnmarshalJSON(bytes []byte) (err error) { + varMavenMavenDistribution := _MavenMavenDistribution{} + + if err = json.Unmarshal(bytes, &varMavenMavenDistribution); err == nil { + *o = MavenMavenDistribution(varMavenMavenDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMavenMavenDistribution struct { + value *MavenMavenDistribution + isSet bool +} + +func (v NullableMavenMavenDistribution) Get() *MavenMavenDistribution { + return v.value +} + +func (v *NullableMavenMavenDistribution) Set(val *MavenMavenDistribution) { + v.value = val + v.isSet = true +} + +func (v NullableMavenMavenDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullableMavenMavenDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMavenMavenDistribution(val *MavenMavenDistribution) *NullableMavenMavenDistribution { + return &NullableMavenMavenDistribution{value: val, isSet: true} +} + +func (v NullableMavenMavenDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMavenMavenDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_distribution_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_distribution_response.go new file mode 100644 index 0000000000..c0db62294f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_distribution_response.go @@ -0,0 +1,510 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the MavenMavenDistributionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MavenMavenDistributionResponse{} + +// MavenMavenDistributionResponse Serializer for Maven Distributions. +type MavenMavenDistributionResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // The URL for accessing the publication as defined by this distribution. + BaseUrl *string `json:"base_url,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Remote that can be used to fetch content when using pull-through caching. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MavenMavenDistributionResponse MavenMavenDistributionResponse + +// NewMavenMavenDistributionResponse instantiates a new MavenMavenDistributionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMavenMavenDistributionResponse(basePath string, name string) *MavenMavenDistributionResponse { + this := MavenMavenDistributionResponse{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + return &this +} + +// NewMavenMavenDistributionResponseWithDefaults instantiates a new MavenMavenDistributionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMavenMavenDistributionResponseWithDefaults() *MavenMavenDistributionResponse { + this := MavenMavenDistributionResponse{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *MavenMavenDistributionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenDistributionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *MavenMavenDistributionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *MavenMavenDistributionResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *MavenMavenDistributionResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenDistributionResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *MavenMavenDistributionResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *MavenMavenDistributionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetBasePath returns the BasePath field value +func (o *MavenMavenDistributionResponse) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *MavenMavenDistributionResponse) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *MavenMavenDistributionResponse) SetBasePath(v string) { + o.BasePath = v +} + +// GetBaseUrl returns the BaseUrl field value if set, zero value otherwise. +func (o *MavenMavenDistributionResponse) GetBaseUrl() string { + if o == nil || IsNil(o.BaseUrl) { + var ret string + return ret + } + return *o.BaseUrl +} + +// GetBaseUrlOk returns a tuple with the BaseUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenDistributionResponse) GetBaseUrlOk() (*string, bool) { + if o == nil || IsNil(o.BaseUrl) { + return nil, false + } + return o.BaseUrl, true +} + +// HasBaseUrl returns a boolean if a field has been set. +func (o *MavenMavenDistributionResponse) HasBaseUrl() bool { + if o != nil && !IsNil(o.BaseUrl) { + return true + } + + return false +} + +// SetBaseUrl gets a reference to the given string and assigns it to the BaseUrl field. +func (o *MavenMavenDistributionResponse) SetBaseUrl(v string) { + o.BaseUrl = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenDistributionResponse) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenDistributionResponse) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *MavenMavenDistributionResponse) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *MavenMavenDistributionResponse) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *MavenMavenDistributionResponse) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *MavenMavenDistributionResponse) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *MavenMavenDistributionResponse) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenDistributionResponse) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *MavenMavenDistributionResponse) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *MavenMavenDistributionResponse) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *MavenMavenDistributionResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *MavenMavenDistributionResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *MavenMavenDistributionResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *MavenMavenDistributionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MavenMavenDistributionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *MavenMavenDistributionResponse) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenDistributionResponse) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenDistributionResponse) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *MavenMavenDistributionResponse) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *MavenMavenDistributionResponse) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *MavenMavenDistributionResponse) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *MavenMavenDistributionResponse) UnsetRepository() { + o.Repository.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenDistributionResponse) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenDistributionResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *MavenMavenDistributionResponse) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *MavenMavenDistributionResponse) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *MavenMavenDistributionResponse) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *MavenMavenDistributionResponse) UnsetRemote() { + o.Remote.Unset() +} + +func (o MavenMavenDistributionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MavenMavenDistributionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["base_path"] = o.BasePath + if !IsNil(o.BaseUrl) { + toSerialize["base_url"] = o.BaseUrl + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MavenMavenDistributionResponse) UnmarshalJSON(bytes []byte) (err error) { + varMavenMavenDistributionResponse := _MavenMavenDistributionResponse{} + + if err = json.Unmarshal(bytes, &varMavenMavenDistributionResponse); err == nil { + *o = MavenMavenDistributionResponse(varMavenMavenDistributionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "base_path") + delete(additionalProperties, "base_url") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMavenMavenDistributionResponse struct { + value *MavenMavenDistributionResponse + isSet bool +} + +func (v NullableMavenMavenDistributionResponse) Get() *MavenMavenDistributionResponse { + return v.value +} + +func (v *NullableMavenMavenDistributionResponse) Set(val *MavenMavenDistributionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMavenMavenDistributionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMavenMavenDistributionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMavenMavenDistributionResponse(val *MavenMavenDistributionResponse) *NullableMavenMavenDistributionResponse { + return &NullableMavenMavenDistributionResponse{value: val, isSet: true} +} + +func (v NullableMavenMavenDistributionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMavenMavenDistributionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_remote.go new file mode 100644 index 0000000000..63ed3961d6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_remote.go @@ -0,0 +1,1047 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the MavenMavenRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MavenMavenRemote{} + +// MavenMavenRemote A Serializer for MavenRemote. Add any new fields if defined on MavenRemote. Similar to the example above, in MavenArtifactSerializer. Additional validators can be added to the parent validators list For example:: class Meta: validators = platform.RemoteSerializer.Meta.validators + [myValidator1, myValidator2] +type MavenMavenRemote struct { + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *PolicyDb6Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MavenMavenRemote MavenMavenRemote + +// NewMavenMavenRemote instantiates a new MavenMavenRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMavenMavenRemote(name string, url string) *MavenMavenRemote { + this := MavenMavenRemote{} + this.Name = name + this.Url = url + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewMavenMavenRemoteWithDefaults instantiates a new MavenMavenRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMavenMavenRemoteWithDefaults() *MavenMavenRemote { + this := MavenMavenRemote{} + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value +func (o *MavenMavenRemote) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MavenMavenRemote) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *MavenMavenRemote) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *MavenMavenRemote) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *MavenMavenRemote) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *MavenMavenRemote) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *MavenMavenRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *MavenMavenRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *MavenMavenRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *MavenMavenRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *MavenMavenRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *MavenMavenRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *MavenMavenRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *MavenMavenRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *MavenMavenRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *MavenMavenRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *MavenMavenRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *MavenMavenRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *MavenMavenRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *MavenMavenRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *MavenMavenRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *MavenMavenRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *MavenMavenRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *MavenMavenRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *MavenMavenRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *MavenMavenRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *MavenMavenRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *MavenMavenRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *MavenMavenRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *MavenMavenRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *MavenMavenRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *MavenMavenRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *MavenMavenRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *MavenMavenRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *MavenMavenRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *MavenMavenRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *MavenMavenRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *MavenMavenRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *MavenMavenRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *MavenMavenRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *MavenMavenRemote) GetPolicy() PolicyDb6Enum { + if o == nil || IsNil(o.Policy) { + var ret PolicyDb6Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRemote) GetPolicyOk() (*PolicyDb6Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given PolicyDb6Enum and assigns it to the Policy field. +func (o *MavenMavenRemote) SetPolicy(v PolicyDb6Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *MavenMavenRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *MavenMavenRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *MavenMavenRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *MavenMavenRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *MavenMavenRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *MavenMavenRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *MavenMavenRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *MavenMavenRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *MavenMavenRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *MavenMavenRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *MavenMavenRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *MavenMavenRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *MavenMavenRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *MavenMavenRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *MavenMavenRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *MavenMavenRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *MavenMavenRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *MavenMavenRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +func (o MavenMavenRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MavenMavenRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MavenMavenRemote) UnmarshalJSON(bytes []byte) (err error) { + varMavenMavenRemote := _MavenMavenRemote{} + + if err = json.Unmarshal(bytes, &varMavenMavenRemote); err == nil { + *o = MavenMavenRemote(varMavenMavenRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMavenMavenRemote struct { + value *MavenMavenRemote + isSet bool +} + +func (v NullableMavenMavenRemote) Get() *MavenMavenRemote { + return v.value +} + +func (v *NullableMavenMavenRemote) Set(val *MavenMavenRemote) { + v.value = val + v.isSet = true +} + +func (v NullableMavenMavenRemote) IsSet() bool { + return v.isSet +} + +func (v *NullableMavenMavenRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMavenMavenRemote(val *MavenMavenRemote) *NullableMavenMavenRemote { + return &NullableMavenMavenRemote{value: val, isSet: true} +} + +func (v NullableMavenMavenRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMavenMavenRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_remote_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_remote_response.go new file mode 100644 index 0000000000..aea6e7ff57 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_remote_response.go @@ -0,0 +1,959 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the MavenMavenRemoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MavenMavenRemoteResponse{} + +// MavenMavenRemoteResponse A Serializer for MavenRemote. Add any new fields if defined on MavenRemote. Similar to the example above, in MavenArtifactSerializer. Additional validators can be added to the parent validators list For example:: class Meta: validators = platform.RemoteSerializer.Meta.validators + [myValidator1, myValidator2] +type MavenMavenRemoteResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *PolicyDb6Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MavenMavenRemoteResponse MavenMavenRemoteResponse + +// NewMavenMavenRemoteResponse instantiates a new MavenMavenRemoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMavenMavenRemoteResponse(name string, url string) *MavenMavenRemoteResponse { + this := MavenMavenRemoteResponse{} + this.Name = name + this.Url = url + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewMavenMavenRemoteResponseWithDefaults instantiates a new MavenMavenRemoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMavenMavenRemoteResponseWithDefaults() *MavenMavenRemoteResponse { + this := MavenMavenRemoteResponse{} + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *MavenMavenRemoteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRemoteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *MavenMavenRemoteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *MavenMavenRemoteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRemoteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *MavenMavenRemoteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *MavenMavenRemoteResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MavenMavenRemoteResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *MavenMavenRemoteResponse) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *MavenMavenRemoteResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *MavenMavenRemoteResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *MavenMavenRemoteResponse) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemoteResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemoteResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *MavenMavenRemoteResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *MavenMavenRemoteResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *MavenMavenRemoteResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemoteResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemoteResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *MavenMavenRemoteResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *MavenMavenRemoteResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *MavenMavenRemoteResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *MavenMavenRemoteResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRemoteResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *MavenMavenRemoteResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemoteResponse) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemoteResponse) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *MavenMavenRemoteResponse) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *MavenMavenRemoteResponse) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *MavenMavenRemoteResponse) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *MavenMavenRemoteResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRemoteResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *MavenMavenRemoteResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *MavenMavenRemoteResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRemoteResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *MavenMavenRemoteResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemoteResponse) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemoteResponse) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *MavenMavenRemoteResponse) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *MavenMavenRemoteResponse) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *MavenMavenRemoteResponse) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemoteResponse) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemoteResponse) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *MavenMavenRemoteResponse) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *MavenMavenRemoteResponse) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *MavenMavenRemoteResponse) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *MavenMavenRemoteResponse) GetPolicy() PolicyDb6Enum { + if o == nil || IsNil(o.Policy) { + var ret PolicyDb6Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRemoteResponse) GetPolicyOk() (*PolicyDb6Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given PolicyDb6Enum and assigns it to the Policy field. +func (o *MavenMavenRemoteResponse) SetPolicy(v PolicyDb6Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemoteResponse) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemoteResponse) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *MavenMavenRemoteResponse) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *MavenMavenRemoteResponse) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *MavenMavenRemoteResponse) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemoteResponse) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemoteResponse) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *MavenMavenRemoteResponse) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *MavenMavenRemoteResponse) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *MavenMavenRemoteResponse) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemoteResponse) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemoteResponse) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *MavenMavenRemoteResponse) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *MavenMavenRemoteResponse) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *MavenMavenRemoteResponse) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemoteResponse) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemoteResponse) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *MavenMavenRemoteResponse) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *MavenMavenRemoteResponse) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *MavenMavenRemoteResponse) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *MavenMavenRemoteResponse) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRemoteResponse) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *MavenMavenRemoteResponse) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRemoteResponse) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRemoteResponse) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *MavenMavenRemoteResponse) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *MavenMavenRemoteResponse) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *MavenMavenRemoteResponse) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *MavenMavenRemoteResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRemoteResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *MavenMavenRemoteResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *MavenMavenRemoteResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +func (o MavenMavenRemoteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MavenMavenRemoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MavenMavenRemoteResponse) UnmarshalJSON(bytes []byte) (err error) { + varMavenMavenRemoteResponse := _MavenMavenRemoteResponse{} + + if err = json.Unmarshal(bytes, &varMavenMavenRemoteResponse); err == nil { + *o = MavenMavenRemoteResponse(varMavenMavenRemoteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "hidden_fields") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMavenMavenRemoteResponse struct { + value *MavenMavenRemoteResponse + isSet bool +} + +func (v NullableMavenMavenRemoteResponse) Get() *MavenMavenRemoteResponse { + return v.value +} + +func (v *NullableMavenMavenRemoteResponse) Set(val *MavenMavenRemoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMavenMavenRemoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMavenMavenRemoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMavenMavenRemoteResponse(val *MavenMavenRemoteResponse) *NullableMavenMavenRemoteResponse { + return &NullableMavenMavenRemoteResponse{value: val, isSet: true} +} + +func (v NullableMavenMavenRemoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMavenMavenRemoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_repository.go new file mode 100644 index 0000000000..eb0f39c62f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_repository.go @@ -0,0 +1,325 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the MavenMavenRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MavenMavenRepository{} + +// MavenMavenRepository Serializer for Maven Repositories. +type MavenMavenRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MavenMavenRepository MavenMavenRepository + +// NewMavenMavenRepository instantiates a new MavenMavenRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMavenMavenRepository(name string) *MavenMavenRepository { + this := MavenMavenRepository{} + this.Name = name + return &this +} + +// NewMavenMavenRepositoryWithDefaults instantiates a new MavenMavenRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMavenMavenRepositoryWithDefaults() *MavenMavenRepository { + this := MavenMavenRepository{} + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *MavenMavenRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *MavenMavenRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *MavenMavenRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *MavenMavenRepository) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MavenMavenRepository) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *MavenMavenRepository) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *MavenMavenRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *MavenMavenRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *MavenMavenRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *MavenMavenRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *MavenMavenRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *MavenMavenRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *MavenMavenRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *MavenMavenRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *MavenMavenRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *MavenMavenRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *MavenMavenRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *MavenMavenRepository) UnsetRemote() { + o.Remote.Unset() +} + +func (o MavenMavenRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MavenMavenRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MavenMavenRepository) UnmarshalJSON(bytes []byte) (err error) { + varMavenMavenRepository := _MavenMavenRepository{} + + if err = json.Unmarshal(bytes, &varMavenMavenRepository); err == nil { + *o = MavenMavenRepository(varMavenMavenRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMavenMavenRepository struct { + value *MavenMavenRepository + isSet bool +} + +func (v NullableMavenMavenRepository) Get() *MavenMavenRepository { + return v.value +} + +func (v *NullableMavenMavenRepository) Set(val *MavenMavenRepository) { + v.value = val + v.isSet = true +} + +func (v NullableMavenMavenRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableMavenMavenRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMavenMavenRepository(val *MavenMavenRepository) *NullableMavenMavenRepository { + return &NullableMavenMavenRepository{value: val, isSet: true} +} + +func (v NullableMavenMavenRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMavenMavenRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_repository_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_repository_response.go new file mode 100644 index 0000000000..3272bb36d1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_maven_maven_repository_response.go @@ -0,0 +1,475 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the MavenMavenRepositoryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MavenMavenRepositoryResponse{} + +// MavenMavenRepositoryResponse Serializer for Maven Repositories. +type MavenMavenRepositoryResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + VersionsHref *string `json:"versions_href,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + LatestVersionHref *string `json:"latest_version_href,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MavenMavenRepositoryResponse MavenMavenRepositoryResponse + +// NewMavenMavenRepositoryResponse instantiates a new MavenMavenRepositoryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMavenMavenRepositoryResponse(name string) *MavenMavenRepositoryResponse { + this := MavenMavenRepositoryResponse{} + this.Name = name + return &this +} + +// NewMavenMavenRepositoryResponseWithDefaults instantiates a new MavenMavenRepositoryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMavenMavenRepositoryResponseWithDefaults() *MavenMavenRepositoryResponse { + this := MavenMavenRepositoryResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *MavenMavenRepositoryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRepositoryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *MavenMavenRepositoryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *MavenMavenRepositoryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *MavenMavenRepositoryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRepositoryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *MavenMavenRepositoryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *MavenMavenRepositoryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetVersionsHref returns the VersionsHref field value if set, zero value otherwise. +func (o *MavenMavenRepositoryResponse) GetVersionsHref() string { + if o == nil || IsNil(o.VersionsHref) { + var ret string + return ret + } + return *o.VersionsHref +} + +// GetVersionsHrefOk returns a tuple with the VersionsHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRepositoryResponse) GetVersionsHrefOk() (*string, bool) { + if o == nil || IsNil(o.VersionsHref) { + return nil, false + } + return o.VersionsHref, true +} + +// HasVersionsHref returns a boolean if a field has been set. +func (o *MavenMavenRepositoryResponse) HasVersionsHref() bool { + if o != nil && !IsNil(o.VersionsHref) { + return true + } + + return false +} + +// SetVersionsHref gets a reference to the given string and assigns it to the VersionsHref field. +func (o *MavenMavenRepositoryResponse) SetVersionsHref(v string) { + o.VersionsHref = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *MavenMavenRepositoryResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRepositoryResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *MavenMavenRepositoryResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *MavenMavenRepositoryResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetLatestVersionHref returns the LatestVersionHref field value if set, zero value otherwise. +func (o *MavenMavenRepositoryResponse) GetLatestVersionHref() string { + if o == nil || IsNil(o.LatestVersionHref) { + var ret string + return ret + } + return *o.LatestVersionHref +} + +// GetLatestVersionHrefOk returns a tuple with the LatestVersionHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MavenMavenRepositoryResponse) GetLatestVersionHrefOk() (*string, bool) { + if o == nil || IsNil(o.LatestVersionHref) { + return nil, false + } + return o.LatestVersionHref, true +} + +// HasLatestVersionHref returns a boolean if a field has been set. +func (o *MavenMavenRepositoryResponse) HasLatestVersionHref() bool { + if o != nil && !IsNil(o.LatestVersionHref) { + return true + } + + return false +} + +// SetLatestVersionHref gets a reference to the given string and assigns it to the LatestVersionHref field. +func (o *MavenMavenRepositoryResponse) SetLatestVersionHref(v string) { + o.LatestVersionHref = &v +} + +// GetName returns the Name field value +func (o *MavenMavenRepositoryResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MavenMavenRepositoryResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *MavenMavenRepositoryResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRepositoryResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRepositoryResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *MavenMavenRepositoryResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *MavenMavenRepositoryResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *MavenMavenRepositoryResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *MavenMavenRepositoryResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRepositoryResponse) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRepositoryResponse) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *MavenMavenRepositoryResponse) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *MavenMavenRepositoryResponse) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *MavenMavenRepositoryResponse) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *MavenMavenRepositoryResponse) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MavenMavenRepositoryResponse) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MavenMavenRepositoryResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *MavenMavenRepositoryResponse) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *MavenMavenRepositoryResponse) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *MavenMavenRepositoryResponse) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *MavenMavenRepositoryResponse) UnsetRemote() { + o.Remote.Unset() +} + +func (o MavenMavenRepositoryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MavenMavenRepositoryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.VersionsHref) { + toSerialize["versions_href"] = o.VersionsHref + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.LatestVersionHref) { + toSerialize["latest_version_href"] = o.LatestVersionHref + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MavenMavenRepositoryResponse) UnmarshalJSON(bytes []byte) (err error) { + varMavenMavenRepositoryResponse := _MavenMavenRepositoryResponse{} + + if err = json.Unmarshal(bytes, &varMavenMavenRepositoryResponse); err == nil { + *o = MavenMavenRepositoryResponse(varMavenMavenRepositoryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "versions_href") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "latest_version_href") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMavenMavenRepositoryResponse struct { + value *MavenMavenRepositoryResponse + isSet bool +} + +func (v NullableMavenMavenRepositoryResponse) Get() *MavenMavenRepositoryResponse { + return v.value +} + +func (v *NullableMavenMavenRepositoryResponse) Set(val *MavenMavenRepositoryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMavenMavenRepositoryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMavenMavenRepositoryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMavenMavenRepositoryResponse(val *MavenMavenRepositoryResponse) *NullableMavenMavenRepositoryResponse { + return &NullableMavenMavenRepositoryResponse{value: val, isSet: true} +} + +func (v NullableMavenMavenRepositoryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMavenMavenRepositoryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_media_types_enum.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_media_types_enum.go new file mode 100644 index 0000000000..039de5f3f7 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_media_types_enum.go @@ -0,0 +1,118 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "fmt" +) + +// MediaTypesEnum * `application/vnd.docker.distribution.manifest.v1+json` - application/vnd.docker.distribution.manifest.v1+json * `application/vnd.docker.distribution.manifest.v2+json` - application/vnd.docker.distribution.manifest.v2+json * `application/vnd.docker.distribution.manifest.list.v2+json` - application/vnd.docker.distribution.manifest.list.v2+json * `application/vnd.oci.image.manifest.v1+json` - application/vnd.oci.image.manifest.v1+json * `application/vnd.oci.image.index.v1+json` - application/vnd.oci.image.index.v1+json +type MediaTypesEnum string + +// List of MediaTypesEnum +const ( + MEDIATYPESENUM_DOCKER_DISTRIBUTION_MANIFEST_V1JSON MediaTypesEnum = "application/vnd.docker.distribution.manifest.v1+json" + MEDIATYPESENUM_DOCKER_DISTRIBUTION_MANIFEST_V2JSON MediaTypesEnum = "application/vnd.docker.distribution.manifest.v2+json" + MEDIATYPESENUM_DOCKER_DISTRIBUTION_MANIFEST_LIST_V2JSON MediaTypesEnum = "application/vnd.docker.distribution.manifest.list.v2+json" + MEDIATYPESENUM_OCI_IMAGE_MANIFEST_V1JSON MediaTypesEnum = "application/vnd.oci.image.manifest.v1+json" + MEDIATYPESENUM_OCI_IMAGE_INDEX_V1JSON MediaTypesEnum = "application/vnd.oci.image.index.v1+json" +) + +// All allowed values of MediaTypesEnum enum +var AllowedMediaTypesEnumEnumValues = []MediaTypesEnum{ + "application/vnd.docker.distribution.manifest.v1+json", + "application/vnd.docker.distribution.manifest.v2+json", + "application/vnd.docker.distribution.manifest.list.v2+json", + "application/vnd.oci.image.manifest.v1+json", + "application/vnd.oci.image.index.v1+json", +} + +func (v *MediaTypesEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := MediaTypesEnum(value) + for _, existing := range AllowedMediaTypesEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid MediaTypesEnum", value) +} + +// NewMediaTypesEnumFromValue returns a pointer to a valid MediaTypesEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewMediaTypesEnumFromValue(v string) (*MediaTypesEnum, error) { + ev := MediaTypesEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for MediaTypesEnum: valid values are %v", v, AllowedMediaTypesEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v MediaTypesEnum) IsValid() bool { + for _, existing := range AllowedMediaTypesEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to MediaTypesEnum value +func (v MediaTypesEnum) Ptr() *MediaTypesEnum { + return &v +} + +type NullableMediaTypesEnum struct { + value *MediaTypesEnum + isSet bool +} + +func (v NullableMediaTypesEnum) Get() *MediaTypesEnum { + return v.value +} + +func (v *NullableMediaTypesEnum) Set(val *MediaTypesEnum) { + v.value = val + v.isSet = true +} + +func (v NullableMediaTypesEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableMediaTypesEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMediaTypesEnum(val *MediaTypesEnum) *NullableMediaTypesEnum { + return &NullableMediaTypesEnum{value: val, isSet: true} +} + +func (v NullableMediaTypesEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMediaTypesEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_metadata_checksum_type_enum.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_metadata_checksum_type_enum.go new file mode 100644 index 0000000000..2cc039d590 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_metadata_checksum_type_enum.go @@ -0,0 +1,122 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "fmt" +) + +// MetadataChecksumTypeEnum * `unknown` - unknown * `md5` - md5 * `sha1` - sha1 * `sha224` - sha224 * `sha256` - sha256 * `sha384` - sha384 * `sha512` - sha512 +type MetadataChecksumTypeEnum string + +// List of MetadataChecksumTypeEnum +const ( + METADATACHECKSUMTYPEENUM_UNKNOWN MetadataChecksumTypeEnum = "unknown" + METADATACHECKSUMTYPEENUM_MD5 MetadataChecksumTypeEnum = "md5" + METADATACHECKSUMTYPEENUM_SHA1 MetadataChecksumTypeEnum = "sha1" + METADATACHECKSUMTYPEENUM_SHA224 MetadataChecksumTypeEnum = "sha224" + METADATACHECKSUMTYPEENUM_SHA256 MetadataChecksumTypeEnum = "sha256" + METADATACHECKSUMTYPEENUM_SHA384 MetadataChecksumTypeEnum = "sha384" + METADATACHECKSUMTYPEENUM_SHA512 MetadataChecksumTypeEnum = "sha512" +) + +// All allowed values of MetadataChecksumTypeEnum enum +var AllowedMetadataChecksumTypeEnumEnumValues = []MetadataChecksumTypeEnum{ + "unknown", + "md5", + "sha1", + "sha224", + "sha256", + "sha384", + "sha512", +} + +func (v *MetadataChecksumTypeEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := MetadataChecksumTypeEnum(value) + for _, existing := range AllowedMetadataChecksumTypeEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid MetadataChecksumTypeEnum", value) +} + +// NewMetadataChecksumTypeEnumFromValue returns a pointer to a valid MetadataChecksumTypeEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewMetadataChecksumTypeEnumFromValue(v string) (*MetadataChecksumTypeEnum, error) { + ev := MetadataChecksumTypeEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for MetadataChecksumTypeEnum: valid values are %v", v, AllowedMetadataChecksumTypeEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v MetadataChecksumTypeEnum) IsValid() bool { + for _, existing := range AllowedMetadataChecksumTypeEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to MetadataChecksumTypeEnum value +func (v MetadataChecksumTypeEnum) Ptr() *MetadataChecksumTypeEnum { + return &v +} + +type NullableMetadataChecksumTypeEnum struct { + value *MetadataChecksumTypeEnum + isSet bool +} + +func (v NullableMetadataChecksumTypeEnum) Get() *MetadataChecksumTypeEnum { + return v.value +} + +func (v *NullableMetadataChecksumTypeEnum) Set(val *MetadataChecksumTypeEnum) { + v.value = val + v.isSet = true +} + +func (v NullableMetadataChecksumTypeEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableMetadataChecksumTypeEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMetadataChecksumTypeEnum(val *MetadataChecksumTypeEnum) *NullableMetadataChecksumTypeEnum { + return &NullableMetadataChecksumTypeEnum{value: val, isSet: true} +} + +func (v NullableMetadataChecksumTypeEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMetadataChecksumTypeEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_method_enum.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_method_enum.go new file mode 100644 index 0000000000..2eccb70ee2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_method_enum.go @@ -0,0 +1,114 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "fmt" +) + +// MethodEnum * `write` - Export by writing * `hardlink` - Export by hardlinking * `symlink` - Export by symlinking +type MethodEnum string + +// List of MethodEnum +const ( + METHODENUM_WRITE MethodEnum = "write" + METHODENUM_HARDLINK MethodEnum = "hardlink" + METHODENUM_SYMLINK MethodEnum = "symlink" +) + +// All allowed values of MethodEnum enum +var AllowedMethodEnumEnumValues = []MethodEnum{ + "write", + "hardlink", + "symlink", +} + +func (v *MethodEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := MethodEnum(value) + for _, existing := range AllowedMethodEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid MethodEnum", value) +} + +// NewMethodEnumFromValue returns a pointer to a valid MethodEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewMethodEnumFromValue(v string) (*MethodEnum, error) { + ev := MethodEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for MethodEnum: valid values are %v", v, AllowedMethodEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v MethodEnum) IsValid() bool { + for _, existing := range AllowedMethodEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to MethodEnum value +func (v MethodEnum) Ptr() *MethodEnum { + return &v +} + +type NullableMethodEnum struct { + value *MethodEnum + isSet bool +} + +func (v NullableMethodEnum) Get() *MethodEnum { + return v.value +} + +func (v *NullableMethodEnum) Set(val *MethodEnum) { + v.value = val + v.isSet = true +} + +func (v NullableMethodEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableMethodEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMethodEnum(val *MethodEnum) *NullableMethodEnum { + return &NullableMethodEnum{value: val, isSet: true} +} + +func (v NullableMethodEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMethodEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_minimal_task_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_minimal_task_response.go new file mode 100644 index 0000000000..095a59f1a6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_minimal_task_response.go @@ -0,0 +1,372 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the MinimalTaskResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MinimalTaskResponse{} + +// MinimalTaskResponse Base serializer for use with :class:`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. +type MinimalTaskResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The name of task. + Name string `json:"name"` + // The current state of the task. The possible values include: 'waiting', 'skipped', 'running', 'completed', 'failed', 'canceled' and 'canceling'. + State *string `json:"state,omitempty"` + // Timestamp of the when this task started execution. + StartedAt *time.Time `json:"started_at,omitempty"` + // Timestamp of the when this task stopped execution. + FinishedAt *time.Time `json:"finished_at,omitempty"` + // The worker associated with this task. This field is empty if a worker is not yet assigned. + Worker *string `json:"worker,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MinimalTaskResponse MinimalTaskResponse + +// NewMinimalTaskResponse instantiates a new MinimalTaskResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMinimalTaskResponse(name string) *MinimalTaskResponse { + this := MinimalTaskResponse{} + this.Name = name + return &this +} + +// NewMinimalTaskResponseWithDefaults instantiates a new MinimalTaskResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMinimalTaskResponseWithDefaults() *MinimalTaskResponse { + this := MinimalTaskResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *MinimalTaskResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MinimalTaskResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *MinimalTaskResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *MinimalTaskResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *MinimalTaskResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MinimalTaskResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *MinimalTaskResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *MinimalTaskResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *MinimalTaskResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MinimalTaskResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *MinimalTaskResponse) SetName(v string) { + o.Name = v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *MinimalTaskResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MinimalTaskResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *MinimalTaskResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *MinimalTaskResponse) SetState(v string) { + o.State = &v +} + +// GetStartedAt returns the StartedAt field value if set, zero value otherwise. +func (o *MinimalTaskResponse) GetStartedAt() time.Time { + if o == nil || IsNil(o.StartedAt) { + var ret time.Time + return ret + } + return *o.StartedAt +} + +// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MinimalTaskResponse) GetStartedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.StartedAt) { + return nil, false + } + return o.StartedAt, true +} + +// HasStartedAt returns a boolean if a field has been set. +func (o *MinimalTaskResponse) HasStartedAt() bool { + if o != nil && !IsNil(o.StartedAt) { + return true + } + + return false +} + +// SetStartedAt gets a reference to the given time.Time and assigns it to the StartedAt field. +func (o *MinimalTaskResponse) SetStartedAt(v time.Time) { + o.StartedAt = &v +} + +// GetFinishedAt returns the FinishedAt field value if set, zero value otherwise. +func (o *MinimalTaskResponse) GetFinishedAt() time.Time { + if o == nil || IsNil(o.FinishedAt) { + var ret time.Time + return ret + } + return *o.FinishedAt +} + +// GetFinishedAtOk returns a tuple with the FinishedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MinimalTaskResponse) GetFinishedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.FinishedAt) { + return nil, false + } + return o.FinishedAt, true +} + +// HasFinishedAt returns a boolean if a field has been set. +func (o *MinimalTaskResponse) HasFinishedAt() bool { + if o != nil && !IsNil(o.FinishedAt) { + return true + } + + return false +} + +// SetFinishedAt gets a reference to the given time.Time and assigns it to the FinishedAt field. +func (o *MinimalTaskResponse) SetFinishedAt(v time.Time) { + o.FinishedAt = &v +} + +// GetWorker returns the Worker field value if set, zero value otherwise. +func (o *MinimalTaskResponse) GetWorker() string { + if o == nil || IsNil(o.Worker) { + var ret string + return ret + } + return *o.Worker +} + +// GetWorkerOk returns a tuple with the Worker field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MinimalTaskResponse) GetWorkerOk() (*string, bool) { + if o == nil || IsNil(o.Worker) { + return nil, false + } + return o.Worker, true +} + +// HasWorker returns a boolean if a field has been set. +func (o *MinimalTaskResponse) HasWorker() bool { + if o != nil && !IsNil(o.Worker) { + return true + } + + return false +} + +// SetWorker gets a reference to the given string and assigns it to the Worker field. +func (o *MinimalTaskResponse) SetWorker(v string) { + o.Worker = &v +} + +func (o MinimalTaskResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MinimalTaskResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.StartedAt) { + toSerialize["started_at"] = o.StartedAt + } + if !IsNil(o.FinishedAt) { + toSerialize["finished_at"] = o.FinishedAt + } + if !IsNil(o.Worker) { + toSerialize["worker"] = o.Worker + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MinimalTaskResponse) UnmarshalJSON(bytes []byte) (err error) { + varMinimalTaskResponse := _MinimalTaskResponse{} + + if err = json.Unmarshal(bytes, &varMinimalTaskResponse); err == nil { + *o = MinimalTaskResponse(varMinimalTaskResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "state") + delete(additionalProperties, "started_at") + delete(additionalProperties, "finished_at") + delete(additionalProperties, "worker") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMinimalTaskResponse struct { + value *MinimalTaskResponse + isSet bool +} + +func (v NullableMinimalTaskResponse) Get() *MinimalTaskResponse { + return v.value +} + +func (v *NullableMinimalTaskResponse) Set(val *MinimalTaskResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMinimalTaskResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMinimalTaskResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMinimalTaskResponse(val *MinimalTaskResponse) *NullableMinimalTaskResponse { + return &NullableMinimalTaskResponse{value: val, isSet: true} +} + +func (v NullableMinimalTaskResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMinimalTaskResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_multiple_artifact_content_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_multiple_artifact_content_response.go new file mode 100644 index 0000000000..dac93803e8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_multiple_artifact_content_response.go @@ -0,0 +1,220 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the MultipleArtifactContentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MultipleArtifactContentResponse{} + +// MultipleArtifactContentResponse Base serializer for use with :class:`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. +type MultipleArtifactContentResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A dict mapping relative paths inside the Content to the correspondingArtifact URLs. E.g.: {'relative/path': '/artifacts/1/' + Artifacts map[string]interface{} `json:"artifacts"` + AdditionalProperties map[string]interface{} +} + +type _MultipleArtifactContentResponse MultipleArtifactContentResponse + +// NewMultipleArtifactContentResponse instantiates a new MultipleArtifactContentResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMultipleArtifactContentResponse(artifacts map[string]interface{}) *MultipleArtifactContentResponse { + this := MultipleArtifactContentResponse{} + this.Artifacts = artifacts + return &this +} + +// NewMultipleArtifactContentResponseWithDefaults instantiates a new MultipleArtifactContentResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMultipleArtifactContentResponseWithDefaults() *MultipleArtifactContentResponse { + this := MultipleArtifactContentResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *MultipleArtifactContentResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MultipleArtifactContentResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *MultipleArtifactContentResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *MultipleArtifactContentResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *MultipleArtifactContentResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MultipleArtifactContentResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *MultipleArtifactContentResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *MultipleArtifactContentResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifacts returns the Artifacts field value +func (o *MultipleArtifactContentResponse) GetArtifacts() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Artifacts +} + +// GetArtifactsOk returns a tuple with the Artifacts field value +// and a boolean to check if the value has been set. +func (o *MultipleArtifactContentResponse) GetArtifactsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Artifacts, true +} + +// SetArtifacts sets field value +func (o *MultipleArtifactContentResponse) SetArtifacts(v map[string]interface{}) { + o.Artifacts = v +} + +func (o MultipleArtifactContentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MultipleArtifactContentResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifacts"] = o.Artifacts + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MultipleArtifactContentResponse) UnmarshalJSON(bytes []byte) (err error) { + varMultipleArtifactContentResponse := _MultipleArtifactContentResponse{} + + if err = json.Unmarshal(bytes, &varMultipleArtifactContentResponse); err == nil { + *o = MultipleArtifactContentResponse(varMultipleArtifactContentResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifacts") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMultipleArtifactContentResponse struct { + value *MultipleArtifactContentResponse + isSet bool +} + +func (v NullableMultipleArtifactContentResponse) Get() *MultipleArtifactContentResponse { + return v.value +} + +func (v *NullableMultipleArtifactContentResponse) Set(val *MultipleArtifactContentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMultipleArtifactContentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMultipleArtifactContentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMultipleArtifactContentResponse(val *MultipleArtifactContentResponse) *NullableMultipleArtifactContentResponse { + return &NullableMultipleArtifactContentResponse{value: val, isSet: true} +} + +func (v NullableMultipleArtifactContentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMultipleArtifactContentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_my_permissions_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_my_permissions_response.go new file mode 100644 index 0000000000..672606d337 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_my_permissions_response.go @@ -0,0 +1,143 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the MyPermissionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MyPermissionsResponse{} + +// MyPermissionsResponse struct for MyPermissionsResponse +type MyPermissionsResponse struct { + Permissions []string `json:"permissions"` + AdditionalProperties map[string]interface{} +} + +type _MyPermissionsResponse MyPermissionsResponse + +// NewMyPermissionsResponse instantiates a new MyPermissionsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMyPermissionsResponse(permissions []string) *MyPermissionsResponse { + this := MyPermissionsResponse{} + this.Permissions = permissions + return &this +} + +// NewMyPermissionsResponseWithDefaults instantiates a new MyPermissionsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMyPermissionsResponseWithDefaults() *MyPermissionsResponse { + this := MyPermissionsResponse{} + return &this +} + +// GetPermissions returns the Permissions field value +func (o *MyPermissionsResponse) GetPermissions() []string { + if o == nil { + var ret []string + return ret + } + + return o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value +// and a boolean to check if the value has been set. +func (o *MyPermissionsResponse) GetPermissionsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Permissions, true +} + +// SetPermissions sets field value +func (o *MyPermissionsResponse) SetPermissions(v []string) { + o.Permissions = v +} + +func (o MyPermissionsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MyPermissionsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["permissions"] = o.Permissions + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MyPermissionsResponse) UnmarshalJSON(bytes []byte) (err error) { + varMyPermissionsResponse := _MyPermissionsResponse{} + + if err = json.Unmarshal(bytes, &varMyPermissionsResponse); err == nil { + *o = MyPermissionsResponse(varMyPermissionsResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "permissions") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMyPermissionsResponse struct { + value *MyPermissionsResponse + isSet bool +} + +func (v NullableMyPermissionsResponse) Get() *MyPermissionsResponse { + return v.value +} + +func (v *NullableMyPermissionsResponse) Set(val *MyPermissionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMyPermissionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMyPermissionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMyPermissionsResponse(val *MyPermissionsResponse) *NullableMyPermissionsResponse { + return &NullableMyPermissionsResponse{value: val, isSet: true} +} + +func (v NullableMyPermissionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMyPermissionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_namespace_link.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_namespace_link.go new file mode 100644 index 0000000000..3c9cdbd0fb --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_namespace_link.go @@ -0,0 +1,171 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the NamespaceLink type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NamespaceLink{} + +// NamespaceLink Provides backwards compatible interface for links with the legacy GalaxyNG API. +type NamespaceLink struct { + Url string `json:"url"` + Name string `json:"name"` + AdditionalProperties map[string]interface{} +} + +type _NamespaceLink NamespaceLink + +// NewNamespaceLink instantiates a new NamespaceLink object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNamespaceLink(url string, name string) *NamespaceLink { + this := NamespaceLink{} + this.Url = url + this.Name = name + return &this +} + +// NewNamespaceLinkWithDefaults instantiates a new NamespaceLink object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNamespaceLinkWithDefaults() *NamespaceLink { + this := NamespaceLink{} + return &this +} + +// GetUrl returns the Url field value +func (o *NamespaceLink) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *NamespaceLink) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *NamespaceLink) SetUrl(v string) { + o.Url = v +} + +// GetName returns the Name field value +func (o *NamespaceLink) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NamespaceLink) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NamespaceLink) SetName(v string) { + o.Name = v +} + +func (o NamespaceLink) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NamespaceLink) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + toSerialize["name"] = o.Name + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NamespaceLink) UnmarshalJSON(bytes []byte) (err error) { + varNamespaceLink := _NamespaceLink{} + + if err = json.Unmarshal(bytes, &varNamespaceLink); err == nil { + *o = NamespaceLink(varNamespaceLink) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "url") + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNamespaceLink struct { + value *NamespaceLink + isSet bool +} + +func (v NullableNamespaceLink) Get() *NamespaceLink { + return v.value +} + +func (v *NullableNamespaceLink) Set(val *NamespaceLink) { + v.value = val + v.isSet = true +} + +func (v NullableNamespaceLink) IsSet() bool { + return v.isSet +} + +func (v *NullableNamespaceLink) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNamespaceLink(val *NamespaceLink) *NullableNamespaceLink { + return &NullableNamespaceLink{value: val, isSet: true} +} + +func (v NullableNamespaceLink) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNamespaceLink) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_namespace_link_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_namespace_link_response.go new file mode 100644 index 0000000000..3387e910ff --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_namespace_link_response.go @@ -0,0 +1,171 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the NamespaceLinkResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NamespaceLinkResponse{} + +// NamespaceLinkResponse Provides backwards compatible interface for links with the legacy GalaxyNG API. +type NamespaceLinkResponse struct { + Url string `json:"url"` + Name string `json:"name"` + AdditionalProperties map[string]interface{} +} + +type _NamespaceLinkResponse NamespaceLinkResponse + +// NewNamespaceLinkResponse instantiates a new NamespaceLinkResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNamespaceLinkResponse(url string, name string) *NamespaceLinkResponse { + this := NamespaceLinkResponse{} + this.Url = url + this.Name = name + return &this +} + +// NewNamespaceLinkResponseWithDefaults instantiates a new NamespaceLinkResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNamespaceLinkResponseWithDefaults() *NamespaceLinkResponse { + this := NamespaceLinkResponse{} + return &this +} + +// GetUrl returns the Url field value +func (o *NamespaceLinkResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *NamespaceLinkResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *NamespaceLinkResponse) SetUrl(v string) { + o.Url = v +} + +// GetName returns the Name field value +func (o *NamespaceLinkResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NamespaceLinkResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NamespaceLinkResponse) SetName(v string) { + o.Name = v +} + +func (o NamespaceLinkResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NamespaceLinkResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + toSerialize["name"] = o.Name + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NamespaceLinkResponse) UnmarshalJSON(bytes []byte) (err error) { + varNamespaceLinkResponse := _NamespaceLinkResponse{} + + if err = json.Unmarshal(bytes, &varNamespaceLinkResponse); err == nil { + *o = NamespaceLinkResponse(varNamespaceLinkResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "url") + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNamespaceLinkResponse struct { + value *NamespaceLinkResponse + isSet bool +} + +func (v NullableNamespaceLinkResponse) Get() *NamespaceLinkResponse { + return v.value +} + +func (v *NullableNamespaceLinkResponse) Set(val *NamespaceLinkResponse) { + v.value = val + v.isSet = true +} + +func (v NullableNamespaceLinkResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableNamespaceLinkResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNamespaceLinkResponse(val *NamespaceLinkResponse) *NullableNamespaceLinkResponse { + return &NullableNamespaceLinkResponse{value: val, isSet: true} +} + +func (v NullableNamespaceLinkResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNamespaceLinkResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_nested_role.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_nested_role.go new file mode 100644 index 0000000000..4fa1530415 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_nested_role.go @@ -0,0 +1,217 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the NestedRole type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NestedRole{} + +// NestedRole Serializer to add/remove object roles to/from users/groups. This is used in conjunction with ``pulpcore.app.viewsets.base.RolesMixin`` and requires the underlying object to be passed as ``content_object`` in the context. +type NestedRole struct { + Users []string `json:"users,omitempty"` + Groups []string `json:"groups,omitempty"` + Role string `json:"role"` + AdditionalProperties map[string]interface{} +} + +type _NestedRole NestedRole + +// NewNestedRole instantiates a new NestedRole object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNestedRole(role string) *NestedRole { + this := NestedRole{} + this.Role = role + return &this +} + +// NewNestedRoleWithDefaults instantiates a new NestedRole object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNestedRoleWithDefaults() *NestedRole { + this := NestedRole{} + return &this +} + +// GetUsers returns the Users field value if set, zero value otherwise. +func (o *NestedRole) GetUsers() []string { + if o == nil || IsNil(o.Users) { + var ret []string + return ret + } + return o.Users +} + +// GetUsersOk returns a tuple with the Users field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NestedRole) GetUsersOk() ([]string, bool) { + if o == nil || IsNil(o.Users) { + return nil, false + } + return o.Users, true +} + +// HasUsers returns a boolean if a field has been set. +func (o *NestedRole) HasUsers() bool { + if o != nil && !IsNil(o.Users) { + return true + } + + return false +} + +// SetUsers gets a reference to the given []string and assigns it to the Users field. +func (o *NestedRole) SetUsers(v []string) { + o.Users = v +} + +// GetGroups returns the Groups field value if set, zero value otherwise. +func (o *NestedRole) GetGroups() []string { + if o == nil || IsNil(o.Groups) { + var ret []string + return ret + } + return o.Groups +} + +// GetGroupsOk returns a tuple with the Groups field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NestedRole) GetGroupsOk() ([]string, bool) { + if o == nil || IsNil(o.Groups) { + return nil, false + } + return o.Groups, true +} + +// HasGroups returns a boolean if a field has been set. +func (o *NestedRole) HasGroups() bool { + if o != nil && !IsNil(o.Groups) { + return true + } + + return false +} + +// SetGroups gets a reference to the given []string and assigns it to the Groups field. +func (o *NestedRole) SetGroups(v []string) { + o.Groups = v +} + +// GetRole returns the Role field value +func (o *NestedRole) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *NestedRole) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *NestedRole) SetRole(v string) { + o.Role = v +} + +func (o NestedRole) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NestedRole) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Users) { + toSerialize["users"] = o.Users + } + if !IsNil(o.Groups) { + toSerialize["groups"] = o.Groups + } + toSerialize["role"] = o.Role + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NestedRole) UnmarshalJSON(bytes []byte) (err error) { + varNestedRole := _NestedRole{} + + if err = json.Unmarshal(bytes, &varNestedRole); err == nil { + *o = NestedRole(varNestedRole) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "users") + delete(additionalProperties, "groups") + delete(additionalProperties, "role") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNestedRole struct { + value *NestedRole + isSet bool +} + +func (v NullableNestedRole) Get() *NestedRole { + return v.value +} + +func (v *NullableNestedRole) Set(val *NestedRole) { + v.value = val + v.isSet = true +} + +func (v NullableNestedRole) IsSet() bool { + return v.isSet +} + +func (v *NullableNestedRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNestedRole(val *NestedRole) *NullableNestedRole { + return &NullableNestedRole{value: val, isSet: true} +} + +func (v NullableNestedRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNestedRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_nested_role_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_nested_role_response.go new file mode 100644 index 0000000000..839999aa6e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_nested_role_response.go @@ -0,0 +1,217 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the NestedRoleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NestedRoleResponse{} + +// NestedRoleResponse Serializer to add/remove object roles to/from users/groups. This is used in conjunction with ``pulpcore.app.viewsets.base.RolesMixin`` and requires the underlying object to be passed as ``content_object`` in the context. +type NestedRoleResponse struct { + Users []string `json:"users,omitempty"` + Groups []string `json:"groups,omitempty"` + Role string `json:"role"` + AdditionalProperties map[string]interface{} +} + +type _NestedRoleResponse NestedRoleResponse + +// NewNestedRoleResponse instantiates a new NestedRoleResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNestedRoleResponse(role string) *NestedRoleResponse { + this := NestedRoleResponse{} + this.Role = role + return &this +} + +// NewNestedRoleResponseWithDefaults instantiates a new NestedRoleResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNestedRoleResponseWithDefaults() *NestedRoleResponse { + this := NestedRoleResponse{} + return &this +} + +// GetUsers returns the Users field value if set, zero value otherwise. +func (o *NestedRoleResponse) GetUsers() []string { + if o == nil || IsNil(o.Users) { + var ret []string + return ret + } + return o.Users +} + +// GetUsersOk returns a tuple with the Users field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NestedRoleResponse) GetUsersOk() ([]string, bool) { + if o == nil || IsNil(o.Users) { + return nil, false + } + return o.Users, true +} + +// HasUsers returns a boolean if a field has been set. +func (o *NestedRoleResponse) HasUsers() bool { + if o != nil && !IsNil(o.Users) { + return true + } + + return false +} + +// SetUsers gets a reference to the given []string and assigns it to the Users field. +func (o *NestedRoleResponse) SetUsers(v []string) { + o.Users = v +} + +// GetGroups returns the Groups field value if set, zero value otherwise. +func (o *NestedRoleResponse) GetGroups() []string { + if o == nil || IsNil(o.Groups) { + var ret []string + return ret + } + return o.Groups +} + +// GetGroupsOk returns a tuple with the Groups field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NestedRoleResponse) GetGroupsOk() ([]string, bool) { + if o == nil || IsNil(o.Groups) { + return nil, false + } + return o.Groups, true +} + +// HasGroups returns a boolean if a field has been set. +func (o *NestedRoleResponse) HasGroups() bool { + if o != nil && !IsNil(o.Groups) { + return true + } + + return false +} + +// SetGroups gets a reference to the given []string and assigns it to the Groups field. +func (o *NestedRoleResponse) SetGroups(v []string) { + o.Groups = v +} + +// GetRole returns the Role field value +func (o *NestedRoleResponse) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *NestedRoleResponse) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *NestedRoleResponse) SetRole(v string) { + o.Role = v +} + +func (o NestedRoleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NestedRoleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Users) { + toSerialize["users"] = o.Users + } + if !IsNil(o.Groups) { + toSerialize["groups"] = o.Groups + } + toSerialize["role"] = o.Role + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NestedRoleResponse) UnmarshalJSON(bytes []byte) (err error) { + varNestedRoleResponse := _NestedRoleResponse{} + + if err = json.Unmarshal(bytes, &varNestedRoleResponse); err == nil { + *o = NestedRoleResponse(varNestedRoleResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "users") + delete(additionalProperties, "groups") + delete(additionalProperties, "role") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNestedRoleResponse struct { + value *NestedRoleResponse + isSet bool +} + +func (v NullableNestedRoleResponse) Get() *NestedRoleResponse { + return v.value +} + +func (v *NullableNestedRoleResponse) Set(val *NestedRoleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableNestedRoleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableNestedRoleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNestedRoleResponse(val *NestedRoleResponse) *NullableNestedRoleResponse { + return &NullableNestedRoleResponse{value: val, isSet: true} +} + +func (v NullableNestedRoleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNestedRoleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_object_roles_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_object_roles_response.go new file mode 100644 index 0000000000..d34997ac57 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_object_roles_response.go @@ -0,0 +1,143 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ObjectRolesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ObjectRolesResponse{} + +// ObjectRolesResponse struct for ObjectRolesResponse +type ObjectRolesResponse struct { + Roles []NestedRoleResponse `json:"roles"` + AdditionalProperties map[string]interface{} +} + +type _ObjectRolesResponse ObjectRolesResponse + +// NewObjectRolesResponse instantiates a new ObjectRolesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewObjectRolesResponse(roles []NestedRoleResponse) *ObjectRolesResponse { + this := ObjectRolesResponse{} + this.Roles = roles + return &this +} + +// NewObjectRolesResponseWithDefaults instantiates a new ObjectRolesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewObjectRolesResponseWithDefaults() *ObjectRolesResponse { + this := ObjectRolesResponse{} + return &this +} + +// GetRoles returns the Roles field value +func (o *ObjectRolesResponse) GetRoles() []NestedRoleResponse { + if o == nil { + var ret []NestedRoleResponse + return ret + } + + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value +// and a boolean to check if the value has been set. +func (o *ObjectRolesResponse) GetRolesOk() ([]NestedRoleResponse, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *ObjectRolesResponse) SetRoles(v []NestedRoleResponse) { + o.Roles = v +} + +func (o ObjectRolesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ObjectRolesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["roles"] = o.Roles + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ObjectRolesResponse) UnmarshalJSON(bytes []byte) (err error) { + varObjectRolesResponse := _ObjectRolesResponse{} + + if err = json.Unmarshal(bytes, &varObjectRolesResponse); err == nil { + *o = ObjectRolesResponse(varObjectRolesResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "roles") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableObjectRolesResponse struct { + value *ObjectRolesResponse + isSet bool +} + +func (v NullableObjectRolesResponse) Get() *ObjectRolesResponse { + return v.value +} + +func (v *NullableObjectRolesResponse) Set(val *ObjectRolesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableObjectRolesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableObjectRolesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObjectRolesResponse(val *ObjectRolesResponse) *NullableObjectRolesResponse { + return &NullableObjectRolesResponse{value: val, isSet: true} +} + +func (v NullableObjectRolesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObjectRolesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_oci_build_image.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_oci_build_image.go new file mode 100644 index 0000000000..85b4e135aa --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_oci_build_image.go @@ -0,0 +1,272 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the OCIBuildImage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OCIBuildImage{} + +// OCIBuildImage Serializer for building an OCI container image from a Containerfile. The Containerfile can either be specified via an artifact url, or a new file can be uploaded. A repository must be specified, to which the container image content will be added. +type OCIBuildImage struct { + // Artifact representing the Containerfile that should be used to run podman-build. + ContainerfileArtifact *string `json:"containerfile_artifact,omitempty"` + // An uploaded Containerfile that should be used to run podman-build. + Containerfile **os.File `json:"containerfile,omitempty"` + // A tag name for the new image being built. + Tag *string `json:"tag,omitempty"` + // A JSON string where each key is an artifact href and the value is it's relative path (name) inside the /pulp_working_directory of the build container executing the Containerfile. + Artifacts map[string]interface{} `json:"artifacts,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OCIBuildImage OCIBuildImage + +// NewOCIBuildImage instantiates a new OCIBuildImage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOCIBuildImage() *OCIBuildImage { + this := OCIBuildImage{} + var tag string = "latest" + this.Tag = &tag + return &this +} + +// NewOCIBuildImageWithDefaults instantiates a new OCIBuildImage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOCIBuildImageWithDefaults() *OCIBuildImage { + this := OCIBuildImage{} + var tag string = "latest" + this.Tag = &tag + return &this +} + +// GetContainerfileArtifact returns the ContainerfileArtifact field value if set, zero value otherwise. +func (o *OCIBuildImage) GetContainerfileArtifact() string { + if o == nil || IsNil(o.ContainerfileArtifact) { + var ret string + return ret + } + return *o.ContainerfileArtifact +} + +// GetContainerfileArtifactOk returns a tuple with the ContainerfileArtifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OCIBuildImage) GetContainerfileArtifactOk() (*string, bool) { + if o == nil || IsNil(o.ContainerfileArtifact) { + return nil, false + } + return o.ContainerfileArtifact, true +} + +// HasContainerfileArtifact returns a boolean if a field has been set. +func (o *OCIBuildImage) HasContainerfileArtifact() bool { + if o != nil && !IsNil(o.ContainerfileArtifact) { + return true + } + + return false +} + +// SetContainerfileArtifact gets a reference to the given string and assigns it to the ContainerfileArtifact field. +func (o *OCIBuildImage) SetContainerfileArtifact(v string) { + o.ContainerfileArtifact = &v +} + +// GetContainerfile returns the Containerfile field value if set, zero value otherwise. +func (o *OCIBuildImage) GetContainerfile() *os.File { + if o == nil || IsNil(o.Containerfile) { + var ret *os.File + return ret + } + return *o.Containerfile +} + +// GetContainerfileOk returns a tuple with the Containerfile field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OCIBuildImage) GetContainerfileOk() (**os.File, bool) { + if o == nil || IsNil(o.Containerfile) { + return nil, false + } + return o.Containerfile, true +} + +// HasContainerfile returns a boolean if a field has been set. +func (o *OCIBuildImage) HasContainerfile() bool { + if o != nil && !IsNil(o.Containerfile) { + return true + } + + return false +} + +// SetContainerfile gets a reference to the given *os.File and assigns it to the Containerfile field. +func (o *OCIBuildImage) SetContainerfile(v *os.File) { + o.Containerfile = &v +} + +// GetTag returns the Tag field value if set, zero value otherwise. +func (o *OCIBuildImage) GetTag() string { + if o == nil || IsNil(o.Tag) { + var ret string + return ret + } + return *o.Tag +} + +// GetTagOk returns a tuple with the Tag field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OCIBuildImage) GetTagOk() (*string, bool) { + if o == nil || IsNil(o.Tag) { + return nil, false + } + return o.Tag, true +} + +// HasTag returns a boolean if a field has been set. +func (o *OCIBuildImage) HasTag() bool { + if o != nil && !IsNil(o.Tag) { + return true + } + + return false +} + +// SetTag gets a reference to the given string and assigns it to the Tag field. +func (o *OCIBuildImage) SetTag(v string) { + o.Tag = &v +} + +// GetArtifacts returns the Artifacts field value if set, zero value otherwise. +func (o *OCIBuildImage) GetArtifacts() map[string]interface{} { + if o == nil || IsNil(o.Artifacts) { + var ret map[string]interface{} + return ret + } + return o.Artifacts +} + +// GetArtifactsOk returns a tuple with the Artifacts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OCIBuildImage) GetArtifactsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Artifacts) { + return map[string]interface{}{}, false + } + return o.Artifacts, true +} + +// HasArtifacts returns a boolean if a field has been set. +func (o *OCIBuildImage) HasArtifacts() bool { + if o != nil && !IsNil(o.Artifacts) { + return true + } + + return false +} + +// SetArtifacts gets a reference to the given map[string]interface{} and assigns it to the Artifacts field. +func (o *OCIBuildImage) SetArtifacts(v map[string]interface{}) { + o.Artifacts = v +} + +func (o OCIBuildImage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OCIBuildImage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ContainerfileArtifact) { + toSerialize["containerfile_artifact"] = o.ContainerfileArtifact + } + if !IsNil(o.Containerfile) { + toSerialize["containerfile"] = o.Containerfile + } + if !IsNil(o.Tag) { + toSerialize["tag"] = o.Tag + } + if !IsNil(o.Artifacts) { + toSerialize["artifacts"] = o.Artifacts + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OCIBuildImage) UnmarshalJSON(bytes []byte) (err error) { + varOCIBuildImage := _OCIBuildImage{} + + if err = json.Unmarshal(bytes, &varOCIBuildImage); err == nil { + *o = OCIBuildImage(varOCIBuildImage) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "containerfile_artifact") + delete(additionalProperties, "containerfile") + delete(additionalProperties, "tag") + delete(additionalProperties, "artifacts") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOCIBuildImage struct { + value *OCIBuildImage + isSet bool +} + +func (v NullableOCIBuildImage) Get() *OCIBuildImage { + return v.value +} + +func (v *NullableOCIBuildImage) Set(val *OCIBuildImage) { + v.value = val + v.isSet = true +} + +func (v NullableOCIBuildImage) IsSet() bool { + return v.isSet +} + +func (v *NullableOCIBuildImage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOCIBuildImage(val *OCIBuildImage) *NullableOCIBuildImage { + return &NullableOCIBuildImage{value: val, isSet: true} +} + +func (v NullableOCIBuildImage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOCIBuildImage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_orphans_cleanup.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_orphans_cleanup.go new file mode 100644 index 0000000000..f8d4554027 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_orphans_cleanup.go @@ -0,0 +1,201 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the OrphansCleanup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrphansCleanup{} + +// OrphansCleanup struct for OrphansCleanup +type OrphansCleanup struct { + // Will delete specified content and associated Artifacts if they are orphans. + ContentHrefs []interface{} `json:"content_hrefs,omitempty"` + // The time in minutes for how long Pulp will hold orphan Content and Artifacts before they become candidates for deletion by this orphan cleanup task. This should ideally be longer than your longest running task otherwise any content created during that task could be cleaned up before the task finishes. If not specified, a default value is taken from the setting ORPHAN_PROTECTION_TIME. + OrphanProtectionTime NullableInt64 `json:"orphan_protection_time,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OrphansCleanup OrphansCleanup + +// NewOrphansCleanup instantiates a new OrphansCleanup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrphansCleanup() *OrphansCleanup { + this := OrphansCleanup{} + return &this +} + +// NewOrphansCleanupWithDefaults instantiates a new OrphansCleanup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrphansCleanupWithDefaults() *OrphansCleanup { + this := OrphansCleanup{} + return &this +} + +// GetContentHrefs returns the ContentHrefs field value if set, zero value otherwise. +func (o *OrphansCleanup) GetContentHrefs() []interface{} { + if o == nil || IsNil(o.ContentHrefs) { + var ret []interface{} + return ret + } + return o.ContentHrefs +} + +// GetContentHrefsOk returns a tuple with the ContentHrefs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrphansCleanup) GetContentHrefsOk() ([]interface{}, bool) { + if o == nil || IsNil(o.ContentHrefs) { + return nil, false + } + return o.ContentHrefs, true +} + +// HasContentHrefs returns a boolean if a field has been set. +func (o *OrphansCleanup) HasContentHrefs() bool { + if o != nil && !IsNil(o.ContentHrefs) { + return true + } + + return false +} + +// SetContentHrefs gets a reference to the given []interface{} and assigns it to the ContentHrefs field. +func (o *OrphansCleanup) SetContentHrefs(v []interface{}) { + o.ContentHrefs = v +} + +// GetOrphanProtectionTime returns the OrphanProtectionTime field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrphansCleanup) GetOrphanProtectionTime() int64 { + if o == nil || IsNil(o.OrphanProtectionTime.Get()) { + var ret int64 + return ret + } + return *o.OrphanProtectionTime.Get() +} + +// GetOrphanProtectionTimeOk returns a tuple with the OrphanProtectionTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrphansCleanup) GetOrphanProtectionTimeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.OrphanProtectionTime.Get(), o.OrphanProtectionTime.IsSet() +} + +// HasOrphanProtectionTime returns a boolean if a field has been set. +func (o *OrphansCleanup) HasOrphanProtectionTime() bool { + if o != nil && o.OrphanProtectionTime.IsSet() { + return true + } + + return false +} + +// SetOrphanProtectionTime gets a reference to the given NullableInt64 and assigns it to the OrphanProtectionTime field. +func (o *OrphansCleanup) SetOrphanProtectionTime(v int64) { + o.OrphanProtectionTime.Set(&v) +} +// SetOrphanProtectionTimeNil sets the value for OrphanProtectionTime to be an explicit nil +func (o *OrphansCleanup) SetOrphanProtectionTimeNil() { + o.OrphanProtectionTime.Set(nil) +} + +// UnsetOrphanProtectionTime ensures that no value is present for OrphanProtectionTime, not even an explicit nil +func (o *OrphansCleanup) UnsetOrphanProtectionTime() { + o.OrphanProtectionTime.Unset() +} + +func (o OrphansCleanup) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrphansCleanup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ContentHrefs) { + toSerialize["content_hrefs"] = o.ContentHrefs + } + if o.OrphanProtectionTime.IsSet() { + toSerialize["orphan_protection_time"] = o.OrphanProtectionTime.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OrphansCleanup) UnmarshalJSON(bytes []byte) (err error) { + varOrphansCleanup := _OrphansCleanup{} + + if err = json.Unmarshal(bytes, &varOrphansCleanup); err == nil { + *o = OrphansCleanup(varOrphansCleanup) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "content_hrefs") + delete(additionalProperties, "orphan_protection_time") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOrphansCleanup struct { + value *OrphansCleanup + isSet bool +} + +func (v NullableOrphansCleanup) Get() *OrphansCleanup { + return v.value +} + +func (v *NullableOrphansCleanup) Set(val *OrphansCleanup) { + v.value = val + v.isSet = true +} + +func (v NullableOrphansCleanup) IsSet() bool { + return v.isSet +} + +func (v *NullableOrphansCleanup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrphansCleanup(val *OrphansCleanup) *NullableOrphansCleanup { + return &NullableOrphansCleanup{value: val, isSet: true} +} + +func (v NullableOrphansCleanup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrphansCleanup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_import_all.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_import_all.go new file mode 100644 index 0000000000..c1ba66a008 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_import_all.go @@ -0,0 +1,173 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the OstreeImportAll type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeImportAll{} + +// OstreeImportAll A Serializer class for importing all refs and commits to a repository. +type OstreeImportAll struct { + // An artifact representing OSTree content compressed as a tarball. + Artifact string `json:"artifact"` + // The name of a repository that contains the compressed OSTree content. + RepositoryName string `json:"repository_name"` + AdditionalProperties map[string]interface{} +} + +type _OstreeImportAll OstreeImportAll + +// NewOstreeImportAll instantiates a new OstreeImportAll object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeImportAll(artifact string, repositoryName string) *OstreeImportAll { + this := OstreeImportAll{} + this.Artifact = artifact + this.RepositoryName = repositoryName + return &this +} + +// NewOstreeImportAllWithDefaults instantiates a new OstreeImportAll object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeImportAllWithDefaults() *OstreeImportAll { + this := OstreeImportAll{} + return &this +} + +// GetArtifact returns the Artifact field value +func (o *OstreeImportAll) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *OstreeImportAll) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *OstreeImportAll) SetArtifact(v string) { + o.Artifact = v +} + +// GetRepositoryName returns the RepositoryName field value +func (o *OstreeImportAll) GetRepositoryName() string { + if o == nil { + var ret string + return ret + } + + return o.RepositoryName +} + +// GetRepositoryNameOk returns a tuple with the RepositoryName field value +// and a boolean to check if the value has been set. +func (o *OstreeImportAll) GetRepositoryNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RepositoryName, true +} + +// SetRepositoryName sets field value +func (o *OstreeImportAll) SetRepositoryName(v string) { + o.RepositoryName = v +} + +func (o OstreeImportAll) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeImportAll) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["artifact"] = o.Artifact + toSerialize["repository_name"] = o.RepositoryName + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeImportAll) UnmarshalJSON(bytes []byte) (err error) { + varOstreeImportAll := _OstreeImportAll{} + + if err = json.Unmarshal(bytes, &varOstreeImportAll); err == nil { + *o = OstreeImportAll(varOstreeImportAll) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "artifact") + delete(additionalProperties, "repository_name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeImportAll struct { + value *OstreeImportAll + isSet bool +} + +func (v NullableOstreeImportAll) Get() *OstreeImportAll { + return v.value +} + +func (v *NullableOstreeImportAll) Set(val *OstreeImportAll) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeImportAll) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeImportAll) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeImportAll(val *OstreeImportAll) *NullableOstreeImportAll { + return &NullableOstreeImportAll{value: val, isSet: true} +} + +func (v NullableOstreeImportAll) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeImportAll) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_import_commits_to_ref.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_import_commits_to_ref.go new file mode 100644 index 0000000000..231da38db1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_import_commits_to_ref.go @@ -0,0 +1,202 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the OstreeImportCommitsToRef type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeImportCommitsToRef{} + +// OstreeImportCommitsToRef A Serializer class for appending child commits to a repository. +type OstreeImportCommitsToRef struct { + // An artifact representing OSTree content compressed as a tarball. + Artifact string `json:"artifact"` + // The name of a repository that contains the compressed OSTree content. + RepositoryName string `json:"repository_name"` + // The name of a ref branch that holds the reference to the last commit. + Ref string `json:"ref"` + AdditionalProperties map[string]interface{} +} + +type _OstreeImportCommitsToRef OstreeImportCommitsToRef + +// NewOstreeImportCommitsToRef instantiates a new OstreeImportCommitsToRef object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeImportCommitsToRef(artifact string, repositoryName string, ref string) *OstreeImportCommitsToRef { + this := OstreeImportCommitsToRef{} + this.Artifact = artifact + this.RepositoryName = repositoryName + this.Ref = ref + return &this +} + +// NewOstreeImportCommitsToRefWithDefaults instantiates a new OstreeImportCommitsToRef object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeImportCommitsToRefWithDefaults() *OstreeImportCommitsToRef { + this := OstreeImportCommitsToRef{} + return &this +} + +// GetArtifact returns the Artifact field value +func (o *OstreeImportCommitsToRef) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *OstreeImportCommitsToRef) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *OstreeImportCommitsToRef) SetArtifact(v string) { + o.Artifact = v +} + +// GetRepositoryName returns the RepositoryName field value +func (o *OstreeImportCommitsToRef) GetRepositoryName() string { + if o == nil { + var ret string + return ret + } + + return o.RepositoryName +} + +// GetRepositoryNameOk returns a tuple with the RepositoryName field value +// and a boolean to check if the value has been set. +func (o *OstreeImportCommitsToRef) GetRepositoryNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RepositoryName, true +} + +// SetRepositoryName sets field value +func (o *OstreeImportCommitsToRef) SetRepositoryName(v string) { + o.RepositoryName = v +} + +// GetRef returns the Ref field value +func (o *OstreeImportCommitsToRef) GetRef() string { + if o == nil { + var ret string + return ret + } + + return o.Ref +} + +// GetRefOk returns a tuple with the Ref field value +// and a boolean to check if the value has been set. +func (o *OstreeImportCommitsToRef) GetRefOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Ref, true +} + +// SetRef sets field value +func (o *OstreeImportCommitsToRef) SetRef(v string) { + o.Ref = v +} + +func (o OstreeImportCommitsToRef) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeImportCommitsToRef) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["artifact"] = o.Artifact + toSerialize["repository_name"] = o.RepositoryName + toSerialize["ref"] = o.Ref + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeImportCommitsToRef) UnmarshalJSON(bytes []byte) (err error) { + varOstreeImportCommitsToRef := _OstreeImportCommitsToRef{} + + if err = json.Unmarshal(bytes, &varOstreeImportCommitsToRef); err == nil { + *o = OstreeImportCommitsToRef(varOstreeImportCommitsToRef) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "artifact") + delete(additionalProperties, "repository_name") + delete(additionalProperties, "ref") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeImportCommitsToRef struct { + value *OstreeImportCommitsToRef + isSet bool +} + +func (v NullableOstreeImportCommitsToRef) Get() *OstreeImportCommitsToRef { + return v.value +} + +func (v *NullableOstreeImportCommitsToRef) Set(val *OstreeImportCommitsToRef) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeImportCommitsToRef) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeImportCommitsToRef) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeImportCommitsToRef(val *OstreeImportCommitsToRef) *NullableOstreeImportCommitsToRef { + return &NullableOstreeImportCommitsToRef{value: val, isSet: true} +} + +func (v NullableOstreeImportCommitsToRef) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeImportCommitsToRef) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_commit_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_commit_response.go new file mode 100644 index 0000000000..b0b2ab3f9e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_commit_response.go @@ -0,0 +1,352 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the OstreeOstreeCommitResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeOstreeCommitResponse{} + +// OstreeOstreeCommitResponse A Serializer class for OSTree commits. +type OstreeOstreeCommitResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact string `json:"artifact"` + // Path where the artifact is located relative to distributions base_path + RelativePath string `json:"relative_path"` + ParentCommit NullableString `json:"parent_commit,omitempty"` + Checksum string `json:"checksum"` + Objs []string `json:"objs"` + AdditionalProperties map[string]interface{} +} + +type _OstreeOstreeCommitResponse OstreeOstreeCommitResponse + +// NewOstreeOstreeCommitResponse instantiates a new OstreeOstreeCommitResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeOstreeCommitResponse(artifact string, relativePath string, checksum string, objs []string) *OstreeOstreeCommitResponse { + this := OstreeOstreeCommitResponse{} + this.Artifact = artifact + this.RelativePath = relativePath + this.Checksum = checksum + this.Objs = objs + return &this +} + +// NewOstreeOstreeCommitResponseWithDefaults instantiates a new OstreeOstreeCommitResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeOstreeCommitResponseWithDefaults() *OstreeOstreeCommitResponse { + this := OstreeOstreeCommitResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *OstreeOstreeCommitResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeCommitResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *OstreeOstreeCommitResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *OstreeOstreeCommitResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *OstreeOstreeCommitResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeCommitResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *OstreeOstreeCommitResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *OstreeOstreeCommitResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value +func (o *OstreeOstreeCommitResponse) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeCommitResponse) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *OstreeOstreeCommitResponse) SetArtifact(v string) { + o.Artifact = v +} + +// GetRelativePath returns the RelativePath field value +func (o *OstreeOstreeCommitResponse) GetRelativePath() string { + if o == nil { + var ret string + return ret + } + + return o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeCommitResponse) GetRelativePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RelativePath, true +} + +// SetRelativePath sets field value +func (o *OstreeOstreeCommitResponse) SetRelativePath(v string) { + o.RelativePath = v +} + +// GetParentCommit returns the ParentCommit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeCommitResponse) GetParentCommit() string { + if o == nil || IsNil(o.ParentCommit.Get()) { + var ret string + return ret + } + return *o.ParentCommit.Get() +} + +// GetParentCommitOk returns a tuple with the ParentCommit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeCommitResponse) GetParentCommitOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ParentCommit.Get(), o.ParentCommit.IsSet() +} + +// HasParentCommit returns a boolean if a field has been set. +func (o *OstreeOstreeCommitResponse) HasParentCommit() bool { + if o != nil && o.ParentCommit.IsSet() { + return true + } + + return false +} + +// SetParentCommit gets a reference to the given NullableString and assigns it to the ParentCommit field. +func (o *OstreeOstreeCommitResponse) SetParentCommit(v string) { + o.ParentCommit.Set(&v) +} +// SetParentCommitNil sets the value for ParentCommit to be an explicit nil +func (o *OstreeOstreeCommitResponse) SetParentCommitNil() { + o.ParentCommit.Set(nil) +} + +// UnsetParentCommit ensures that no value is present for ParentCommit, not even an explicit nil +func (o *OstreeOstreeCommitResponse) UnsetParentCommit() { + o.ParentCommit.Unset() +} + +// GetChecksum returns the Checksum field value +func (o *OstreeOstreeCommitResponse) GetChecksum() string { + if o == nil { + var ret string + return ret + } + + return o.Checksum +} + +// GetChecksumOk returns a tuple with the Checksum field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeCommitResponse) GetChecksumOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Checksum, true +} + +// SetChecksum sets field value +func (o *OstreeOstreeCommitResponse) SetChecksum(v string) { + o.Checksum = v +} + +// GetObjs returns the Objs field value +func (o *OstreeOstreeCommitResponse) GetObjs() []string { + if o == nil { + var ret []string + return ret + } + + return o.Objs +} + +// GetObjsOk returns a tuple with the Objs field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeCommitResponse) GetObjsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Objs, true +} + +// SetObjs sets field value +func (o *OstreeOstreeCommitResponse) SetObjs(v []string) { + o.Objs = v +} + +func (o OstreeOstreeCommitResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeOstreeCommitResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifact"] = o.Artifact + toSerialize["relative_path"] = o.RelativePath + if o.ParentCommit.IsSet() { + toSerialize["parent_commit"] = o.ParentCommit.Get() + } + toSerialize["checksum"] = o.Checksum + toSerialize["objs"] = o.Objs + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeOstreeCommitResponse) UnmarshalJSON(bytes []byte) (err error) { + varOstreeOstreeCommitResponse := _OstreeOstreeCommitResponse{} + + if err = json.Unmarshal(bytes, &varOstreeOstreeCommitResponse); err == nil { + *o = OstreeOstreeCommitResponse(varOstreeOstreeCommitResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "parent_commit") + delete(additionalProperties, "checksum") + delete(additionalProperties, "objs") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeOstreeCommitResponse struct { + value *OstreeOstreeCommitResponse + isSet bool +} + +func (v NullableOstreeOstreeCommitResponse) Get() *OstreeOstreeCommitResponse { + return v.value +} + +func (v *NullableOstreeOstreeCommitResponse) Set(val *OstreeOstreeCommitResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeOstreeCommitResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeOstreeCommitResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeOstreeCommitResponse(val *OstreeOstreeCommitResponse) *NullableOstreeOstreeCommitResponse { + return &NullableOstreeOstreeCommitResponse{value: val, isSet: true} +} + +func (v NullableOstreeOstreeCommitResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeOstreeCommitResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_config_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_config_response.go new file mode 100644 index 0000000000..4526c33c01 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_config_response.go @@ -0,0 +1,249 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the OstreeOstreeConfigResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeOstreeConfigResponse{} + +// OstreeOstreeConfigResponse A Serializer class for OSTree repository configuration files. +type OstreeOstreeConfigResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact string `json:"artifact"` + // Path where the artifact is located relative to distributions base_path + RelativePath string `json:"relative_path"` + AdditionalProperties map[string]interface{} +} + +type _OstreeOstreeConfigResponse OstreeOstreeConfigResponse + +// NewOstreeOstreeConfigResponse instantiates a new OstreeOstreeConfigResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeOstreeConfigResponse(artifact string, relativePath string) *OstreeOstreeConfigResponse { + this := OstreeOstreeConfigResponse{} + this.Artifact = artifact + this.RelativePath = relativePath + return &this +} + +// NewOstreeOstreeConfigResponseWithDefaults instantiates a new OstreeOstreeConfigResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeOstreeConfigResponseWithDefaults() *OstreeOstreeConfigResponse { + this := OstreeOstreeConfigResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *OstreeOstreeConfigResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeConfigResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *OstreeOstreeConfigResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *OstreeOstreeConfigResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *OstreeOstreeConfigResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeConfigResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *OstreeOstreeConfigResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *OstreeOstreeConfigResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value +func (o *OstreeOstreeConfigResponse) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeConfigResponse) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *OstreeOstreeConfigResponse) SetArtifact(v string) { + o.Artifact = v +} + +// GetRelativePath returns the RelativePath field value +func (o *OstreeOstreeConfigResponse) GetRelativePath() string { + if o == nil { + var ret string + return ret + } + + return o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeConfigResponse) GetRelativePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RelativePath, true +} + +// SetRelativePath sets field value +func (o *OstreeOstreeConfigResponse) SetRelativePath(v string) { + o.RelativePath = v +} + +func (o OstreeOstreeConfigResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeOstreeConfigResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifact"] = o.Artifact + toSerialize["relative_path"] = o.RelativePath + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeOstreeConfigResponse) UnmarshalJSON(bytes []byte) (err error) { + varOstreeOstreeConfigResponse := _OstreeOstreeConfigResponse{} + + if err = json.Unmarshal(bytes, &varOstreeOstreeConfigResponse); err == nil { + *o = OstreeOstreeConfigResponse(varOstreeOstreeConfigResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeOstreeConfigResponse struct { + value *OstreeOstreeConfigResponse + isSet bool +} + +func (v NullableOstreeOstreeConfigResponse) Get() *OstreeOstreeConfigResponse { + return v.value +} + +func (v *NullableOstreeOstreeConfigResponse) Set(val *OstreeOstreeConfigResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeOstreeConfigResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeOstreeConfigResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeOstreeConfigResponse(val *OstreeOstreeConfigResponse) *NullableOstreeOstreeConfigResponse { + return &NullableOstreeOstreeConfigResponse{value: val, isSet: true} +} + +func (v NullableOstreeOstreeConfigResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeOstreeConfigResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_content_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_content_response.go new file mode 100644 index 0000000000..855c7a9ee8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_content_response.go @@ -0,0 +1,276 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the OstreeOstreeContentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeOstreeContentResponse{} + +// OstreeOstreeContentResponse A Serializer class for uncategorized content units (e.g., static deltas). +type OstreeOstreeContentResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact string `json:"artifact"` + RelativePath string `json:"relative_path"` + Digest string `json:"digest"` + AdditionalProperties map[string]interface{} +} + +type _OstreeOstreeContentResponse OstreeOstreeContentResponse + +// NewOstreeOstreeContentResponse instantiates a new OstreeOstreeContentResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeOstreeContentResponse(artifact string, relativePath string, digest string) *OstreeOstreeContentResponse { + this := OstreeOstreeContentResponse{} + this.Artifact = artifact + this.RelativePath = relativePath + this.Digest = digest + return &this +} + +// NewOstreeOstreeContentResponseWithDefaults instantiates a new OstreeOstreeContentResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeOstreeContentResponseWithDefaults() *OstreeOstreeContentResponse { + this := OstreeOstreeContentResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *OstreeOstreeContentResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeContentResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *OstreeOstreeContentResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *OstreeOstreeContentResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *OstreeOstreeContentResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeContentResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *OstreeOstreeContentResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *OstreeOstreeContentResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value +func (o *OstreeOstreeContentResponse) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeContentResponse) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *OstreeOstreeContentResponse) SetArtifact(v string) { + o.Artifact = v +} + +// GetRelativePath returns the RelativePath field value +func (o *OstreeOstreeContentResponse) GetRelativePath() string { + if o == nil { + var ret string + return ret + } + + return o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeContentResponse) GetRelativePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RelativePath, true +} + +// SetRelativePath sets field value +func (o *OstreeOstreeContentResponse) SetRelativePath(v string) { + o.RelativePath = v +} + +// GetDigest returns the Digest field value +func (o *OstreeOstreeContentResponse) GetDigest() string { + if o == nil { + var ret string + return ret + } + + return o.Digest +} + +// GetDigestOk returns a tuple with the Digest field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeContentResponse) GetDigestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Digest, true +} + +// SetDigest sets field value +func (o *OstreeOstreeContentResponse) SetDigest(v string) { + o.Digest = v +} + +func (o OstreeOstreeContentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeOstreeContentResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifact"] = o.Artifact + toSerialize["relative_path"] = o.RelativePath + toSerialize["digest"] = o.Digest + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeOstreeContentResponse) UnmarshalJSON(bytes []byte) (err error) { + varOstreeOstreeContentResponse := _OstreeOstreeContentResponse{} + + if err = json.Unmarshal(bytes, &varOstreeOstreeContentResponse); err == nil { + *o = OstreeOstreeContentResponse(varOstreeOstreeContentResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "digest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeOstreeContentResponse struct { + value *OstreeOstreeContentResponse + isSet bool +} + +func (v NullableOstreeOstreeContentResponse) Get() *OstreeOstreeContentResponse { + return v.value +} + +func (v *NullableOstreeOstreeContentResponse) Set(val *OstreeOstreeContentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeOstreeContentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeOstreeContentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeOstreeContentResponse(val *OstreeOstreeContentResponse) *NullableOstreeOstreeContentResponse { + return &NullableOstreeOstreeContentResponse{value: val, isSet: true} +} + +func (v NullableOstreeOstreeContentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeOstreeContentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_distribution.go new file mode 100644 index 0000000000..fe8adc9ccc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_distribution.go @@ -0,0 +1,396 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the OstreeOstreeDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeOstreeDistribution{} + +// OstreeOstreeDistribution A Serializer class for an OSTree distribution. +type OstreeOstreeDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // RepositoryVersion to be served + RepositoryVersion NullableString `json:"repository_version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OstreeOstreeDistribution OstreeOstreeDistribution + +// NewOstreeOstreeDistribution instantiates a new OstreeOstreeDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeOstreeDistribution(basePath string, name string) *OstreeOstreeDistribution { + this := OstreeOstreeDistribution{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + return &this +} + +// NewOstreeOstreeDistributionWithDefaults instantiates a new OstreeOstreeDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeOstreeDistributionWithDefaults() *OstreeOstreeDistribution { + this := OstreeOstreeDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value +func (o *OstreeOstreeDistribution) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeDistribution) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *OstreeOstreeDistribution) SetBasePath(v string) { + o.BasePath = v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *OstreeOstreeDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *OstreeOstreeDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *OstreeOstreeDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *OstreeOstreeDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *OstreeOstreeDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *OstreeOstreeDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *OstreeOstreeDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *OstreeOstreeDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *OstreeOstreeDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *OstreeOstreeDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *OstreeOstreeDistribution) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeDistribution) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *OstreeOstreeDistribution) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *OstreeOstreeDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *OstreeOstreeDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *OstreeOstreeDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *OstreeOstreeDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeDistribution) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion.Get()) { + var ret string + return ret + } + return *o.RepositoryVersion.Get() +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeDistribution) GetRepositoryVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RepositoryVersion.Get(), o.RepositoryVersion.IsSet() +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *OstreeOstreeDistribution) HasRepositoryVersion() bool { + if o != nil && o.RepositoryVersion.IsSet() { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given NullableString and assigns it to the RepositoryVersion field. +func (o *OstreeOstreeDistribution) SetRepositoryVersion(v string) { + o.RepositoryVersion.Set(&v) +} +// SetRepositoryVersionNil sets the value for RepositoryVersion to be an explicit nil +func (o *OstreeOstreeDistribution) SetRepositoryVersionNil() { + o.RepositoryVersion.Set(nil) +} + +// UnsetRepositoryVersion ensures that no value is present for RepositoryVersion, not even an explicit nil +func (o *OstreeOstreeDistribution) UnsetRepositoryVersion() { + o.RepositoryVersion.Unset() +} + +func (o OstreeOstreeDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeOstreeDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["base_path"] = o.BasePath + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.RepositoryVersion.IsSet() { + toSerialize["repository_version"] = o.RepositoryVersion.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeOstreeDistribution) UnmarshalJSON(bytes []byte) (err error) { + varOstreeOstreeDistribution := _OstreeOstreeDistribution{} + + if err = json.Unmarshal(bytes, &varOstreeOstreeDistribution); err == nil { + *o = OstreeOstreeDistribution(varOstreeOstreeDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "repository_version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeOstreeDistribution struct { + value *OstreeOstreeDistribution + isSet bool +} + +func (v NullableOstreeOstreeDistribution) Get() *OstreeOstreeDistribution { + return v.value +} + +func (v *NullableOstreeOstreeDistribution) Set(val *OstreeOstreeDistribution) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeOstreeDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeOstreeDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeOstreeDistribution(val *OstreeOstreeDistribution) *NullableOstreeOstreeDistribution { + return &NullableOstreeOstreeDistribution{value: val, isSet: true} +} + +func (v NullableOstreeOstreeDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeOstreeDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_distribution_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_distribution_response.go new file mode 100644 index 0000000000..ac98cd1e5c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_distribution_response.go @@ -0,0 +1,510 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the OstreeOstreeDistributionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeOstreeDistributionResponse{} + +// OstreeOstreeDistributionResponse A Serializer class for an OSTree distribution. +type OstreeOstreeDistributionResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // The URL for accessing the publication as defined by this distribution. + BaseUrl *string `json:"base_url,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // RepositoryVersion to be served + RepositoryVersion NullableString `json:"repository_version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OstreeOstreeDistributionResponse OstreeOstreeDistributionResponse + +// NewOstreeOstreeDistributionResponse instantiates a new OstreeOstreeDistributionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeOstreeDistributionResponse(basePath string, name string) *OstreeOstreeDistributionResponse { + this := OstreeOstreeDistributionResponse{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + return &this +} + +// NewOstreeOstreeDistributionResponseWithDefaults instantiates a new OstreeOstreeDistributionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeOstreeDistributionResponseWithDefaults() *OstreeOstreeDistributionResponse { + this := OstreeOstreeDistributionResponse{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *OstreeOstreeDistributionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeDistributionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *OstreeOstreeDistributionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *OstreeOstreeDistributionResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *OstreeOstreeDistributionResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeDistributionResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *OstreeOstreeDistributionResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *OstreeOstreeDistributionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetBasePath returns the BasePath field value +func (o *OstreeOstreeDistributionResponse) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeDistributionResponse) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *OstreeOstreeDistributionResponse) SetBasePath(v string) { + o.BasePath = v +} + +// GetBaseUrl returns the BaseUrl field value if set, zero value otherwise. +func (o *OstreeOstreeDistributionResponse) GetBaseUrl() string { + if o == nil || IsNil(o.BaseUrl) { + var ret string + return ret + } + return *o.BaseUrl +} + +// GetBaseUrlOk returns a tuple with the BaseUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeDistributionResponse) GetBaseUrlOk() (*string, bool) { + if o == nil || IsNil(o.BaseUrl) { + return nil, false + } + return o.BaseUrl, true +} + +// HasBaseUrl returns a boolean if a field has been set. +func (o *OstreeOstreeDistributionResponse) HasBaseUrl() bool { + if o != nil && !IsNil(o.BaseUrl) { + return true + } + + return false +} + +// SetBaseUrl gets a reference to the given string and assigns it to the BaseUrl field. +func (o *OstreeOstreeDistributionResponse) SetBaseUrl(v string) { + o.BaseUrl = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeDistributionResponse) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeDistributionResponse) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *OstreeOstreeDistributionResponse) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *OstreeOstreeDistributionResponse) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *OstreeOstreeDistributionResponse) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *OstreeOstreeDistributionResponse) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *OstreeOstreeDistributionResponse) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeDistributionResponse) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *OstreeOstreeDistributionResponse) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *OstreeOstreeDistributionResponse) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *OstreeOstreeDistributionResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *OstreeOstreeDistributionResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *OstreeOstreeDistributionResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *OstreeOstreeDistributionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeDistributionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *OstreeOstreeDistributionResponse) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeDistributionResponse) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeDistributionResponse) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *OstreeOstreeDistributionResponse) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *OstreeOstreeDistributionResponse) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *OstreeOstreeDistributionResponse) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *OstreeOstreeDistributionResponse) UnsetRepository() { + o.Repository.Unset() +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeDistributionResponse) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion.Get()) { + var ret string + return ret + } + return *o.RepositoryVersion.Get() +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeDistributionResponse) GetRepositoryVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RepositoryVersion.Get(), o.RepositoryVersion.IsSet() +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *OstreeOstreeDistributionResponse) HasRepositoryVersion() bool { + if o != nil && o.RepositoryVersion.IsSet() { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given NullableString and assigns it to the RepositoryVersion field. +func (o *OstreeOstreeDistributionResponse) SetRepositoryVersion(v string) { + o.RepositoryVersion.Set(&v) +} +// SetRepositoryVersionNil sets the value for RepositoryVersion to be an explicit nil +func (o *OstreeOstreeDistributionResponse) SetRepositoryVersionNil() { + o.RepositoryVersion.Set(nil) +} + +// UnsetRepositoryVersion ensures that no value is present for RepositoryVersion, not even an explicit nil +func (o *OstreeOstreeDistributionResponse) UnsetRepositoryVersion() { + o.RepositoryVersion.Unset() +} + +func (o OstreeOstreeDistributionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeOstreeDistributionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["base_path"] = o.BasePath + if !IsNil(o.BaseUrl) { + toSerialize["base_url"] = o.BaseUrl + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.RepositoryVersion.IsSet() { + toSerialize["repository_version"] = o.RepositoryVersion.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeOstreeDistributionResponse) UnmarshalJSON(bytes []byte) (err error) { + varOstreeOstreeDistributionResponse := _OstreeOstreeDistributionResponse{} + + if err = json.Unmarshal(bytes, &varOstreeOstreeDistributionResponse); err == nil { + *o = OstreeOstreeDistributionResponse(varOstreeOstreeDistributionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "base_path") + delete(additionalProperties, "base_url") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "repository_version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeOstreeDistributionResponse struct { + value *OstreeOstreeDistributionResponse + isSet bool +} + +func (v NullableOstreeOstreeDistributionResponse) Get() *OstreeOstreeDistributionResponse { + return v.value +} + +func (v *NullableOstreeOstreeDistributionResponse) Set(val *OstreeOstreeDistributionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeOstreeDistributionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeOstreeDistributionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeOstreeDistributionResponse(val *OstreeOstreeDistributionResponse) *NullableOstreeOstreeDistributionResponse { + return &NullableOstreeOstreeDistributionResponse{value: val, isSet: true} +} + +func (v NullableOstreeOstreeDistributionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeOstreeDistributionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_object_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_object_response.go new file mode 100644 index 0000000000..5468a28a4e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_object_response.go @@ -0,0 +1,306 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the OstreeOstreeObjectResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeOstreeObjectResponse{} + +// OstreeOstreeObjectResponse A Serializer class for OSTree objects (e.g., dirtree, dirmeta, file). +type OstreeOstreeObjectResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact string `json:"artifact"` + // Path where the artifact is located relative to distributions base_path + RelativePath string `json:"relative_path"` + Checksum string `json:"checksum"` + // The type of an object. All values are described by the mapping declared at https://lazka.github.io/pgi-docs/OSTree-1.0/enums.html#OSTree.ObjectType + Typ int64 `json:"typ"` + AdditionalProperties map[string]interface{} +} + +type _OstreeOstreeObjectResponse OstreeOstreeObjectResponse + +// NewOstreeOstreeObjectResponse instantiates a new OstreeOstreeObjectResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeOstreeObjectResponse(artifact string, relativePath string, checksum string, typ int64) *OstreeOstreeObjectResponse { + this := OstreeOstreeObjectResponse{} + this.Artifact = artifact + this.RelativePath = relativePath + this.Checksum = checksum + this.Typ = typ + return &this +} + +// NewOstreeOstreeObjectResponseWithDefaults instantiates a new OstreeOstreeObjectResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeOstreeObjectResponseWithDefaults() *OstreeOstreeObjectResponse { + this := OstreeOstreeObjectResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *OstreeOstreeObjectResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeObjectResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *OstreeOstreeObjectResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *OstreeOstreeObjectResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *OstreeOstreeObjectResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeObjectResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *OstreeOstreeObjectResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *OstreeOstreeObjectResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value +func (o *OstreeOstreeObjectResponse) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeObjectResponse) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *OstreeOstreeObjectResponse) SetArtifact(v string) { + o.Artifact = v +} + +// GetRelativePath returns the RelativePath field value +func (o *OstreeOstreeObjectResponse) GetRelativePath() string { + if o == nil { + var ret string + return ret + } + + return o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeObjectResponse) GetRelativePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RelativePath, true +} + +// SetRelativePath sets field value +func (o *OstreeOstreeObjectResponse) SetRelativePath(v string) { + o.RelativePath = v +} + +// GetChecksum returns the Checksum field value +func (o *OstreeOstreeObjectResponse) GetChecksum() string { + if o == nil { + var ret string + return ret + } + + return o.Checksum +} + +// GetChecksumOk returns a tuple with the Checksum field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeObjectResponse) GetChecksumOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Checksum, true +} + +// SetChecksum sets field value +func (o *OstreeOstreeObjectResponse) SetChecksum(v string) { + o.Checksum = v +} + +// GetTyp returns the Typ field value +func (o *OstreeOstreeObjectResponse) GetTyp() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Typ +} + +// GetTypOk returns a tuple with the Typ field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeObjectResponse) GetTypOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Typ, true +} + +// SetTyp sets field value +func (o *OstreeOstreeObjectResponse) SetTyp(v int64) { + o.Typ = v +} + +func (o OstreeOstreeObjectResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeOstreeObjectResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifact"] = o.Artifact + toSerialize["relative_path"] = o.RelativePath + toSerialize["checksum"] = o.Checksum + toSerialize["typ"] = o.Typ + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeOstreeObjectResponse) UnmarshalJSON(bytes []byte) (err error) { + varOstreeOstreeObjectResponse := _OstreeOstreeObjectResponse{} + + if err = json.Unmarshal(bytes, &varOstreeOstreeObjectResponse); err == nil { + *o = OstreeOstreeObjectResponse(varOstreeOstreeObjectResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "checksum") + delete(additionalProperties, "typ") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeOstreeObjectResponse struct { + value *OstreeOstreeObjectResponse + isSet bool +} + +func (v NullableOstreeOstreeObjectResponse) Get() *OstreeOstreeObjectResponse { + return v.value +} + +func (v *NullableOstreeOstreeObjectResponse) Set(val *OstreeOstreeObjectResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeOstreeObjectResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeOstreeObjectResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeOstreeObjectResponse(val *OstreeOstreeObjectResponse) *NullableOstreeOstreeObjectResponse { + return &NullableOstreeOstreeObjectResponse{value: val, isSet: true} +} + +func (v NullableOstreeOstreeObjectResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeOstreeObjectResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_ref_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_ref_response.go new file mode 100644 index 0000000000..d88bc54d92 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_ref_response.go @@ -0,0 +1,342 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the OstreeOstreeRefResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeOstreeRefResponse{} + +// OstreeOstreeRefResponse A Serializer class for OSTree head commits. +type OstreeOstreeRefResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact string `json:"artifact"` + // Path where the artifact is located relative to distributions base_path + RelativePath string `json:"relative_path"` + Commit string `json:"commit"` + Checksum *string `json:"checksum,omitempty"` + Name string `json:"name"` + AdditionalProperties map[string]interface{} +} + +type _OstreeOstreeRefResponse OstreeOstreeRefResponse + +// NewOstreeOstreeRefResponse instantiates a new OstreeOstreeRefResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeOstreeRefResponse(artifact string, relativePath string, commit string, name string) *OstreeOstreeRefResponse { + this := OstreeOstreeRefResponse{} + this.Artifact = artifact + this.RelativePath = relativePath + this.Commit = commit + this.Name = name + return &this +} + +// NewOstreeOstreeRefResponseWithDefaults instantiates a new OstreeOstreeRefResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeOstreeRefResponseWithDefaults() *OstreeOstreeRefResponse { + this := OstreeOstreeRefResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *OstreeOstreeRefResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRefResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *OstreeOstreeRefResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *OstreeOstreeRefResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *OstreeOstreeRefResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRefResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *OstreeOstreeRefResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *OstreeOstreeRefResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value +func (o *OstreeOstreeRefResponse) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRefResponse) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *OstreeOstreeRefResponse) SetArtifact(v string) { + o.Artifact = v +} + +// GetRelativePath returns the RelativePath field value +func (o *OstreeOstreeRefResponse) GetRelativePath() string { + if o == nil { + var ret string + return ret + } + + return o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRefResponse) GetRelativePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RelativePath, true +} + +// SetRelativePath sets field value +func (o *OstreeOstreeRefResponse) SetRelativePath(v string) { + o.RelativePath = v +} + +// GetCommit returns the Commit field value +func (o *OstreeOstreeRefResponse) GetCommit() string { + if o == nil { + var ret string + return ret + } + + return o.Commit +} + +// GetCommitOk returns a tuple with the Commit field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRefResponse) GetCommitOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Commit, true +} + +// SetCommit sets field value +func (o *OstreeOstreeRefResponse) SetCommit(v string) { + o.Commit = v +} + +// GetChecksum returns the Checksum field value if set, zero value otherwise. +func (o *OstreeOstreeRefResponse) GetChecksum() string { + if o == nil || IsNil(o.Checksum) { + var ret string + return ret + } + return *o.Checksum +} + +// GetChecksumOk returns a tuple with the Checksum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRefResponse) GetChecksumOk() (*string, bool) { + if o == nil || IsNil(o.Checksum) { + return nil, false + } + return o.Checksum, true +} + +// HasChecksum returns a boolean if a field has been set. +func (o *OstreeOstreeRefResponse) HasChecksum() bool { + if o != nil && !IsNil(o.Checksum) { + return true + } + + return false +} + +// SetChecksum gets a reference to the given string and assigns it to the Checksum field. +func (o *OstreeOstreeRefResponse) SetChecksum(v string) { + o.Checksum = &v +} + +// GetName returns the Name field value +func (o *OstreeOstreeRefResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRefResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *OstreeOstreeRefResponse) SetName(v string) { + o.Name = v +} + +func (o OstreeOstreeRefResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeOstreeRefResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifact"] = o.Artifact + toSerialize["relative_path"] = o.RelativePath + toSerialize["commit"] = o.Commit + if !IsNil(o.Checksum) { + toSerialize["checksum"] = o.Checksum + } + toSerialize["name"] = o.Name + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeOstreeRefResponse) UnmarshalJSON(bytes []byte) (err error) { + varOstreeOstreeRefResponse := _OstreeOstreeRefResponse{} + + if err = json.Unmarshal(bytes, &varOstreeOstreeRefResponse); err == nil { + *o = OstreeOstreeRefResponse(varOstreeOstreeRefResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "commit") + delete(additionalProperties, "checksum") + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeOstreeRefResponse struct { + value *OstreeOstreeRefResponse + isSet bool +} + +func (v NullableOstreeOstreeRefResponse) Get() *OstreeOstreeRefResponse { + return v.value +} + +func (v *NullableOstreeOstreeRefResponse) Set(val *OstreeOstreeRefResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeOstreeRefResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeOstreeRefResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeOstreeRefResponse(val *OstreeOstreeRefResponse) *NullableOstreeOstreeRefResponse { + return &NullableOstreeOstreeRefResponse{value: val, isSet: true} +} + +func (v NullableOstreeOstreeRefResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeOstreeRefResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_remote.go new file mode 100644 index 0000000000..c7a93721a4 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_remote.go @@ -0,0 +1,1167 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the OstreeOstreeRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeOstreeRemote{} + +// OstreeOstreeRemote A Serializer class for a remote OSTree repository. +type OstreeOstreeRemote struct { + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy462Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // An option to specify how many commits to traverse. + Depth *int64 `json:"depth,omitempty"` + // A list of refs to include during a sync. The wildcards *, ? are recognized. 'include_refs' is evaluated before 'exclude_refs'. + IncludeRefs []string `json:"include_refs,omitempty"` + // A list of tags to exclude during a sync. The wildcards *, ? are recognized. 'exclude_refs' is evaluated after 'include_refs'. + ExcludeRefs []string `json:"exclude_refs,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OstreeOstreeRemote OstreeOstreeRemote + +// NewOstreeOstreeRemote instantiates a new OstreeOstreeRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeOstreeRemote(name string, url string) *OstreeOstreeRemote { + this := OstreeOstreeRemote{} + this.Name = name + this.Url = url + var policy Policy462Enum = POLICY462ENUM_IMMEDIATE + this.Policy = &policy + var depth int64 = 0 + this.Depth = &depth + return &this +} + +// NewOstreeOstreeRemoteWithDefaults instantiates a new OstreeOstreeRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeOstreeRemoteWithDefaults() *OstreeOstreeRemote { + this := OstreeOstreeRemote{} + var policy Policy462Enum = POLICY462ENUM_IMMEDIATE + this.Policy = &policy + var depth int64 = 0 + this.Depth = &depth + return &this +} + +// GetName returns the Name field value +func (o *OstreeOstreeRemote) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemote) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *OstreeOstreeRemote) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *OstreeOstreeRemote) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemote) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *OstreeOstreeRemote) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *OstreeOstreeRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *OstreeOstreeRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *OstreeOstreeRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *OstreeOstreeRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *OstreeOstreeRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *OstreeOstreeRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *OstreeOstreeRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *OstreeOstreeRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *OstreeOstreeRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *OstreeOstreeRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *OstreeOstreeRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *OstreeOstreeRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *OstreeOstreeRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *OstreeOstreeRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *OstreeOstreeRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *OstreeOstreeRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *OstreeOstreeRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *OstreeOstreeRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *OstreeOstreeRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *OstreeOstreeRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *OstreeOstreeRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *OstreeOstreeRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *OstreeOstreeRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *OstreeOstreeRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *OstreeOstreeRemote) GetPolicy() Policy462Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy462Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemote) GetPolicyOk() (*Policy462Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy462Enum and assigns it to the Policy field. +func (o *OstreeOstreeRemote) SetPolicy(v Policy462Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *OstreeOstreeRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *OstreeOstreeRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *OstreeOstreeRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *OstreeOstreeRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *OstreeOstreeRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *OstreeOstreeRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *OstreeOstreeRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *OstreeOstreeRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *OstreeOstreeRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *OstreeOstreeRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *OstreeOstreeRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *OstreeOstreeRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *OstreeOstreeRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetDepth returns the Depth field value if set, zero value otherwise. +func (o *OstreeOstreeRemote) GetDepth() int64 { + if o == nil || IsNil(o.Depth) { + var ret int64 + return ret + } + return *o.Depth +} + +// GetDepthOk returns a tuple with the Depth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemote) GetDepthOk() (*int64, bool) { + if o == nil || IsNil(o.Depth) { + return nil, false + } + return o.Depth, true +} + +// HasDepth returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasDepth() bool { + if o != nil && !IsNil(o.Depth) { + return true + } + + return false +} + +// SetDepth gets a reference to the given int64 and assigns it to the Depth field. +func (o *OstreeOstreeRemote) SetDepth(v int64) { + o.Depth = &v +} + +// GetIncludeRefs returns the IncludeRefs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetIncludeRefs() []string { + if o == nil { + var ret []string + return ret + } + return o.IncludeRefs +} + +// GetIncludeRefsOk returns a tuple with the IncludeRefs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetIncludeRefsOk() ([]string, bool) { + if o == nil || IsNil(o.IncludeRefs) { + return nil, false + } + return o.IncludeRefs, true +} + +// HasIncludeRefs returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasIncludeRefs() bool { + if o != nil && IsNil(o.IncludeRefs) { + return true + } + + return false +} + +// SetIncludeRefs gets a reference to the given []string and assigns it to the IncludeRefs field. +func (o *OstreeOstreeRemote) SetIncludeRefs(v []string) { + o.IncludeRefs = v +} + +// GetExcludeRefs returns the ExcludeRefs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemote) GetExcludeRefs() []string { + if o == nil { + var ret []string + return ret + } + return o.ExcludeRefs +} + +// GetExcludeRefsOk returns a tuple with the ExcludeRefs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemote) GetExcludeRefsOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeRefs) { + return nil, false + } + return o.ExcludeRefs, true +} + +// HasExcludeRefs returns a boolean if a field has been set. +func (o *OstreeOstreeRemote) HasExcludeRefs() bool { + if o != nil && IsNil(o.ExcludeRefs) { + return true + } + + return false +} + +// SetExcludeRefs gets a reference to the given []string and assigns it to the ExcludeRefs field. +func (o *OstreeOstreeRemote) SetExcludeRefs(v []string) { + o.ExcludeRefs = v +} + +func (o OstreeOstreeRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeOstreeRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.Depth) { + toSerialize["depth"] = o.Depth + } + if o.IncludeRefs != nil { + toSerialize["include_refs"] = o.IncludeRefs + } + if o.ExcludeRefs != nil { + toSerialize["exclude_refs"] = o.ExcludeRefs + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeOstreeRemote) UnmarshalJSON(bytes []byte) (err error) { + varOstreeOstreeRemote := _OstreeOstreeRemote{} + + if err = json.Unmarshal(bytes, &varOstreeOstreeRemote); err == nil { + *o = OstreeOstreeRemote(varOstreeOstreeRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "depth") + delete(additionalProperties, "include_refs") + delete(additionalProperties, "exclude_refs") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeOstreeRemote struct { + value *OstreeOstreeRemote + isSet bool +} + +func (v NullableOstreeOstreeRemote) Get() *OstreeOstreeRemote { + return v.value +} + +func (v *NullableOstreeOstreeRemote) Set(val *OstreeOstreeRemote) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeOstreeRemote) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeOstreeRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeOstreeRemote(val *OstreeOstreeRemote) *NullableOstreeOstreeRemote { + return &NullableOstreeOstreeRemote{value: val, isSet: true} +} + +func (v NullableOstreeOstreeRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeOstreeRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_remote_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_remote_response.go new file mode 100644 index 0000000000..0fe44bdbed --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_remote_response.go @@ -0,0 +1,1079 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the OstreeOstreeRemoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeOstreeRemoteResponse{} + +// OstreeOstreeRemoteResponse A Serializer class for a remote OSTree repository. +type OstreeOstreeRemoteResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy462Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + // An option to specify how many commits to traverse. + Depth *int64 `json:"depth,omitempty"` + // A list of refs to include during a sync. The wildcards *, ? are recognized. 'include_refs' is evaluated before 'exclude_refs'. + IncludeRefs []string `json:"include_refs,omitempty"` + // A list of tags to exclude during a sync. The wildcards *, ? are recognized. 'exclude_refs' is evaluated after 'include_refs'. + ExcludeRefs []string `json:"exclude_refs,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OstreeOstreeRemoteResponse OstreeOstreeRemoteResponse + +// NewOstreeOstreeRemoteResponse instantiates a new OstreeOstreeRemoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeOstreeRemoteResponse(name string, url string) *OstreeOstreeRemoteResponse { + this := OstreeOstreeRemoteResponse{} + this.Name = name + this.Url = url + var policy Policy462Enum = POLICY462ENUM_IMMEDIATE + this.Policy = &policy + var depth int64 = 0 + this.Depth = &depth + return &this +} + +// NewOstreeOstreeRemoteResponseWithDefaults instantiates a new OstreeOstreeRemoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeOstreeRemoteResponseWithDefaults() *OstreeOstreeRemoteResponse { + this := OstreeOstreeRemoteResponse{} + var policy Policy462Enum = POLICY462ENUM_IMMEDIATE + this.Policy = &policy + var depth int64 = 0 + this.Depth = &depth + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *OstreeOstreeRemoteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemoteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *OstreeOstreeRemoteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *OstreeOstreeRemoteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemoteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *OstreeOstreeRemoteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *OstreeOstreeRemoteResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemoteResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *OstreeOstreeRemoteResponse) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *OstreeOstreeRemoteResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemoteResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *OstreeOstreeRemoteResponse) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemoteResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemoteResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *OstreeOstreeRemoteResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *OstreeOstreeRemoteResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *OstreeOstreeRemoteResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemoteResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemoteResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *OstreeOstreeRemoteResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *OstreeOstreeRemoteResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *OstreeOstreeRemoteResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *OstreeOstreeRemoteResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemoteResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *OstreeOstreeRemoteResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemoteResponse) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemoteResponse) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *OstreeOstreeRemoteResponse) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *OstreeOstreeRemoteResponse) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *OstreeOstreeRemoteResponse) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *OstreeOstreeRemoteResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemoteResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *OstreeOstreeRemoteResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *OstreeOstreeRemoteResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemoteResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *OstreeOstreeRemoteResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemoteResponse) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemoteResponse) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *OstreeOstreeRemoteResponse) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *OstreeOstreeRemoteResponse) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *OstreeOstreeRemoteResponse) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemoteResponse) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemoteResponse) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *OstreeOstreeRemoteResponse) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *OstreeOstreeRemoteResponse) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *OstreeOstreeRemoteResponse) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *OstreeOstreeRemoteResponse) GetPolicy() Policy462Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy462Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemoteResponse) GetPolicyOk() (*Policy462Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy462Enum and assigns it to the Policy field. +func (o *OstreeOstreeRemoteResponse) SetPolicy(v Policy462Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemoteResponse) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemoteResponse) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *OstreeOstreeRemoteResponse) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *OstreeOstreeRemoteResponse) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *OstreeOstreeRemoteResponse) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemoteResponse) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemoteResponse) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *OstreeOstreeRemoteResponse) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *OstreeOstreeRemoteResponse) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *OstreeOstreeRemoteResponse) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemoteResponse) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemoteResponse) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *OstreeOstreeRemoteResponse) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *OstreeOstreeRemoteResponse) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *OstreeOstreeRemoteResponse) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemoteResponse) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemoteResponse) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *OstreeOstreeRemoteResponse) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *OstreeOstreeRemoteResponse) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *OstreeOstreeRemoteResponse) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *OstreeOstreeRemoteResponse) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemoteResponse) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *OstreeOstreeRemoteResponse) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemoteResponse) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemoteResponse) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *OstreeOstreeRemoteResponse) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *OstreeOstreeRemoteResponse) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *OstreeOstreeRemoteResponse) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *OstreeOstreeRemoteResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemoteResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *OstreeOstreeRemoteResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +// GetDepth returns the Depth field value if set, zero value otherwise. +func (o *OstreeOstreeRemoteResponse) GetDepth() int64 { + if o == nil || IsNil(o.Depth) { + var ret int64 + return ret + } + return *o.Depth +} + +// GetDepthOk returns a tuple with the Depth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRemoteResponse) GetDepthOk() (*int64, bool) { + if o == nil || IsNil(o.Depth) { + return nil, false + } + return o.Depth, true +} + +// HasDepth returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasDepth() bool { + if o != nil && !IsNil(o.Depth) { + return true + } + + return false +} + +// SetDepth gets a reference to the given int64 and assigns it to the Depth field. +func (o *OstreeOstreeRemoteResponse) SetDepth(v int64) { + o.Depth = &v +} + +// GetIncludeRefs returns the IncludeRefs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemoteResponse) GetIncludeRefs() []string { + if o == nil { + var ret []string + return ret + } + return o.IncludeRefs +} + +// GetIncludeRefsOk returns a tuple with the IncludeRefs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemoteResponse) GetIncludeRefsOk() ([]string, bool) { + if o == nil || IsNil(o.IncludeRefs) { + return nil, false + } + return o.IncludeRefs, true +} + +// HasIncludeRefs returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasIncludeRefs() bool { + if o != nil && IsNil(o.IncludeRefs) { + return true + } + + return false +} + +// SetIncludeRefs gets a reference to the given []string and assigns it to the IncludeRefs field. +func (o *OstreeOstreeRemoteResponse) SetIncludeRefs(v []string) { + o.IncludeRefs = v +} + +// GetExcludeRefs returns the ExcludeRefs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRemoteResponse) GetExcludeRefs() []string { + if o == nil { + var ret []string + return ret + } + return o.ExcludeRefs +} + +// GetExcludeRefsOk returns a tuple with the ExcludeRefs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRemoteResponse) GetExcludeRefsOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeRefs) { + return nil, false + } + return o.ExcludeRefs, true +} + +// HasExcludeRefs returns a boolean if a field has been set. +func (o *OstreeOstreeRemoteResponse) HasExcludeRefs() bool { + if o != nil && IsNil(o.ExcludeRefs) { + return true + } + + return false +} + +// SetExcludeRefs gets a reference to the given []string and assigns it to the ExcludeRefs field. +func (o *OstreeOstreeRemoteResponse) SetExcludeRefs(v []string) { + o.ExcludeRefs = v +} + +func (o OstreeOstreeRemoteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeOstreeRemoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + if !IsNil(o.Depth) { + toSerialize["depth"] = o.Depth + } + if o.IncludeRefs != nil { + toSerialize["include_refs"] = o.IncludeRefs + } + if o.ExcludeRefs != nil { + toSerialize["exclude_refs"] = o.ExcludeRefs + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeOstreeRemoteResponse) UnmarshalJSON(bytes []byte) (err error) { + varOstreeOstreeRemoteResponse := _OstreeOstreeRemoteResponse{} + + if err = json.Unmarshal(bytes, &varOstreeOstreeRemoteResponse); err == nil { + *o = OstreeOstreeRemoteResponse(varOstreeOstreeRemoteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "hidden_fields") + delete(additionalProperties, "depth") + delete(additionalProperties, "include_refs") + delete(additionalProperties, "exclude_refs") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeOstreeRemoteResponse struct { + value *OstreeOstreeRemoteResponse + isSet bool +} + +func (v NullableOstreeOstreeRemoteResponse) Get() *OstreeOstreeRemoteResponse { + return v.value +} + +func (v *NullableOstreeOstreeRemoteResponse) Set(val *OstreeOstreeRemoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeOstreeRemoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeOstreeRemoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeOstreeRemoteResponse(val *OstreeOstreeRemoteResponse) *NullableOstreeOstreeRemoteResponse { + return &NullableOstreeOstreeRemoteResponse{value: val, isSet: true} +} + +func (v NullableOstreeOstreeRemoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeOstreeRemoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_repository.go new file mode 100644 index 0000000000..004e4e1d52 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_repository.go @@ -0,0 +1,366 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the OstreeOstreeRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeOstreeRepository{} + +// OstreeOstreeRepository A Serializer class for an OSTree repository. +type OstreeOstreeRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + ComputeDelta *bool `json:"compute_delta,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OstreeOstreeRepository OstreeOstreeRepository + +// NewOstreeOstreeRepository instantiates a new OstreeOstreeRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeOstreeRepository(name string) *OstreeOstreeRepository { + this := OstreeOstreeRepository{} + this.Name = name + var computeDelta bool = true + this.ComputeDelta = &computeDelta + return &this +} + +// NewOstreeOstreeRepositoryWithDefaults instantiates a new OstreeOstreeRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeOstreeRepositoryWithDefaults() *OstreeOstreeRepository { + this := OstreeOstreeRepository{} + var computeDelta bool = true + this.ComputeDelta = &computeDelta + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *OstreeOstreeRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *OstreeOstreeRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *OstreeOstreeRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *OstreeOstreeRepository) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRepository) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *OstreeOstreeRepository) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *OstreeOstreeRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *OstreeOstreeRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *OstreeOstreeRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *OstreeOstreeRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *OstreeOstreeRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *OstreeOstreeRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *OstreeOstreeRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *OstreeOstreeRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *OstreeOstreeRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *OstreeOstreeRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *OstreeOstreeRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *OstreeOstreeRepository) UnsetRemote() { + o.Remote.Unset() +} + +// GetComputeDelta returns the ComputeDelta field value if set, zero value otherwise. +func (o *OstreeOstreeRepository) GetComputeDelta() bool { + if o == nil || IsNil(o.ComputeDelta) { + var ret bool + return ret + } + return *o.ComputeDelta +} + +// GetComputeDeltaOk returns a tuple with the ComputeDelta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRepository) GetComputeDeltaOk() (*bool, bool) { + if o == nil || IsNil(o.ComputeDelta) { + return nil, false + } + return o.ComputeDelta, true +} + +// HasComputeDelta returns a boolean if a field has been set. +func (o *OstreeOstreeRepository) HasComputeDelta() bool { + if o != nil && !IsNil(o.ComputeDelta) { + return true + } + + return false +} + +// SetComputeDelta gets a reference to the given bool and assigns it to the ComputeDelta field. +func (o *OstreeOstreeRepository) SetComputeDelta(v bool) { + o.ComputeDelta = &v +} + +func (o OstreeOstreeRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeOstreeRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if !IsNil(o.ComputeDelta) { + toSerialize["compute_delta"] = o.ComputeDelta + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeOstreeRepository) UnmarshalJSON(bytes []byte) (err error) { + varOstreeOstreeRepository := _OstreeOstreeRepository{} + + if err = json.Unmarshal(bytes, &varOstreeOstreeRepository); err == nil { + *o = OstreeOstreeRepository(varOstreeOstreeRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "compute_delta") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeOstreeRepository struct { + value *OstreeOstreeRepository + isSet bool +} + +func (v NullableOstreeOstreeRepository) Get() *OstreeOstreeRepository { + return v.value +} + +func (v *NullableOstreeOstreeRepository) Set(val *OstreeOstreeRepository) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeOstreeRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeOstreeRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeOstreeRepository(val *OstreeOstreeRepository) *NullableOstreeOstreeRepository { + return &NullableOstreeOstreeRepository{value: val, isSet: true} +} + +func (v NullableOstreeOstreeRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeOstreeRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_repository_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_repository_response.go new file mode 100644 index 0000000000..d514678234 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_repository_response.go @@ -0,0 +1,516 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the OstreeOstreeRepositoryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeOstreeRepositoryResponse{} + +// OstreeOstreeRepositoryResponse A Serializer class for an OSTree repository. +type OstreeOstreeRepositoryResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + VersionsHref *string `json:"versions_href,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + LatestVersionHref *string `json:"latest_version_href,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + ComputeDelta *bool `json:"compute_delta,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OstreeOstreeRepositoryResponse OstreeOstreeRepositoryResponse + +// NewOstreeOstreeRepositoryResponse instantiates a new OstreeOstreeRepositoryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeOstreeRepositoryResponse(name string) *OstreeOstreeRepositoryResponse { + this := OstreeOstreeRepositoryResponse{} + this.Name = name + var computeDelta bool = true + this.ComputeDelta = &computeDelta + return &this +} + +// NewOstreeOstreeRepositoryResponseWithDefaults instantiates a new OstreeOstreeRepositoryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeOstreeRepositoryResponseWithDefaults() *OstreeOstreeRepositoryResponse { + this := OstreeOstreeRepositoryResponse{} + var computeDelta bool = true + this.ComputeDelta = &computeDelta + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *OstreeOstreeRepositoryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRepositoryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *OstreeOstreeRepositoryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *OstreeOstreeRepositoryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *OstreeOstreeRepositoryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRepositoryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *OstreeOstreeRepositoryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *OstreeOstreeRepositoryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetVersionsHref returns the VersionsHref field value if set, zero value otherwise. +func (o *OstreeOstreeRepositoryResponse) GetVersionsHref() string { + if o == nil || IsNil(o.VersionsHref) { + var ret string + return ret + } + return *o.VersionsHref +} + +// GetVersionsHrefOk returns a tuple with the VersionsHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRepositoryResponse) GetVersionsHrefOk() (*string, bool) { + if o == nil || IsNil(o.VersionsHref) { + return nil, false + } + return o.VersionsHref, true +} + +// HasVersionsHref returns a boolean if a field has been set. +func (o *OstreeOstreeRepositoryResponse) HasVersionsHref() bool { + if o != nil && !IsNil(o.VersionsHref) { + return true + } + + return false +} + +// SetVersionsHref gets a reference to the given string and assigns it to the VersionsHref field. +func (o *OstreeOstreeRepositoryResponse) SetVersionsHref(v string) { + o.VersionsHref = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *OstreeOstreeRepositoryResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRepositoryResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *OstreeOstreeRepositoryResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *OstreeOstreeRepositoryResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetLatestVersionHref returns the LatestVersionHref field value if set, zero value otherwise. +func (o *OstreeOstreeRepositoryResponse) GetLatestVersionHref() string { + if o == nil || IsNil(o.LatestVersionHref) { + var ret string + return ret + } + return *o.LatestVersionHref +} + +// GetLatestVersionHrefOk returns a tuple with the LatestVersionHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRepositoryResponse) GetLatestVersionHrefOk() (*string, bool) { + if o == nil || IsNil(o.LatestVersionHref) { + return nil, false + } + return o.LatestVersionHref, true +} + +// HasLatestVersionHref returns a boolean if a field has been set. +func (o *OstreeOstreeRepositoryResponse) HasLatestVersionHref() bool { + if o != nil && !IsNil(o.LatestVersionHref) { + return true + } + + return false +} + +// SetLatestVersionHref gets a reference to the given string and assigns it to the LatestVersionHref field. +func (o *OstreeOstreeRepositoryResponse) SetLatestVersionHref(v string) { + o.LatestVersionHref = &v +} + +// GetName returns the Name field value +func (o *OstreeOstreeRepositoryResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRepositoryResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *OstreeOstreeRepositoryResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRepositoryResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRepositoryResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *OstreeOstreeRepositoryResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *OstreeOstreeRepositoryResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *OstreeOstreeRepositoryResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *OstreeOstreeRepositoryResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRepositoryResponse) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRepositoryResponse) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *OstreeOstreeRepositoryResponse) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *OstreeOstreeRepositoryResponse) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *OstreeOstreeRepositoryResponse) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *OstreeOstreeRepositoryResponse) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OstreeOstreeRepositoryResponse) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OstreeOstreeRepositoryResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *OstreeOstreeRepositoryResponse) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *OstreeOstreeRepositoryResponse) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *OstreeOstreeRepositoryResponse) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *OstreeOstreeRepositoryResponse) UnsetRemote() { + o.Remote.Unset() +} + +// GetComputeDelta returns the ComputeDelta field value if set, zero value otherwise. +func (o *OstreeOstreeRepositoryResponse) GetComputeDelta() bool { + if o == nil || IsNil(o.ComputeDelta) { + var ret bool + return ret + } + return *o.ComputeDelta +} + +// GetComputeDeltaOk returns a tuple with the ComputeDelta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeRepositoryResponse) GetComputeDeltaOk() (*bool, bool) { + if o == nil || IsNil(o.ComputeDelta) { + return nil, false + } + return o.ComputeDelta, true +} + +// HasComputeDelta returns a boolean if a field has been set. +func (o *OstreeOstreeRepositoryResponse) HasComputeDelta() bool { + if o != nil && !IsNil(o.ComputeDelta) { + return true + } + + return false +} + +// SetComputeDelta gets a reference to the given bool and assigns it to the ComputeDelta field. +func (o *OstreeOstreeRepositoryResponse) SetComputeDelta(v bool) { + o.ComputeDelta = &v +} + +func (o OstreeOstreeRepositoryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeOstreeRepositoryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.VersionsHref) { + toSerialize["versions_href"] = o.VersionsHref + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.LatestVersionHref) { + toSerialize["latest_version_href"] = o.LatestVersionHref + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if !IsNil(o.ComputeDelta) { + toSerialize["compute_delta"] = o.ComputeDelta + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeOstreeRepositoryResponse) UnmarshalJSON(bytes []byte) (err error) { + varOstreeOstreeRepositoryResponse := _OstreeOstreeRepositoryResponse{} + + if err = json.Unmarshal(bytes, &varOstreeOstreeRepositoryResponse); err == nil { + *o = OstreeOstreeRepositoryResponse(varOstreeOstreeRepositoryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "versions_href") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "latest_version_href") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "compute_delta") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeOstreeRepositoryResponse struct { + value *OstreeOstreeRepositoryResponse + isSet bool +} + +func (v NullableOstreeOstreeRepositoryResponse) Get() *OstreeOstreeRepositoryResponse { + return v.value +} + +func (v *NullableOstreeOstreeRepositoryResponse) Set(val *OstreeOstreeRepositoryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeOstreeRepositoryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeOstreeRepositoryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeOstreeRepositoryResponse(val *OstreeOstreeRepositoryResponse) *NullableOstreeOstreeRepositoryResponse { + return &NullableOstreeOstreeRepositoryResponse{value: val, isSet: true} +} + +func (v NullableOstreeOstreeRepositoryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeOstreeRepositoryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_summary_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_summary_response.go new file mode 100644 index 0000000000..e80d9f16a3 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_ostree_ostree_summary_response.go @@ -0,0 +1,249 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the OstreeOstreeSummaryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OstreeOstreeSummaryResponse{} + +// OstreeOstreeSummaryResponse A Serializer class for an OSTree summary file. +type OstreeOstreeSummaryResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact string `json:"artifact"` + // Path where the artifact is located relative to distributions base_path + RelativePath string `json:"relative_path"` + AdditionalProperties map[string]interface{} +} + +type _OstreeOstreeSummaryResponse OstreeOstreeSummaryResponse + +// NewOstreeOstreeSummaryResponse instantiates a new OstreeOstreeSummaryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOstreeOstreeSummaryResponse(artifact string, relativePath string) *OstreeOstreeSummaryResponse { + this := OstreeOstreeSummaryResponse{} + this.Artifact = artifact + this.RelativePath = relativePath + return &this +} + +// NewOstreeOstreeSummaryResponseWithDefaults instantiates a new OstreeOstreeSummaryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOstreeOstreeSummaryResponseWithDefaults() *OstreeOstreeSummaryResponse { + this := OstreeOstreeSummaryResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *OstreeOstreeSummaryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeSummaryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *OstreeOstreeSummaryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *OstreeOstreeSummaryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *OstreeOstreeSummaryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OstreeOstreeSummaryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *OstreeOstreeSummaryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *OstreeOstreeSummaryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value +func (o *OstreeOstreeSummaryResponse) GetArtifact() string { + if o == nil { + var ret string + return ret + } + + return o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeSummaryResponse) GetArtifactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Artifact, true +} + +// SetArtifact sets field value +func (o *OstreeOstreeSummaryResponse) SetArtifact(v string) { + o.Artifact = v +} + +// GetRelativePath returns the RelativePath field value +func (o *OstreeOstreeSummaryResponse) GetRelativePath() string { + if o == nil { + var ret string + return ret + } + + return o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value +// and a boolean to check if the value has been set. +func (o *OstreeOstreeSummaryResponse) GetRelativePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RelativePath, true +} + +// SetRelativePath sets field value +func (o *OstreeOstreeSummaryResponse) SetRelativePath(v string) { + o.RelativePath = v +} + +func (o OstreeOstreeSummaryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OstreeOstreeSummaryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["artifact"] = o.Artifact + toSerialize["relative_path"] = o.RelativePath + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OstreeOstreeSummaryResponse) UnmarshalJSON(bytes []byte) (err error) { + varOstreeOstreeSummaryResponse := _OstreeOstreeSummaryResponse{} + + if err = json.Unmarshal(bytes, &varOstreeOstreeSummaryResponse); err == nil { + *o = OstreeOstreeSummaryResponse(varOstreeOstreeSummaryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOstreeOstreeSummaryResponse struct { + value *OstreeOstreeSummaryResponse + isSet bool +} + +func (v NullableOstreeOstreeSummaryResponse) Get() *OstreeOstreeSummaryResponse { + return v.value +} + +func (v *NullableOstreeOstreeSummaryResponse) Set(val *OstreeOstreeSummaryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOstreeOstreeSummaryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOstreeOstreeSummaryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOstreeOstreeSummaryResponse(val *OstreeOstreeSummaryResponse) *NullableOstreeOstreeSummaryResponse { + return &NullableOstreeOstreeSummaryResponse{value: val, isSet: true} +} + +func (v NullableOstreeOstreeSummaryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOstreeOstreeSummaryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_checksum_type_enum.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_checksum_type_enum.go new file mode 100644 index 0000000000..0996f3d68f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_checksum_type_enum.go @@ -0,0 +1,122 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "fmt" +) + +// PackageChecksumTypeEnum * `unknown` - unknown * `md5` - md5 * `sha1` - sha1 * `sha224` - sha224 * `sha256` - sha256 * `sha384` - sha384 * `sha512` - sha512 +type PackageChecksumTypeEnum string + +// List of PackageChecksumTypeEnum +const ( + PACKAGECHECKSUMTYPEENUM_UNKNOWN PackageChecksumTypeEnum = "unknown" + PACKAGECHECKSUMTYPEENUM_MD5 PackageChecksumTypeEnum = "md5" + PACKAGECHECKSUMTYPEENUM_SHA1 PackageChecksumTypeEnum = "sha1" + PACKAGECHECKSUMTYPEENUM_SHA224 PackageChecksumTypeEnum = "sha224" + PACKAGECHECKSUMTYPEENUM_SHA256 PackageChecksumTypeEnum = "sha256" + PACKAGECHECKSUMTYPEENUM_SHA384 PackageChecksumTypeEnum = "sha384" + PACKAGECHECKSUMTYPEENUM_SHA512 PackageChecksumTypeEnum = "sha512" +) + +// All allowed values of PackageChecksumTypeEnum enum +var AllowedPackageChecksumTypeEnumEnumValues = []PackageChecksumTypeEnum{ + "unknown", + "md5", + "sha1", + "sha224", + "sha256", + "sha384", + "sha512", +} + +func (v *PackageChecksumTypeEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := PackageChecksumTypeEnum(value) + for _, existing := range AllowedPackageChecksumTypeEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid PackageChecksumTypeEnum", value) +} + +// NewPackageChecksumTypeEnumFromValue returns a pointer to a valid PackageChecksumTypeEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewPackageChecksumTypeEnumFromValue(v string) (*PackageChecksumTypeEnum, error) { + ev := PackageChecksumTypeEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for PackageChecksumTypeEnum: valid values are %v", v, AllowedPackageChecksumTypeEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v PackageChecksumTypeEnum) IsValid() bool { + for _, existing := range AllowedPackageChecksumTypeEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to PackageChecksumTypeEnum value +func (v PackageChecksumTypeEnum) Ptr() *PackageChecksumTypeEnum { + return &v +} + +type NullablePackageChecksumTypeEnum struct { + value *PackageChecksumTypeEnum + isSet bool +} + +func (v NullablePackageChecksumTypeEnum) Get() *PackageChecksumTypeEnum { + return v.value +} + +func (v *NullablePackageChecksumTypeEnum) Set(val *PackageChecksumTypeEnum) { + v.value = val + v.isSet = true +} + +func (v NullablePackageChecksumTypeEnum) IsSet() bool { + return v.isSet +} + +func (v *NullablePackageChecksumTypeEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePackageChecksumTypeEnum(val *PackageChecksumTypeEnum) *NullablePackageChecksumTypeEnum { + return &NullablePackageChecksumTypeEnum{value: val, isSet: true} +} + +func (v NullablePackageChecksumTypeEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePackageChecksumTypeEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_metadata_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_metadata_response.go new file mode 100644 index 0000000000..fe4c2692f0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_metadata_response.go @@ -0,0 +1,230 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PackageMetadataResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PackageMetadataResponse{} + +// PackageMetadataResponse A Serializer for a package's metadata. +type PackageMetadataResponse struct { + // Cache value from last PyPI sync + LastSerial int64 `json:"last_serial"` + // Core metadata of the package + Info map[string]interface{} `json:"info"` + // List of all the releases of the package + Releases map[string]interface{} `json:"releases"` + Urls map[string]interface{} `json:"urls"` + AdditionalProperties map[string]interface{} +} + +type _PackageMetadataResponse PackageMetadataResponse + +// NewPackageMetadataResponse instantiates a new PackageMetadataResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPackageMetadataResponse(lastSerial int64, info map[string]interface{}, releases map[string]interface{}, urls map[string]interface{}) *PackageMetadataResponse { + this := PackageMetadataResponse{} + this.LastSerial = lastSerial + this.Info = info + this.Releases = releases + this.Urls = urls + return &this +} + +// NewPackageMetadataResponseWithDefaults instantiates a new PackageMetadataResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPackageMetadataResponseWithDefaults() *PackageMetadataResponse { + this := PackageMetadataResponse{} + return &this +} + +// GetLastSerial returns the LastSerial field value +func (o *PackageMetadataResponse) GetLastSerial() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.LastSerial +} + +// GetLastSerialOk returns a tuple with the LastSerial field value +// and a boolean to check if the value has been set. +func (o *PackageMetadataResponse) GetLastSerialOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.LastSerial, true +} + +// SetLastSerial sets field value +func (o *PackageMetadataResponse) SetLastSerial(v int64) { + o.LastSerial = v +} + +// GetInfo returns the Info field value +func (o *PackageMetadataResponse) GetInfo() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Info +} + +// GetInfoOk returns a tuple with the Info field value +// and a boolean to check if the value has been set. +func (o *PackageMetadataResponse) GetInfoOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Info, true +} + +// SetInfo sets field value +func (o *PackageMetadataResponse) SetInfo(v map[string]interface{}) { + o.Info = v +} + +// GetReleases returns the Releases field value +func (o *PackageMetadataResponse) GetReleases() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Releases +} + +// GetReleasesOk returns a tuple with the Releases field value +// and a boolean to check if the value has been set. +func (o *PackageMetadataResponse) GetReleasesOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Releases, true +} + +// SetReleases sets field value +func (o *PackageMetadataResponse) SetReleases(v map[string]interface{}) { + o.Releases = v +} + +// GetUrls returns the Urls field value +func (o *PackageMetadataResponse) GetUrls() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Urls +} + +// GetUrlsOk returns a tuple with the Urls field value +// and a boolean to check if the value has been set. +func (o *PackageMetadataResponse) GetUrlsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Urls, true +} + +// SetUrls sets field value +func (o *PackageMetadataResponse) SetUrls(v map[string]interface{}) { + o.Urls = v +} + +func (o PackageMetadataResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PackageMetadataResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["last_serial"] = o.LastSerial + toSerialize["info"] = o.Info + toSerialize["releases"] = o.Releases + toSerialize["urls"] = o.Urls + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PackageMetadataResponse) UnmarshalJSON(bytes []byte) (err error) { + varPackageMetadataResponse := _PackageMetadataResponse{} + + if err = json.Unmarshal(bytes, &varPackageMetadataResponse); err == nil { + *o = PackageMetadataResponse(varPackageMetadataResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "last_serial") + delete(additionalProperties, "info") + delete(additionalProperties, "releases") + delete(additionalProperties, "urls") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePackageMetadataResponse struct { + value *PackageMetadataResponse + isSet bool +} + +func (v NullablePackageMetadataResponse) Get() *PackageMetadataResponse { + return v.value +} + +func (v *NullablePackageMetadataResponse) Set(val *PackageMetadataResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePackageMetadataResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePackageMetadataResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePackageMetadataResponse(val *PackageMetadataResponse) *NullablePackageMetadataResponse { + return &NullablePackageMetadataResponse{value: val, isSet: true} +} + +func (v NullablePackageMetadataResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePackageMetadataResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_types_enum.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_types_enum.go new file mode 100644 index 0000000000..d74eeeaa2b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_types_enum.go @@ -0,0 +1,124 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "fmt" +) + +// PackageTypesEnum * `bdist_dmg` - bdist_dmg * `bdist_dumb` - bdist_dumb * `bdist_egg` - bdist_egg * `bdist_msi` - bdist_msi * `bdist_rpm` - bdist_rpm * `bdist_wheel` - bdist_wheel * `bdist_wininst` - bdist_wininst * `sdist` - sdist +type PackageTypesEnum string + +// List of PackageTypesEnum +const ( + PACKAGETYPESENUM_BDIST_DMG PackageTypesEnum = "bdist_dmg" + PACKAGETYPESENUM_BDIST_DUMB PackageTypesEnum = "bdist_dumb" + PACKAGETYPESENUM_BDIST_EGG PackageTypesEnum = "bdist_egg" + PACKAGETYPESENUM_BDIST_MSI PackageTypesEnum = "bdist_msi" + PACKAGETYPESENUM_BDIST_RPM PackageTypesEnum = "bdist_rpm" + PACKAGETYPESENUM_BDIST_WHEEL PackageTypesEnum = "bdist_wheel" + PACKAGETYPESENUM_BDIST_WININST PackageTypesEnum = "bdist_wininst" + PACKAGETYPESENUM_SDIST PackageTypesEnum = "sdist" +) + +// All allowed values of PackageTypesEnum enum +var AllowedPackageTypesEnumEnumValues = []PackageTypesEnum{ + "bdist_dmg", + "bdist_dumb", + "bdist_egg", + "bdist_msi", + "bdist_rpm", + "bdist_wheel", + "bdist_wininst", + "sdist", +} + +func (v *PackageTypesEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := PackageTypesEnum(value) + for _, existing := range AllowedPackageTypesEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid PackageTypesEnum", value) +} + +// NewPackageTypesEnumFromValue returns a pointer to a valid PackageTypesEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewPackageTypesEnumFromValue(v string) (*PackageTypesEnum, error) { + ev := PackageTypesEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for PackageTypesEnum: valid values are %v", v, AllowedPackageTypesEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v PackageTypesEnum) IsValid() bool { + for _, existing := range AllowedPackageTypesEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to PackageTypesEnum value +func (v PackageTypesEnum) Ptr() *PackageTypesEnum { + return &v +} + +type NullablePackageTypesEnum struct { + value *PackageTypesEnum + isSet bool +} + +func (v NullablePackageTypesEnum) Get() *PackageTypesEnum { + return v.value +} + +func (v *NullablePackageTypesEnum) Set(val *PackageTypesEnum) { + v.value = val + v.isSet = true +} + +func (v NullablePackageTypesEnum) IsSet() bool { + return v.isSet +} + +func (v *NullablePackageTypesEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePackageTypesEnum(val *PackageTypesEnum) *NullablePackageTypesEnum { + return &NullablePackageTypesEnum{value: val, isSet: true} +} + +func (v NullablePackageTypesEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePackageTypesEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_upload.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_upload.go new file mode 100644 index 0000000000..e4783e8b11 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_upload.go @@ -0,0 +1,216 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the PackageUpload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PackageUpload{} + +// PackageUpload A Serializer for Python packages being uploaded to the index. +type PackageUpload struct { + // A Python package release file to upload to the index. + Content *os.File `json:"content"` + // Defaults to `file_upload`, don't change it or request will fail! + Action *string `json:"action,omitempty"` + // SHA256 of package to validate upload integrity. + Sha256Digest string `json:"sha256_digest"` + AdditionalProperties map[string]interface{} +} + +type _PackageUpload PackageUpload + +// NewPackageUpload instantiates a new PackageUpload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPackageUpload(content *os.File, sha256Digest string) *PackageUpload { + this := PackageUpload{} + this.Content = content + var action string = "file_upload" + this.Action = &action + this.Sha256Digest = sha256Digest + return &this +} + +// NewPackageUploadWithDefaults instantiates a new PackageUpload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPackageUploadWithDefaults() *PackageUpload { + this := PackageUpload{} + var action string = "file_upload" + this.Action = &action + return &this +} + +// GetContent returns the Content field value +func (o *PackageUpload) GetContent() *os.File { + if o == nil { + var ret *os.File + return ret + } + + return o.Content +} + +// GetContentOk returns a tuple with the Content field value +// and a boolean to check if the value has been set. +func (o *PackageUpload) GetContentOk() (**os.File, bool) { + if o == nil { + return nil, false + } + return &o.Content, true +} + +// SetContent sets field value +func (o *PackageUpload) SetContent(v *os.File) { + o.Content = v +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *PackageUpload) GetAction() string { + if o == nil || IsNil(o.Action) { + var ret string + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PackageUpload) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *PackageUpload) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *PackageUpload) SetAction(v string) { + o.Action = &v +} + +// GetSha256Digest returns the Sha256Digest field value +func (o *PackageUpload) GetSha256Digest() string { + if o == nil { + var ret string + return ret + } + + return o.Sha256Digest +} + +// GetSha256DigestOk returns a tuple with the Sha256Digest field value +// and a boolean to check if the value has been set. +func (o *PackageUpload) GetSha256DigestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Sha256Digest, true +} + +// SetSha256Digest sets field value +func (o *PackageUpload) SetSha256Digest(v string) { + o.Sha256Digest = v +} + +func (o PackageUpload) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PackageUpload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["content"] = o.Content + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + toSerialize["sha256_digest"] = o.Sha256Digest + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PackageUpload) UnmarshalJSON(bytes []byte) (err error) { + varPackageUpload := _PackageUpload{} + + if err = json.Unmarshal(bytes, &varPackageUpload); err == nil { + *o = PackageUpload(varPackageUpload) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "content") + delete(additionalProperties, "action") + delete(additionalProperties, "sha256_digest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePackageUpload struct { + value *PackageUpload + isSet bool +} + +func (v NullablePackageUpload) Get() *PackageUpload { + return v.value +} + +func (v *NullablePackageUpload) Set(val *PackageUpload) { + v.value = val + v.isSet = true +} + +func (v NullablePackageUpload) IsSet() bool { + return v.isSet +} + +func (v *NullablePackageUpload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePackageUpload(val *PackageUpload) *NullablePackageUpload { + return &NullablePackageUpload{value: val, isSet: true} +} + +func (v NullablePackageUpload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePackageUpload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_upload_task_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_upload_task_response.go new file mode 100644 index 0000000000..93155507b1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_package_upload_task_response.go @@ -0,0 +1,200 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the PackageUploadTaskResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PackageUploadTaskResponse{} + +// PackageUploadTaskResponse A Serializer for responding to a package upload task. +type PackageUploadTaskResponse struct { + Session string `json:"session"` + Task string `json:"task"` + TaskStartTime time.Time `json:"task_start_time"` + AdditionalProperties map[string]interface{} +} + +type _PackageUploadTaskResponse PackageUploadTaskResponse + +// NewPackageUploadTaskResponse instantiates a new PackageUploadTaskResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPackageUploadTaskResponse(session string, task string, taskStartTime time.Time) *PackageUploadTaskResponse { + this := PackageUploadTaskResponse{} + this.Session = session + this.Task = task + this.TaskStartTime = taskStartTime + return &this +} + +// NewPackageUploadTaskResponseWithDefaults instantiates a new PackageUploadTaskResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPackageUploadTaskResponseWithDefaults() *PackageUploadTaskResponse { + this := PackageUploadTaskResponse{} + return &this +} + +// GetSession returns the Session field value +func (o *PackageUploadTaskResponse) GetSession() string { + if o == nil { + var ret string + return ret + } + + return o.Session +} + +// GetSessionOk returns a tuple with the Session field value +// and a boolean to check if the value has been set. +func (o *PackageUploadTaskResponse) GetSessionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Session, true +} + +// SetSession sets field value +func (o *PackageUploadTaskResponse) SetSession(v string) { + o.Session = v +} + +// GetTask returns the Task field value +func (o *PackageUploadTaskResponse) GetTask() string { + if o == nil { + var ret string + return ret + } + + return o.Task +} + +// GetTaskOk returns a tuple with the Task field value +// and a boolean to check if the value has been set. +func (o *PackageUploadTaskResponse) GetTaskOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Task, true +} + +// SetTask sets field value +func (o *PackageUploadTaskResponse) SetTask(v string) { + o.Task = v +} + +// GetTaskStartTime returns the TaskStartTime field value +func (o *PackageUploadTaskResponse) GetTaskStartTime() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.TaskStartTime +} + +// GetTaskStartTimeOk returns a tuple with the TaskStartTime field value +// and a boolean to check if the value has been set. +func (o *PackageUploadTaskResponse) GetTaskStartTimeOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.TaskStartTime, true +} + +// SetTaskStartTime sets field value +func (o *PackageUploadTaskResponse) SetTaskStartTime(v time.Time) { + o.TaskStartTime = v +} + +func (o PackageUploadTaskResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PackageUploadTaskResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["session"] = o.Session + toSerialize["task"] = o.Task + toSerialize["task_start_time"] = o.TaskStartTime + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PackageUploadTaskResponse) UnmarshalJSON(bytes []byte) (err error) { + varPackageUploadTaskResponse := _PackageUploadTaskResponse{} + + if err = json.Unmarshal(bytes, &varPackageUploadTaskResponse); err == nil { + *o = PackageUploadTaskResponse(varPackageUploadTaskResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "session") + delete(additionalProperties, "task") + delete(additionalProperties, "task_start_time") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePackageUploadTaskResponse struct { + value *PackageUploadTaskResponse + isSet bool +} + +func (v NullablePackageUploadTaskResponse) Get() *PackageUploadTaskResponse { + return v.value +} + +func (v *NullablePackageUploadTaskResponse) Set(val *PackageUploadTaskResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePackageUploadTaskResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePackageUploadTaskResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePackageUploadTaskResponse(val *PackageUploadTaskResponse) *NullablePackageUploadTaskResponse { + return &NullablePackageUploadTaskResponse{value: val, isSet: true} +} + +func (v NullablePackageUploadTaskResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePackageUploadTaskResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_access_policy_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_access_policy_response_list.go new file mode 100644 index 0000000000..327ef9a83c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_access_policy_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedAccessPolicyResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedAccessPolicyResponseList{} + +// PaginatedAccessPolicyResponseList struct for PaginatedAccessPolicyResponseList +type PaginatedAccessPolicyResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AccessPolicyResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedAccessPolicyResponseList PaginatedAccessPolicyResponseList + +// NewPaginatedAccessPolicyResponseList instantiates a new PaginatedAccessPolicyResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedAccessPolicyResponseList() *PaginatedAccessPolicyResponseList { + this := PaginatedAccessPolicyResponseList{} + return &this +} + +// NewPaginatedAccessPolicyResponseListWithDefaults instantiates a new PaginatedAccessPolicyResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedAccessPolicyResponseListWithDefaults() *PaginatedAccessPolicyResponseList { + this := PaginatedAccessPolicyResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedAccessPolicyResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedAccessPolicyResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedAccessPolicyResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedAccessPolicyResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedAccessPolicyResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedAccessPolicyResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedAccessPolicyResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedAccessPolicyResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedAccessPolicyResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedAccessPolicyResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedAccessPolicyResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedAccessPolicyResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedAccessPolicyResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedAccessPolicyResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedAccessPolicyResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedAccessPolicyResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedAccessPolicyResponseList) GetResults() []AccessPolicyResponse { + if o == nil || IsNil(o.Results) { + var ret []AccessPolicyResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedAccessPolicyResponseList) GetResultsOk() ([]AccessPolicyResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedAccessPolicyResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []AccessPolicyResponse and assigns it to the Results field. +func (o *PaginatedAccessPolicyResponseList) SetResults(v []AccessPolicyResponse) { + o.Results = v +} + +func (o PaginatedAccessPolicyResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedAccessPolicyResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedAccessPolicyResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedAccessPolicyResponseList := _PaginatedAccessPolicyResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedAccessPolicyResponseList); err == nil { + *o = PaginatedAccessPolicyResponseList(varPaginatedAccessPolicyResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedAccessPolicyResponseList struct { + value *PaginatedAccessPolicyResponseList + isSet bool +} + +func (v NullablePaginatedAccessPolicyResponseList) Get() *PaginatedAccessPolicyResponseList { + return v.value +} + +func (v *NullablePaginatedAccessPolicyResponseList) Set(val *PaginatedAccessPolicyResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedAccessPolicyResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedAccessPolicyResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedAccessPolicyResponseList(val *PaginatedAccessPolicyResponseList) *NullablePaginatedAccessPolicyResponseList { + return &NullablePaginatedAccessPolicyResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedAccessPolicyResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedAccessPolicyResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_artifact_distribution_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_artifact_distribution_response_list.go new file mode 100644 index 0000000000..acc16c0350 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_artifact_distribution_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedArtifactDistributionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedArtifactDistributionResponseList{} + +// PaginatedArtifactDistributionResponseList struct for PaginatedArtifactDistributionResponseList +type PaginatedArtifactDistributionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ArtifactDistributionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedArtifactDistributionResponseList PaginatedArtifactDistributionResponseList + +// NewPaginatedArtifactDistributionResponseList instantiates a new PaginatedArtifactDistributionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedArtifactDistributionResponseList() *PaginatedArtifactDistributionResponseList { + this := PaginatedArtifactDistributionResponseList{} + return &this +} + +// NewPaginatedArtifactDistributionResponseListWithDefaults instantiates a new PaginatedArtifactDistributionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedArtifactDistributionResponseListWithDefaults() *PaginatedArtifactDistributionResponseList { + this := PaginatedArtifactDistributionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedArtifactDistributionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedArtifactDistributionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedArtifactDistributionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedArtifactDistributionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedArtifactDistributionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedArtifactDistributionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedArtifactDistributionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedArtifactDistributionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedArtifactDistributionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedArtifactDistributionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedArtifactDistributionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedArtifactDistributionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedArtifactDistributionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedArtifactDistributionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedArtifactDistributionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedArtifactDistributionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedArtifactDistributionResponseList) GetResults() []ArtifactDistributionResponse { + if o == nil || IsNil(o.Results) { + var ret []ArtifactDistributionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedArtifactDistributionResponseList) GetResultsOk() ([]ArtifactDistributionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedArtifactDistributionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ArtifactDistributionResponse and assigns it to the Results field. +func (o *PaginatedArtifactDistributionResponseList) SetResults(v []ArtifactDistributionResponse) { + o.Results = v +} + +func (o PaginatedArtifactDistributionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedArtifactDistributionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedArtifactDistributionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedArtifactDistributionResponseList := _PaginatedArtifactDistributionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedArtifactDistributionResponseList); err == nil { + *o = PaginatedArtifactDistributionResponseList(varPaginatedArtifactDistributionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedArtifactDistributionResponseList struct { + value *PaginatedArtifactDistributionResponseList + isSet bool +} + +func (v NullablePaginatedArtifactDistributionResponseList) Get() *PaginatedArtifactDistributionResponseList { + return v.value +} + +func (v *NullablePaginatedArtifactDistributionResponseList) Set(val *PaginatedArtifactDistributionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedArtifactDistributionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedArtifactDistributionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedArtifactDistributionResponseList(val *PaginatedArtifactDistributionResponseList) *NullablePaginatedArtifactDistributionResponseList { + return &NullablePaginatedArtifactDistributionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedArtifactDistributionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedArtifactDistributionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_artifact_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_artifact_response_list.go new file mode 100644 index 0000000000..95510c3307 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_artifact_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedArtifactResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedArtifactResponseList{} + +// PaginatedArtifactResponseList struct for PaginatedArtifactResponseList +type PaginatedArtifactResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ArtifactResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedArtifactResponseList PaginatedArtifactResponseList + +// NewPaginatedArtifactResponseList instantiates a new PaginatedArtifactResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedArtifactResponseList() *PaginatedArtifactResponseList { + this := PaginatedArtifactResponseList{} + return &this +} + +// NewPaginatedArtifactResponseListWithDefaults instantiates a new PaginatedArtifactResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedArtifactResponseListWithDefaults() *PaginatedArtifactResponseList { + this := PaginatedArtifactResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedArtifactResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedArtifactResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedArtifactResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedArtifactResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedArtifactResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedArtifactResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedArtifactResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedArtifactResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedArtifactResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedArtifactResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedArtifactResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedArtifactResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedArtifactResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedArtifactResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedArtifactResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedArtifactResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedArtifactResponseList) GetResults() []ArtifactResponse { + if o == nil || IsNil(o.Results) { + var ret []ArtifactResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedArtifactResponseList) GetResultsOk() ([]ArtifactResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedArtifactResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ArtifactResponse and assigns it to the Results field. +func (o *PaginatedArtifactResponseList) SetResults(v []ArtifactResponse) { + o.Results = v +} + +func (o PaginatedArtifactResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedArtifactResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedArtifactResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedArtifactResponseList := _PaginatedArtifactResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedArtifactResponseList); err == nil { + *o = PaginatedArtifactResponseList(varPaginatedArtifactResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedArtifactResponseList struct { + value *PaginatedArtifactResponseList + isSet bool +} + +func (v NullablePaginatedArtifactResponseList) Get() *PaginatedArtifactResponseList { + return v.value +} + +func (v *NullablePaginatedArtifactResponseList) Set(val *PaginatedArtifactResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedArtifactResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedArtifactResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedArtifactResponseList(val *PaginatedArtifactResponseList) *NullablePaginatedArtifactResponseList { + return &NullablePaginatedArtifactResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedArtifactResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedArtifactResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_response_list.go new file mode 100644 index 0000000000..8537b4c21a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_response_list.go @@ -0,0 +1,226 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedCollectionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedCollectionResponseList{} + +// PaginatedCollectionResponseList struct for PaginatedCollectionResponseList +type PaginatedCollectionResponseList struct { + Meta *PaginatedCollectionResponseListMeta `json:"meta,omitempty"` + Links *PaginatedCollectionResponseListLinks `json:"links,omitempty"` + Data []CollectionResponse `json:"data,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedCollectionResponseList PaginatedCollectionResponseList + +// NewPaginatedCollectionResponseList instantiates a new PaginatedCollectionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedCollectionResponseList() *PaginatedCollectionResponseList { + this := PaginatedCollectionResponseList{} + return &this +} + +// NewPaginatedCollectionResponseListWithDefaults instantiates a new PaginatedCollectionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedCollectionResponseListWithDefaults() *PaginatedCollectionResponseList { + this := PaginatedCollectionResponseList{} + return &this +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *PaginatedCollectionResponseList) GetMeta() PaginatedCollectionResponseListMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedCollectionResponseListMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCollectionResponseList) GetMetaOk() (*PaginatedCollectionResponseListMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *PaginatedCollectionResponseList) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedCollectionResponseListMeta and assigns it to the Meta field. +func (o *PaginatedCollectionResponseList) SetMeta(v PaginatedCollectionResponseListMeta) { + o.Meta = &v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *PaginatedCollectionResponseList) GetLinks() PaginatedCollectionResponseListLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedCollectionResponseListLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCollectionResponseList) GetLinksOk() (*PaginatedCollectionResponseListLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *PaginatedCollectionResponseList) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedCollectionResponseListLinks and assigns it to the Links field. +func (o *PaginatedCollectionResponseList) SetLinks(v PaginatedCollectionResponseListLinks) { + o.Links = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *PaginatedCollectionResponseList) GetData() []CollectionResponse { + if o == nil || IsNil(o.Data) { + var ret []CollectionResponse + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCollectionResponseList) GetDataOk() ([]CollectionResponse, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *PaginatedCollectionResponseList) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []CollectionResponse and assigns it to the Data field. +func (o *PaginatedCollectionResponseList) SetData(v []CollectionResponse) { + o.Data = v +} + +func (o PaginatedCollectionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedCollectionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedCollectionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedCollectionResponseList := _PaginatedCollectionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedCollectionResponseList); err == nil { + *o = PaginatedCollectionResponseList(varPaginatedCollectionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "meta") + delete(additionalProperties, "links") + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedCollectionResponseList struct { + value *PaginatedCollectionResponseList + isSet bool +} + +func (v NullablePaginatedCollectionResponseList) Get() *PaginatedCollectionResponseList { + return v.value +} + +func (v *NullablePaginatedCollectionResponseList) Set(val *PaginatedCollectionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedCollectionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedCollectionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedCollectionResponseList(val *PaginatedCollectionResponseList) *NullablePaginatedCollectionResponseList { + return &NullablePaginatedCollectionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedCollectionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedCollectionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_response_list_links.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_response_list_links.go new file mode 100644 index 0000000000..82a49a07e1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_response_list_links.go @@ -0,0 +1,303 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedCollectionResponseListLinks type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedCollectionResponseListLinks{} + +// PaginatedCollectionResponseListLinks struct for PaginatedCollectionResponseListLinks +type PaginatedCollectionResponseListLinks struct { + First NullableString `json:"first,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Next NullableString `json:"next,omitempty"` + Last NullableString `json:"last,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedCollectionResponseListLinks PaginatedCollectionResponseListLinks + +// NewPaginatedCollectionResponseListLinks instantiates a new PaginatedCollectionResponseListLinks object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedCollectionResponseListLinks() *PaginatedCollectionResponseListLinks { + this := PaginatedCollectionResponseListLinks{} + return &this +} + +// NewPaginatedCollectionResponseListLinksWithDefaults instantiates a new PaginatedCollectionResponseListLinks object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedCollectionResponseListLinksWithDefaults() *PaginatedCollectionResponseListLinks { + this := PaginatedCollectionResponseListLinks{} + return &this +} + +// GetFirst returns the First field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCollectionResponseListLinks) GetFirst() string { + if o == nil || IsNil(o.First.Get()) { + var ret string + return ret + } + return *o.First.Get() +} + +// GetFirstOk returns a tuple with the First field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCollectionResponseListLinks) GetFirstOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.First.Get(), o.First.IsSet() +} + +// HasFirst returns a boolean if a field has been set. +func (o *PaginatedCollectionResponseListLinks) HasFirst() bool { + if o != nil && o.First.IsSet() { + return true + } + + return false +} + +// SetFirst gets a reference to the given NullableString and assigns it to the First field. +func (o *PaginatedCollectionResponseListLinks) SetFirst(v string) { + o.First.Set(&v) +} +// SetFirstNil sets the value for First to be an explicit nil +func (o *PaginatedCollectionResponseListLinks) SetFirstNil() { + o.First.Set(nil) +} + +// UnsetFirst ensures that no value is present for First, not even an explicit nil +func (o *PaginatedCollectionResponseListLinks) UnsetFirst() { + o.First.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCollectionResponseListLinks) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCollectionResponseListLinks) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedCollectionResponseListLinks) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedCollectionResponseListLinks) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedCollectionResponseListLinks) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedCollectionResponseListLinks) UnsetPrevious() { + o.Previous.Unset() +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCollectionResponseListLinks) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCollectionResponseListLinks) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedCollectionResponseListLinks) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedCollectionResponseListLinks) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedCollectionResponseListLinks) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedCollectionResponseListLinks) UnsetNext() { + o.Next.Unset() +} + +// GetLast returns the Last field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCollectionResponseListLinks) GetLast() string { + if o == nil || IsNil(o.Last.Get()) { + var ret string + return ret + } + return *o.Last.Get() +} + +// GetLastOk returns a tuple with the Last field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCollectionResponseListLinks) GetLastOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Last.Get(), o.Last.IsSet() +} + +// HasLast returns a boolean if a field has been set. +func (o *PaginatedCollectionResponseListLinks) HasLast() bool { + if o != nil && o.Last.IsSet() { + return true + } + + return false +} + +// SetLast gets a reference to the given NullableString and assigns it to the Last field. +func (o *PaginatedCollectionResponseListLinks) SetLast(v string) { + o.Last.Set(&v) +} +// SetLastNil sets the value for Last to be an explicit nil +func (o *PaginatedCollectionResponseListLinks) SetLastNil() { + o.Last.Set(nil) +} + +// UnsetLast ensures that no value is present for Last, not even an explicit nil +func (o *PaginatedCollectionResponseListLinks) UnsetLast() { + o.Last.Unset() +} + +func (o PaginatedCollectionResponseListLinks) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedCollectionResponseListLinks) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.First.IsSet() { + toSerialize["first"] = o.First.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Last.IsSet() { + toSerialize["last"] = o.Last.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedCollectionResponseListLinks) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedCollectionResponseListLinks := _PaginatedCollectionResponseListLinks{} + + if err = json.Unmarshal(bytes, &varPaginatedCollectionResponseListLinks); err == nil { + *o = PaginatedCollectionResponseListLinks(varPaginatedCollectionResponseListLinks) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "first") + delete(additionalProperties, "previous") + delete(additionalProperties, "next") + delete(additionalProperties, "last") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedCollectionResponseListLinks struct { + value *PaginatedCollectionResponseListLinks + isSet bool +} + +func (v NullablePaginatedCollectionResponseListLinks) Get() *PaginatedCollectionResponseListLinks { + return v.value +} + +func (v *NullablePaginatedCollectionResponseListLinks) Set(val *PaginatedCollectionResponseListLinks) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedCollectionResponseListLinks) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedCollectionResponseListLinks) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedCollectionResponseListLinks(val *PaginatedCollectionResponseListLinks) *NullablePaginatedCollectionResponseListLinks { + return &NullablePaginatedCollectionResponseListLinks{value: val, isSet: true} +} + +func (v NullablePaginatedCollectionResponseListLinks) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedCollectionResponseListLinks) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_response_list_meta.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_response_list_meta.go new file mode 100644 index 0000000000..1556e6b2e1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_response_list_meta.go @@ -0,0 +1,152 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedCollectionResponseListMeta type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedCollectionResponseListMeta{} + +// PaginatedCollectionResponseListMeta struct for PaginatedCollectionResponseListMeta +type PaginatedCollectionResponseListMeta struct { + Count *int32 `json:"count,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedCollectionResponseListMeta PaginatedCollectionResponseListMeta + +// NewPaginatedCollectionResponseListMeta instantiates a new PaginatedCollectionResponseListMeta object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedCollectionResponseListMeta() *PaginatedCollectionResponseListMeta { + this := PaginatedCollectionResponseListMeta{} + return &this +} + +// NewPaginatedCollectionResponseListMetaWithDefaults instantiates a new PaginatedCollectionResponseListMeta object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedCollectionResponseListMetaWithDefaults() *PaginatedCollectionResponseListMeta { + this := PaginatedCollectionResponseListMeta{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedCollectionResponseListMeta) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCollectionResponseListMeta) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedCollectionResponseListMeta) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedCollectionResponseListMeta) SetCount(v int32) { + o.Count = &v +} + +func (o PaginatedCollectionResponseListMeta) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedCollectionResponseListMeta) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedCollectionResponseListMeta) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedCollectionResponseListMeta := _PaginatedCollectionResponseListMeta{} + + if err = json.Unmarshal(bytes, &varPaginatedCollectionResponseListMeta); err == nil { + *o = PaginatedCollectionResponseListMeta(varPaginatedCollectionResponseListMeta) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedCollectionResponseListMeta struct { + value *PaginatedCollectionResponseListMeta + isSet bool +} + +func (v NullablePaginatedCollectionResponseListMeta) Get() *PaginatedCollectionResponseListMeta { + return v.value +} + +func (v *NullablePaginatedCollectionResponseListMeta) Set(val *PaginatedCollectionResponseListMeta) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedCollectionResponseListMeta) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedCollectionResponseListMeta) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedCollectionResponseListMeta(val *PaginatedCollectionResponseListMeta) *NullablePaginatedCollectionResponseListMeta { + return &NullablePaginatedCollectionResponseListMeta{value: val, isSet: true} +} + +func (v NullablePaginatedCollectionResponseListMeta) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedCollectionResponseListMeta) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_version_list_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_version_list_response_list.go new file mode 100644 index 0000000000..568420d377 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_version_list_response_list.go @@ -0,0 +1,226 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedCollectionVersionListResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedCollectionVersionListResponseList{} + +// PaginatedCollectionVersionListResponseList struct for PaginatedCollectionVersionListResponseList +type PaginatedCollectionVersionListResponseList struct { + Meta *PaginatedCollectionResponseListMeta `json:"meta,omitempty"` + Links *PaginatedCollectionResponseListLinks `json:"links,omitempty"` + Data []CollectionVersionListResponse `json:"data,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedCollectionVersionListResponseList PaginatedCollectionVersionListResponseList + +// NewPaginatedCollectionVersionListResponseList instantiates a new PaginatedCollectionVersionListResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedCollectionVersionListResponseList() *PaginatedCollectionVersionListResponseList { + this := PaginatedCollectionVersionListResponseList{} + return &this +} + +// NewPaginatedCollectionVersionListResponseListWithDefaults instantiates a new PaginatedCollectionVersionListResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedCollectionVersionListResponseListWithDefaults() *PaginatedCollectionVersionListResponseList { + this := PaginatedCollectionVersionListResponseList{} + return &this +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *PaginatedCollectionVersionListResponseList) GetMeta() PaginatedCollectionResponseListMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedCollectionResponseListMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCollectionVersionListResponseList) GetMetaOk() (*PaginatedCollectionResponseListMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *PaginatedCollectionVersionListResponseList) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedCollectionResponseListMeta and assigns it to the Meta field. +func (o *PaginatedCollectionVersionListResponseList) SetMeta(v PaginatedCollectionResponseListMeta) { + o.Meta = &v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *PaginatedCollectionVersionListResponseList) GetLinks() PaginatedCollectionResponseListLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedCollectionResponseListLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCollectionVersionListResponseList) GetLinksOk() (*PaginatedCollectionResponseListLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *PaginatedCollectionVersionListResponseList) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedCollectionResponseListLinks and assigns it to the Links field. +func (o *PaginatedCollectionVersionListResponseList) SetLinks(v PaginatedCollectionResponseListLinks) { + o.Links = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *PaginatedCollectionVersionListResponseList) GetData() []CollectionVersionListResponse { + if o == nil || IsNil(o.Data) { + var ret []CollectionVersionListResponse + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCollectionVersionListResponseList) GetDataOk() ([]CollectionVersionListResponse, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *PaginatedCollectionVersionListResponseList) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []CollectionVersionListResponse and assigns it to the Data field. +func (o *PaginatedCollectionVersionListResponseList) SetData(v []CollectionVersionListResponse) { + o.Data = v +} + +func (o PaginatedCollectionVersionListResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedCollectionVersionListResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedCollectionVersionListResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedCollectionVersionListResponseList := _PaginatedCollectionVersionListResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedCollectionVersionListResponseList); err == nil { + *o = PaginatedCollectionVersionListResponseList(varPaginatedCollectionVersionListResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "meta") + delete(additionalProperties, "links") + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedCollectionVersionListResponseList struct { + value *PaginatedCollectionVersionListResponseList + isSet bool +} + +func (v NullablePaginatedCollectionVersionListResponseList) Get() *PaginatedCollectionVersionListResponseList { + return v.value +} + +func (v *NullablePaginatedCollectionVersionListResponseList) Set(val *PaginatedCollectionVersionListResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedCollectionVersionListResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedCollectionVersionListResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedCollectionVersionListResponseList(val *PaginatedCollectionVersionListResponseList) *NullablePaginatedCollectionVersionListResponseList { + return &NullablePaginatedCollectionVersionListResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedCollectionVersionListResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedCollectionVersionListResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_version_search_list_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_version_search_list_response_list.go new file mode 100644 index 0000000000..166856460b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_collection_version_search_list_response_list.go @@ -0,0 +1,226 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedCollectionVersionSearchListResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedCollectionVersionSearchListResponseList{} + +// PaginatedCollectionVersionSearchListResponseList struct for PaginatedCollectionVersionSearchListResponseList +type PaginatedCollectionVersionSearchListResponseList struct { + Meta *PaginatedCollectionResponseListMeta `json:"meta,omitempty"` + Links *PaginatedCollectionResponseListLinks `json:"links,omitempty"` + Data []CollectionVersionSearchListResponse `json:"data,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedCollectionVersionSearchListResponseList PaginatedCollectionVersionSearchListResponseList + +// NewPaginatedCollectionVersionSearchListResponseList instantiates a new PaginatedCollectionVersionSearchListResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedCollectionVersionSearchListResponseList() *PaginatedCollectionVersionSearchListResponseList { + this := PaginatedCollectionVersionSearchListResponseList{} + return &this +} + +// NewPaginatedCollectionVersionSearchListResponseListWithDefaults instantiates a new PaginatedCollectionVersionSearchListResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedCollectionVersionSearchListResponseListWithDefaults() *PaginatedCollectionVersionSearchListResponseList { + this := PaginatedCollectionVersionSearchListResponseList{} + return &this +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *PaginatedCollectionVersionSearchListResponseList) GetMeta() PaginatedCollectionResponseListMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedCollectionResponseListMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCollectionVersionSearchListResponseList) GetMetaOk() (*PaginatedCollectionResponseListMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *PaginatedCollectionVersionSearchListResponseList) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedCollectionResponseListMeta and assigns it to the Meta field. +func (o *PaginatedCollectionVersionSearchListResponseList) SetMeta(v PaginatedCollectionResponseListMeta) { + o.Meta = &v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *PaginatedCollectionVersionSearchListResponseList) GetLinks() PaginatedCollectionResponseListLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedCollectionResponseListLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCollectionVersionSearchListResponseList) GetLinksOk() (*PaginatedCollectionResponseListLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *PaginatedCollectionVersionSearchListResponseList) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedCollectionResponseListLinks and assigns it to the Links field. +func (o *PaginatedCollectionVersionSearchListResponseList) SetLinks(v PaginatedCollectionResponseListLinks) { + o.Links = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *PaginatedCollectionVersionSearchListResponseList) GetData() []CollectionVersionSearchListResponse { + if o == nil || IsNil(o.Data) { + var ret []CollectionVersionSearchListResponse + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCollectionVersionSearchListResponseList) GetDataOk() ([]CollectionVersionSearchListResponse, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *PaginatedCollectionVersionSearchListResponseList) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []CollectionVersionSearchListResponse and assigns it to the Data field. +func (o *PaginatedCollectionVersionSearchListResponseList) SetData(v []CollectionVersionSearchListResponse) { + o.Data = v +} + +func (o PaginatedCollectionVersionSearchListResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedCollectionVersionSearchListResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedCollectionVersionSearchListResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedCollectionVersionSearchListResponseList := _PaginatedCollectionVersionSearchListResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedCollectionVersionSearchListResponseList); err == nil { + *o = PaginatedCollectionVersionSearchListResponseList(varPaginatedCollectionVersionSearchListResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "meta") + delete(additionalProperties, "links") + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedCollectionVersionSearchListResponseList struct { + value *PaginatedCollectionVersionSearchListResponseList + isSet bool +} + +func (v NullablePaginatedCollectionVersionSearchListResponseList) Get() *PaginatedCollectionVersionSearchListResponseList { + return v.value +} + +func (v *NullablePaginatedCollectionVersionSearchListResponseList) Set(val *PaginatedCollectionVersionSearchListResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedCollectionVersionSearchListResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedCollectionVersionSearchListResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedCollectionVersionSearchListResponseList(val *PaginatedCollectionVersionSearchListResponseList) *NullablePaginatedCollectionVersionSearchListResponseList { + return &NullablePaginatedCollectionVersionSearchListResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedCollectionVersionSearchListResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedCollectionVersionSearchListResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_content_guard_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_content_guard_response_list.go new file mode 100644 index 0000000000..9923ef3445 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_content_guard_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedContentGuardResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedContentGuardResponseList{} + +// PaginatedContentGuardResponseList struct for PaginatedContentGuardResponseList +type PaginatedContentGuardResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ContentGuardResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedContentGuardResponseList PaginatedContentGuardResponseList + +// NewPaginatedContentGuardResponseList instantiates a new PaginatedContentGuardResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedContentGuardResponseList() *PaginatedContentGuardResponseList { + this := PaginatedContentGuardResponseList{} + return &this +} + +// NewPaginatedContentGuardResponseListWithDefaults instantiates a new PaginatedContentGuardResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedContentGuardResponseListWithDefaults() *PaginatedContentGuardResponseList { + this := PaginatedContentGuardResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedContentGuardResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedContentGuardResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedContentGuardResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedContentGuardResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedContentGuardResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedContentGuardResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedContentGuardResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedContentGuardResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedContentGuardResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedContentGuardResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedContentGuardResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedContentGuardResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedContentGuardResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedContentGuardResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedContentGuardResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedContentGuardResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedContentGuardResponseList) GetResults() []ContentGuardResponse { + if o == nil || IsNil(o.Results) { + var ret []ContentGuardResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedContentGuardResponseList) GetResultsOk() ([]ContentGuardResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedContentGuardResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ContentGuardResponse and assigns it to the Results field. +func (o *PaginatedContentGuardResponseList) SetResults(v []ContentGuardResponse) { + o.Results = v +} + +func (o PaginatedContentGuardResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedContentGuardResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedContentGuardResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedContentGuardResponseList := _PaginatedContentGuardResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedContentGuardResponseList); err == nil { + *o = PaginatedContentGuardResponseList(varPaginatedContentGuardResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedContentGuardResponseList struct { + value *PaginatedContentGuardResponseList + isSet bool +} + +func (v NullablePaginatedContentGuardResponseList) Get() *PaginatedContentGuardResponseList { + return v.value +} + +func (v *NullablePaginatedContentGuardResponseList) Set(val *PaginatedContentGuardResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedContentGuardResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedContentGuardResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedContentGuardResponseList(val *PaginatedContentGuardResponseList) *NullablePaginatedContentGuardResponseList { + return &NullablePaginatedContentGuardResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedContentGuardResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedContentGuardResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_content_redirect_content_guard_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_content_redirect_content_guard_response_list.go new file mode 100644 index 0000000000..dbbb218148 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_content_redirect_content_guard_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedContentRedirectContentGuardResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedContentRedirectContentGuardResponseList{} + +// PaginatedContentRedirectContentGuardResponseList struct for PaginatedContentRedirectContentGuardResponseList +type PaginatedContentRedirectContentGuardResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ContentRedirectContentGuardResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedContentRedirectContentGuardResponseList PaginatedContentRedirectContentGuardResponseList + +// NewPaginatedContentRedirectContentGuardResponseList instantiates a new PaginatedContentRedirectContentGuardResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedContentRedirectContentGuardResponseList() *PaginatedContentRedirectContentGuardResponseList { + this := PaginatedContentRedirectContentGuardResponseList{} + return &this +} + +// NewPaginatedContentRedirectContentGuardResponseListWithDefaults instantiates a new PaginatedContentRedirectContentGuardResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedContentRedirectContentGuardResponseListWithDefaults() *PaginatedContentRedirectContentGuardResponseList { + this := PaginatedContentRedirectContentGuardResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedContentRedirectContentGuardResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedContentRedirectContentGuardResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedContentRedirectContentGuardResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedContentRedirectContentGuardResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedContentRedirectContentGuardResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedContentRedirectContentGuardResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedContentRedirectContentGuardResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedContentRedirectContentGuardResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedContentRedirectContentGuardResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedContentRedirectContentGuardResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedContentRedirectContentGuardResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedContentRedirectContentGuardResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedContentRedirectContentGuardResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedContentRedirectContentGuardResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedContentRedirectContentGuardResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedContentRedirectContentGuardResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedContentRedirectContentGuardResponseList) GetResults() []ContentRedirectContentGuardResponse { + if o == nil || IsNil(o.Results) { + var ret []ContentRedirectContentGuardResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedContentRedirectContentGuardResponseList) GetResultsOk() ([]ContentRedirectContentGuardResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedContentRedirectContentGuardResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ContentRedirectContentGuardResponse and assigns it to the Results field. +func (o *PaginatedContentRedirectContentGuardResponseList) SetResults(v []ContentRedirectContentGuardResponse) { + o.Results = v +} + +func (o PaginatedContentRedirectContentGuardResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedContentRedirectContentGuardResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedContentRedirectContentGuardResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedContentRedirectContentGuardResponseList := _PaginatedContentRedirectContentGuardResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedContentRedirectContentGuardResponseList); err == nil { + *o = PaginatedContentRedirectContentGuardResponseList(varPaginatedContentRedirectContentGuardResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedContentRedirectContentGuardResponseList struct { + value *PaginatedContentRedirectContentGuardResponseList + isSet bool +} + +func (v NullablePaginatedContentRedirectContentGuardResponseList) Get() *PaginatedContentRedirectContentGuardResponseList { + return v.value +} + +func (v *NullablePaginatedContentRedirectContentGuardResponseList) Set(val *PaginatedContentRedirectContentGuardResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedContentRedirectContentGuardResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedContentRedirectContentGuardResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedContentRedirectContentGuardResponseList(val *PaginatedContentRedirectContentGuardResponseList) *NullablePaginatedContentRedirectContentGuardResponseList { + return &NullablePaginatedContentRedirectContentGuardResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedContentRedirectContentGuardResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedContentRedirectContentGuardResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_distribution_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_distribution_response_list.go new file mode 100644 index 0000000000..e9620d4e9a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_distribution_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedDistributionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedDistributionResponseList{} + +// PaginatedDistributionResponseList struct for PaginatedDistributionResponseList +type PaginatedDistributionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DistributionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedDistributionResponseList PaginatedDistributionResponseList + +// NewPaginatedDistributionResponseList instantiates a new PaginatedDistributionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedDistributionResponseList() *PaginatedDistributionResponseList { + this := PaginatedDistributionResponseList{} + return &this +} + +// NewPaginatedDistributionResponseListWithDefaults instantiates a new PaginatedDistributionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedDistributionResponseListWithDefaults() *PaginatedDistributionResponseList { + this := PaginatedDistributionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedDistributionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDistributionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedDistributionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedDistributionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedDistributionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedDistributionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedDistributionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedDistributionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedDistributionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedDistributionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedDistributionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedDistributionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedDistributionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedDistributionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedDistributionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedDistributionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedDistributionResponseList) GetResults() []DistributionResponse { + if o == nil || IsNil(o.Results) { + var ret []DistributionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDistributionResponseList) GetResultsOk() ([]DistributionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedDistributionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DistributionResponse and assigns it to the Results field. +func (o *PaginatedDistributionResponseList) SetResults(v []DistributionResponse) { + o.Results = v +} + +func (o PaginatedDistributionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedDistributionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedDistributionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedDistributionResponseList := _PaginatedDistributionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedDistributionResponseList); err == nil { + *o = PaginatedDistributionResponseList(varPaginatedDistributionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedDistributionResponseList struct { + value *PaginatedDistributionResponseList + isSet bool +} + +func (v NullablePaginatedDistributionResponseList) Get() *PaginatedDistributionResponseList { + return v.value +} + +func (v *NullablePaginatedDistributionResponseList) Set(val *PaginatedDistributionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedDistributionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedDistributionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedDistributionResponseList(val *PaginatedDistributionResponseList) *NullablePaginatedDistributionResponseList { + return &NullablePaginatedDistributionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedDistributionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedDistributionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_domain_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_domain_response_list.go new file mode 100644 index 0000000000..845edb8f8c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_domain_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedDomainResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedDomainResponseList{} + +// PaginatedDomainResponseList struct for PaginatedDomainResponseList +type PaginatedDomainResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DomainResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedDomainResponseList PaginatedDomainResponseList + +// NewPaginatedDomainResponseList instantiates a new PaginatedDomainResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedDomainResponseList() *PaginatedDomainResponseList { + this := PaginatedDomainResponseList{} + return &this +} + +// NewPaginatedDomainResponseListWithDefaults instantiates a new PaginatedDomainResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedDomainResponseListWithDefaults() *PaginatedDomainResponseList { + this := PaginatedDomainResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedDomainResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDomainResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedDomainResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedDomainResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedDomainResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedDomainResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedDomainResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedDomainResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedDomainResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedDomainResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedDomainResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedDomainResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedDomainResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedDomainResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedDomainResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedDomainResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedDomainResponseList) GetResults() []DomainResponse { + if o == nil || IsNil(o.Results) { + var ret []DomainResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDomainResponseList) GetResultsOk() ([]DomainResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedDomainResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DomainResponse and assigns it to the Results field. +func (o *PaginatedDomainResponseList) SetResults(v []DomainResponse) { + o.Results = v +} + +func (o PaginatedDomainResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedDomainResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedDomainResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedDomainResponseList := _PaginatedDomainResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedDomainResponseList); err == nil { + *o = PaginatedDomainResponseList(varPaginatedDomainResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedDomainResponseList struct { + value *PaginatedDomainResponseList + isSet bool +} + +func (v NullablePaginatedDomainResponseList) Get() *PaginatedDomainResponseList { + return v.value +} + +func (v *NullablePaginatedDomainResponseList) Set(val *PaginatedDomainResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedDomainResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedDomainResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedDomainResponseList(val *PaginatedDomainResponseList) *NullablePaginatedDomainResponseList { + return &NullablePaginatedDomainResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedDomainResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedDomainResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_filesystem_export_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_filesystem_export_response_list.go new file mode 100644 index 0000000000..e9e90282b3 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_filesystem_export_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedFilesystemExportResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedFilesystemExportResponseList{} + +// PaginatedFilesystemExportResponseList struct for PaginatedFilesystemExportResponseList +type PaginatedFilesystemExportResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []FilesystemExportResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedFilesystemExportResponseList PaginatedFilesystemExportResponseList + +// NewPaginatedFilesystemExportResponseList instantiates a new PaginatedFilesystemExportResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedFilesystemExportResponseList() *PaginatedFilesystemExportResponseList { + this := PaginatedFilesystemExportResponseList{} + return &this +} + +// NewPaginatedFilesystemExportResponseListWithDefaults instantiates a new PaginatedFilesystemExportResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedFilesystemExportResponseListWithDefaults() *PaginatedFilesystemExportResponseList { + this := PaginatedFilesystemExportResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedFilesystemExportResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFilesystemExportResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedFilesystemExportResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedFilesystemExportResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFilesystemExportResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFilesystemExportResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedFilesystemExportResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedFilesystemExportResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedFilesystemExportResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedFilesystemExportResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFilesystemExportResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFilesystemExportResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedFilesystemExportResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedFilesystemExportResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedFilesystemExportResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedFilesystemExportResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedFilesystemExportResponseList) GetResults() []FilesystemExportResponse { + if o == nil || IsNil(o.Results) { + var ret []FilesystemExportResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFilesystemExportResponseList) GetResultsOk() ([]FilesystemExportResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedFilesystemExportResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FilesystemExportResponse and assigns it to the Results field. +func (o *PaginatedFilesystemExportResponseList) SetResults(v []FilesystemExportResponse) { + o.Results = v +} + +func (o PaginatedFilesystemExportResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedFilesystemExportResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedFilesystemExportResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedFilesystemExportResponseList := _PaginatedFilesystemExportResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedFilesystemExportResponseList); err == nil { + *o = PaginatedFilesystemExportResponseList(varPaginatedFilesystemExportResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedFilesystemExportResponseList struct { + value *PaginatedFilesystemExportResponseList + isSet bool +} + +func (v NullablePaginatedFilesystemExportResponseList) Get() *PaginatedFilesystemExportResponseList { + return v.value +} + +func (v *NullablePaginatedFilesystemExportResponseList) Set(val *PaginatedFilesystemExportResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedFilesystemExportResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedFilesystemExportResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedFilesystemExportResponseList(val *PaginatedFilesystemExportResponseList) *NullablePaginatedFilesystemExportResponseList { + return &NullablePaginatedFilesystemExportResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedFilesystemExportResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedFilesystemExportResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_filesystem_exporter_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_filesystem_exporter_response_list.go new file mode 100644 index 0000000000..174a2e2062 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_filesystem_exporter_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedFilesystemExporterResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedFilesystemExporterResponseList{} + +// PaginatedFilesystemExporterResponseList struct for PaginatedFilesystemExporterResponseList +type PaginatedFilesystemExporterResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []FilesystemExporterResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedFilesystemExporterResponseList PaginatedFilesystemExporterResponseList + +// NewPaginatedFilesystemExporterResponseList instantiates a new PaginatedFilesystemExporterResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedFilesystemExporterResponseList() *PaginatedFilesystemExporterResponseList { + this := PaginatedFilesystemExporterResponseList{} + return &this +} + +// NewPaginatedFilesystemExporterResponseListWithDefaults instantiates a new PaginatedFilesystemExporterResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedFilesystemExporterResponseListWithDefaults() *PaginatedFilesystemExporterResponseList { + this := PaginatedFilesystemExporterResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedFilesystemExporterResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFilesystemExporterResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedFilesystemExporterResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedFilesystemExporterResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFilesystemExporterResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFilesystemExporterResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedFilesystemExporterResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedFilesystemExporterResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedFilesystemExporterResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedFilesystemExporterResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFilesystemExporterResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFilesystemExporterResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedFilesystemExporterResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedFilesystemExporterResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedFilesystemExporterResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedFilesystemExporterResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedFilesystemExporterResponseList) GetResults() []FilesystemExporterResponse { + if o == nil || IsNil(o.Results) { + var ret []FilesystemExporterResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFilesystemExporterResponseList) GetResultsOk() ([]FilesystemExporterResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedFilesystemExporterResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FilesystemExporterResponse and assigns it to the Results field. +func (o *PaginatedFilesystemExporterResponseList) SetResults(v []FilesystemExporterResponse) { + o.Results = v +} + +func (o PaginatedFilesystemExporterResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedFilesystemExporterResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedFilesystemExporterResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedFilesystemExporterResponseList := _PaginatedFilesystemExporterResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedFilesystemExporterResponseList); err == nil { + *o = PaginatedFilesystemExporterResponseList(varPaginatedFilesystemExporterResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedFilesystemExporterResponseList struct { + value *PaginatedFilesystemExporterResponseList + isSet bool +} + +func (v NullablePaginatedFilesystemExporterResponseList) Get() *PaginatedFilesystemExporterResponseList { + return v.value +} + +func (v *NullablePaginatedFilesystemExporterResponseList) Set(val *PaginatedFilesystemExporterResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedFilesystemExporterResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedFilesystemExporterResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedFilesystemExporterResponseList(val *PaginatedFilesystemExporterResponseList) *NullablePaginatedFilesystemExporterResponseList { + return &NullablePaginatedFilesystemExporterResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedFilesystemExporterResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedFilesystemExporterResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_collection_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_collection_response_list.go new file mode 100644 index 0000000000..f87575842e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_collection_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedGalaxyCollectionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedGalaxyCollectionResponseList{} + +// PaginatedGalaxyCollectionResponseList struct for PaginatedGalaxyCollectionResponseList +type PaginatedGalaxyCollectionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []GalaxyCollectionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedGalaxyCollectionResponseList PaginatedGalaxyCollectionResponseList + +// NewPaginatedGalaxyCollectionResponseList instantiates a new PaginatedGalaxyCollectionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedGalaxyCollectionResponseList() *PaginatedGalaxyCollectionResponseList { + this := PaginatedGalaxyCollectionResponseList{} + return &this +} + +// NewPaginatedGalaxyCollectionResponseListWithDefaults instantiates a new PaginatedGalaxyCollectionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedGalaxyCollectionResponseListWithDefaults() *PaginatedGalaxyCollectionResponseList { + this := PaginatedGalaxyCollectionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedGalaxyCollectionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGalaxyCollectionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedGalaxyCollectionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedGalaxyCollectionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGalaxyCollectionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGalaxyCollectionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedGalaxyCollectionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedGalaxyCollectionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedGalaxyCollectionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedGalaxyCollectionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGalaxyCollectionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGalaxyCollectionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedGalaxyCollectionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedGalaxyCollectionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedGalaxyCollectionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedGalaxyCollectionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedGalaxyCollectionResponseList) GetResults() []GalaxyCollectionResponse { + if o == nil || IsNil(o.Results) { + var ret []GalaxyCollectionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGalaxyCollectionResponseList) GetResultsOk() ([]GalaxyCollectionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedGalaxyCollectionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []GalaxyCollectionResponse and assigns it to the Results field. +func (o *PaginatedGalaxyCollectionResponseList) SetResults(v []GalaxyCollectionResponse) { + o.Results = v +} + +func (o PaginatedGalaxyCollectionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedGalaxyCollectionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedGalaxyCollectionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedGalaxyCollectionResponseList := _PaginatedGalaxyCollectionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedGalaxyCollectionResponseList); err == nil { + *o = PaginatedGalaxyCollectionResponseList(varPaginatedGalaxyCollectionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedGalaxyCollectionResponseList struct { + value *PaginatedGalaxyCollectionResponseList + isSet bool +} + +func (v NullablePaginatedGalaxyCollectionResponseList) Get() *PaginatedGalaxyCollectionResponseList { + return v.value +} + +func (v *NullablePaginatedGalaxyCollectionResponseList) Set(val *PaginatedGalaxyCollectionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedGalaxyCollectionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedGalaxyCollectionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedGalaxyCollectionResponseList(val *PaginatedGalaxyCollectionResponseList) *NullablePaginatedGalaxyCollectionResponseList { + return &NullablePaginatedGalaxyCollectionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedGalaxyCollectionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedGalaxyCollectionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_collection_version_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_collection_version_response_list.go new file mode 100644 index 0000000000..72fa53d7c6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_collection_version_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedGalaxyCollectionVersionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedGalaxyCollectionVersionResponseList{} + +// PaginatedGalaxyCollectionVersionResponseList struct for PaginatedGalaxyCollectionVersionResponseList +type PaginatedGalaxyCollectionVersionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []GalaxyCollectionVersionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedGalaxyCollectionVersionResponseList PaginatedGalaxyCollectionVersionResponseList + +// NewPaginatedGalaxyCollectionVersionResponseList instantiates a new PaginatedGalaxyCollectionVersionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedGalaxyCollectionVersionResponseList() *PaginatedGalaxyCollectionVersionResponseList { + this := PaginatedGalaxyCollectionVersionResponseList{} + return &this +} + +// NewPaginatedGalaxyCollectionVersionResponseListWithDefaults instantiates a new PaginatedGalaxyCollectionVersionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedGalaxyCollectionVersionResponseListWithDefaults() *PaginatedGalaxyCollectionVersionResponseList { + this := PaginatedGalaxyCollectionVersionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedGalaxyCollectionVersionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGalaxyCollectionVersionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedGalaxyCollectionVersionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedGalaxyCollectionVersionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGalaxyCollectionVersionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGalaxyCollectionVersionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedGalaxyCollectionVersionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedGalaxyCollectionVersionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedGalaxyCollectionVersionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedGalaxyCollectionVersionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGalaxyCollectionVersionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGalaxyCollectionVersionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedGalaxyCollectionVersionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedGalaxyCollectionVersionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedGalaxyCollectionVersionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedGalaxyCollectionVersionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedGalaxyCollectionVersionResponseList) GetResults() []GalaxyCollectionVersionResponse { + if o == nil || IsNil(o.Results) { + var ret []GalaxyCollectionVersionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGalaxyCollectionVersionResponseList) GetResultsOk() ([]GalaxyCollectionVersionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedGalaxyCollectionVersionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []GalaxyCollectionVersionResponse and assigns it to the Results field. +func (o *PaginatedGalaxyCollectionVersionResponseList) SetResults(v []GalaxyCollectionVersionResponse) { + o.Results = v +} + +func (o PaginatedGalaxyCollectionVersionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedGalaxyCollectionVersionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedGalaxyCollectionVersionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedGalaxyCollectionVersionResponseList := _PaginatedGalaxyCollectionVersionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedGalaxyCollectionVersionResponseList); err == nil { + *o = PaginatedGalaxyCollectionVersionResponseList(varPaginatedGalaxyCollectionVersionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedGalaxyCollectionVersionResponseList struct { + value *PaginatedGalaxyCollectionVersionResponseList + isSet bool +} + +func (v NullablePaginatedGalaxyCollectionVersionResponseList) Get() *PaginatedGalaxyCollectionVersionResponseList { + return v.value +} + +func (v *NullablePaginatedGalaxyCollectionVersionResponseList) Set(val *PaginatedGalaxyCollectionVersionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedGalaxyCollectionVersionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedGalaxyCollectionVersionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedGalaxyCollectionVersionResponseList(val *PaginatedGalaxyCollectionVersionResponseList) *NullablePaginatedGalaxyCollectionVersionResponseList { + return &NullablePaginatedGalaxyCollectionVersionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedGalaxyCollectionVersionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedGalaxyCollectionVersionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_role_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_role_response_list.go new file mode 100644 index 0000000000..9d2aecb3b4 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_role_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedGalaxyRoleResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedGalaxyRoleResponseList{} + +// PaginatedGalaxyRoleResponseList struct for PaginatedGalaxyRoleResponseList +type PaginatedGalaxyRoleResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []GalaxyRoleResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedGalaxyRoleResponseList PaginatedGalaxyRoleResponseList + +// NewPaginatedGalaxyRoleResponseList instantiates a new PaginatedGalaxyRoleResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedGalaxyRoleResponseList() *PaginatedGalaxyRoleResponseList { + this := PaginatedGalaxyRoleResponseList{} + return &this +} + +// NewPaginatedGalaxyRoleResponseListWithDefaults instantiates a new PaginatedGalaxyRoleResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedGalaxyRoleResponseListWithDefaults() *PaginatedGalaxyRoleResponseList { + this := PaginatedGalaxyRoleResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedGalaxyRoleResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGalaxyRoleResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedGalaxyRoleResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedGalaxyRoleResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGalaxyRoleResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGalaxyRoleResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedGalaxyRoleResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedGalaxyRoleResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedGalaxyRoleResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedGalaxyRoleResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGalaxyRoleResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGalaxyRoleResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedGalaxyRoleResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedGalaxyRoleResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedGalaxyRoleResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedGalaxyRoleResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedGalaxyRoleResponseList) GetResults() []GalaxyRoleResponse { + if o == nil || IsNil(o.Results) { + var ret []GalaxyRoleResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGalaxyRoleResponseList) GetResultsOk() ([]GalaxyRoleResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedGalaxyRoleResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []GalaxyRoleResponse and assigns it to the Results field. +func (o *PaginatedGalaxyRoleResponseList) SetResults(v []GalaxyRoleResponse) { + o.Results = v +} + +func (o PaginatedGalaxyRoleResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedGalaxyRoleResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedGalaxyRoleResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedGalaxyRoleResponseList := _PaginatedGalaxyRoleResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedGalaxyRoleResponseList); err == nil { + *o = PaginatedGalaxyRoleResponseList(varPaginatedGalaxyRoleResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedGalaxyRoleResponseList struct { + value *PaginatedGalaxyRoleResponseList + isSet bool +} + +func (v NullablePaginatedGalaxyRoleResponseList) Get() *PaginatedGalaxyRoleResponseList { + return v.value +} + +func (v *NullablePaginatedGalaxyRoleResponseList) Set(val *PaginatedGalaxyRoleResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedGalaxyRoleResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedGalaxyRoleResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedGalaxyRoleResponseList(val *PaginatedGalaxyRoleResponseList) *NullablePaginatedGalaxyRoleResponseList { + return &NullablePaginatedGalaxyRoleResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedGalaxyRoleResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedGalaxyRoleResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_role_version_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_role_version_response_list.go new file mode 100644 index 0000000000..c68c62bd72 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_galaxy_role_version_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedGalaxyRoleVersionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedGalaxyRoleVersionResponseList{} + +// PaginatedGalaxyRoleVersionResponseList struct for PaginatedGalaxyRoleVersionResponseList +type PaginatedGalaxyRoleVersionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []GalaxyRoleVersionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedGalaxyRoleVersionResponseList PaginatedGalaxyRoleVersionResponseList + +// NewPaginatedGalaxyRoleVersionResponseList instantiates a new PaginatedGalaxyRoleVersionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedGalaxyRoleVersionResponseList() *PaginatedGalaxyRoleVersionResponseList { + this := PaginatedGalaxyRoleVersionResponseList{} + return &this +} + +// NewPaginatedGalaxyRoleVersionResponseListWithDefaults instantiates a new PaginatedGalaxyRoleVersionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedGalaxyRoleVersionResponseListWithDefaults() *PaginatedGalaxyRoleVersionResponseList { + this := PaginatedGalaxyRoleVersionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedGalaxyRoleVersionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGalaxyRoleVersionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedGalaxyRoleVersionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedGalaxyRoleVersionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGalaxyRoleVersionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGalaxyRoleVersionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedGalaxyRoleVersionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedGalaxyRoleVersionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedGalaxyRoleVersionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedGalaxyRoleVersionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGalaxyRoleVersionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGalaxyRoleVersionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedGalaxyRoleVersionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedGalaxyRoleVersionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedGalaxyRoleVersionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedGalaxyRoleVersionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedGalaxyRoleVersionResponseList) GetResults() []GalaxyRoleVersionResponse { + if o == nil || IsNil(o.Results) { + var ret []GalaxyRoleVersionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGalaxyRoleVersionResponseList) GetResultsOk() ([]GalaxyRoleVersionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedGalaxyRoleVersionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []GalaxyRoleVersionResponse and assigns it to the Results field. +func (o *PaginatedGalaxyRoleVersionResponseList) SetResults(v []GalaxyRoleVersionResponse) { + o.Results = v +} + +func (o PaginatedGalaxyRoleVersionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedGalaxyRoleVersionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedGalaxyRoleVersionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedGalaxyRoleVersionResponseList := _PaginatedGalaxyRoleVersionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedGalaxyRoleVersionResponseList); err == nil { + *o = PaginatedGalaxyRoleVersionResponseList(varPaginatedGalaxyRoleVersionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedGalaxyRoleVersionResponseList struct { + value *PaginatedGalaxyRoleVersionResponseList + isSet bool +} + +func (v NullablePaginatedGalaxyRoleVersionResponseList) Get() *PaginatedGalaxyRoleVersionResponseList { + return v.value +} + +func (v *NullablePaginatedGalaxyRoleVersionResponseList) Set(val *PaginatedGalaxyRoleVersionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedGalaxyRoleVersionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedGalaxyRoleVersionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedGalaxyRoleVersionResponseList(val *PaginatedGalaxyRoleVersionResponseList) *NullablePaginatedGalaxyRoleVersionResponseList { + return &NullablePaginatedGalaxyRoleVersionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedGalaxyRoleVersionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedGalaxyRoleVersionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_group_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_group_response_list.go new file mode 100644 index 0000000000..8a1062c7c1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_group_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedGroupResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedGroupResponseList{} + +// PaginatedGroupResponseList struct for PaginatedGroupResponseList +type PaginatedGroupResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []GroupResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedGroupResponseList PaginatedGroupResponseList + +// NewPaginatedGroupResponseList instantiates a new PaginatedGroupResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedGroupResponseList() *PaginatedGroupResponseList { + this := PaginatedGroupResponseList{} + return &this +} + +// NewPaginatedGroupResponseListWithDefaults instantiates a new PaginatedGroupResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedGroupResponseListWithDefaults() *PaginatedGroupResponseList { + this := PaginatedGroupResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedGroupResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGroupResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedGroupResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedGroupResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGroupResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGroupResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedGroupResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedGroupResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedGroupResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedGroupResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGroupResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGroupResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedGroupResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedGroupResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedGroupResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedGroupResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedGroupResponseList) GetResults() []GroupResponse { + if o == nil || IsNil(o.Results) { + var ret []GroupResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGroupResponseList) GetResultsOk() ([]GroupResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedGroupResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []GroupResponse and assigns it to the Results field. +func (o *PaginatedGroupResponseList) SetResults(v []GroupResponse) { + o.Results = v +} + +func (o PaginatedGroupResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedGroupResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedGroupResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedGroupResponseList := _PaginatedGroupResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedGroupResponseList); err == nil { + *o = PaginatedGroupResponseList(varPaginatedGroupResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedGroupResponseList struct { + value *PaginatedGroupResponseList + isSet bool +} + +func (v NullablePaginatedGroupResponseList) Get() *PaginatedGroupResponseList { + return v.value +} + +func (v *NullablePaginatedGroupResponseList) Set(val *PaginatedGroupResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedGroupResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedGroupResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedGroupResponseList(val *PaginatedGroupResponseList) *NullablePaginatedGroupResponseList { + return &NullablePaginatedGroupResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedGroupResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedGroupResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_group_role_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_group_role_response_list.go new file mode 100644 index 0000000000..e8649bedb0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_group_role_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedGroupRoleResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedGroupRoleResponseList{} + +// PaginatedGroupRoleResponseList struct for PaginatedGroupRoleResponseList +type PaginatedGroupRoleResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []GroupRoleResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedGroupRoleResponseList PaginatedGroupRoleResponseList + +// NewPaginatedGroupRoleResponseList instantiates a new PaginatedGroupRoleResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedGroupRoleResponseList() *PaginatedGroupRoleResponseList { + this := PaginatedGroupRoleResponseList{} + return &this +} + +// NewPaginatedGroupRoleResponseListWithDefaults instantiates a new PaginatedGroupRoleResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedGroupRoleResponseListWithDefaults() *PaginatedGroupRoleResponseList { + this := PaginatedGroupRoleResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedGroupRoleResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGroupRoleResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedGroupRoleResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedGroupRoleResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGroupRoleResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGroupRoleResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedGroupRoleResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedGroupRoleResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedGroupRoleResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedGroupRoleResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGroupRoleResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGroupRoleResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedGroupRoleResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedGroupRoleResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedGroupRoleResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedGroupRoleResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedGroupRoleResponseList) GetResults() []GroupRoleResponse { + if o == nil || IsNil(o.Results) { + var ret []GroupRoleResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGroupRoleResponseList) GetResultsOk() ([]GroupRoleResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedGroupRoleResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []GroupRoleResponse and assigns it to the Results field. +func (o *PaginatedGroupRoleResponseList) SetResults(v []GroupRoleResponse) { + o.Results = v +} + +func (o PaginatedGroupRoleResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedGroupRoleResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedGroupRoleResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedGroupRoleResponseList := _PaginatedGroupRoleResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedGroupRoleResponseList); err == nil { + *o = PaginatedGroupRoleResponseList(varPaginatedGroupRoleResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedGroupRoleResponseList struct { + value *PaginatedGroupRoleResponseList + isSet bool +} + +func (v NullablePaginatedGroupRoleResponseList) Get() *PaginatedGroupRoleResponseList { + return v.value +} + +func (v *NullablePaginatedGroupRoleResponseList) Set(val *PaginatedGroupRoleResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedGroupRoleResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedGroupRoleResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedGroupRoleResponseList(val *PaginatedGroupRoleResponseList) *NullablePaginatedGroupRoleResponseList { + return &NullablePaginatedGroupRoleResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedGroupRoleResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedGroupRoleResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_group_user_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_group_user_response_list.go new file mode 100644 index 0000000000..a0aa50488d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_group_user_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedGroupUserResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedGroupUserResponseList{} + +// PaginatedGroupUserResponseList struct for PaginatedGroupUserResponseList +type PaginatedGroupUserResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []GroupUserResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedGroupUserResponseList PaginatedGroupUserResponseList + +// NewPaginatedGroupUserResponseList instantiates a new PaginatedGroupUserResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedGroupUserResponseList() *PaginatedGroupUserResponseList { + this := PaginatedGroupUserResponseList{} + return &this +} + +// NewPaginatedGroupUserResponseListWithDefaults instantiates a new PaginatedGroupUserResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedGroupUserResponseListWithDefaults() *PaginatedGroupUserResponseList { + this := PaginatedGroupUserResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedGroupUserResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGroupUserResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedGroupUserResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedGroupUserResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGroupUserResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGroupUserResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedGroupUserResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedGroupUserResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedGroupUserResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedGroupUserResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedGroupUserResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedGroupUserResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedGroupUserResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedGroupUserResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedGroupUserResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedGroupUserResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedGroupUserResponseList) GetResults() []GroupUserResponse { + if o == nil || IsNil(o.Results) { + var ret []GroupUserResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGroupUserResponseList) GetResultsOk() ([]GroupUserResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedGroupUserResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []GroupUserResponse and assigns it to the Results field. +func (o *PaginatedGroupUserResponseList) SetResults(v []GroupUserResponse) { + o.Results = v +} + +func (o PaginatedGroupUserResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedGroupUserResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedGroupUserResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedGroupUserResponseList := _PaginatedGroupUserResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedGroupUserResponseList); err == nil { + *o = PaginatedGroupUserResponseList(varPaginatedGroupUserResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedGroupUserResponseList struct { + value *PaginatedGroupUserResponseList + isSet bool +} + +func (v NullablePaginatedGroupUserResponseList) Get() *PaginatedGroupUserResponseList { + return v.value +} + +func (v *NullablePaginatedGroupUserResponseList) Set(val *PaginatedGroupUserResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedGroupUserResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedGroupUserResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedGroupUserResponseList(val *PaginatedGroupUserResponseList) *NullablePaginatedGroupUserResponseList { + return &NullablePaginatedGroupUserResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedGroupUserResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedGroupUserResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_import_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_import_response_list.go new file mode 100644 index 0000000000..45716a7bcd --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_import_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedImportResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedImportResponseList{} + +// PaginatedImportResponseList struct for PaginatedImportResponseList +type PaginatedImportResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ImportResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedImportResponseList PaginatedImportResponseList + +// NewPaginatedImportResponseList instantiates a new PaginatedImportResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedImportResponseList() *PaginatedImportResponseList { + this := PaginatedImportResponseList{} + return &this +} + +// NewPaginatedImportResponseListWithDefaults instantiates a new PaginatedImportResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedImportResponseListWithDefaults() *PaginatedImportResponseList { + this := PaginatedImportResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedImportResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedImportResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedImportResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedImportResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedImportResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedImportResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedImportResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedImportResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedImportResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedImportResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedImportResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedImportResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedImportResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedImportResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedImportResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedImportResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedImportResponseList) GetResults() []ImportResponse { + if o == nil || IsNil(o.Results) { + var ret []ImportResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedImportResponseList) GetResultsOk() ([]ImportResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedImportResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ImportResponse and assigns it to the Results field. +func (o *PaginatedImportResponseList) SetResults(v []ImportResponse) { + o.Results = v +} + +func (o PaginatedImportResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedImportResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedImportResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedImportResponseList := _PaginatedImportResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedImportResponseList); err == nil { + *o = PaginatedImportResponseList(varPaginatedImportResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedImportResponseList struct { + value *PaginatedImportResponseList + isSet bool +} + +func (v NullablePaginatedImportResponseList) Get() *PaginatedImportResponseList { + return v.value +} + +func (v *NullablePaginatedImportResponseList) Set(val *PaginatedImportResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedImportResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedImportResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedImportResponseList(val *PaginatedImportResponseList) *NullablePaginatedImportResponseList { + return &NullablePaginatedImportResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedImportResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedImportResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_multiple_artifact_content_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_multiple_artifact_content_response_list.go new file mode 100644 index 0000000000..6ecc5a4979 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_multiple_artifact_content_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedMultipleArtifactContentResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedMultipleArtifactContentResponseList{} + +// PaginatedMultipleArtifactContentResponseList struct for PaginatedMultipleArtifactContentResponseList +type PaginatedMultipleArtifactContentResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []MultipleArtifactContentResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedMultipleArtifactContentResponseList PaginatedMultipleArtifactContentResponseList + +// NewPaginatedMultipleArtifactContentResponseList instantiates a new PaginatedMultipleArtifactContentResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedMultipleArtifactContentResponseList() *PaginatedMultipleArtifactContentResponseList { + this := PaginatedMultipleArtifactContentResponseList{} + return &this +} + +// NewPaginatedMultipleArtifactContentResponseListWithDefaults instantiates a new PaginatedMultipleArtifactContentResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedMultipleArtifactContentResponseListWithDefaults() *PaginatedMultipleArtifactContentResponseList { + this := PaginatedMultipleArtifactContentResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedMultipleArtifactContentResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedMultipleArtifactContentResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedMultipleArtifactContentResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedMultipleArtifactContentResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedMultipleArtifactContentResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedMultipleArtifactContentResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedMultipleArtifactContentResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedMultipleArtifactContentResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedMultipleArtifactContentResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedMultipleArtifactContentResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedMultipleArtifactContentResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedMultipleArtifactContentResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedMultipleArtifactContentResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedMultipleArtifactContentResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedMultipleArtifactContentResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedMultipleArtifactContentResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedMultipleArtifactContentResponseList) GetResults() []MultipleArtifactContentResponse { + if o == nil || IsNil(o.Results) { + var ret []MultipleArtifactContentResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedMultipleArtifactContentResponseList) GetResultsOk() ([]MultipleArtifactContentResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedMultipleArtifactContentResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []MultipleArtifactContentResponse and assigns it to the Results field. +func (o *PaginatedMultipleArtifactContentResponseList) SetResults(v []MultipleArtifactContentResponse) { + o.Results = v +} + +func (o PaginatedMultipleArtifactContentResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedMultipleArtifactContentResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedMultipleArtifactContentResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedMultipleArtifactContentResponseList := _PaginatedMultipleArtifactContentResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedMultipleArtifactContentResponseList); err == nil { + *o = PaginatedMultipleArtifactContentResponseList(varPaginatedMultipleArtifactContentResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedMultipleArtifactContentResponseList struct { + value *PaginatedMultipleArtifactContentResponseList + isSet bool +} + +func (v NullablePaginatedMultipleArtifactContentResponseList) Get() *PaginatedMultipleArtifactContentResponseList { + return v.value +} + +func (v *NullablePaginatedMultipleArtifactContentResponseList) Set(val *PaginatedMultipleArtifactContentResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedMultipleArtifactContentResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedMultipleArtifactContentResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedMultipleArtifactContentResponseList(val *PaginatedMultipleArtifactContentResponseList) *NullablePaginatedMultipleArtifactContentResponseList { + return &NullablePaginatedMultipleArtifactContentResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedMultipleArtifactContentResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedMultipleArtifactContentResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_publication_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_publication_response_list.go new file mode 100644 index 0000000000..f3a5a3e4de --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_publication_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedPublicationResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPublicationResponseList{} + +// PaginatedPublicationResponseList struct for PaginatedPublicationResponseList +type PaginatedPublicationResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PublicationResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedPublicationResponseList PaginatedPublicationResponseList + +// NewPaginatedPublicationResponseList instantiates a new PaginatedPublicationResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedPublicationResponseList() *PaginatedPublicationResponseList { + this := PaginatedPublicationResponseList{} + return &this +} + +// NewPaginatedPublicationResponseListWithDefaults instantiates a new PaginatedPublicationResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedPublicationResponseListWithDefaults() *PaginatedPublicationResponseList { + this := PaginatedPublicationResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedPublicationResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPublicationResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedPublicationResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedPublicationResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedPublicationResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedPublicationResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedPublicationResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedPublicationResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedPublicationResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedPublicationResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedPublicationResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedPublicationResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedPublicationResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedPublicationResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedPublicationResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedPublicationResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedPublicationResponseList) GetResults() []PublicationResponse { + if o == nil || IsNil(o.Results) { + var ret []PublicationResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPublicationResponseList) GetResultsOk() ([]PublicationResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedPublicationResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []PublicationResponse and assigns it to the Results field. +func (o *PaginatedPublicationResponseList) SetResults(v []PublicationResponse) { + o.Results = v +} + +func (o PaginatedPublicationResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedPublicationResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedPublicationResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedPublicationResponseList := _PaginatedPublicationResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedPublicationResponseList); err == nil { + *o = PaginatedPublicationResponseList(varPaginatedPublicationResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedPublicationResponseList struct { + value *PaginatedPublicationResponseList + isSet bool +} + +func (v NullablePaginatedPublicationResponseList) Get() *PaginatedPublicationResponseList { + return v.value +} + +func (v *NullablePaginatedPublicationResponseList) Set(val *PaginatedPublicationResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedPublicationResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedPublicationResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedPublicationResponseList(val *PaginatedPublicationResponseList) *NullablePaginatedPublicationResponseList { + return &NullablePaginatedPublicationResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedPublicationResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedPublicationResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_pulp_export_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_pulp_export_response_list.go new file mode 100644 index 0000000000..b8f15b4a75 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_pulp_export_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedPulpExportResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPulpExportResponseList{} + +// PaginatedPulpExportResponseList struct for PaginatedPulpExportResponseList +type PaginatedPulpExportResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PulpExportResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedPulpExportResponseList PaginatedPulpExportResponseList + +// NewPaginatedPulpExportResponseList instantiates a new PaginatedPulpExportResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedPulpExportResponseList() *PaginatedPulpExportResponseList { + this := PaginatedPulpExportResponseList{} + return &this +} + +// NewPaginatedPulpExportResponseListWithDefaults instantiates a new PaginatedPulpExportResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedPulpExportResponseListWithDefaults() *PaginatedPulpExportResponseList { + this := PaginatedPulpExportResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedPulpExportResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPulpExportResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedPulpExportResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedPulpExportResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedPulpExportResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedPulpExportResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedPulpExportResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedPulpExportResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedPulpExportResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedPulpExportResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedPulpExportResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedPulpExportResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedPulpExportResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedPulpExportResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedPulpExportResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedPulpExportResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedPulpExportResponseList) GetResults() []PulpExportResponse { + if o == nil || IsNil(o.Results) { + var ret []PulpExportResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPulpExportResponseList) GetResultsOk() ([]PulpExportResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedPulpExportResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []PulpExportResponse and assigns it to the Results field. +func (o *PaginatedPulpExportResponseList) SetResults(v []PulpExportResponse) { + o.Results = v +} + +func (o PaginatedPulpExportResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedPulpExportResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedPulpExportResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedPulpExportResponseList := _PaginatedPulpExportResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedPulpExportResponseList); err == nil { + *o = PaginatedPulpExportResponseList(varPaginatedPulpExportResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedPulpExportResponseList struct { + value *PaginatedPulpExportResponseList + isSet bool +} + +func (v NullablePaginatedPulpExportResponseList) Get() *PaginatedPulpExportResponseList { + return v.value +} + +func (v *NullablePaginatedPulpExportResponseList) Set(val *PaginatedPulpExportResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedPulpExportResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedPulpExportResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedPulpExportResponseList(val *PaginatedPulpExportResponseList) *NullablePaginatedPulpExportResponseList { + return &NullablePaginatedPulpExportResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedPulpExportResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedPulpExportResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_pulp_exporter_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_pulp_exporter_response_list.go new file mode 100644 index 0000000000..7566159df0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_pulp_exporter_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedPulpExporterResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPulpExporterResponseList{} + +// PaginatedPulpExporterResponseList struct for PaginatedPulpExporterResponseList +type PaginatedPulpExporterResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PulpExporterResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedPulpExporterResponseList PaginatedPulpExporterResponseList + +// NewPaginatedPulpExporterResponseList instantiates a new PaginatedPulpExporterResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedPulpExporterResponseList() *PaginatedPulpExporterResponseList { + this := PaginatedPulpExporterResponseList{} + return &this +} + +// NewPaginatedPulpExporterResponseListWithDefaults instantiates a new PaginatedPulpExporterResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedPulpExporterResponseListWithDefaults() *PaginatedPulpExporterResponseList { + this := PaginatedPulpExporterResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedPulpExporterResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPulpExporterResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedPulpExporterResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedPulpExporterResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedPulpExporterResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedPulpExporterResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedPulpExporterResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedPulpExporterResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedPulpExporterResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedPulpExporterResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedPulpExporterResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedPulpExporterResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedPulpExporterResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedPulpExporterResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedPulpExporterResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedPulpExporterResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedPulpExporterResponseList) GetResults() []PulpExporterResponse { + if o == nil || IsNil(o.Results) { + var ret []PulpExporterResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPulpExporterResponseList) GetResultsOk() ([]PulpExporterResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedPulpExporterResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []PulpExporterResponse and assigns it to the Results field. +func (o *PaginatedPulpExporterResponseList) SetResults(v []PulpExporterResponse) { + o.Results = v +} + +func (o PaginatedPulpExporterResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedPulpExporterResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedPulpExporterResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedPulpExporterResponseList := _PaginatedPulpExporterResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedPulpExporterResponseList); err == nil { + *o = PaginatedPulpExporterResponseList(varPaginatedPulpExporterResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedPulpExporterResponseList struct { + value *PaginatedPulpExporterResponseList + isSet bool +} + +func (v NullablePaginatedPulpExporterResponseList) Get() *PaginatedPulpExporterResponseList { + return v.value +} + +func (v *NullablePaginatedPulpExporterResponseList) Set(val *PaginatedPulpExporterResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedPulpExporterResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedPulpExporterResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedPulpExporterResponseList(val *PaginatedPulpExporterResponseList) *NullablePaginatedPulpExporterResponseList { + return &NullablePaginatedPulpExporterResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedPulpExporterResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedPulpExporterResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_pulp_importer_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_pulp_importer_response_list.go new file mode 100644 index 0000000000..3355164338 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_pulp_importer_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedPulpImporterResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPulpImporterResponseList{} + +// PaginatedPulpImporterResponseList struct for PaginatedPulpImporterResponseList +type PaginatedPulpImporterResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PulpImporterResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedPulpImporterResponseList PaginatedPulpImporterResponseList + +// NewPaginatedPulpImporterResponseList instantiates a new PaginatedPulpImporterResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedPulpImporterResponseList() *PaginatedPulpImporterResponseList { + this := PaginatedPulpImporterResponseList{} + return &this +} + +// NewPaginatedPulpImporterResponseListWithDefaults instantiates a new PaginatedPulpImporterResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedPulpImporterResponseListWithDefaults() *PaginatedPulpImporterResponseList { + this := PaginatedPulpImporterResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedPulpImporterResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPulpImporterResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedPulpImporterResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedPulpImporterResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedPulpImporterResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedPulpImporterResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedPulpImporterResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedPulpImporterResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedPulpImporterResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedPulpImporterResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedPulpImporterResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedPulpImporterResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedPulpImporterResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedPulpImporterResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedPulpImporterResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedPulpImporterResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedPulpImporterResponseList) GetResults() []PulpImporterResponse { + if o == nil || IsNil(o.Results) { + var ret []PulpImporterResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPulpImporterResponseList) GetResultsOk() ([]PulpImporterResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedPulpImporterResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []PulpImporterResponse and assigns it to the Results field. +func (o *PaginatedPulpImporterResponseList) SetResults(v []PulpImporterResponse) { + o.Results = v +} + +func (o PaginatedPulpImporterResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedPulpImporterResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedPulpImporterResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedPulpImporterResponseList := _PaginatedPulpImporterResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedPulpImporterResponseList); err == nil { + *o = PaginatedPulpImporterResponseList(varPaginatedPulpImporterResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedPulpImporterResponseList struct { + value *PaginatedPulpImporterResponseList + isSet bool +} + +func (v NullablePaginatedPulpImporterResponseList) Get() *PaginatedPulpImporterResponseList { + return v.value +} + +func (v *NullablePaginatedPulpImporterResponseList) Set(val *PaginatedPulpImporterResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedPulpImporterResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedPulpImporterResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedPulpImporterResponseList(val *PaginatedPulpImporterResponseList) *NullablePaginatedPulpImporterResponseList { + return &NullablePaginatedPulpImporterResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedPulpImporterResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedPulpImporterResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_rbac_content_guard_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_rbac_content_guard_response_list.go new file mode 100644 index 0000000000..25b0387542 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_rbac_content_guard_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedRBACContentGuardResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedRBACContentGuardResponseList{} + +// PaginatedRBACContentGuardResponseList struct for PaginatedRBACContentGuardResponseList +type PaginatedRBACContentGuardResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RBACContentGuardResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedRBACContentGuardResponseList PaginatedRBACContentGuardResponseList + +// NewPaginatedRBACContentGuardResponseList instantiates a new PaginatedRBACContentGuardResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedRBACContentGuardResponseList() *PaginatedRBACContentGuardResponseList { + this := PaginatedRBACContentGuardResponseList{} + return &this +} + +// NewPaginatedRBACContentGuardResponseListWithDefaults instantiates a new PaginatedRBACContentGuardResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedRBACContentGuardResponseListWithDefaults() *PaginatedRBACContentGuardResponseList { + this := PaginatedRBACContentGuardResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedRBACContentGuardResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRBACContentGuardResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedRBACContentGuardResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedRBACContentGuardResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRBACContentGuardResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRBACContentGuardResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedRBACContentGuardResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedRBACContentGuardResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedRBACContentGuardResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedRBACContentGuardResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRBACContentGuardResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRBACContentGuardResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedRBACContentGuardResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedRBACContentGuardResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedRBACContentGuardResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedRBACContentGuardResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedRBACContentGuardResponseList) GetResults() []RBACContentGuardResponse { + if o == nil || IsNil(o.Results) { + var ret []RBACContentGuardResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRBACContentGuardResponseList) GetResultsOk() ([]RBACContentGuardResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedRBACContentGuardResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RBACContentGuardResponse and assigns it to the Results field. +func (o *PaginatedRBACContentGuardResponseList) SetResults(v []RBACContentGuardResponse) { + o.Results = v +} + +func (o PaginatedRBACContentGuardResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedRBACContentGuardResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedRBACContentGuardResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedRBACContentGuardResponseList := _PaginatedRBACContentGuardResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedRBACContentGuardResponseList); err == nil { + *o = PaginatedRBACContentGuardResponseList(varPaginatedRBACContentGuardResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedRBACContentGuardResponseList struct { + value *PaginatedRBACContentGuardResponseList + isSet bool +} + +func (v NullablePaginatedRBACContentGuardResponseList) Get() *PaginatedRBACContentGuardResponseList { + return v.value +} + +func (v *NullablePaginatedRBACContentGuardResponseList) Set(val *PaginatedRBACContentGuardResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedRBACContentGuardResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedRBACContentGuardResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedRBACContentGuardResponseList(val *PaginatedRBACContentGuardResponseList) *NullablePaginatedRBACContentGuardResponseList { + return &NullablePaginatedRBACContentGuardResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedRBACContentGuardResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedRBACContentGuardResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_remote_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_remote_response_list.go new file mode 100644 index 0000000000..5964af6f54 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_remote_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedRemoteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedRemoteResponseList{} + +// PaginatedRemoteResponseList struct for PaginatedRemoteResponseList +type PaginatedRemoteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RemoteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedRemoteResponseList PaginatedRemoteResponseList + +// NewPaginatedRemoteResponseList instantiates a new PaginatedRemoteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedRemoteResponseList() *PaginatedRemoteResponseList { + this := PaginatedRemoteResponseList{} + return &this +} + +// NewPaginatedRemoteResponseListWithDefaults instantiates a new PaginatedRemoteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedRemoteResponseListWithDefaults() *PaginatedRemoteResponseList { + this := PaginatedRemoteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedRemoteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRemoteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedRemoteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedRemoteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRemoteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRemoteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedRemoteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedRemoteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedRemoteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedRemoteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRemoteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRemoteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedRemoteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedRemoteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedRemoteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedRemoteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedRemoteResponseList) GetResults() []RemoteResponse { + if o == nil || IsNil(o.Results) { + var ret []RemoteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRemoteResponseList) GetResultsOk() ([]RemoteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedRemoteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RemoteResponse and assigns it to the Results field. +func (o *PaginatedRemoteResponseList) SetResults(v []RemoteResponse) { + o.Results = v +} + +func (o PaginatedRemoteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedRemoteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedRemoteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedRemoteResponseList := _PaginatedRemoteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedRemoteResponseList); err == nil { + *o = PaginatedRemoteResponseList(varPaginatedRemoteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedRemoteResponseList struct { + value *PaginatedRemoteResponseList + isSet bool +} + +func (v NullablePaginatedRemoteResponseList) Get() *PaginatedRemoteResponseList { + return v.value +} + +func (v *NullablePaginatedRemoteResponseList) Set(val *PaginatedRemoteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedRemoteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedRemoteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedRemoteResponseList(val *PaginatedRemoteResponseList) *NullablePaginatedRemoteResponseList { + return &NullablePaginatedRemoteResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedRemoteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedRemoteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_repository_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_repository_response_list.go new file mode 100644 index 0000000000..8a3451b5ce --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_repository_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedRepositoryResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedRepositoryResponseList{} + +// PaginatedRepositoryResponseList struct for PaginatedRepositoryResponseList +type PaginatedRepositoryResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RepositoryResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedRepositoryResponseList PaginatedRepositoryResponseList + +// NewPaginatedRepositoryResponseList instantiates a new PaginatedRepositoryResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedRepositoryResponseList() *PaginatedRepositoryResponseList { + this := PaginatedRepositoryResponseList{} + return &this +} + +// NewPaginatedRepositoryResponseListWithDefaults instantiates a new PaginatedRepositoryResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedRepositoryResponseListWithDefaults() *PaginatedRepositoryResponseList { + this := PaginatedRepositoryResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedRepositoryResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRepositoryResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedRepositoryResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedRepositoryResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRepositoryResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRepositoryResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedRepositoryResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedRepositoryResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedRepositoryResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedRepositoryResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRepositoryResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRepositoryResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedRepositoryResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedRepositoryResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedRepositoryResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedRepositoryResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedRepositoryResponseList) GetResults() []RepositoryResponse { + if o == nil || IsNil(o.Results) { + var ret []RepositoryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRepositoryResponseList) GetResultsOk() ([]RepositoryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedRepositoryResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RepositoryResponse and assigns it to the Results field. +func (o *PaginatedRepositoryResponseList) SetResults(v []RepositoryResponse) { + o.Results = v +} + +func (o PaginatedRepositoryResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedRepositoryResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedRepositoryResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedRepositoryResponseList := _PaginatedRepositoryResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedRepositoryResponseList); err == nil { + *o = PaginatedRepositoryResponseList(varPaginatedRepositoryResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedRepositoryResponseList struct { + value *PaginatedRepositoryResponseList + isSet bool +} + +func (v NullablePaginatedRepositoryResponseList) Get() *PaginatedRepositoryResponseList { + return v.value +} + +func (v *NullablePaginatedRepositoryResponseList) Set(val *PaginatedRepositoryResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedRepositoryResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedRepositoryResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedRepositoryResponseList(val *PaginatedRepositoryResponseList) *NullablePaginatedRepositoryResponseList { + return &NullablePaginatedRepositoryResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedRepositoryResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedRepositoryResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_repository_version_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_repository_version_response_list.go new file mode 100644 index 0000000000..2bee47889d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_repository_version_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedRepositoryVersionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedRepositoryVersionResponseList{} + +// PaginatedRepositoryVersionResponseList struct for PaginatedRepositoryVersionResponseList +type PaginatedRepositoryVersionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RepositoryVersionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedRepositoryVersionResponseList PaginatedRepositoryVersionResponseList + +// NewPaginatedRepositoryVersionResponseList instantiates a new PaginatedRepositoryVersionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedRepositoryVersionResponseList() *PaginatedRepositoryVersionResponseList { + this := PaginatedRepositoryVersionResponseList{} + return &this +} + +// NewPaginatedRepositoryVersionResponseListWithDefaults instantiates a new PaginatedRepositoryVersionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedRepositoryVersionResponseListWithDefaults() *PaginatedRepositoryVersionResponseList { + this := PaginatedRepositoryVersionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedRepositoryVersionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRepositoryVersionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedRepositoryVersionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedRepositoryVersionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRepositoryVersionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRepositoryVersionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedRepositoryVersionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedRepositoryVersionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedRepositoryVersionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedRepositoryVersionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRepositoryVersionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRepositoryVersionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedRepositoryVersionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedRepositoryVersionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedRepositoryVersionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedRepositoryVersionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedRepositoryVersionResponseList) GetResults() []RepositoryVersionResponse { + if o == nil || IsNil(o.Results) { + var ret []RepositoryVersionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRepositoryVersionResponseList) GetResultsOk() ([]RepositoryVersionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedRepositoryVersionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RepositoryVersionResponse and assigns it to the Results field. +func (o *PaginatedRepositoryVersionResponseList) SetResults(v []RepositoryVersionResponse) { + o.Results = v +} + +func (o PaginatedRepositoryVersionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedRepositoryVersionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedRepositoryVersionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedRepositoryVersionResponseList := _PaginatedRepositoryVersionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedRepositoryVersionResponseList); err == nil { + *o = PaginatedRepositoryVersionResponseList(varPaginatedRepositoryVersionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedRepositoryVersionResponseList struct { + value *PaginatedRepositoryVersionResponseList + isSet bool +} + +func (v NullablePaginatedRepositoryVersionResponseList) Get() *PaginatedRepositoryVersionResponseList { + return v.value +} + +func (v *NullablePaginatedRepositoryVersionResponseList) Set(val *PaginatedRepositoryVersionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedRepositoryVersionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedRepositoryVersionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedRepositoryVersionResponseList(val *PaginatedRepositoryVersionResponseList) *NullablePaginatedRepositoryVersionResponseList { + return &NullablePaginatedRepositoryVersionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedRepositoryVersionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedRepositoryVersionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_role_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_role_response_list.go new file mode 100644 index 0000000000..e8c8ab1c6a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_role_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedRoleResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedRoleResponseList{} + +// PaginatedRoleResponseList struct for PaginatedRoleResponseList +type PaginatedRoleResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RoleResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedRoleResponseList PaginatedRoleResponseList + +// NewPaginatedRoleResponseList instantiates a new PaginatedRoleResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedRoleResponseList() *PaginatedRoleResponseList { + this := PaginatedRoleResponseList{} + return &this +} + +// NewPaginatedRoleResponseListWithDefaults instantiates a new PaginatedRoleResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedRoleResponseListWithDefaults() *PaginatedRoleResponseList { + this := PaginatedRoleResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedRoleResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRoleResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedRoleResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedRoleResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRoleResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRoleResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedRoleResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedRoleResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedRoleResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedRoleResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRoleResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRoleResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedRoleResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedRoleResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedRoleResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedRoleResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedRoleResponseList) GetResults() []RoleResponse { + if o == nil || IsNil(o.Results) { + var ret []RoleResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRoleResponseList) GetResultsOk() ([]RoleResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedRoleResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RoleResponse and assigns it to the Results field. +func (o *PaginatedRoleResponseList) SetResults(v []RoleResponse) { + o.Results = v +} + +func (o PaginatedRoleResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedRoleResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedRoleResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedRoleResponseList := _PaginatedRoleResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedRoleResponseList); err == nil { + *o = PaginatedRoleResponseList(varPaginatedRoleResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedRoleResponseList struct { + value *PaginatedRoleResponseList + isSet bool +} + +func (v NullablePaginatedRoleResponseList) Get() *PaginatedRoleResponseList { + return v.value +} + +func (v *NullablePaginatedRoleResponseList) Set(val *PaginatedRoleResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedRoleResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedRoleResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedRoleResponseList(val *PaginatedRoleResponseList) *NullablePaginatedRoleResponseList { + return &NullablePaginatedRoleResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedRoleResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedRoleResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_signing_service_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_signing_service_response_list.go new file mode 100644 index 0000000000..de4666015a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_signing_service_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedSigningServiceResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedSigningServiceResponseList{} + +// PaginatedSigningServiceResponseList struct for PaginatedSigningServiceResponseList +type PaginatedSigningServiceResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []SigningServiceResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedSigningServiceResponseList PaginatedSigningServiceResponseList + +// NewPaginatedSigningServiceResponseList instantiates a new PaginatedSigningServiceResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedSigningServiceResponseList() *PaginatedSigningServiceResponseList { + this := PaginatedSigningServiceResponseList{} + return &this +} + +// NewPaginatedSigningServiceResponseListWithDefaults instantiates a new PaginatedSigningServiceResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedSigningServiceResponseListWithDefaults() *PaginatedSigningServiceResponseList { + this := PaginatedSigningServiceResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedSigningServiceResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedSigningServiceResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedSigningServiceResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedSigningServiceResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedSigningServiceResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedSigningServiceResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedSigningServiceResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedSigningServiceResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedSigningServiceResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedSigningServiceResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedSigningServiceResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedSigningServiceResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedSigningServiceResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedSigningServiceResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedSigningServiceResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedSigningServiceResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedSigningServiceResponseList) GetResults() []SigningServiceResponse { + if o == nil || IsNil(o.Results) { + var ret []SigningServiceResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedSigningServiceResponseList) GetResultsOk() ([]SigningServiceResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedSigningServiceResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []SigningServiceResponse and assigns it to the Results field. +func (o *PaginatedSigningServiceResponseList) SetResults(v []SigningServiceResponse) { + o.Results = v +} + +func (o PaginatedSigningServiceResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedSigningServiceResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedSigningServiceResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedSigningServiceResponseList := _PaginatedSigningServiceResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedSigningServiceResponseList); err == nil { + *o = PaginatedSigningServiceResponseList(varPaginatedSigningServiceResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedSigningServiceResponseList struct { + value *PaginatedSigningServiceResponseList + isSet bool +} + +func (v NullablePaginatedSigningServiceResponseList) Get() *PaginatedSigningServiceResponseList { + return v.value +} + +func (v *NullablePaginatedSigningServiceResponseList) Set(val *PaginatedSigningServiceResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedSigningServiceResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedSigningServiceResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedSigningServiceResponseList(val *PaginatedSigningServiceResponseList) *NullablePaginatedSigningServiceResponseList { + return &NullablePaginatedSigningServiceResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedSigningServiceResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedSigningServiceResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_tag_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_tag_response_list.go new file mode 100644 index 0000000000..ec08c957e9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_tag_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedTagResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedTagResponseList{} + +// PaginatedTagResponseList struct for PaginatedTagResponseList +type PaginatedTagResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []TagResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedTagResponseList PaginatedTagResponseList + +// NewPaginatedTagResponseList instantiates a new PaginatedTagResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedTagResponseList() *PaginatedTagResponseList { + this := PaginatedTagResponseList{} + return &this +} + +// NewPaginatedTagResponseListWithDefaults instantiates a new PaginatedTagResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedTagResponseListWithDefaults() *PaginatedTagResponseList { + this := PaginatedTagResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedTagResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTagResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedTagResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedTagResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedTagResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedTagResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedTagResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedTagResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedTagResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedTagResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedTagResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedTagResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedTagResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedTagResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedTagResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedTagResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedTagResponseList) GetResults() []TagResponse { + if o == nil || IsNil(o.Results) { + var ret []TagResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTagResponseList) GetResultsOk() ([]TagResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedTagResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []TagResponse and assigns it to the Results field. +func (o *PaginatedTagResponseList) SetResults(v []TagResponse) { + o.Results = v +} + +func (o PaginatedTagResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedTagResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedTagResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedTagResponseList := _PaginatedTagResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedTagResponseList); err == nil { + *o = PaginatedTagResponseList(varPaginatedTagResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedTagResponseList struct { + value *PaginatedTagResponseList + isSet bool +} + +func (v NullablePaginatedTagResponseList) Get() *PaginatedTagResponseList { + return v.value +} + +func (v *NullablePaginatedTagResponseList) Set(val *PaginatedTagResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedTagResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedTagResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedTagResponseList(val *PaginatedTagResponseList) *NullablePaginatedTagResponseList { + return &NullablePaginatedTagResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedTagResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedTagResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_task_group_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_task_group_response_list.go new file mode 100644 index 0000000000..3d51e3c49e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_task_group_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedTaskGroupResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedTaskGroupResponseList{} + +// PaginatedTaskGroupResponseList struct for PaginatedTaskGroupResponseList +type PaginatedTaskGroupResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []TaskGroupResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedTaskGroupResponseList PaginatedTaskGroupResponseList + +// NewPaginatedTaskGroupResponseList instantiates a new PaginatedTaskGroupResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedTaskGroupResponseList() *PaginatedTaskGroupResponseList { + this := PaginatedTaskGroupResponseList{} + return &this +} + +// NewPaginatedTaskGroupResponseListWithDefaults instantiates a new PaginatedTaskGroupResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedTaskGroupResponseListWithDefaults() *PaginatedTaskGroupResponseList { + this := PaginatedTaskGroupResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedTaskGroupResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTaskGroupResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedTaskGroupResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedTaskGroupResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedTaskGroupResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedTaskGroupResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedTaskGroupResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedTaskGroupResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedTaskGroupResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedTaskGroupResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedTaskGroupResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedTaskGroupResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedTaskGroupResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedTaskGroupResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedTaskGroupResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedTaskGroupResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedTaskGroupResponseList) GetResults() []TaskGroupResponse { + if o == nil || IsNil(o.Results) { + var ret []TaskGroupResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTaskGroupResponseList) GetResultsOk() ([]TaskGroupResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedTaskGroupResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []TaskGroupResponse and assigns it to the Results field. +func (o *PaginatedTaskGroupResponseList) SetResults(v []TaskGroupResponse) { + o.Results = v +} + +func (o PaginatedTaskGroupResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedTaskGroupResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedTaskGroupResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedTaskGroupResponseList := _PaginatedTaskGroupResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedTaskGroupResponseList); err == nil { + *o = PaginatedTaskGroupResponseList(varPaginatedTaskGroupResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedTaskGroupResponseList struct { + value *PaginatedTaskGroupResponseList + isSet bool +} + +func (v NullablePaginatedTaskGroupResponseList) Get() *PaginatedTaskGroupResponseList { + return v.value +} + +func (v *NullablePaginatedTaskGroupResponseList) Set(val *PaginatedTaskGroupResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedTaskGroupResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedTaskGroupResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedTaskGroupResponseList(val *PaginatedTaskGroupResponseList) *NullablePaginatedTaskGroupResponseList { + return &NullablePaginatedTaskGroupResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedTaskGroupResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedTaskGroupResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_task_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_task_response_list.go new file mode 100644 index 0000000000..b71bc50d29 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_task_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedTaskResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedTaskResponseList{} + +// PaginatedTaskResponseList struct for PaginatedTaskResponseList +type PaginatedTaskResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []TaskResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedTaskResponseList PaginatedTaskResponseList + +// NewPaginatedTaskResponseList instantiates a new PaginatedTaskResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedTaskResponseList() *PaginatedTaskResponseList { + this := PaginatedTaskResponseList{} + return &this +} + +// NewPaginatedTaskResponseListWithDefaults instantiates a new PaginatedTaskResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedTaskResponseListWithDefaults() *PaginatedTaskResponseList { + this := PaginatedTaskResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedTaskResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTaskResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedTaskResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedTaskResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedTaskResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedTaskResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedTaskResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedTaskResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedTaskResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedTaskResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedTaskResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedTaskResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedTaskResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedTaskResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedTaskResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedTaskResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedTaskResponseList) GetResults() []TaskResponse { + if o == nil || IsNil(o.Results) { + var ret []TaskResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTaskResponseList) GetResultsOk() ([]TaskResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedTaskResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []TaskResponse and assigns it to the Results field. +func (o *PaginatedTaskResponseList) SetResults(v []TaskResponse) { + o.Results = v +} + +func (o PaginatedTaskResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedTaskResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedTaskResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedTaskResponseList := _PaginatedTaskResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedTaskResponseList); err == nil { + *o = PaginatedTaskResponseList(varPaginatedTaskResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedTaskResponseList struct { + value *PaginatedTaskResponseList + isSet bool +} + +func (v NullablePaginatedTaskResponseList) Get() *PaginatedTaskResponseList { + return v.value +} + +func (v *NullablePaginatedTaskResponseList) Set(val *PaginatedTaskResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedTaskResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedTaskResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedTaskResponseList(val *PaginatedTaskResponseList) *NullablePaginatedTaskResponseList { + return &NullablePaginatedTaskResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedTaskResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedTaskResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_task_schedule_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_task_schedule_response_list.go new file mode 100644 index 0000000000..d2896c2709 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_task_schedule_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedTaskScheduleResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedTaskScheduleResponseList{} + +// PaginatedTaskScheduleResponseList struct for PaginatedTaskScheduleResponseList +type PaginatedTaskScheduleResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []TaskScheduleResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedTaskScheduleResponseList PaginatedTaskScheduleResponseList + +// NewPaginatedTaskScheduleResponseList instantiates a new PaginatedTaskScheduleResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedTaskScheduleResponseList() *PaginatedTaskScheduleResponseList { + this := PaginatedTaskScheduleResponseList{} + return &this +} + +// NewPaginatedTaskScheduleResponseListWithDefaults instantiates a new PaginatedTaskScheduleResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedTaskScheduleResponseListWithDefaults() *PaginatedTaskScheduleResponseList { + this := PaginatedTaskScheduleResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedTaskScheduleResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTaskScheduleResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedTaskScheduleResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedTaskScheduleResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedTaskScheduleResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedTaskScheduleResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedTaskScheduleResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedTaskScheduleResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedTaskScheduleResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedTaskScheduleResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedTaskScheduleResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedTaskScheduleResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedTaskScheduleResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedTaskScheduleResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedTaskScheduleResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedTaskScheduleResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedTaskScheduleResponseList) GetResults() []TaskScheduleResponse { + if o == nil || IsNil(o.Results) { + var ret []TaskScheduleResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTaskScheduleResponseList) GetResultsOk() ([]TaskScheduleResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedTaskScheduleResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []TaskScheduleResponse and assigns it to the Results field. +func (o *PaginatedTaskScheduleResponseList) SetResults(v []TaskScheduleResponse) { + o.Results = v +} + +func (o PaginatedTaskScheduleResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedTaskScheduleResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedTaskScheduleResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedTaskScheduleResponseList := _PaginatedTaskScheduleResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedTaskScheduleResponseList); err == nil { + *o = PaginatedTaskScheduleResponseList(varPaginatedTaskScheduleResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedTaskScheduleResponseList struct { + value *PaginatedTaskScheduleResponseList + isSet bool +} + +func (v NullablePaginatedTaskScheduleResponseList) Get() *PaginatedTaskScheduleResponseList { + return v.value +} + +func (v *NullablePaginatedTaskScheduleResponseList) Set(val *PaginatedTaskScheduleResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedTaskScheduleResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedTaskScheduleResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedTaskScheduleResponseList(val *PaginatedTaskScheduleResponseList) *NullablePaginatedTaskScheduleResponseList { + return &NullablePaginatedTaskScheduleResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedTaskScheduleResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedTaskScheduleResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_upload_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_upload_response_list.go new file mode 100644 index 0000000000..760286d8d7 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_upload_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedUploadResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUploadResponseList{} + +// PaginatedUploadResponseList struct for PaginatedUploadResponseList +type PaginatedUploadResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []UploadResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedUploadResponseList PaginatedUploadResponseList + +// NewPaginatedUploadResponseList instantiates a new PaginatedUploadResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedUploadResponseList() *PaginatedUploadResponseList { + this := PaginatedUploadResponseList{} + return &this +} + +// NewPaginatedUploadResponseListWithDefaults instantiates a new PaginatedUploadResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedUploadResponseListWithDefaults() *PaginatedUploadResponseList { + this := PaginatedUploadResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedUploadResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedUploadResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedUploadResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedUploadResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedUploadResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedUploadResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedUploadResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedUploadResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedUploadResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedUploadResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedUploadResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedUploadResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedUploadResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedUploadResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedUploadResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedUploadResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedUploadResponseList) GetResults() []UploadResponse { + if o == nil || IsNil(o.Results) { + var ret []UploadResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedUploadResponseList) GetResultsOk() ([]UploadResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedUploadResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []UploadResponse and assigns it to the Results field. +func (o *PaginatedUploadResponseList) SetResults(v []UploadResponse) { + o.Results = v +} + +func (o PaginatedUploadResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedUploadResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedUploadResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedUploadResponseList := _PaginatedUploadResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedUploadResponseList); err == nil { + *o = PaginatedUploadResponseList(varPaginatedUploadResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedUploadResponseList struct { + value *PaginatedUploadResponseList + isSet bool +} + +func (v NullablePaginatedUploadResponseList) Get() *PaginatedUploadResponseList { + return v.value +} + +func (v *NullablePaginatedUploadResponseList) Set(val *PaginatedUploadResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedUploadResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedUploadResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedUploadResponseList(val *PaginatedUploadResponseList) *NullablePaginatedUploadResponseList { + return &NullablePaginatedUploadResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedUploadResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedUploadResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_upstream_pulp_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_upstream_pulp_response_list.go new file mode 100644 index 0000000000..af8768a765 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_upstream_pulp_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedUpstreamPulpResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUpstreamPulpResponseList{} + +// PaginatedUpstreamPulpResponseList struct for PaginatedUpstreamPulpResponseList +type PaginatedUpstreamPulpResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []UpstreamPulpResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedUpstreamPulpResponseList PaginatedUpstreamPulpResponseList + +// NewPaginatedUpstreamPulpResponseList instantiates a new PaginatedUpstreamPulpResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedUpstreamPulpResponseList() *PaginatedUpstreamPulpResponseList { + this := PaginatedUpstreamPulpResponseList{} + return &this +} + +// NewPaginatedUpstreamPulpResponseListWithDefaults instantiates a new PaginatedUpstreamPulpResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedUpstreamPulpResponseListWithDefaults() *PaginatedUpstreamPulpResponseList { + this := PaginatedUpstreamPulpResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedUpstreamPulpResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedUpstreamPulpResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedUpstreamPulpResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedUpstreamPulpResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedUpstreamPulpResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedUpstreamPulpResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedUpstreamPulpResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedUpstreamPulpResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedUpstreamPulpResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedUpstreamPulpResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedUpstreamPulpResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedUpstreamPulpResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedUpstreamPulpResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedUpstreamPulpResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedUpstreamPulpResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedUpstreamPulpResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedUpstreamPulpResponseList) GetResults() []UpstreamPulpResponse { + if o == nil || IsNil(o.Results) { + var ret []UpstreamPulpResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedUpstreamPulpResponseList) GetResultsOk() ([]UpstreamPulpResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedUpstreamPulpResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []UpstreamPulpResponse and assigns it to the Results field. +func (o *PaginatedUpstreamPulpResponseList) SetResults(v []UpstreamPulpResponse) { + o.Results = v +} + +func (o PaginatedUpstreamPulpResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedUpstreamPulpResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedUpstreamPulpResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedUpstreamPulpResponseList := _PaginatedUpstreamPulpResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedUpstreamPulpResponseList); err == nil { + *o = PaginatedUpstreamPulpResponseList(varPaginatedUpstreamPulpResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedUpstreamPulpResponseList struct { + value *PaginatedUpstreamPulpResponseList + isSet bool +} + +func (v NullablePaginatedUpstreamPulpResponseList) Get() *PaginatedUpstreamPulpResponseList { + return v.value +} + +func (v *NullablePaginatedUpstreamPulpResponseList) Set(val *PaginatedUpstreamPulpResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedUpstreamPulpResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedUpstreamPulpResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedUpstreamPulpResponseList(val *PaginatedUpstreamPulpResponseList) *NullablePaginatedUpstreamPulpResponseList { + return &NullablePaginatedUpstreamPulpResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedUpstreamPulpResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedUpstreamPulpResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_user_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_user_response_list.go new file mode 100644 index 0000000000..b136bd547e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_user_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedUserResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUserResponseList{} + +// PaginatedUserResponseList struct for PaginatedUserResponseList +type PaginatedUserResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []UserResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedUserResponseList PaginatedUserResponseList + +// NewPaginatedUserResponseList instantiates a new PaginatedUserResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedUserResponseList() *PaginatedUserResponseList { + this := PaginatedUserResponseList{} + return &this +} + +// NewPaginatedUserResponseListWithDefaults instantiates a new PaginatedUserResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedUserResponseListWithDefaults() *PaginatedUserResponseList { + this := PaginatedUserResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedUserResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedUserResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedUserResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedUserResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedUserResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedUserResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedUserResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedUserResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedUserResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedUserResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedUserResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedUserResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedUserResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedUserResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedUserResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedUserResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedUserResponseList) GetResults() []UserResponse { + if o == nil || IsNil(o.Results) { + var ret []UserResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedUserResponseList) GetResultsOk() ([]UserResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedUserResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []UserResponse and assigns it to the Results field. +func (o *PaginatedUserResponseList) SetResults(v []UserResponse) { + o.Results = v +} + +func (o PaginatedUserResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedUserResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedUserResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedUserResponseList := _PaginatedUserResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedUserResponseList); err == nil { + *o = PaginatedUserResponseList(varPaginatedUserResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedUserResponseList struct { + value *PaginatedUserResponseList + isSet bool +} + +func (v NullablePaginatedUserResponseList) Get() *PaginatedUserResponseList { + return v.value +} + +func (v *NullablePaginatedUserResponseList) Set(val *PaginatedUserResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedUserResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedUserResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedUserResponseList(val *PaginatedUserResponseList) *NullablePaginatedUserResponseList { + return &NullablePaginatedUserResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedUserResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedUserResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_user_role_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_user_role_response_list.go new file mode 100644 index 0000000000..7ead8eceab --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_user_role_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedUserRoleResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUserRoleResponseList{} + +// PaginatedUserRoleResponseList struct for PaginatedUserRoleResponseList +type PaginatedUserRoleResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []UserRoleResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedUserRoleResponseList PaginatedUserRoleResponseList + +// NewPaginatedUserRoleResponseList instantiates a new PaginatedUserRoleResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedUserRoleResponseList() *PaginatedUserRoleResponseList { + this := PaginatedUserRoleResponseList{} + return &this +} + +// NewPaginatedUserRoleResponseListWithDefaults instantiates a new PaginatedUserRoleResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedUserRoleResponseListWithDefaults() *PaginatedUserRoleResponseList { + this := PaginatedUserRoleResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedUserRoleResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedUserRoleResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedUserRoleResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedUserRoleResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedUserRoleResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedUserRoleResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedUserRoleResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedUserRoleResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedUserRoleResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedUserRoleResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedUserRoleResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedUserRoleResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedUserRoleResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedUserRoleResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedUserRoleResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedUserRoleResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedUserRoleResponseList) GetResults() []UserRoleResponse { + if o == nil || IsNil(o.Results) { + var ret []UserRoleResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedUserRoleResponseList) GetResultsOk() ([]UserRoleResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedUserRoleResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []UserRoleResponse and assigns it to the Results field. +func (o *PaginatedUserRoleResponseList) SetResults(v []UserRoleResponse) { + o.Results = v +} + +func (o PaginatedUserRoleResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedUserRoleResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedUserRoleResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedUserRoleResponseList := _PaginatedUserRoleResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedUserRoleResponseList); err == nil { + *o = PaginatedUserRoleResponseList(varPaginatedUserRoleResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedUserRoleResponseList struct { + value *PaginatedUserRoleResponseList + isSet bool +} + +func (v NullablePaginatedUserRoleResponseList) Get() *PaginatedUserRoleResponseList { + return v.value +} + +func (v *NullablePaginatedUserRoleResponseList) Set(val *PaginatedUserRoleResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedUserRoleResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedUserRoleResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedUserRoleResponseList(val *PaginatedUserRoleResponseList) *NullablePaginatedUserRoleResponseList { + return &NullablePaginatedUserRoleResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedUserRoleResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedUserRoleResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_worker_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_worker_response_list.go new file mode 100644 index 0000000000..c1af904818 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginated_worker_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedWorkerResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedWorkerResponseList{} + +// PaginatedWorkerResponseList struct for PaginatedWorkerResponseList +type PaginatedWorkerResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []WorkerResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedWorkerResponseList PaginatedWorkerResponseList + +// NewPaginatedWorkerResponseList instantiates a new PaginatedWorkerResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedWorkerResponseList() *PaginatedWorkerResponseList { + this := PaginatedWorkerResponseList{} + return &this +} + +// NewPaginatedWorkerResponseListWithDefaults instantiates a new PaginatedWorkerResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedWorkerResponseListWithDefaults() *PaginatedWorkerResponseList { + this := PaginatedWorkerResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedWorkerResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWorkerResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedWorkerResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedWorkerResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedWorkerResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedWorkerResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedWorkerResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedWorkerResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedWorkerResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedWorkerResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedWorkerResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedWorkerResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedWorkerResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedWorkerResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedWorkerResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedWorkerResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedWorkerResponseList) GetResults() []WorkerResponse { + if o == nil || IsNil(o.Results) { + var ret []WorkerResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWorkerResponseList) GetResultsOk() ([]WorkerResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedWorkerResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []WorkerResponse and assigns it to the Results field. +func (o *PaginatedWorkerResponseList) SetResults(v []WorkerResponse) { + o.Results = v +} + +func (o PaginatedWorkerResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedWorkerResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedWorkerResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedWorkerResponseList := _PaginatedWorkerResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedWorkerResponseList); err == nil { + *o = PaginatedWorkerResponseList(varPaginatedWorkerResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedWorkerResponseList struct { + value *PaginatedWorkerResponseList + isSet bool +} + +func (v NullablePaginatedWorkerResponseList) Get() *PaginatedWorkerResponseList { + return v.value +} + +func (v *NullablePaginatedWorkerResponseList) Set(val *PaginatedWorkerResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedWorkerResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedWorkerResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedWorkerResponseList(val *PaginatedWorkerResponseList) *NullablePaginatedWorkerResponseList { + return &NullablePaginatedWorkerResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedWorkerResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedWorkerResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_ansible_distribution_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_ansible_distribution_response_list.go new file mode 100644 index 0000000000..0920ebefbd --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_ansible_distribution_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedansibleAnsibleDistributionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedansibleAnsibleDistributionResponseList{} + +// PaginatedansibleAnsibleDistributionResponseList struct for PaginatedansibleAnsibleDistributionResponseList +type PaginatedansibleAnsibleDistributionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AnsibleAnsibleDistributionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedansibleAnsibleDistributionResponseList PaginatedansibleAnsibleDistributionResponseList + +// NewPaginatedansibleAnsibleDistributionResponseList instantiates a new PaginatedansibleAnsibleDistributionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedansibleAnsibleDistributionResponseList() *PaginatedansibleAnsibleDistributionResponseList { + this := PaginatedansibleAnsibleDistributionResponseList{} + return &this +} + +// NewPaginatedansibleAnsibleDistributionResponseListWithDefaults instantiates a new PaginatedansibleAnsibleDistributionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedansibleAnsibleDistributionResponseListWithDefaults() *PaginatedansibleAnsibleDistributionResponseList { + this := PaginatedansibleAnsibleDistributionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedansibleAnsibleDistributionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleAnsibleDistributionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedansibleAnsibleDistributionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedansibleAnsibleDistributionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleAnsibleDistributionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleAnsibleDistributionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedansibleAnsibleDistributionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedansibleAnsibleDistributionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedansibleAnsibleDistributionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedansibleAnsibleDistributionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleAnsibleDistributionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleAnsibleDistributionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedansibleAnsibleDistributionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedansibleAnsibleDistributionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedansibleAnsibleDistributionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedansibleAnsibleDistributionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedansibleAnsibleDistributionResponseList) GetResults() []AnsibleAnsibleDistributionResponse { + if o == nil || IsNil(o.Results) { + var ret []AnsibleAnsibleDistributionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleAnsibleDistributionResponseList) GetResultsOk() ([]AnsibleAnsibleDistributionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedansibleAnsibleDistributionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []AnsibleAnsibleDistributionResponse and assigns it to the Results field. +func (o *PaginatedansibleAnsibleDistributionResponseList) SetResults(v []AnsibleAnsibleDistributionResponse) { + o.Results = v +} + +func (o PaginatedansibleAnsibleDistributionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedansibleAnsibleDistributionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedansibleAnsibleDistributionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedansibleAnsibleDistributionResponseList := _PaginatedansibleAnsibleDistributionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedansibleAnsibleDistributionResponseList); err == nil { + *o = PaginatedansibleAnsibleDistributionResponseList(varPaginatedansibleAnsibleDistributionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedansibleAnsibleDistributionResponseList struct { + value *PaginatedansibleAnsibleDistributionResponseList + isSet bool +} + +func (v NullablePaginatedansibleAnsibleDistributionResponseList) Get() *PaginatedansibleAnsibleDistributionResponseList { + return v.value +} + +func (v *NullablePaginatedansibleAnsibleDistributionResponseList) Set(val *PaginatedansibleAnsibleDistributionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedansibleAnsibleDistributionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedansibleAnsibleDistributionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedansibleAnsibleDistributionResponseList(val *PaginatedansibleAnsibleDistributionResponseList) *NullablePaginatedansibleAnsibleDistributionResponseList { + return &NullablePaginatedansibleAnsibleDistributionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedansibleAnsibleDistributionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedansibleAnsibleDistributionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_ansible_namespace_metadata_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_ansible_namespace_metadata_response_list.go new file mode 100644 index 0000000000..931bbe78b7 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_ansible_namespace_metadata_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedansibleAnsibleNamespaceMetadataResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedansibleAnsibleNamespaceMetadataResponseList{} + +// PaginatedansibleAnsibleNamespaceMetadataResponseList struct for PaginatedansibleAnsibleNamespaceMetadataResponseList +type PaginatedansibleAnsibleNamespaceMetadataResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AnsibleAnsibleNamespaceMetadataResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedansibleAnsibleNamespaceMetadataResponseList PaginatedansibleAnsibleNamespaceMetadataResponseList + +// NewPaginatedansibleAnsibleNamespaceMetadataResponseList instantiates a new PaginatedansibleAnsibleNamespaceMetadataResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedansibleAnsibleNamespaceMetadataResponseList() *PaginatedansibleAnsibleNamespaceMetadataResponseList { + this := PaginatedansibleAnsibleNamespaceMetadataResponseList{} + return &this +} + +// NewPaginatedansibleAnsibleNamespaceMetadataResponseListWithDefaults instantiates a new PaginatedansibleAnsibleNamespaceMetadataResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedansibleAnsibleNamespaceMetadataResponseListWithDefaults() *PaginatedansibleAnsibleNamespaceMetadataResponseList { + this := PaginatedansibleAnsibleNamespaceMetadataResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) GetResults() []AnsibleAnsibleNamespaceMetadataResponse { + if o == nil || IsNil(o.Results) { + var ret []AnsibleAnsibleNamespaceMetadataResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) GetResultsOk() ([]AnsibleAnsibleNamespaceMetadataResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []AnsibleAnsibleNamespaceMetadataResponse and assigns it to the Results field. +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) SetResults(v []AnsibleAnsibleNamespaceMetadataResponse) { + o.Results = v +} + +func (o PaginatedansibleAnsibleNamespaceMetadataResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedansibleAnsibleNamespaceMetadataResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedansibleAnsibleNamespaceMetadataResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedansibleAnsibleNamespaceMetadataResponseList := _PaginatedansibleAnsibleNamespaceMetadataResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedansibleAnsibleNamespaceMetadataResponseList); err == nil { + *o = PaginatedansibleAnsibleNamespaceMetadataResponseList(varPaginatedansibleAnsibleNamespaceMetadataResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedansibleAnsibleNamespaceMetadataResponseList struct { + value *PaginatedansibleAnsibleNamespaceMetadataResponseList + isSet bool +} + +func (v NullablePaginatedansibleAnsibleNamespaceMetadataResponseList) Get() *PaginatedansibleAnsibleNamespaceMetadataResponseList { + return v.value +} + +func (v *NullablePaginatedansibleAnsibleNamespaceMetadataResponseList) Set(val *PaginatedansibleAnsibleNamespaceMetadataResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedansibleAnsibleNamespaceMetadataResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedansibleAnsibleNamespaceMetadataResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedansibleAnsibleNamespaceMetadataResponseList(val *PaginatedansibleAnsibleNamespaceMetadataResponseList) *NullablePaginatedansibleAnsibleNamespaceMetadataResponseList { + return &NullablePaginatedansibleAnsibleNamespaceMetadataResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedansibleAnsibleNamespaceMetadataResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedansibleAnsibleNamespaceMetadataResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_ansible_repository_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_ansible_repository_response_list.go new file mode 100644 index 0000000000..1210c4681d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_ansible_repository_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedansibleAnsibleRepositoryResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedansibleAnsibleRepositoryResponseList{} + +// PaginatedansibleAnsibleRepositoryResponseList struct for PaginatedansibleAnsibleRepositoryResponseList +type PaginatedansibleAnsibleRepositoryResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AnsibleAnsibleRepositoryResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedansibleAnsibleRepositoryResponseList PaginatedansibleAnsibleRepositoryResponseList + +// NewPaginatedansibleAnsibleRepositoryResponseList instantiates a new PaginatedansibleAnsibleRepositoryResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedansibleAnsibleRepositoryResponseList() *PaginatedansibleAnsibleRepositoryResponseList { + this := PaginatedansibleAnsibleRepositoryResponseList{} + return &this +} + +// NewPaginatedansibleAnsibleRepositoryResponseListWithDefaults instantiates a new PaginatedansibleAnsibleRepositoryResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedansibleAnsibleRepositoryResponseListWithDefaults() *PaginatedansibleAnsibleRepositoryResponseList { + this := PaginatedansibleAnsibleRepositoryResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedansibleAnsibleRepositoryResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleAnsibleRepositoryResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedansibleAnsibleRepositoryResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedansibleAnsibleRepositoryResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleAnsibleRepositoryResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleAnsibleRepositoryResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedansibleAnsibleRepositoryResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedansibleAnsibleRepositoryResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedansibleAnsibleRepositoryResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedansibleAnsibleRepositoryResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleAnsibleRepositoryResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleAnsibleRepositoryResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedansibleAnsibleRepositoryResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedansibleAnsibleRepositoryResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedansibleAnsibleRepositoryResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedansibleAnsibleRepositoryResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedansibleAnsibleRepositoryResponseList) GetResults() []AnsibleAnsibleRepositoryResponse { + if o == nil || IsNil(o.Results) { + var ret []AnsibleAnsibleRepositoryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleAnsibleRepositoryResponseList) GetResultsOk() ([]AnsibleAnsibleRepositoryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedansibleAnsibleRepositoryResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []AnsibleAnsibleRepositoryResponse and assigns it to the Results field. +func (o *PaginatedansibleAnsibleRepositoryResponseList) SetResults(v []AnsibleAnsibleRepositoryResponse) { + o.Results = v +} + +func (o PaginatedansibleAnsibleRepositoryResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedansibleAnsibleRepositoryResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedansibleAnsibleRepositoryResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedansibleAnsibleRepositoryResponseList := _PaginatedansibleAnsibleRepositoryResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedansibleAnsibleRepositoryResponseList); err == nil { + *o = PaginatedansibleAnsibleRepositoryResponseList(varPaginatedansibleAnsibleRepositoryResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedansibleAnsibleRepositoryResponseList struct { + value *PaginatedansibleAnsibleRepositoryResponseList + isSet bool +} + +func (v NullablePaginatedansibleAnsibleRepositoryResponseList) Get() *PaginatedansibleAnsibleRepositoryResponseList { + return v.value +} + +func (v *NullablePaginatedansibleAnsibleRepositoryResponseList) Set(val *PaginatedansibleAnsibleRepositoryResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedansibleAnsibleRepositoryResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedansibleAnsibleRepositoryResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedansibleAnsibleRepositoryResponseList(val *PaginatedansibleAnsibleRepositoryResponseList) *NullablePaginatedansibleAnsibleRepositoryResponseList { + return &NullablePaginatedansibleAnsibleRepositoryResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedansibleAnsibleRepositoryResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedansibleAnsibleRepositoryResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_remote_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_remote_response_list.go new file mode 100644 index 0000000000..8e66fa3187 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_remote_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedansibleCollectionRemoteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedansibleCollectionRemoteResponseList{} + +// PaginatedansibleCollectionRemoteResponseList struct for PaginatedansibleCollectionRemoteResponseList +type PaginatedansibleCollectionRemoteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AnsibleCollectionRemoteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedansibleCollectionRemoteResponseList PaginatedansibleCollectionRemoteResponseList + +// NewPaginatedansibleCollectionRemoteResponseList instantiates a new PaginatedansibleCollectionRemoteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedansibleCollectionRemoteResponseList() *PaginatedansibleCollectionRemoteResponseList { + this := PaginatedansibleCollectionRemoteResponseList{} + return &this +} + +// NewPaginatedansibleCollectionRemoteResponseListWithDefaults instantiates a new PaginatedansibleCollectionRemoteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedansibleCollectionRemoteResponseListWithDefaults() *PaginatedansibleCollectionRemoteResponseList { + this := PaginatedansibleCollectionRemoteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedansibleCollectionRemoteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleCollectionRemoteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionRemoteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedansibleCollectionRemoteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleCollectionRemoteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleCollectionRemoteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionRemoteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedansibleCollectionRemoteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedansibleCollectionRemoteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedansibleCollectionRemoteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleCollectionRemoteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleCollectionRemoteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionRemoteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedansibleCollectionRemoteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedansibleCollectionRemoteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedansibleCollectionRemoteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedansibleCollectionRemoteResponseList) GetResults() []AnsibleCollectionRemoteResponse { + if o == nil || IsNil(o.Results) { + var ret []AnsibleCollectionRemoteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleCollectionRemoteResponseList) GetResultsOk() ([]AnsibleCollectionRemoteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionRemoteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []AnsibleCollectionRemoteResponse and assigns it to the Results field. +func (o *PaginatedansibleCollectionRemoteResponseList) SetResults(v []AnsibleCollectionRemoteResponse) { + o.Results = v +} + +func (o PaginatedansibleCollectionRemoteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedansibleCollectionRemoteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedansibleCollectionRemoteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedansibleCollectionRemoteResponseList := _PaginatedansibleCollectionRemoteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedansibleCollectionRemoteResponseList); err == nil { + *o = PaginatedansibleCollectionRemoteResponseList(varPaginatedansibleCollectionRemoteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedansibleCollectionRemoteResponseList struct { + value *PaginatedansibleCollectionRemoteResponseList + isSet bool +} + +func (v NullablePaginatedansibleCollectionRemoteResponseList) Get() *PaginatedansibleCollectionRemoteResponseList { + return v.value +} + +func (v *NullablePaginatedansibleCollectionRemoteResponseList) Set(val *PaginatedansibleCollectionRemoteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedansibleCollectionRemoteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedansibleCollectionRemoteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedansibleCollectionRemoteResponseList(val *PaginatedansibleCollectionRemoteResponseList) *NullablePaginatedansibleCollectionRemoteResponseList { + return &NullablePaginatedansibleCollectionRemoteResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedansibleCollectionRemoteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedansibleCollectionRemoteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_response_list.go new file mode 100644 index 0000000000..0edcbff6a1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedansibleCollectionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedansibleCollectionResponseList{} + +// PaginatedansibleCollectionResponseList struct for PaginatedansibleCollectionResponseList +type PaginatedansibleCollectionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AnsibleCollectionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedansibleCollectionResponseList PaginatedansibleCollectionResponseList + +// NewPaginatedansibleCollectionResponseList instantiates a new PaginatedansibleCollectionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedansibleCollectionResponseList() *PaginatedansibleCollectionResponseList { + this := PaginatedansibleCollectionResponseList{} + return &this +} + +// NewPaginatedansibleCollectionResponseListWithDefaults instantiates a new PaginatedansibleCollectionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedansibleCollectionResponseListWithDefaults() *PaginatedansibleCollectionResponseList { + this := PaginatedansibleCollectionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedansibleCollectionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleCollectionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedansibleCollectionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleCollectionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleCollectionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedansibleCollectionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedansibleCollectionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedansibleCollectionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleCollectionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleCollectionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedansibleCollectionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedansibleCollectionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedansibleCollectionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedansibleCollectionResponseList) GetResults() []AnsibleCollectionResponse { + if o == nil || IsNil(o.Results) { + var ret []AnsibleCollectionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleCollectionResponseList) GetResultsOk() ([]AnsibleCollectionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []AnsibleCollectionResponse and assigns it to the Results field. +func (o *PaginatedansibleCollectionResponseList) SetResults(v []AnsibleCollectionResponse) { + o.Results = v +} + +func (o PaginatedansibleCollectionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedansibleCollectionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedansibleCollectionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedansibleCollectionResponseList := _PaginatedansibleCollectionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedansibleCollectionResponseList); err == nil { + *o = PaginatedansibleCollectionResponseList(varPaginatedansibleCollectionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedansibleCollectionResponseList struct { + value *PaginatedansibleCollectionResponseList + isSet bool +} + +func (v NullablePaginatedansibleCollectionResponseList) Get() *PaginatedansibleCollectionResponseList { + return v.value +} + +func (v *NullablePaginatedansibleCollectionResponseList) Set(val *PaginatedansibleCollectionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedansibleCollectionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedansibleCollectionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedansibleCollectionResponseList(val *PaginatedansibleCollectionResponseList) *NullablePaginatedansibleCollectionResponseList { + return &NullablePaginatedansibleCollectionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedansibleCollectionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedansibleCollectionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_version_mark_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_version_mark_response_list.go new file mode 100644 index 0000000000..cb311da7ce --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_version_mark_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedansibleCollectionVersionMarkResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedansibleCollectionVersionMarkResponseList{} + +// PaginatedansibleCollectionVersionMarkResponseList struct for PaginatedansibleCollectionVersionMarkResponseList +type PaginatedansibleCollectionVersionMarkResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AnsibleCollectionVersionMarkResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedansibleCollectionVersionMarkResponseList PaginatedansibleCollectionVersionMarkResponseList + +// NewPaginatedansibleCollectionVersionMarkResponseList instantiates a new PaginatedansibleCollectionVersionMarkResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedansibleCollectionVersionMarkResponseList() *PaginatedansibleCollectionVersionMarkResponseList { + this := PaginatedansibleCollectionVersionMarkResponseList{} + return &this +} + +// NewPaginatedansibleCollectionVersionMarkResponseListWithDefaults instantiates a new PaginatedansibleCollectionVersionMarkResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedansibleCollectionVersionMarkResponseListWithDefaults() *PaginatedansibleCollectionVersionMarkResponseList { + this := PaginatedansibleCollectionVersionMarkResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedansibleCollectionVersionMarkResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleCollectionVersionMarkResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionVersionMarkResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedansibleCollectionVersionMarkResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleCollectionVersionMarkResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleCollectionVersionMarkResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionVersionMarkResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedansibleCollectionVersionMarkResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedansibleCollectionVersionMarkResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedansibleCollectionVersionMarkResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleCollectionVersionMarkResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleCollectionVersionMarkResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionVersionMarkResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedansibleCollectionVersionMarkResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedansibleCollectionVersionMarkResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedansibleCollectionVersionMarkResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedansibleCollectionVersionMarkResponseList) GetResults() []AnsibleCollectionVersionMarkResponse { + if o == nil || IsNil(o.Results) { + var ret []AnsibleCollectionVersionMarkResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleCollectionVersionMarkResponseList) GetResultsOk() ([]AnsibleCollectionVersionMarkResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionVersionMarkResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []AnsibleCollectionVersionMarkResponse and assigns it to the Results field. +func (o *PaginatedansibleCollectionVersionMarkResponseList) SetResults(v []AnsibleCollectionVersionMarkResponse) { + o.Results = v +} + +func (o PaginatedansibleCollectionVersionMarkResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedansibleCollectionVersionMarkResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedansibleCollectionVersionMarkResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedansibleCollectionVersionMarkResponseList := _PaginatedansibleCollectionVersionMarkResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedansibleCollectionVersionMarkResponseList); err == nil { + *o = PaginatedansibleCollectionVersionMarkResponseList(varPaginatedansibleCollectionVersionMarkResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedansibleCollectionVersionMarkResponseList struct { + value *PaginatedansibleCollectionVersionMarkResponseList + isSet bool +} + +func (v NullablePaginatedansibleCollectionVersionMarkResponseList) Get() *PaginatedansibleCollectionVersionMarkResponseList { + return v.value +} + +func (v *NullablePaginatedansibleCollectionVersionMarkResponseList) Set(val *PaginatedansibleCollectionVersionMarkResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedansibleCollectionVersionMarkResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedansibleCollectionVersionMarkResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedansibleCollectionVersionMarkResponseList(val *PaginatedansibleCollectionVersionMarkResponseList) *NullablePaginatedansibleCollectionVersionMarkResponseList { + return &NullablePaginatedansibleCollectionVersionMarkResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedansibleCollectionVersionMarkResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedansibleCollectionVersionMarkResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_version_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_version_response_list.go new file mode 100644 index 0000000000..b62647e768 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_version_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedansibleCollectionVersionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedansibleCollectionVersionResponseList{} + +// PaginatedansibleCollectionVersionResponseList struct for PaginatedansibleCollectionVersionResponseList +type PaginatedansibleCollectionVersionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AnsibleCollectionVersionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedansibleCollectionVersionResponseList PaginatedansibleCollectionVersionResponseList + +// NewPaginatedansibleCollectionVersionResponseList instantiates a new PaginatedansibleCollectionVersionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedansibleCollectionVersionResponseList() *PaginatedansibleCollectionVersionResponseList { + this := PaginatedansibleCollectionVersionResponseList{} + return &this +} + +// NewPaginatedansibleCollectionVersionResponseListWithDefaults instantiates a new PaginatedansibleCollectionVersionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedansibleCollectionVersionResponseListWithDefaults() *PaginatedansibleCollectionVersionResponseList { + this := PaginatedansibleCollectionVersionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedansibleCollectionVersionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleCollectionVersionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionVersionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedansibleCollectionVersionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleCollectionVersionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleCollectionVersionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionVersionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedansibleCollectionVersionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedansibleCollectionVersionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedansibleCollectionVersionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleCollectionVersionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleCollectionVersionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionVersionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedansibleCollectionVersionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedansibleCollectionVersionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedansibleCollectionVersionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedansibleCollectionVersionResponseList) GetResults() []AnsibleCollectionVersionResponse { + if o == nil || IsNil(o.Results) { + var ret []AnsibleCollectionVersionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleCollectionVersionResponseList) GetResultsOk() ([]AnsibleCollectionVersionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionVersionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []AnsibleCollectionVersionResponse and assigns it to the Results field. +func (o *PaginatedansibleCollectionVersionResponseList) SetResults(v []AnsibleCollectionVersionResponse) { + o.Results = v +} + +func (o PaginatedansibleCollectionVersionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedansibleCollectionVersionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedansibleCollectionVersionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedansibleCollectionVersionResponseList := _PaginatedansibleCollectionVersionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedansibleCollectionVersionResponseList); err == nil { + *o = PaginatedansibleCollectionVersionResponseList(varPaginatedansibleCollectionVersionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedansibleCollectionVersionResponseList struct { + value *PaginatedansibleCollectionVersionResponseList + isSet bool +} + +func (v NullablePaginatedansibleCollectionVersionResponseList) Get() *PaginatedansibleCollectionVersionResponseList { + return v.value +} + +func (v *NullablePaginatedansibleCollectionVersionResponseList) Set(val *PaginatedansibleCollectionVersionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedansibleCollectionVersionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedansibleCollectionVersionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedansibleCollectionVersionResponseList(val *PaginatedansibleCollectionVersionResponseList) *NullablePaginatedansibleCollectionVersionResponseList { + return &NullablePaginatedansibleCollectionVersionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedansibleCollectionVersionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedansibleCollectionVersionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_version_signature_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_version_signature_response_list.go new file mode 100644 index 0000000000..9687e46665 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_collection_version_signature_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedansibleCollectionVersionSignatureResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedansibleCollectionVersionSignatureResponseList{} + +// PaginatedansibleCollectionVersionSignatureResponseList struct for PaginatedansibleCollectionVersionSignatureResponseList +type PaginatedansibleCollectionVersionSignatureResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AnsibleCollectionVersionSignatureResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedansibleCollectionVersionSignatureResponseList PaginatedansibleCollectionVersionSignatureResponseList + +// NewPaginatedansibleCollectionVersionSignatureResponseList instantiates a new PaginatedansibleCollectionVersionSignatureResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedansibleCollectionVersionSignatureResponseList() *PaginatedansibleCollectionVersionSignatureResponseList { + this := PaginatedansibleCollectionVersionSignatureResponseList{} + return &this +} + +// NewPaginatedansibleCollectionVersionSignatureResponseListWithDefaults instantiates a new PaginatedansibleCollectionVersionSignatureResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedansibleCollectionVersionSignatureResponseListWithDefaults() *PaginatedansibleCollectionVersionSignatureResponseList { + this := PaginatedansibleCollectionVersionSignatureResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedansibleCollectionVersionSignatureResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleCollectionVersionSignatureResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionVersionSignatureResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedansibleCollectionVersionSignatureResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleCollectionVersionSignatureResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleCollectionVersionSignatureResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionVersionSignatureResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedansibleCollectionVersionSignatureResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedansibleCollectionVersionSignatureResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedansibleCollectionVersionSignatureResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleCollectionVersionSignatureResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleCollectionVersionSignatureResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionVersionSignatureResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedansibleCollectionVersionSignatureResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedansibleCollectionVersionSignatureResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedansibleCollectionVersionSignatureResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedansibleCollectionVersionSignatureResponseList) GetResults() []AnsibleCollectionVersionSignatureResponse { + if o == nil || IsNil(o.Results) { + var ret []AnsibleCollectionVersionSignatureResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleCollectionVersionSignatureResponseList) GetResultsOk() ([]AnsibleCollectionVersionSignatureResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedansibleCollectionVersionSignatureResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []AnsibleCollectionVersionSignatureResponse and assigns it to the Results field. +func (o *PaginatedansibleCollectionVersionSignatureResponseList) SetResults(v []AnsibleCollectionVersionSignatureResponse) { + o.Results = v +} + +func (o PaginatedansibleCollectionVersionSignatureResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedansibleCollectionVersionSignatureResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedansibleCollectionVersionSignatureResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedansibleCollectionVersionSignatureResponseList := _PaginatedansibleCollectionVersionSignatureResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedansibleCollectionVersionSignatureResponseList); err == nil { + *o = PaginatedansibleCollectionVersionSignatureResponseList(varPaginatedansibleCollectionVersionSignatureResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedansibleCollectionVersionSignatureResponseList struct { + value *PaginatedansibleCollectionVersionSignatureResponseList + isSet bool +} + +func (v NullablePaginatedansibleCollectionVersionSignatureResponseList) Get() *PaginatedansibleCollectionVersionSignatureResponseList { + return v.value +} + +func (v *NullablePaginatedansibleCollectionVersionSignatureResponseList) Set(val *PaginatedansibleCollectionVersionSignatureResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedansibleCollectionVersionSignatureResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedansibleCollectionVersionSignatureResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedansibleCollectionVersionSignatureResponseList(val *PaginatedansibleCollectionVersionSignatureResponseList) *NullablePaginatedansibleCollectionVersionSignatureResponseList { + return &NullablePaginatedansibleCollectionVersionSignatureResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedansibleCollectionVersionSignatureResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedansibleCollectionVersionSignatureResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_git_remote_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_git_remote_response_list.go new file mode 100644 index 0000000000..714d7e6e5d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_git_remote_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedansibleGitRemoteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedansibleGitRemoteResponseList{} + +// PaginatedansibleGitRemoteResponseList struct for PaginatedansibleGitRemoteResponseList +type PaginatedansibleGitRemoteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AnsibleGitRemoteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedansibleGitRemoteResponseList PaginatedansibleGitRemoteResponseList + +// NewPaginatedansibleGitRemoteResponseList instantiates a new PaginatedansibleGitRemoteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedansibleGitRemoteResponseList() *PaginatedansibleGitRemoteResponseList { + this := PaginatedansibleGitRemoteResponseList{} + return &this +} + +// NewPaginatedansibleGitRemoteResponseListWithDefaults instantiates a new PaginatedansibleGitRemoteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedansibleGitRemoteResponseListWithDefaults() *PaginatedansibleGitRemoteResponseList { + this := PaginatedansibleGitRemoteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedansibleGitRemoteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleGitRemoteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedansibleGitRemoteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedansibleGitRemoteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleGitRemoteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleGitRemoteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedansibleGitRemoteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedansibleGitRemoteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedansibleGitRemoteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedansibleGitRemoteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleGitRemoteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleGitRemoteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedansibleGitRemoteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedansibleGitRemoteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedansibleGitRemoteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedansibleGitRemoteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedansibleGitRemoteResponseList) GetResults() []AnsibleGitRemoteResponse { + if o == nil || IsNil(o.Results) { + var ret []AnsibleGitRemoteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleGitRemoteResponseList) GetResultsOk() ([]AnsibleGitRemoteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedansibleGitRemoteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []AnsibleGitRemoteResponse and assigns it to the Results field. +func (o *PaginatedansibleGitRemoteResponseList) SetResults(v []AnsibleGitRemoteResponse) { + o.Results = v +} + +func (o PaginatedansibleGitRemoteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedansibleGitRemoteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedansibleGitRemoteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedansibleGitRemoteResponseList := _PaginatedansibleGitRemoteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedansibleGitRemoteResponseList); err == nil { + *o = PaginatedansibleGitRemoteResponseList(varPaginatedansibleGitRemoteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedansibleGitRemoteResponseList struct { + value *PaginatedansibleGitRemoteResponseList + isSet bool +} + +func (v NullablePaginatedansibleGitRemoteResponseList) Get() *PaginatedansibleGitRemoteResponseList { + return v.value +} + +func (v *NullablePaginatedansibleGitRemoteResponseList) Set(val *PaginatedansibleGitRemoteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedansibleGitRemoteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedansibleGitRemoteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedansibleGitRemoteResponseList(val *PaginatedansibleGitRemoteResponseList) *NullablePaginatedansibleGitRemoteResponseList { + return &NullablePaginatedansibleGitRemoteResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedansibleGitRemoteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedansibleGitRemoteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_role_remote_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_role_remote_response_list.go new file mode 100644 index 0000000000..8b4efe7f35 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_role_remote_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedansibleRoleRemoteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedansibleRoleRemoteResponseList{} + +// PaginatedansibleRoleRemoteResponseList struct for PaginatedansibleRoleRemoteResponseList +type PaginatedansibleRoleRemoteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AnsibleRoleRemoteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedansibleRoleRemoteResponseList PaginatedansibleRoleRemoteResponseList + +// NewPaginatedansibleRoleRemoteResponseList instantiates a new PaginatedansibleRoleRemoteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedansibleRoleRemoteResponseList() *PaginatedansibleRoleRemoteResponseList { + this := PaginatedansibleRoleRemoteResponseList{} + return &this +} + +// NewPaginatedansibleRoleRemoteResponseListWithDefaults instantiates a new PaginatedansibleRoleRemoteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedansibleRoleRemoteResponseListWithDefaults() *PaginatedansibleRoleRemoteResponseList { + this := PaginatedansibleRoleRemoteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedansibleRoleRemoteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleRoleRemoteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedansibleRoleRemoteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedansibleRoleRemoteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleRoleRemoteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleRoleRemoteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedansibleRoleRemoteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedansibleRoleRemoteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedansibleRoleRemoteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedansibleRoleRemoteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleRoleRemoteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleRoleRemoteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedansibleRoleRemoteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedansibleRoleRemoteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedansibleRoleRemoteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedansibleRoleRemoteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedansibleRoleRemoteResponseList) GetResults() []AnsibleRoleRemoteResponse { + if o == nil || IsNil(o.Results) { + var ret []AnsibleRoleRemoteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleRoleRemoteResponseList) GetResultsOk() ([]AnsibleRoleRemoteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedansibleRoleRemoteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []AnsibleRoleRemoteResponse and assigns it to the Results field. +func (o *PaginatedansibleRoleRemoteResponseList) SetResults(v []AnsibleRoleRemoteResponse) { + o.Results = v +} + +func (o PaginatedansibleRoleRemoteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedansibleRoleRemoteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedansibleRoleRemoteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedansibleRoleRemoteResponseList := _PaginatedansibleRoleRemoteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedansibleRoleRemoteResponseList); err == nil { + *o = PaginatedansibleRoleRemoteResponseList(varPaginatedansibleRoleRemoteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedansibleRoleRemoteResponseList struct { + value *PaginatedansibleRoleRemoteResponseList + isSet bool +} + +func (v NullablePaginatedansibleRoleRemoteResponseList) Get() *PaginatedansibleRoleRemoteResponseList { + return v.value +} + +func (v *NullablePaginatedansibleRoleRemoteResponseList) Set(val *PaginatedansibleRoleRemoteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedansibleRoleRemoteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedansibleRoleRemoteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedansibleRoleRemoteResponseList(val *PaginatedansibleRoleRemoteResponseList) *NullablePaginatedansibleRoleRemoteResponseList { + return &NullablePaginatedansibleRoleRemoteResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedansibleRoleRemoteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedansibleRoleRemoteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_role_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_role_response_list.go new file mode 100644 index 0000000000..939cabe87c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedansible_role_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedansibleRoleResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedansibleRoleResponseList{} + +// PaginatedansibleRoleResponseList struct for PaginatedansibleRoleResponseList +type PaginatedansibleRoleResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []AnsibleRoleResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedansibleRoleResponseList PaginatedansibleRoleResponseList + +// NewPaginatedansibleRoleResponseList instantiates a new PaginatedansibleRoleResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedansibleRoleResponseList() *PaginatedansibleRoleResponseList { + this := PaginatedansibleRoleResponseList{} + return &this +} + +// NewPaginatedansibleRoleResponseListWithDefaults instantiates a new PaginatedansibleRoleResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedansibleRoleResponseListWithDefaults() *PaginatedansibleRoleResponseList { + this := PaginatedansibleRoleResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedansibleRoleResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleRoleResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedansibleRoleResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedansibleRoleResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleRoleResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleRoleResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedansibleRoleResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedansibleRoleResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedansibleRoleResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedansibleRoleResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedansibleRoleResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedansibleRoleResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedansibleRoleResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedansibleRoleResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedansibleRoleResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedansibleRoleResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedansibleRoleResponseList) GetResults() []AnsibleRoleResponse { + if o == nil || IsNil(o.Results) { + var ret []AnsibleRoleResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedansibleRoleResponseList) GetResultsOk() ([]AnsibleRoleResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedansibleRoleResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []AnsibleRoleResponse and assigns it to the Results field. +func (o *PaginatedansibleRoleResponseList) SetResults(v []AnsibleRoleResponse) { + o.Results = v +} + +func (o PaginatedansibleRoleResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedansibleRoleResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedansibleRoleResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedansibleRoleResponseList := _PaginatedansibleRoleResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedansibleRoleResponseList); err == nil { + *o = PaginatedansibleRoleResponseList(varPaginatedansibleRoleResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedansibleRoleResponseList struct { + value *PaginatedansibleRoleResponseList + isSet bool +} + +func (v NullablePaginatedansibleRoleResponseList) Get() *PaginatedansibleRoleResponseList { + return v.value +} + +func (v *NullablePaginatedansibleRoleResponseList) Set(val *PaginatedansibleRoleResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedansibleRoleResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedansibleRoleResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedansibleRoleResponseList(val *PaginatedansibleRoleResponseList) *NullablePaginatedansibleRoleResponseList { + return &NullablePaginatedansibleRoleResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedansibleRoleResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedansibleRoleResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcertguard_rhsm_cert_guard_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcertguard_rhsm_cert_guard_response_list.go new file mode 100644 index 0000000000..dde5de6fba --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcertguard_rhsm_cert_guard_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedcertguardRHSMCertGuardResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedcertguardRHSMCertGuardResponseList{} + +// PaginatedcertguardRHSMCertGuardResponseList struct for PaginatedcertguardRHSMCertGuardResponseList +type PaginatedcertguardRHSMCertGuardResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []CertguardRHSMCertGuardResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedcertguardRHSMCertGuardResponseList PaginatedcertguardRHSMCertGuardResponseList + +// NewPaginatedcertguardRHSMCertGuardResponseList instantiates a new PaginatedcertguardRHSMCertGuardResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedcertguardRHSMCertGuardResponseList() *PaginatedcertguardRHSMCertGuardResponseList { + this := PaginatedcertguardRHSMCertGuardResponseList{} + return &this +} + +// NewPaginatedcertguardRHSMCertGuardResponseListWithDefaults instantiates a new PaginatedcertguardRHSMCertGuardResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedcertguardRHSMCertGuardResponseListWithDefaults() *PaginatedcertguardRHSMCertGuardResponseList { + this := PaginatedcertguardRHSMCertGuardResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedcertguardRHSMCertGuardResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcertguardRHSMCertGuardResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedcertguardRHSMCertGuardResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedcertguardRHSMCertGuardResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcertguardRHSMCertGuardResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcertguardRHSMCertGuardResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedcertguardRHSMCertGuardResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedcertguardRHSMCertGuardResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedcertguardRHSMCertGuardResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedcertguardRHSMCertGuardResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcertguardRHSMCertGuardResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcertguardRHSMCertGuardResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedcertguardRHSMCertGuardResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedcertguardRHSMCertGuardResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedcertguardRHSMCertGuardResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedcertguardRHSMCertGuardResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedcertguardRHSMCertGuardResponseList) GetResults() []CertguardRHSMCertGuardResponse { + if o == nil || IsNil(o.Results) { + var ret []CertguardRHSMCertGuardResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcertguardRHSMCertGuardResponseList) GetResultsOk() ([]CertguardRHSMCertGuardResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedcertguardRHSMCertGuardResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []CertguardRHSMCertGuardResponse and assigns it to the Results field. +func (o *PaginatedcertguardRHSMCertGuardResponseList) SetResults(v []CertguardRHSMCertGuardResponse) { + o.Results = v +} + +func (o PaginatedcertguardRHSMCertGuardResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedcertguardRHSMCertGuardResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedcertguardRHSMCertGuardResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedcertguardRHSMCertGuardResponseList := _PaginatedcertguardRHSMCertGuardResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedcertguardRHSMCertGuardResponseList); err == nil { + *o = PaginatedcertguardRHSMCertGuardResponseList(varPaginatedcertguardRHSMCertGuardResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedcertguardRHSMCertGuardResponseList struct { + value *PaginatedcertguardRHSMCertGuardResponseList + isSet bool +} + +func (v NullablePaginatedcertguardRHSMCertGuardResponseList) Get() *PaginatedcertguardRHSMCertGuardResponseList { + return v.value +} + +func (v *NullablePaginatedcertguardRHSMCertGuardResponseList) Set(val *PaginatedcertguardRHSMCertGuardResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedcertguardRHSMCertGuardResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedcertguardRHSMCertGuardResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedcertguardRHSMCertGuardResponseList(val *PaginatedcertguardRHSMCertGuardResponseList) *NullablePaginatedcertguardRHSMCertGuardResponseList { + return &NullablePaginatedcertguardRHSMCertGuardResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedcertguardRHSMCertGuardResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedcertguardRHSMCertGuardResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcertguard_x509_cert_guard_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcertguard_x509_cert_guard_response_list.go new file mode 100644 index 0000000000..f1f00bd7be --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcertguard_x509_cert_guard_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedcertguardX509CertGuardResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedcertguardX509CertGuardResponseList{} + +// PaginatedcertguardX509CertGuardResponseList struct for PaginatedcertguardX509CertGuardResponseList +type PaginatedcertguardX509CertGuardResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []CertguardX509CertGuardResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedcertguardX509CertGuardResponseList PaginatedcertguardX509CertGuardResponseList + +// NewPaginatedcertguardX509CertGuardResponseList instantiates a new PaginatedcertguardX509CertGuardResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedcertguardX509CertGuardResponseList() *PaginatedcertguardX509CertGuardResponseList { + this := PaginatedcertguardX509CertGuardResponseList{} + return &this +} + +// NewPaginatedcertguardX509CertGuardResponseListWithDefaults instantiates a new PaginatedcertguardX509CertGuardResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedcertguardX509CertGuardResponseListWithDefaults() *PaginatedcertguardX509CertGuardResponseList { + this := PaginatedcertguardX509CertGuardResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedcertguardX509CertGuardResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcertguardX509CertGuardResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedcertguardX509CertGuardResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedcertguardX509CertGuardResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcertguardX509CertGuardResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcertguardX509CertGuardResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedcertguardX509CertGuardResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedcertguardX509CertGuardResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedcertguardX509CertGuardResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedcertguardX509CertGuardResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcertguardX509CertGuardResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcertguardX509CertGuardResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedcertguardX509CertGuardResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedcertguardX509CertGuardResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedcertguardX509CertGuardResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedcertguardX509CertGuardResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedcertguardX509CertGuardResponseList) GetResults() []CertguardX509CertGuardResponse { + if o == nil || IsNil(o.Results) { + var ret []CertguardX509CertGuardResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcertguardX509CertGuardResponseList) GetResultsOk() ([]CertguardX509CertGuardResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedcertguardX509CertGuardResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []CertguardX509CertGuardResponse and assigns it to the Results field. +func (o *PaginatedcertguardX509CertGuardResponseList) SetResults(v []CertguardX509CertGuardResponse) { + o.Results = v +} + +func (o PaginatedcertguardX509CertGuardResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedcertguardX509CertGuardResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedcertguardX509CertGuardResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedcertguardX509CertGuardResponseList := _PaginatedcertguardX509CertGuardResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedcertguardX509CertGuardResponseList); err == nil { + *o = PaginatedcertguardX509CertGuardResponseList(varPaginatedcertguardX509CertGuardResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedcertguardX509CertGuardResponseList struct { + value *PaginatedcertguardX509CertGuardResponseList + isSet bool +} + +func (v NullablePaginatedcertguardX509CertGuardResponseList) Get() *PaginatedcertguardX509CertGuardResponseList { + return v.value +} + +func (v *NullablePaginatedcertguardX509CertGuardResponseList) Set(val *PaginatedcertguardX509CertGuardResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedcertguardX509CertGuardResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedcertguardX509CertGuardResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedcertguardX509CertGuardResponseList(val *PaginatedcertguardX509CertGuardResponseList) *NullablePaginatedcertguardX509CertGuardResponseList { + return &NullablePaginatedcertguardX509CertGuardResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedcertguardX509CertGuardResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedcertguardX509CertGuardResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_blob_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_blob_response_list.go new file mode 100644 index 0000000000..e0027f85eb --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_blob_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedcontainerBlobResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedcontainerBlobResponseList{} + +// PaginatedcontainerBlobResponseList struct for PaginatedcontainerBlobResponseList +type PaginatedcontainerBlobResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ContainerBlobResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedcontainerBlobResponseList PaginatedcontainerBlobResponseList + +// NewPaginatedcontainerBlobResponseList instantiates a new PaginatedcontainerBlobResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedcontainerBlobResponseList() *PaginatedcontainerBlobResponseList { + this := PaginatedcontainerBlobResponseList{} + return &this +} + +// NewPaginatedcontainerBlobResponseListWithDefaults instantiates a new PaginatedcontainerBlobResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedcontainerBlobResponseListWithDefaults() *PaginatedcontainerBlobResponseList { + this := PaginatedcontainerBlobResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedcontainerBlobResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerBlobResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedcontainerBlobResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedcontainerBlobResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerBlobResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerBlobResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedcontainerBlobResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedcontainerBlobResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedcontainerBlobResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedcontainerBlobResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerBlobResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerBlobResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedcontainerBlobResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedcontainerBlobResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedcontainerBlobResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedcontainerBlobResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedcontainerBlobResponseList) GetResults() []ContainerBlobResponse { + if o == nil || IsNil(o.Results) { + var ret []ContainerBlobResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerBlobResponseList) GetResultsOk() ([]ContainerBlobResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedcontainerBlobResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ContainerBlobResponse and assigns it to the Results field. +func (o *PaginatedcontainerBlobResponseList) SetResults(v []ContainerBlobResponse) { + o.Results = v +} + +func (o PaginatedcontainerBlobResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedcontainerBlobResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedcontainerBlobResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedcontainerBlobResponseList := _PaginatedcontainerBlobResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedcontainerBlobResponseList); err == nil { + *o = PaginatedcontainerBlobResponseList(varPaginatedcontainerBlobResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedcontainerBlobResponseList struct { + value *PaginatedcontainerBlobResponseList + isSet bool +} + +func (v NullablePaginatedcontainerBlobResponseList) Get() *PaginatedcontainerBlobResponseList { + return v.value +} + +func (v *NullablePaginatedcontainerBlobResponseList) Set(val *PaginatedcontainerBlobResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedcontainerBlobResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedcontainerBlobResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedcontainerBlobResponseList(val *PaginatedcontainerBlobResponseList) *NullablePaginatedcontainerBlobResponseList { + return &NullablePaginatedcontainerBlobResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedcontainerBlobResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedcontainerBlobResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_distribution_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_distribution_response_list.go new file mode 100644 index 0000000000..a20c0bdc98 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_distribution_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedcontainerContainerDistributionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedcontainerContainerDistributionResponseList{} + +// PaginatedcontainerContainerDistributionResponseList struct for PaginatedcontainerContainerDistributionResponseList +type PaginatedcontainerContainerDistributionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ContainerContainerDistributionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedcontainerContainerDistributionResponseList PaginatedcontainerContainerDistributionResponseList + +// NewPaginatedcontainerContainerDistributionResponseList instantiates a new PaginatedcontainerContainerDistributionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedcontainerContainerDistributionResponseList() *PaginatedcontainerContainerDistributionResponseList { + this := PaginatedcontainerContainerDistributionResponseList{} + return &this +} + +// NewPaginatedcontainerContainerDistributionResponseListWithDefaults instantiates a new PaginatedcontainerContainerDistributionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedcontainerContainerDistributionResponseListWithDefaults() *PaginatedcontainerContainerDistributionResponseList { + this := PaginatedcontainerContainerDistributionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedcontainerContainerDistributionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerContainerDistributionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerDistributionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedcontainerContainerDistributionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerContainerDistributionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerContainerDistributionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerDistributionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedcontainerContainerDistributionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedcontainerContainerDistributionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedcontainerContainerDistributionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerContainerDistributionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerContainerDistributionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerDistributionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedcontainerContainerDistributionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedcontainerContainerDistributionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedcontainerContainerDistributionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedcontainerContainerDistributionResponseList) GetResults() []ContainerContainerDistributionResponse { + if o == nil || IsNil(o.Results) { + var ret []ContainerContainerDistributionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerContainerDistributionResponseList) GetResultsOk() ([]ContainerContainerDistributionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerDistributionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ContainerContainerDistributionResponse and assigns it to the Results field. +func (o *PaginatedcontainerContainerDistributionResponseList) SetResults(v []ContainerContainerDistributionResponse) { + o.Results = v +} + +func (o PaginatedcontainerContainerDistributionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedcontainerContainerDistributionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedcontainerContainerDistributionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedcontainerContainerDistributionResponseList := _PaginatedcontainerContainerDistributionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedcontainerContainerDistributionResponseList); err == nil { + *o = PaginatedcontainerContainerDistributionResponseList(varPaginatedcontainerContainerDistributionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedcontainerContainerDistributionResponseList struct { + value *PaginatedcontainerContainerDistributionResponseList + isSet bool +} + +func (v NullablePaginatedcontainerContainerDistributionResponseList) Get() *PaginatedcontainerContainerDistributionResponseList { + return v.value +} + +func (v *NullablePaginatedcontainerContainerDistributionResponseList) Set(val *PaginatedcontainerContainerDistributionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedcontainerContainerDistributionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedcontainerContainerDistributionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedcontainerContainerDistributionResponseList(val *PaginatedcontainerContainerDistributionResponseList) *NullablePaginatedcontainerContainerDistributionResponseList { + return &NullablePaginatedcontainerContainerDistributionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedcontainerContainerDistributionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedcontainerContainerDistributionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_namespace_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_namespace_response_list.go new file mode 100644 index 0000000000..ef2ee054bb --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_namespace_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedcontainerContainerNamespaceResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedcontainerContainerNamespaceResponseList{} + +// PaginatedcontainerContainerNamespaceResponseList struct for PaginatedcontainerContainerNamespaceResponseList +type PaginatedcontainerContainerNamespaceResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ContainerContainerNamespaceResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedcontainerContainerNamespaceResponseList PaginatedcontainerContainerNamespaceResponseList + +// NewPaginatedcontainerContainerNamespaceResponseList instantiates a new PaginatedcontainerContainerNamespaceResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedcontainerContainerNamespaceResponseList() *PaginatedcontainerContainerNamespaceResponseList { + this := PaginatedcontainerContainerNamespaceResponseList{} + return &this +} + +// NewPaginatedcontainerContainerNamespaceResponseListWithDefaults instantiates a new PaginatedcontainerContainerNamespaceResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedcontainerContainerNamespaceResponseListWithDefaults() *PaginatedcontainerContainerNamespaceResponseList { + this := PaginatedcontainerContainerNamespaceResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedcontainerContainerNamespaceResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerContainerNamespaceResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerNamespaceResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedcontainerContainerNamespaceResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerContainerNamespaceResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerContainerNamespaceResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerNamespaceResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedcontainerContainerNamespaceResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedcontainerContainerNamespaceResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedcontainerContainerNamespaceResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerContainerNamespaceResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerContainerNamespaceResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerNamespaceResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedcontainerContainerNamespaceResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedcontainerContainerNamespaceResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedcontainerContainerNamespaceResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedcontainerContainerNamespaceResponseList) GetResults() []ContainerContainerNamespaceResponse { + if o == nil || IsNil(o.Results) { + var ret []ContainerContainerNamespaceResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerContainerNamespaceResponseList) GetResultsOk() ([]ContainerContainerNamespaceResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerNamespaceResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ContainerContainerNamespaceResponse and assigns it to the Results field. +func (o *PaginatedcontainerContainerNamespaceResponseList) SetResults(v []ContainerContainerNamespaceResponse) { + o.Results = v +} + +func (o PaginatedcontainerContainerNamespaceResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedcontainerContainerNamespaceResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedcontainerContainerNamespaceResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedcontainerContainerNamespaceResponseList := _PaginatedcontainerContainerNamespaceResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedcontainerContainerNamespaceResponseList); err == nil { + *o = PaginatedcontainerContainerNamespaceResponseList(varPaginatedcontainerContainerNamespaceResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedcontainerContainerNamespaceResponseList struct { + value *PaginatedcontainerContainerNamespaceResponseList + isSet bool +} + +func (v NullablePaginatedcontainerContainerNamespaceResponseList) Get() *PaginatedcontainerContainerNamespaceResponseList { + return v.value +} + +func (v *NullablePaginatedcontainerContainerNamespaceResponseList) Set(val *PaginatedcontainerContainerNamespaceResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedcontainerContainerNamespaceResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedcontainerContainerNamespaceResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedcontainerContainerNamespaceResponseList(val *PaginatedcontainerContainerNamespaceResponseList) *NullablePaginatedcontainerContainerNamespaceResponseList { + return &NullablePaginatedcontainerContainerNamespaceResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedcontainerContainerNamespaceResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedcontainerContainerNamespaceResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_push_repository_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_push_repository_response_list.go new file mode 100644 index 0000000000..3a4de34704 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_push_repository_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedcontainerContainerPushRepositoryResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedcontainerContainerPushRepositoryResponseList{} + +// PaginatedcontainerContainerPushRepositoryResponseList struct for PaginatedcontainerContainerPushRepositoryResponseList +type PaginatedcontainerContainerPushRepositoryResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ContainerContainerPushRepositoryResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedcontainerContainerPushRepositoryResponseList PaginatedcontainerContainerPushRepositoryResponseList + +// NewPaginatedcontainerContainerPushRepositoryResponseList instantiates a new PaginatedcontainerContainerPushRepositoryResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedcontainerContainerPushRepositoryResponseList() *PaginatedcontainerContainerPushRepositoryResponseList { + this := PaginatedcontainerContainerPushRepositoryResponseList{} + return &this +} + +// NewPaginatedcontainerContainerPushRepositoryResponseListWithDefaults instantiates a new PaginatedcontainerContainerPushRepositoryResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedcontainerContainerPushRepositoryResponseListWithDefaults() *PaginatedcontainerContainerPushRepositoryResponseList { + this := PaginatedcontainerContainerPushRepositoryResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedcontainerContainerPushRepositoryResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerContainerPushRepositoryResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerPushRepositoryResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedcontainerContainerPushRepositoryResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerContainerPushRepositoryResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerContainerPushRepositoryResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerPushRepositoryResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedcontainerContainerPushRepositoryResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedcontainerContainerPushRepositoryResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedcontainerContainerPushRepositoryResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerContainerPushRepositoryResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerContainerPushRepositoryResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerPushRepositoryResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedcontainerContainerPushRepositoryResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedcontainerContainerPushRepositoryResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedcontainerContainerPushRepositoryResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedcontainerContainerPushRepositoryResponseList) GetResults() []ContainerContainerPushRepositoryResponse { + if o == nil || IsNil(o.Results) { + var ret []ContainerContainerPushRepositoryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerContainerPushRepositoryResponseList) GetResultsOk() ([]ContainerContainerPushRepositoryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerPushRepositoryResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ContainerContainerPushRepositoryResponse and assigns it to the Results field. +func (o *PaginatedcontainerContainerPushRepositoryResponseList) SetResults(v []ContainerContainerPushRepositoryResponse) { + o.Results = v +} + +func (o PaginatedcontainerContainerPushRepositoryResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedcontainerContainerPushRepositoryResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedcontainerContainerPushRepositoryResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedcontainerContainerPushRepositoryResponseList := _PaginatedcontainerContainerPushRepositoryResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedcontainerContainerPushRepositoryResponseList); err == nil { + *o = PaginatedcontainerContainerPushRepositoryResponseList(varPaginatedcontainerContainerPushRepositoryResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedcontainerContainerPushRepositoryResponseList struct { + value *PaginatedcontainerContainerPushRepositoryResponseList + isSet bool +} + +func (v NullablePaginatedcontainerContainerPushRepositoryResponseList) Get() *PaginatedcontainerContainerPushRepositoryResponseList { + return v.value +} + +func (v *NullablePaginatedcontainerContainerPushRepositoryResponseList) Set(val *PaginatedcontainerContainerPushRepositoryResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedcontainerContainerPushRepositoryResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedcontainerContainerPushRepositoryResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedcontainerContainerPushRepositoryResponseList(val *PaginatedcontainerContainerPushRepositoryResponseList) *NullablePaginatedcontainerContainerPushRepositoryResponseList { + return &NullablePaginatedcontainerContainerPushRepositoryResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedcontainerContainerPushRepositoryResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedcontainerContainerPushRepositoryResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_remote_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_remote_response_list.go new file mode 100644 index 0000000000..a5821547e5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_remote_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedcontainerContainerRemoteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedcontainerContainerRemoteResponseList{} + +// PaginatedcontainerContainerRemoteResponseList struct for PaginatedcontainerContainerRemoteResponseList +type PaginatedcontainerContainerRemoteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ContainerContainerRemoteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedcontainerContainerRemoteResponseList PaginatedcontainerContainerRemoteResponseList + +// NewPaginatedcontainerContainerRemoteResponseList instantiates a new PaginatedcontainerContainerRemoteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedcontainerContainerRemoteResponseList() *PaginatedcontainerContainerRemoteResponseList { + this := PaginatedcontainerContainerRemoteResponseList{} + return &this +} + +// NewPaginatedcontainerContainerRemoteResponseListWithDefaults instantiates a new PaginatedcontainerContainerRemoteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedcontainerContainerRemoteResponseListWithDefaults() *PaginatedcontainerContainerRemoteResponseList { + this := PaginatedcontainerContainerRemoteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedcontainerContainerRemoteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerContainerRemoteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerRemoteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedcontainerContainerRemoteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerContainerRemoteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerContainerRemoteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerRemoteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedcontainerContainerRemoteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedcontainerContainerRemoteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedcontainerContainerRemoteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerContainerRemoteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerContainerRemoteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerRemoteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedcontainerContainerRemoteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedcontainerContainerRemoteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedcontainerContainerRemoteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedcontainerContainerRemoteResponseList) GetResults() []ContainerContainerRemoteResponse { + if o == nil || IsNil(o.Results) { + var ret []ContainerContainerRemoteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerContainerRemoteResponseList) GetResultsOk() ([]ContainerContainerRemoteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerRemoteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ContainerContainerRemoteResponse and assigns it to the Results field. +func (o *PaginatedcontainerContainerRemoteResponseList) SetResults(v []ContainerContainerRemoteResponse) { + o.Results = v +} + +func (o PaginatedcontainerContainerRemoteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedcontainerContainerRemoteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedcontainerContainerRemoteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedcontainerContainerRemoteResponseList := _PaginatedcontainerContainerRemoteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedcontainerContainerRemoteResponseList); err == nil { + *o = PaginatedcontainerContainerRemoteResponseList(varPaginatedcontainerContainerRemoteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedcontainerContainerRemoteResponseList struct { + value *PaginatedcontainerContainerRemoteResponseList + isSet bool +} + +func (v NullablePaginatedcontainerContainerRemoteResponseList) Get() *PaginatedcontainerContainerRemoteResponseList { + return v.value +} + +func (v *NullablePaginatedcontainerContainerRemoteResponseList) Set(val *PaginatedcontainerContainerRemoteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedcontainerContainerRemoteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedcontainerContainerRemoteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedcontainerContainerRemoteResponseList(val *PaginatedcontainerContainerRemoteResponseList) *NullablePaginatedcontainerContainerRemoteResponseList { + return &NullablePaginatedcontainerContainerRemoteResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedcontainerContainerRemoteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedcontainerContainerRemoteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_repository_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_repository_response_list.go new file mode 100644 index 0000000000..f83040514e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_container_repository_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedcontainerContainerRepositoryResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedcontainerContainerRepositoryResponseList{} + +// PaginatedcontainerContainerRepositoryResponseList struct for PaginatedcontainerContainerRepositoryResponseList +type PaginatedcontainerContainerRepositoryResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ContainerContainerRepositoryResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedcontainerContainerRepositoryResponseList PaginatedcontainerContainerRepositoryResponseList + +// NewPaginatedcontainerContainerRepositoryResponseList instantiates a new PaginatedcontainerContainerRepositoryResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedcontainerContainerRepositoryResponseList() *PaginatedcontainerContainerRepositoryResponseList { + this := PaginatedcontainerContainerRepositoryResponseList{} + return &this +} + +// NewPaginatedcontainerContainerRepositoryResponseListWithDefaults instantiates a new PaginatedcontainerContainerRepositoryResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedcontainerContainerRepositoryResponseListWithDefaults() *PaginatedcontainerContainerRepositoryResponseList { + this := PaginatedcontainerContainerRepositoryResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedcontainerContainerRepositoryResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerContainerRepositoryResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerRepositoryResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedcontainerContainerRepositoryResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerContainerRepositoryResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerContainerRepositoryResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerRepositoryResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedcontainerContainerRepositoryResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedcontainerContainerRepositoryResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedcontainerContainerRepositoryResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerContainerRepositoryResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerContainerRepositoryResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerRepositoryResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedcontainerContainerRepositoryResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedcontainerContainerRepositoryResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedcontainerContainerRepositoryResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedcontainerContainerRepositoryResponseList) GetResults() []ContainerContainerRepositoryResponse { + if o == nil || IsNil(o.Results) { + var ret []ContainerContainerRepositoryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerContainerRepositoryResponseList) GetResultsOk() ([]ContainerContainerRepositoryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedcontainerContainerRepositoryResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ContainerContainerRepositoryResponse and assigns it to the Results field. +func (o *PaginatedcontainerContainerRepositoryResponseList) SetResults(v []ContainerContainerRepositoryResponse) { + o.Results = v +} + +func (o PaginatedcontainerContainerRepositoryResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedcontainerContainerRepositoryResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedcontainerContainerRepositoryResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedcontainerContainerRepositoryResponseList := _PaginatedcontainerContainerRepositoryResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedcontainerContainerRepositoryResponseList); err == nil { + *o = PaginatedcontainerContainerRepositoryResponseList(varPaginatedcontainerContainerRepositoryResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedcontainerContainerRepositoryResponseList struct { + value *PaginatedcontainerContainerRepositoryResponseList + isSet bool +} + +func (v NullablePaginatedcontainerContainerRepositoryResponseList) Get() *PaginatedcontainerContainerRepositoryResponseList { + return v.value +} + +func (v *NullablePaginatedcontainerContainerRepositoryResponseList) Set(val *PaginatedcontainerContainerRepositoryResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedcontainerContainerRepositoryResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedcontainerContainerRepositoryResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedcontainerContainerRepositoryResponseList(val *PaginatedcontainerContainerRepositoryResponseList) *NullablePaginatedcontainerContainerRepositoryResponseList { + return &NullablePaginatedcontainerContainerRepositoryResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedcontainerContainerRepositoryResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedcontainerContainerRepositoryResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_manifest_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_manifest_response_list.go new file mode 100644 index 0000000000..176d99ab8e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_manifest_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedcontainerManifestResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedcontainerManifestResponseList{} + +// PaginatedcontainerManifestResponseList struct for PaginatedcontainerManifestResponseList +type PaginatedcontainerManifestResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ContainerManifestResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedcontainerManifestResponseList PaginatedcontainerManifestResponseList + +// NewPaginatedcontainerManifestResponseList instantiates a new PaginatedcontainerManifestResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedcontainerManifestResponseList() *PaginatedcontainerManifestResponseList { + this := PaginatedcontainerManifestResponseList{} + return &this +} + +// NewPaginatedcontainerManifestResponseListWithDefaults instantiates a new PaginatedcontainerManifestResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedcontainerManifestResponseListWithDefaults() *PaginatedcontainerManifestResponseList { + this := PaginatedcontainerManifestResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedcontainerManifestResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerManifestResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedcontainerManifestResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedcontainerManifestResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerManifestResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerManifestResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedcontainerManifestResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedcontainerManifestResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedcontainerManifestResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedcontainerManifestResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerManifestResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerManifestResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedcontainerManifestResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedcontainerManifestResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedcontainerManifestResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedcontainerManifestResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedcontainerManifestResponseList) GetResults() []ContainerManifestResponse { + if o == nil || IsNil(o.Results) { + var ret []ContainerManifestResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerManifestResponseList) GetResultsOk() ([]ContainerManifestResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedcontainerManifestResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ContainerManifestResponse and assigns it to the Results field. +func (o *PaginatedcontainerManifestResponseList) SetResults(v []ContainerManifestResponse) { + o.Results = v +} + +func (o PaginatedcontainerManifestResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedcontainerManifestResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedcontainerManifestResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedcontainerManifestResponseList := _PaginatedcontainerManifestResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedcontainerManifestResponseList); err == nil { + *o = PaginatedcontainerManifestResponseList(varPaginatedcontainerManifestResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedcontainerManifestResponseList struct { + value *PaginatedcontainerManifestResponseList + isSet bool +} + +func (v NullablePaginatedcontainerManifestResponseList) Get() *PaginatedcontainerManifestResponseList { + return v.value +} + +func (v *NullablePaginatedcontainerManifestResponseList) Set(val *PaginatedcontainerManifestResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedcontainerManifestResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedcontainerManifestResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedcontainerManifestResponseList(val *PaginatedcontainerManifestResponseList) *NullablePaginatedcontainerManifestResponseList { + return &NullablePaginatedcontainerManifestResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedcontainerManifestResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedcontainerManifestResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_manifest_signature_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_manifest_signature_response_list.go new file mode 100644 index 0000000000..d211fb6ff7 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_manifest_signature_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedcontainerManifestSignatureResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedcontainerManifestSignatureResponseList{} + +// PaginatedcontainerManifestSignatureResponseList struct for PaginatedcontainerManifestSignatureResponseList +type PaginatedcontainerManifestSignatureResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ContainerManifestSignatureResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedcontainerManifestSignatureResponseList PaginatedcontainerManifestSignatureResponseList + +// NewPaginatedcontainerManifestSignatureResponseList instantiates a new PaginatedcontainerManifestSignatureResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedcontainerManifestSignatureResponseList() *PaginatedcontainerManifestSignatureResponseList { + this := PaginatedcontainerManifestSignatureResponseList{} + return &this +} + +// NewPaginatedcontainerManifestSignatureResponseListWithDefaults instantiates a new PaginatedcontainerManifestSignatureResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedcontainerManifestSignatureResponseListWithDefaults() *PaginatedcontainerManifestSignatureResponseList { + this := PaginatedcontainerManifestSignatureResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedcontainerManifestSignatureResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerManifestSignatureResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedcontainerManifestSignatureResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedcontainerManifestSignatureResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerManifestSignatureResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerManifestSignatureResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedcontainerManifestSignatureResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedcontainerManifestSignatureResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedcontainerManifestSignatureResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedcontainerManifestSignatureResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerManifestSignatureResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerManifestSignatureResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedcontainerManifestSignatureResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedcontainerManifestSignatureResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedcontainerManifestSignatureResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedcontainerManifestSignatureResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedcontainerManifestSignatureResponseList) GetResults() []ContainerManifestSignatureResponse { + if o == nil || IsNil(o.Results) { + var ret []ContainerManifestSignatureResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerManifestSignatureResponseList) GetResultsOk() ([]ContainerManifestSignatureResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedcontainerManifestSignatureResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ContainerManifestSignatureResponse and assigns it to the Results field. +func (o *PaginatedcontainerManifestSignatureResponseList) SetResults(v []ContainerManifestSignatureResponse) { + o.Results = v +} + +func (o PaginatedcontainerManifestSignatureResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedcontainerManifestSignatureResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedcontainerManifestSignatureResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedcontainerManifestSignatureResponseList := _PaginatedcontainerManifestSignatureResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedcontainerManifestSignatureResponseList); err == nil { + *o = PaginatedcontainerManifestSignatureResponseList(varPaginatedcontainerManifestSignatureResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedcontainerManifestSignatureResponseList struct { + value *PaginatedcontainerManifestSignatureResponseList + isSet bool +} + +func (v NullablePaginatedcontainerManifestSignatureResponseList) Get() *PaginatedcontainerManifestSignatureResponseList { + return v.value +} + +func (v *NullablePaginatedcontainerManifestSignatureResponseList) Set(val *PaginatedcontainerManifestSignatureResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedcontainerManifestSignatureResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedcontainerManifestSignatureResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedcontainerManifestSignatureResponseList(val *PaginatedcontainerManifestSignatureResponseList) *NullablePaginatedcontainerManifestSignatureResponseList { + return &NullablePaginatedcontainerManifestSignatureResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedcontainerManifestSignatureResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedcontainerManifestSignatureResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_tag_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_tag_response_list.go new file mode 100644 index 0000000000..126b6d24cd --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedcontainer_tag_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedcontainerTagResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedcontainerTagResponseList{} + +// PaginatedcontainerTagResponseList struct for PaginatedcontainerTagResponseList +type PaginatedcontainerTagResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []ContainerTagResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedcontainerTagResponseList PaginatedcontainerTagResponseList + +// NewPaginatedcontainerTagResponseList instantiates a new PaginatedcontainerTagResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedcontainerTagResponseList() *PaginatedcontainerTagResponseList { + this := PaginatedcontainerTagResponseList{} + return &this +} + +// NewPaginatedcontainerTagResponseListWithDefaults instantiates a new PaginatedcontainerTagResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedcontainerTagResponseListWithDefaults() *PaginatedcontainerTagResponseList { + this := PaginatedcontainerTagResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedcontainerTagResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerTagResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedcontainerTagResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedcontainerTagResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerTagResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerTagResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedcontainerTagResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedcontainerTagResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedcontainerTagResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedcontainerTagResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedcontainerTagResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedcontainerTagResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedcontainerTagResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedcontainerTagResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedcontainerTagResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedcontainerTagResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedcontainerTagResponseList) GetResults() []ContainerTagResponse { + if o == nil || IsNil(o.Results) { + var ret []ContainerTagResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedcontainerTagResponseList) GetResultsOk() ([]ContainerTagResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedcontainerTagResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ContainerTagResponse and assigns it to the Results field. +func (o *PaginatedcontainerTagResponseList) SetResults(v []ContainerTagResponse) { + o.Results = v +} + +func (o PaginatedcontainerTagResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedcontainerTagResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedcontainerTagResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedcontainerTagResponseList := _PaginatedcontainerTagResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedcontainerTagResponseList); err == nil { + *o = PaginatedcontainerTagResponseList(varPaginatedcontainerTagResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedcontainerTagResponseList struct { + value *PaginatedcontainerTagResponseList + isSet bool +} + +func (v NullablePaginatedcontainerTagResponseList) Get() *PaginatedcontainerTagResponseList { + return v.value +} + +func (v *NullablePaginatedcontainerTagResponseList) Set(val *PaginatedcontainerTagResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedcontainerTagResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedcontainerTagResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedcontainerTagResponseList(val *PaginatedcontainerTagResponseList) *NullablePaginatedcontainerTagResponseList { + return &NullablePaginatedcontainerTagResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedcontainerTagResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedcontainerTagResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_distribution_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_distribution_response_list.go new file mode 100644 index 0000000000..32643ff970 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_distribution_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebAptDistributionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebAptDistributionResponseList{} + +// PaginateddebAptDistributionResponseList struct for PaginateddebAptDistributionResponseList +type PaginateddebAptDistributionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebAptDistributionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebAptDistributionResponseList PaginateddebAptDistributionResponseList + +// NewPaginateddebAptDistributionResponseList instantiates a new PaginateddebAptDistributionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebAptDistributionResponseList() *PaginateddebAptDistributionResponseList { + this := PaginateddebAptDistributionResponseList{} + return &this +} + +// NewPaginateddebAptDistributionResponseListWithDefaults instantiates a new PaginateddebAptDistributionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebAptDistributionResponseListWithDefaults() *PaginateddebAptDistributionResponseList { + this := PaginateddebAptDistributionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebAptDistributionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebAptDistributionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebAptDistributionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebAptDistributionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebAptDistributionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebAptDistributionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebAptDistributionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebAptDistributionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebAptDistributionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebAptDistributionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebAptDistributionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebAptDistributionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebAptDistributionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebAptDistributionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebAptDistributionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebAptDistributionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebAptDistributionResponseList) GetResults() []DebAptDistributionResponse { + if o == nil || IsNil(o.Results) { + var ret []DebAptDistributionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebAptDistributionResponseList) GetResultsOk() ([]DebAptDistributionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebAptDistributionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebAptDistributionResponse and assigns it to the Results field. +func (o *PaginateddebAptDistributionResponseList) SetResults(v []DebAptDistributionResponse) { + o.Results = v +} + +func (o PaginateddebAptDistributionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebAptDistributionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebAptDistributionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebAptDistributionResponseList := _PaginateddebAptDistributionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebAptDistributionResponseList); err == nil { + *o = PaginateddebAptDistributionResponseList(varPaginateddebAptDistributionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebAptDistributionResponseList struct { + value *PaginateddebAptDistributionResponseList + isSet bool +} + +func (v NullablePaginateddebAptDistributionResponseList) Get() *PaginateddebAptDistributionResponseList { + return v.value +} + +func (v *NullablePaginateddebAptDistributionResponseList) Set(val *PaginateddebAptDistributionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebAptDistributionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebAptDistributionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebAptDistributionResponseList(val *PaginateddebAptDistributionResponseList) *NullablePaginateddebAptDistributionResponseList { + return &NullablePaginateddebAptDistributionResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebAptDistributionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebAptDistributionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_publication_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_publication_response_list.go new file mode 100644 index 0000000000..d731a717c4 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_publication_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebAptPublicationResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebAptPublicationResponseList{} + +// PaginateddebAptPublicationResponseList struct for PaginateddebAptPublicationResponseList +type PaginateddebAptPublicationResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebAptPublicationResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebAptPublicationResponseList PaginateddebAptPublicationResponseList + +// NewPaginateddebAptPublicationResponseList instantiates a new PaginateddebAptPublicationResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebAptPublicationResponseList() *PaginateddebAptPublicationResponseList { + this := PaginateddebAptPublicationResponseList{} + return &this +} + +// NewPaginateddebAptPublicationResponseListWithDefaults instantiates a new PaginateddebAptPublicationResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebAptPublicationResponseListWithDefaults() *PaginateddebAptPublicationResponseList { + this := PaginateddebAptPublicationResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebAptPublicationResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebAptPublicationResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebAptPublicationResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebAptPublicationResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebAptPublicationResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebAptPublicationResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebAptPublicationResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebAptPublicationResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebAptPublicationResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebAptPublicationResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebAptPublicationResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebAptPublicationResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebAptPublicationResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebAptPublicationResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebAptPublicationResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebAptPublicationResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebAptPublicationResponseList) GetResults() []DebAptPublicationResponse { + if o == nil || IsNil(o.Results) { + var ret []DebAptPublicationResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebAptPublicationResponseList) GetResultsOk() ([]DebAptPublicationResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebAptPublicationResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebAptPublicationResponse and assigns it to the Results field. +func (o *PaginateddebAptPublicationResponseList) SetResults(v []DebAptPublicationResponse) { + o.Results = v +} + +func (o PaginateddebAptPublicationResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebAptPublicationResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebAptPublicationResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebAptPublicationResponseList := _PaginateddebAptPublicationResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebAptPublicationResponseList); err == nil { + *o = PaginateddebAptPublicationResponseList(varPaginateddebAptPublicationResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebAptPublicationResponseList struct { + value *PaginateddebAptPublicationResponseList + isSet bool +} + +func (v NullablePaginateddebAptPublicationResponseList) Get() *PaginateddebAptPublicationResponseList { + return v.value +} + +func (v *NullablePaginateddebAptPublicationResponseList) Set(val *PaginateddebAptPublicationResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebAptPublicationResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebAptPublicationResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebAptPublicationResponseList(val *PaginateddebAptPublicationResponseList) *NullablePaginateddebAptPublicationResponseList { + return &NullablePaginateddebAptPublicationResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebAptPublicationResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebAptPublicationResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_remote_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_remote_response_list.go new file mode 100644 index 0000000000..1c373eca93 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_remote_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebAptRemoteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebAptRemoteResponseList{} + +// PaginateddebAptRemoteResponseList struct for PaginateddebAptRemoteResponseList +type PaginateddebAptRemoteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebAptRemoteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebAptRemoteResponseList PaginateddebAptRemoteResponseList + +// NewPaginateddebAptRemoteResponseList instantiates a new PaginateddebAptRemoteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebAptRemoteResponseList() *PaginateddebAptRemoteResponseList { + this := PaginateddebAptRemoteResponseList{} + return &this +} + +// NewPaginateddebAptRemoteResponseListWithDefaults instantiates a new PaginateddebAptRemoteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebAptRemoteResponseListWithDefaults() *PaginateddebAptRemoteResponseList { + this := PaginateddebAptRemoteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebAptRemoteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebAptRemoteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebAptRemoteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebAptRemoteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebAptRemoteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebAptRemoteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebAptRemoteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebAptRemoteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebAptRemoteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebAptRemoteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebAptRemoteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebAptRemoteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebAptRemoteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebAptRemoteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebAptRemoteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebAptRemoteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebAptRemoteResponseList) GetResults() []DebAptRemoteResponse { + if o == nil || IsNil(o.Results) { + var ret []DebAptRemoteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebAptRemoteResponseList) GetResultsOk() ([]DebAptRemoteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebAptRemoteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebAptRemoteResponse and assigns it to the Results field. +func (o *PaginateddebAptRemoteResponseList) SetResults(v []DebAptRemoteResponse) { + o.Results = v +} + +func (o PaginateddebAptRemoteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebAptRemoteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebAptRemoteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebAptRemoteResponseList := _PaginateddebAptRemoteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebAptRemoteResponseList); err == nil { + *o = PaginateddebAptRemoteResponseList(varPaginateddebAptRemoteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebAptRemoteResponseList struct { + value *PaginateddebAptRemoteResponseList + isSet bool +} + +func (v NullablePaginateddebAptRemoteResponseList) Get() *PaginateddebAptRemoteResponseList { + return v.value +} + +func (v *NullablePaginateddebAptRemoteResponseList) Set(val *PaginateddebAptRemoteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebAptRemoteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebAptRemoteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebAptRemoteResponseList(val *PaginateddebAptRemoteResponseList) *NullablePaginateddebAptRemoteResponseList { + return &NullablePaginateddebAptRemoteResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebAptRemoteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebAptRemoteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_repository_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_repository_response_list.go new file mode 100644 index 0000000000..ec65262527 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_apt_repository_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebAptRepositoryResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebAptRepositoryResponseList{} + +// PaginateddebAptRepositoryResponseList struct for PaginateddebAptRepositoryResponseList +type PaginateddebAptRepositoryResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebAptRepositoryResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebAptRepositoryResponseList PaginateddebAptRepositoryResponseList + +// NewPaginateddebAptRepositoryResponseList instantiates a new PaginateddebAptRepositoryResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebAptRepositoryResponseList() *PaginateddebAptRepositoryResponseList { + this := PaginateddebAptRepositoryResponseList{} + return &this +} + +// NewPaginateddebAptRepositoryResponseListWithDefaults instantiates a new PaginateddebAptRepositoryResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebAptRepositoryResponseListWithDefaults() *PaginateddebAptRepositoryResponseList { + this := PaginateddebAptRepositoryResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebAptRepositoryResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebAptRepositoryResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebAptRepositoryResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebAptRepositoryResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebAptRepositoryResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebAptRepositoryResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebAptRepositoryResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebAptRepositoryResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebAptRepositoryResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebAptRepositoryResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebAptRepositoryResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebAptRepositoryResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebAptRepositoryResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebAptRepositoryResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebAptRepositoryResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebAptRepositoryResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebAptRepositoryResponseList) GetResults() []DebAptRepositoryResponse { + if o == nil || IsNil(o.Results) { + var ret []DebAptRepositoryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebAptRepositoryResponseList) GetResultsOk() ([]DebAptRepositoryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebAptRepositoryResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebAptRepositoryResponse and assigns it to the Results field. +func (o *PaginateddebAptRepositoryResponseList) SetResults(v []DebAptRepositoryResponse) { + o.Results = v +} + +func (o PaginateddebAptRepositoryResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebAptRepositoryResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebAptRepositoryResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebAptRepositoryResponseList := _PaginateddebAptRepositoryResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebAptRepositoryResponseList); err == nil { + *o = PaginateddebAptRepositoryResponseList(varPaginateddebAptRepositoryResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebAptRepositoryResponseList struct { + value *PaginateddebAptRepositoryResponseList + isSet bool +} + +func (v NullablePaginateddebAptRepositoryResponseList) Get() *PaginateddebAptRepositoryResponseList { + return v.value +} + +func (v *NullablePaginateddebAptRepositoryResponseList) Set(val *PaginateddebAptRepositoryResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebAptRepositoryResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebAptRepositoryResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebAptRepositoryResponseList(val *PaginateddebAptRepositoryResponseList) *NullablePaginateddebAptRepositoryResponseList { + return &NullablePaginateddebAptRepositoryResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebAptRepositoryResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebAptRepositoryResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_generic_content_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_generic_content_response_list.go new file mode 100644 index 0000000000..379806e98b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_generic_content_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebGenericContentResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebGenericContentResponseList{} + +// PaginateddebGenericContentResponseList struct for PaginateddebGenericContentResponseList +type PaginateddebGenericContentResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebGenericContentResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebGenericContentResponseList PaginateddebGenericContentResponseList + +// NewPaginateddebGenericContentResponseList instantiates a new PaginateddebGenericContentResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebGenericContentResponseList() *PaginateddebGenericContentResponseList { + this := PaginateddebGenericContentResponseList{} + return &this +} + +// NewPaginateddebGenericContentResponseListWithDefaults instantiates a new PaginateddebGenericContentResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebGenericContentResponseListWithDefaults() *PaginateddebGenericContentResponseList { + this := PaginateddebGenericContentResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebGenericContentResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebGenericContentResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebGenericContentResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebGenericContentResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebGenericContentResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebGenericContentResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebGenericContentResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebGenericContentResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebGenericContentResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebGenericContentResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebGenericContentResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebGenericContentResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebGenericContentResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebGenericContentResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebGenericContentResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebGenericContentResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebGenericContentResponseList) GetResults() []DebGenericContentResponse { + if o == nil || IsNil(o.Results) { + var ret []DebGenericContentResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebGenericContentResponseList) GetResultsOk() ([]DebGenericContentResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebGenericContentResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebGenericContentResponse and assigns it to the Results field. +func (o *PaginateddebGenericContentResponseList) SetResults(v []DebGenericContentResponse) { + o.Results = v +} + +func (o PaginateddebGenericContentResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebGenericContentResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebGenericContentResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebGenericContentResponseList := _PaginateddebGenericContentResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebGenericContentResponseList); err == nil { + *o = PaginateddebGenericContentResponseList(varPaginateddebGenericContentResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebGenericContentResponseList struct { + value *PaginateddebGenericContentResponseList + isSet bool +} + +func (v NullablePaginateddebGenericContentResponseList) Get() *PaginateddebGenericContentResponseList { + return v.value +} + +func (v *NullablePaginateddebGenericContentResponseList) Set(val *PaginateddebGenericContentResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebGenericContentResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebGenericContentResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebGenericContentResponseList(val *PaginateddebGenericContentResponseList) *NullablePaginateddebGenericContentResponseList { + return &NullablePaginateddebGenericContentResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebGenericContentResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebGenericContentResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_installer_file_index_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_installer_file_index_response_list.go new file mode 100644 index 0000000000..5832102fe4 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_installer_file_index_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebInstallerFileIndexResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebInstallerFileIndexResponseList{} + +// PaginateddebInstallerFileIndexResponseList struct for PaginateddebInstallerFileIndexResponseList +type PaginateddebInstallerFileIndexResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebInstallerFileIndexResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebInstallerFileIndexResponseList PaginateddebInstallerFileIndexResponseList + +// NewPaginateddebInstallerFileIndexResponseList instantiates a new PaginateddebInstallerFileIndexResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebInstallerFileIndexResponseList() *PaginateddebInstallerFileIndexResponseList { + this := PaginateddebInstallerFileIndexResponseList{} + return &this +} + +// NewPaginateddebInstallerFileIndexResponseListWithDefaults instantiates a new PaginateddebInstallerFileIndexResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebInstallerFileIndexResponseListWithDefaults() *PaginateddebInstallerFileIndexResponseList { + this := PaginateddebInstallerFileIndexResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebInstallerFileIndexResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebInstallerFileIndexResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebInstallerFileIndexResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebInstallerFileIndexResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebInstallerFileIndexResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebInstallerFileIndexResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebInstallerFileIndexResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebInstallerFileIndexResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebInstallerFileIndexResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebInstallerFileIndexResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebInstallerFileIndexResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebInstallerFileIndexResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebInstallerFileIndexResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebInstallerFileIndexResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebInstallerFileIndexResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebInstallerFileIndexResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebInstallerFileIndexResponseList) GetResults() []DebInstallerFileIndexResponse { + if o == nil || IsNil(o.Results) { + var ret []DebInstallerFileIndexResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebInstallerFileIndexResponseList) GetResultsOk() ([]DebInstallerFileIndexResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebInstallerFileIndexResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebInstallerFileIndexResponse and assigns it to the Results field. +func (o *PaginateddebInstallerFileIndexResponseList) SetResults(v []DebInstallerFileIndexResponse) { + o.Results = v +} + +func (o PaginateddebInstallerFileIndexResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebInstallerFileIndexResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebInstallerFileIndexResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebInstallerFileIndexResponseList := _PaginateddebInstallerFileIndexResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebInstallerFileIndexResponseList); err == nil { + *o = PaginateddebInstallerFileIndexResponseList(varPaginateddebInstallerFileIndexResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebInstallerFileIndexResponseList struct { + value *PaginateddebInstallerFileIndexResponseList + isSet bool +} + +func (v NullablePaginateddebInstallerFileIndexResponseList) Get() *PaginateddebInstallerFileIndexResponseList { + return v.value +} + +func (v *NullablePaginateddebInstallerFileIndexResponseList) Set(val *PaginateddebInstallerFileIndexResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebInstallerFileIndexResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebInstallerFileIndexResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebInstallerFileIndexResponseList(val *PaginateddebInstallerFileIndexResponseList) *NullablePaginateddebInstallerFileIndexResponseList { + return &NullablePaginateddebInstallerFileIndexResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebInstallerFileIndexResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebInstallerFileIndexResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_installer_package_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_installer_package_response_list.go new file mode 100644 index 0000000000..649c06a513 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_installer_package_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebInstallerPackageResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebInstallerPackageResponseList{} + +// PaginateddebInstallerPackageResponseList struct for PaginateddebInstallerPackageResponseList +type PaginateddebInstallerPackageResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebInstallerPackageResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebInstallerPackageResponseList PaginateddebInstallerPackageResponseList + +// NewPaginateddebInstallerPackageResponseList instantiates a new PaginateddebInstallerPackageResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebInstallerPackageResponseList() *PaginateddebInstallerPackageResponseList { + this := PaginateddebInstallerPackageResponseList{} + return &this +} + +// NewPaginateddebInstallerPackageResponseListWithDefaults instantiates a new PaginateddebInstallerPackageResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebInstallerPackageResponseListWithDefaults() *PaginateddebInstallerPackageResponseList { + this := PaginateddebInstallerPackageResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebInstallerPackageResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebInstallerPackageResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebInstallerPackageResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebInstallerPackageResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebInstallerPackageResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebInstallerPackageResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebInstallerPackageResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebInstallerPackageResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebInstallerPackageResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebInstallerPackageResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebInstallerPackageResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebInstallerPackageResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebInstallerPackageResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebInstallerPackageResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebInstallerPackageResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebInstallerPackageResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebInstallerPackageResponseList) GetResults() []DebInstallerPackageResponse { + if o == nil || IsNil(o.Results) { + var ret []DebInstallerPackageResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebInstallerPackageResponseList) GetResultsOk() ([]DebInstallerPackageResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebInstallerPackageResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebInstallerPackageResponse and assigns it to the Results field. +func (o *PaginateddebInstallerPackageResponseList) SetResults(v []DebInstallerPackageResponse) { + o.Results = v +} + +func (o PaginateddebInstallerPackageResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebInstallerPackageResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebInstallerPackageResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebInstallerPackageResponseList := _PaginateddebInstallerPackageResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebInstallerPackageResponseList); err == nil { + *o = PaginateddebInstallerPackageResponseList(varPaginateddebInstallerPackageResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebInstallerPackageResponseList struct { + value *PaginateddebInstallerPackageResponseList + isSet bool +} + +func (v NullablePaginateddebInstallerPackageResponseList) Get() *PaginateddebInstallerPackageResponseList { + return v.value +} + +func (v *NullablePaginateddebInstallerPackageResponseList) Set(val *PaginateddebInstallerPackageResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebInstallerPackageResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebInstallerPackageResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebInstallerPackageResponseList(val *PaginateddebInstallerPackageResponseList) *NullablePaginateddebInstallerPackageResponseList { + return &NullablePaginateddebInstallerPackageResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebInstallerPackageResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebInstallerPackageResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_package_index_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_package_index_response_list.go new file mode 100644 index 0000000000..8972591d98 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_package_index_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebPackageIndexResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebPackageIndexResponseList{} + +// PaginateddebPackageIndexResponseList struct for PaginateddebPackageIndexResponseList +type PaginateddebPackageIndexResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebPackageIndexResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebPackageIndexResponseList PaginateddebPackageIndexResponseList + +// NewPaginateddebPackageIndexResponseList instantiates a new PaginateddebPackageIndexResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebPackageIndexResponseList() *PaginateddebPackageIndexResponseList { + this := PaginateddebPackageIndexResponseList{} + return &this +} + +// NewPaginateddebPackageIndexResponseListWithDefaults instantiates a new PaginateddebPackageIndexResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebPackageIndexResponseListWithDefaults() *PaginateddebPackageIndexResponseList { + this := PaginateddebPackageIndexResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebPackageIndexResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebPackageIndexResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebPackageIndexResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebPackageIndexResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebPackageIndexResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebPackageIndexResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebPackageIndexResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebPackageIndexResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebPackageIndexResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebPackageIndexResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebPackageIndexResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebPackageIndexResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebPackageIndexResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebPackageIndexResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebPackageIndexResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebPackageIndexResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebPackageIndexResponseList) GetResults() []DebPackageIndexResponse { + if o == nil || IsNil(o.Results) { + var ret []DebPackageIndexResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebPackageIndexResponseList) GetResultsOk() ([]DebPackageIndexResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebPackageIndexResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebPackageIndexResponse and assigns it to the Results field. +func (o *PaginateddebPackageIndexResponseList) SetResults(v []DebPackageIndexResponse) { + o.Results = v +} + +func (o PaginateddebPackageIndexResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebPackageIndexResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebPackageIndexResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebPackageIndexResponseList := _PaginateddebPackageIndexResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebPackageIndexResponseList); err == nil { + *o = PaginateddebPackageIndexResponseList(varPaginateddebPackageIndexResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebPackageIndexResponseList struct { + value *PaginateddebPackageIndexResponseList + isSet bool +} + +func (v NullablePaginateddebPackageIndexResponseList) Get() *PaginateddebPackageIndexResponseList { + return v.value +} + +func (v *NullablePaginateddebPackageIndexResponseList) Set(val *PaginateddebPackageIndexResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebPackageIndexResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebPackageIndexResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebPackageIndexResponseList(val *PaginateddebPackageIndexResponseList) *NullablePaginateddebPackageIndexResponseList { + return &NullablePaginateddebPackageIndexResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebPackageIndexResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebPackageIndexResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_package_release_component_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_package_release_component_response_list.go new file mode 100644 index 0000000000..76b07b2d56 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_package_release_component_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebPackageReleaseComponentResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebPackageReleaseComponentResponseList{} + +// PaginateddebPackageReleaseComponentResponseList struct for PaginateddebPackageReleaseComponentResponseList +type PaginateddebPackageReleaseComponentResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebPackageReleaseComponentResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebPackageReleaseComponentResponseList PaginateddebPackageReleaseComponentResponseList + +// NewPaginateddebPackageReleaseComponentResponseList instantiates a new PaginateddebPackageReleaseComponentResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebPackageReleaseComponentResponseList() *PaginateddebPackageReleaseComponentResponseList { + this := PaginateddebPackageReleaseComponentResponseList{} + return &this +} + +// NewPaginateddebPackageReleaseComponentResponseListWithDefaults instantiates a new PaginateddebPackageReleaseComponentResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebPackageReleaseComponentResponseListWithDefaults() *PaginateddebPackageReleaseComponentResponseList { + this := PaginateddebPackageReleaseComponentResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebPackageReleaseComponentResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebPackageReleaseComponentResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebPackageReleaseComponentResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebPackageReleaseComponentResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebPackageReleaseComponentResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebPackageReleaseComponentResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebPackageReleaseComponentResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebPackageReleaseComponentResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebPackageReleaseComponentResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebPackageReleaseComponentResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebPackageReleaseComponentResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebPackageReleaseComponentResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebPackageReleaseComponentResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebPackageReleaseComponentResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebPackageReleaseComponentResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebPackageReleaseComponentResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebPackageReleaseComponentResponseList) GetResults() []DebPackageReleaseComponentResponse { + if o == nil || IsNil(o.Results) { + var ret []DebPackageReleaseComponentResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebPackageReleaseComponentResponseList) GetResultsOk() ([]DebPackageReleaseComponentResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebPackageReleaseComponentResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebPackageReleaseComponentResponse and assigns it to the Results field. +func (o *PaginateddebPackageReleaseComponentResponseList) SetResults(v []DebPackageReleaseComponentResponse) { + o.Results = v +} + +func (o PaginateddebPackageReleaseComponentResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebPackageReleaseComponentResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebPackageReleaseComponentResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebPackageReleaseComponentResponseList := _PaginateddebPackageReleaseComponentResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebPackageReleaseComponentResponseList); err == nil { + *o = PaginateddebPackageReleaseComponentResponseList(varPaginateddebPackageReleaseComponentResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebPackageReleaseComponentResponseList struct { + value *PaginateddebPackageReleaseComponentResponseList + isSet bool +} + +func (v NullablePaginateddebPackageReleaseComponentResponseList) Get() *PaginateddebPackageReleaseComponentResponseList { + return v.value +} + +func (v *NullablePaginateddebPackageReleaseComponentResponseList) Set(val *PaginateddebPackageReleaseComponentResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebPackageReleaseComponentResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebPackageReleaseComponentResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebPackageReleaseComponentResponseList(val *PaginateddebPackageReleaseComponentResponseList) *NullablePaginateddebPackageReleaseComponentResponseList { + return &NullablePaginateddebPackageReleaseComponentResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebPackageReleaseComponentResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebPackageReleaseComponentResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_package_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_package_response_list.go new file mode 100644 index 0000000000..973b96710b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_package_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebPackageResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebPackageResponseList{} + +// PaginateddebPackageResponseList struct for PaginateddebPackageResponseList +type PaginateddebPackageResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebPackageResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebPackageResponseList PaginateddebPackageResponseList + +// NewPaginateddebPackageResponseList instantiates a new PaginateddebPackageResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebPackageResponseList() *PaginateddebPackageResponseList { + this := PaginateddebPackageResponseList{} + return &this +} + +// NewPaginateddebPackageResponseListWithDefaults instantiates a new PaginateddebPackageResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebPackageResponseListWithDefaults() *PaginateddebPackageResponseList { + this := PaginateddebPackageResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebPackageResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebPackageResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebPackageResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebPackageResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebPackageResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebPackageResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebPackageResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebPackageResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebPackageResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebPackageResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebPackageResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebPackageResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebPackageResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebPackageResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebPackageResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebPackageResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebPackageResponseList) GetResults() []DebPackageResponse { + if o == nil || IsNil(o.Results) { + var ret []DebPackageResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebPackageResponseList) GetResultsOk() ([]DebPackageResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebPackageResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebPackageResponse and assigns it to the Results field. +func (o *PaginateddebPackageResponseList) SetResults(v []DebPackageResponse) { + o.Results = v +} + +func (o PaginateddebPackageResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebPackageResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebPackageResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebPackageResponseList := _PaginateddebPackageResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebPackageResponseList); err == nil { + *o = PaginateddebPackageResponseList(varPaginateddebPackageResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebPackageResponseList struct { + value *PaginateddebPackageResponseList + isSet bool +} + +func (v NullablePaginateddebPackageResponseList) Get() *PaginateddebPackageResponseList { + return v.value +} + +func (v *NullablePaginateddebPackageResponseList) Set(val *PaginateddebPackageResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebPackageResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebPackageResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebPackageResponseList(val *PaginateddebPackageResponseList) *NullablePaginateddebPackageResponseList { + return &NullablePaginateddebPackageResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebPackageResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebPackageResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_architecture_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_architecture_response_list.go new file mode 100644 index 0000000000..97e26bb17b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_architecture_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebReleaseArchitectureResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebReleaseArchitectureResponseList{} + +// PaginateddebReleaseArchitectureResponseList struct for PaginateddebReleaseArchitectureResponseList +type PaginateddebReleaseArchitectureResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebReleaseArchitectureResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebReleaseArchitectureResponseList PaginateddebReleaseArchitectureResponseList + +// NewPaginateddebReleaseArchitectureResponseList instantiates a new PaginateddebReleaseArchitectureResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebReleaseArchitectureResponseList() *PaginateddebReleaseArchitectureResponseList { + this := PaginateddebReleaseArchitectureResponseList{} + return &this +} + +// NewPaginateddebReleaseArchitectureResponseListWithDefaults instantiates a new PaginateddebReleaseArchitectureResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebReleaseArchitectureResponseListWithDefaults() *PaginateddebReleaseArchitectureResponseList { + this := PaginateddebReleaseArchitectureResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebReleaseArchitectureResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebReleaseArchitectureResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebReleaseArchitectureResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebReleaseArchitectureResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebReleaseArchitectureResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebReleaseArchitectureResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebReleaseArchitectureResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebReleaseArchitectureResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebReleaseArchitectureResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebReleaseArchitectureResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebReleaseArchitectureResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebReleaseArchitectureResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebReleaseArchitectureResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebReleaseArchitectureResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebReleaseArchitectureResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebReleaseArchitectureResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebReleaseArchitectureResponseList) GetResults() []DebReleaseArchitectureResponse { + if o == nil || IsNil(o.Results) { + var ret []DebReleaseArchitectureResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebReleaseArchitectureResponseList) GetResultsOk() ([]DebReleaseArchitectureResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebReleaseArchitectureResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebReleaseArchitectureResponse and assigns it to the Results field. +func (o *PaginateddebReleaseArchitectureResponseList) SetResults(v []DebReleaseArchitectureResponse) { + o.Results = v +} + +func (o PaginateddebReleaseArchitectureResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebReleaseArchitectureResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebReleaseArchitectureResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebReleaseArchitectureResponseList := _PaginateddebReleaseArchitectureResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebReleaseArchitectureResponseList); err == nil { + *o = PaginateddebReleaseArchitectureResponseList(varPaginateddebReleaseArchitectureResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebReleaseArchitectureResponseList struct { + value *PaginateddebReleaseArchitectureResponseList + isSet bool +} + +func (v NullablePaginateddebReleaseArchitectureResponseList) Get() *PaginateddebReleaseArchitectureResponseList { + return v.value +} + +func (v *NullablePaginateddebReleaseArchitectureResponseList) Set(val *PaginateddebReleaseArchitectureResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebReleaseArchitectureResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebReleaseArchitectureResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebReleaseArchitectureResponseList(val *PaginateddebReleaseArchitectureResponseList) *NullablePaginateddebReleaseArchitectureResponseList { + return &NullablePaginateddebReleaseArchitectureResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebReleaseArchitectureResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebReleaseArchitectureResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_component_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_component_response_list.go new file mode 100644 index 0000000000..56b3bf199d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_component_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebReleaseComponentResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebReleaseComponentResponseList{} + +// PaginateddebReleaseComponentResponseList struct for PaginateddebReleaseComponentResponseList +type PaginateddebReleaseComponentResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebReleaseComponentResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebReleaseComponentResponseList PaginateddebReleaseComponentResponseList + +// NewPaginateddebReleaseComponentResponseList instantiates a new PaginateddebReleaseComponentResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebReleaseComponentResponseList() *PaginateddebReleaseComponentResponseList { + this := PaginateddebReleaseComponentResponseList{} + return &this +} + +// NewPaginateddebReleaseComponentResponseListWithDefaults instantiates a new PaginateddebReleaseComponentResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebReleaseComponentResponseListWithDefaults() *PaginateddebReleaseComponentResponseList { + this := PaginateddebReleaseComponentResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebReleaseComponentResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebReleaseComponentResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebReleaseComponentResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebReleaseComponentResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebReleaseComponentResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebReleaseComponentResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebReleaseComponentResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebReleaseComponentResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebReleaseComponentResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebReleaseComponentResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebReleaseComponentResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebReleaseComponentResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebReleaseComponentResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebReleaseComponentResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebReleaseComponentResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebReleaseComponentResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebReleaseComponentResponseList) GetResults() []DebReleaseComponentResponse { + if o == nil || IsNil(o.Results) { + var ret []DebReleaseComponentResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebReleaseComponentResponseList) GetResultsOk() ([]DebReleaseComponentResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebReleaseComponentResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebReleaseComponentResponse and assigns it to the Results field. +func (o *PaginateddebReleaseComponentResponseList) SetResults(v []DebReleaseComponentResponse) { + o.Results = v +} + +func (o PaginateddebReleaseComponentResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebReleaseComponentResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebReleaseComponentResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebReleaseComponentResponseList := _PaginateddebReleaseComponentResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebReleaseComponentResponseList); err == nil { + *o = PaginateddebReleaseComponentResponseList(varPaginateddebReleaseComponentResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebReleaseComponentResponseList struct { + value *PaginateddebReleaseComponentResponseList + isSet bool +} + +func (v NullablePaginateddebReleaseComponentResponseList) Get() *PaginateddebReleaseComponentResponseList { + return v.value +} + +func (v *NullablePaginateddebReleaseComponentResponseList) Set(val *PaginateddebReleaseComponentResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebReleaseComponentResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebReleaseComponentResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebReleaseComponentResponseList(val *PaginateddebReleaseComponentResponseList) *NullablePaginateddebReleaseComponentResponseList { + return &NullablePaginateddebReleaseComponentResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebReleaseComponentResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebReleaseComponentResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_file_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_file_response_list.go new file mode 100644 index 0000000000..431b1efdc9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_file_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebReleaseFileResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebReleaseFileResponseList{} + +// PaginateddebReleaseFileResponseList struct for PaginateddebReleaseFileResponseList +type PaginateddebReleaseFileResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebReleaseFileResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebReleaseFileResponseList PaginateddebReleaseFileResponseList + +// NewPaginateddebReleaseFileResponseList instantiates a new PaginateddebReleaseFileResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebReleaseFileResponseList() *PaginateddebReleaseFileResponseList { + this := PaginateddebReleaseFileResponseList{} + return &this +} + +// NewPaginateddebReleaseFileResponseListWithDefaults instantiates a new PaginateddebReleaseFileResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebReleaseFileResponseListWithDefaults() *PaginateddebReleaseFileResponseList { + this := PaginateddebReleaseFileResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebReleaseFileResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebReleaseFileResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebReleaseFileResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebReleaseFileResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebReleaseFileResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebReleaseFileResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebReleaseFileResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebReleaseFileResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebReleaseFileResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebReleaseFileResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebReleaseFileResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebReleaseFileResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebReleaseFileResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebReleaseFileResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebReleaseFileResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebReleaseFileResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebReleaseFileResponseList) GetResults() []DebReleaseFileResponse { + if o == nil || IsNil(o.Results) { + var ret []DebReleaseFileResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebReleaseFileResponseList) GetResultsOk() ([]DebReleaseFileResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebReleaseFileResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebReleaseFileResponse and assigns it to the Results field. +func (o *PaginateddebReleaseFileResponseList) SetResults(v []DebReleaseFileResponse) { + o.Results = v +} + +func (o PaginateddebReleaseFileResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebReleaseFileResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebReleaseFileResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebReleaseFileResponseList := _PaginateddebReleaseFileResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebReleaseFileResponseList); err == nil { + *o = PaginateddebReleaseFileResponseList(varPaginateddebReleaseFileResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebReleaseFileResponseList struct { + value *PaginateddebReleaseFileResponseList + isSet bool +} + +func (v NullablePaginateddebReleaseFileResponseList) Get() *PaginateddebReleaseFileResponseList { + return v.value +} + +func (v *NullablePaginateddebReleaseFileResponseList) Set(val *PaginateddebReleaseFileResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebReleaseFileResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebReleaseFileResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebReleaseFileResponseList(val *PaginateddebReleaseFileResponseList) *NullablePaginateddebReleaseFileResponseList { + return &NullablePaginateddebReleaseFileResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebReleaseFileResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebReleaseFileResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_response_list.go new file mode 100644 index 0000000000..7b206f3d6e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_release_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebReleaseResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebReleaseResponseList{} + +// PaginateddebReleaseResponseList struct for PaginateddebReleaseResponseList +type PaginateddebReleaseResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebReleaseResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebReleaseResponseList PaginateddebReleaseResponseList + +// NewPaginateddebReleaseResponseList instantiates a new PaginateddebReleaseResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebReleaseResponseList() *PaginateddebReleaseResponseList { + this := PaginateddebReleaseResponseList{} + return &this +} + +// NewPaginateddebReleaseResponseListWithDefaults instantiates a new PaginateddebReleaseResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebReleaseResponseListWithDefaults() *PaginateddebReleaseResponseList { + this := PaginateddebReleaseResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebReleaseResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebReleaseResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebReleaseResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebReleaseResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebReleaseResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebReleaseResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebReleaseResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebReleaseResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebReleaseResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebReleaseResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebReleaseResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebReleaseResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebReleaseResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebReleaseResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebReleaseResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebReleaseResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebReleaseResponseList) GetResults() []DebReleaseResponse { + if o == nil || IsNil(o.Results) { + var ret []DebReleaseResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebReleaseResponseList) GetResultsOk() ([]DebReleaseResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebReleaseResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebReleaseResponse and assigns it to the Results field. +func (o *PaginateddebReleaseResponseList) SetResults(v []DebReleaseResponse) { + o.Results = v +} + +func (o PaginateddebReleaseResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebReleaseResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebReleaseResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebReleaseResponseList := _PaginateddebReleaseResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebReleaseResponseList); err == nil { + *o = PaginateddebReleaseResponseList(varPaginateddebReleaseResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebReleaseResponseList struct { + value *PaginateddebReleaseResponseList + isSet bool +} + +func (v NullablePaginateddebReleaseResponseList) Get() *PaginateddebReleaseResponseList { + return v.value +} + +func (v *NullablePaginateddebReleaseResponseList) Set(val *PaginateddebReleaseResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebReleaseResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebReleaseResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebReleaseResponseList(val *PaginateddebReleaseResponseList) *NullablePaginateddebReleaseResponseList { + return &NullablePaginateddebReleaseResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebReleaseResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebReleaseResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_verbatim_publication_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_verbatim_publication_response_list.go new file mode 100644 index 0000000000..3a9cbcb3ea --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginateddeb_verbatim_publication_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginateddebVerbatimPublicationResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginateddebVerbatimPublicationResponseList{} + +// PaginateddebVerbatimPublicationResponseList struct for PaginateddebVerbatimPublicationResponseList +type PaginateddebVerbatimPublicationResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []DebVerbatimPublicationResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginateddebVerbatimPublicationResponseList PaginateddebVerbatimPublicationResponseList + +// NewPaginateddebVerbatimPublicationResponseList instantiates a new PaginateddebVerbatimPublicationResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginateddebVerbatimPublicationResponseList() *PaginateddebVerbatimPublicationResponseList { + this := PaginateddebVerbatimPublicationResponseList{} + return &this +} + +// NewPaginateddebVerbatimPublicationResponseListWithDefaults instantiates a new PaginateddebVerbatimPublicationResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginateddebVerbatimPublicationResponseListWithDefaults() *PaginateddebVerbatimPublicationResponseList { + this := PaginateddebVerbatimPublicationResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginateddebVerbatimPublicationResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebVerbatimPublicationResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginateddebVerbatimPublicationResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginateddebVerbatimPublicationResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebVerbatimPublicationResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebVerbatimPublicationResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginateddebVerbatimPublicationResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginateddebVerbatimPublicationResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginateddebVerbatimPublicationResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginateddebVerbatimPublicationResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginateddebVerbatimPublicationResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginateddebVerbatimPublicationResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginateddebVerbatimPublicationResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginateddebVerbatimPublicationResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginateddebVerbatimPublicationResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginateddebVerbatimPublicationResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginateddebVerbatimPublicationResponseList) GetResults() []DebVerbatimPublicationResponse { + if o == nil || IsNil(o.Results) { + var ret []DebVerbatimPublicationResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginateddebVerbatimPublicationResponseList) GetResultsOk() ([]DebVerbatimPublicationResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginateddebVerbatimPublicationResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DebVerbatimPublicationResponse and assigns it to the Results field. +func (o *PaginateddebVerbatimPublicationResponseList) SetResults(v []DebVerbatimPublicationResponse) { + o.Results = v +} + +func (o PaginateddebVerbatimPublicationResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginateddebVerbatimPublicationResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginateddebVerbatimPublicationResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginateddebVerbatimPublicationResponseList := _PaginateddebVerbatimPublicationResponseList{} + + if err = json.Unmarshal(bytes, &varPaginateddebVerbatimPublicationResponseList); err == nil { + *o = PaginateddebVerbatimPublicationResponseList(varPaginateddebVerbatimPublicationResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginateddebVerbatimPublicationResponseList struct { + value *PaginateddebVerbatimPublicationResponseList + isSet bool +} + +func (v NullablePaginateddebVerbatimPublicationResponseList) Get() *PaginateddebVerbatimPublicationResponseList { + return v.value +} + +func (v *NullablePaginateddebVerbatimPublicationResponseList) Set(val *PaginateddebVerbatimPublicationResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginateddebVerbatimPublicationResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginateddebVerbatimPublicationResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginateddebVerbatimPublicationResponseList(val *PaginateddebVerbatimPublicationResponseList) *NullablePaginateddebVerbatimPublicationResponseList { + return &NullablePaginateddebVerbatimPublicationResponseList{value: val, isSet: true} +} + +func (v NullablePaginateddebVerbatimPublicationResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginateddebVerbatimPublicationResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_alternate_content_source_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_alternate_content_source_response_list.go new file mode 100644 index 0000000000..30aa81162f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_alternate_content_source_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedfileFileAlternateContentSourceResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedfileFileAlternateContentSourceResponseList{} + +// PaginatedfileFileAlternateContentSourceResponseList struct for PaginatedfileFileAlternateContentSourceResponseList +type PaginatedfileFileAlternateContentSourceResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []FileFileAlternateContentSourceResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedfileFileAlternateContentSourceResponseList PaginatedfileFileAlternateContentSourceResponseList + +// NewPaginatedfileFileAlternateContentSourceResponseList instantiates a new PaginatedfileFileAlternateContentSourceResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedfileFileAlternateContentSourceResponseList() *PaginatedfileFileAlternateContentSourceResponseList { + this := PaginatedfileFileAlternateContentSourceResponseList{} + return &this +} + +// NewPaginatedfileFileAlternateContentSourceResponseListWithDefaults instantiates a new PaginatedfileFileAlternateContentSourceResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedfileFileAlternateContentSourceResponseListWithDefaults() *PaginatedfileFileAlternateContentSourceResponseList { + this := PaginatedfileFileAlternateContentSourceResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedfileFileAlternateContentSourceResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedfileFileAlternateContentSourceResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedfileFileAlternateContentSourceResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedfileFileAlternateContentSourceResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedfileFileAlternateContentSourceResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedfileFileAlternateContentSourceResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedfileFileAlternateContentSourceResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedfileFileAlternateContentSourceResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedfileFileAlternateContentSourceResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedfileFileAlternateContentSourceResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedfileFileAlternateContentSourceResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedfileFileAlternateContentSourceResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedfileFileAlternateContentSourceResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedfileFileAlternateContentSourceResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedfileFileAlternateContentSourceResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedfileFileAlternateContentSourceResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedfileFileAlternateContentSourceResponseList) GetResults() []FileFileAlternateContentSourceResponse { + if o == nil || IsNil(o.Results) { + var ret []FileFileAlternateContentSourceResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedfileFileAlternateContentSourceResponseList) GetResultsOk() ([]FileFileAlternateContentSourceResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedfileFileAlternateContentSourceResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FileFileAlternateContentSourceResponse and assigns it to the Results field. +func (o *PaginatedfileFileAlternateContentSourceResponseList) SetResults(v []FileFileAlternateContentSourceResponse) { + o.Results = v +} + +func (o PaginatedfileFileAlternateContentSourceResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedfileFileAlternateContentSourceResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedfileFileAlternateContentSourceResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedfileFileAlternateContentSourceResponseList := _PaginatedfileFileAlternateContentSourceResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedfileFileAlternateContentSourceResponseList); err == nil { + *o = PaginatedfileFileAlternateContentSourceResponseList(varPaginatedfileFileAlternateContentSourceResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedfileFileAlternateContentSourceResponseList struct { + value *PaginatedfileFileAlternateContentSourceResponseList + isSet bool +} + +func (v NullablePaginatedfileFileAlternateContentSourceResponseList) Get() *PaginatedfileFileAlternateContentSourceResponseList { + return v.value +} + +func (v *NullablePaginatedfileFileAlternateContentSourceResponseList) Set(val *PaginatedfileFileAlternateContentSourceResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedfileFileAlternateContentSourceResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedfileFileAlternateContentSourceResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedfileFileAlternateContentSourceResponseList(val *PaginatedfileFileAlternateContentSourceResponseList) *NullablePaginatedfileFileAlternateContentSourceResponseList { + return &NullablePaginatedfileFileAlternateContentSourceResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedfileFileAlternateContentSourceResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedfileFileAlternateContentSourceResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_content_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_content_response_list.go new file mode 100644 index 0000000000..8c374af0a0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_content_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedfileFileContentResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedfileFileContentResponseList{} + +// PaginatedfileFileContentResponseList struct for PaginatedfileFileContentResponseList +type PaginatedfileFileContentResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []FileFileContentResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedfileFileContentResponseList PaginatedfileFileContentResponseList + +// NewPaginatedfileFileContentResponseList instantiates a new PaginatedfileFileContentResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedfileFileContentResponseList() *PaginatedfileFileContentResponseList { + this := PaginatedfileFileContentResponseList{} + return &this +} + +// NewPaginatedfileFileContentResponseListWithDefaults instantiates a new PaginatedfileFileContentResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedfileFileContentResponseListWithDefaults() *PaginatedfileFileContentResponseList { + this := PaginatedfileFileContentResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedfileFileContentResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedfileFileContentResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedfileFileContentResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedfileFileContentResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedfileFileContentResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedfileFileContentResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedfileFileContentResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedfileFileContentResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedfileFileContentResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedfileFileContentResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedfileFileContentResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedfileFileContentResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedfileFileContentResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedfileFileContentResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedfileFileContentResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedfileFileContentResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedfileFileContentResponseList) GetResults() []FileFileContentResponse { + if o == nil || IsNil(o.Results) { + var ret []FileFileContentResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedfileFileContentResponseList) GetResultsOk() ([]FileFileContentResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedfileFileContentResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FileFileContentResponse and assigns it to the Results field. +func (o *PaginatedfileFileContentResponseList) SetResults(v []FileFileContentResponse) { + o.Results = v +} + +func (o PaginatedfileFileContentResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedfileFileContentResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedfileFileContentResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedfileFileContentResponseList := _PaginatedfileFileContentResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedfileFileContentResponseList); err == nil { + *o = PaginatedfileFileContentResponseList(varPaginatedfileFileContentResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedfileFileContentResponseList struct { + value *PaginatedfileFileContentResponseList + isSet bool +} + +func (v NullablePaginatedfileFileContentResponseList) Get() *PaginatedfileFileContentResponseList { + return v.value +} + +func (v *NullablePaginatedfileFileContentResponseList) Set(val *PaginatedfileFileContentResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedfileFileContentResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedfileFileContentResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedfileFileContentResponseList(val *PaginatedfileFileContentResponseList) *NullablePaginatedfileFileContentResponseList { + return &NullablePaginatedfileFileContentResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedfileFileContentResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedfileFileContentResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_distribution_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_distribution_response_list.go new file mode 100644 index 0000000000..fc1acbe9a2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_distribution_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedfileFileDistributionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedfileFileDistributionResponseList{} + +// PaginatedfileFileDistributionResponseList struct for PaginatedfileFileDistributionResponseList +type PaginatedfileFileDistributionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []FileFileDistributionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedfileFileDistributionResponseList PaginatedfileFileDistributionResponseList + +// NewPaginatedfileFileDistributionResponseList instantiates a new PaginatedfileFileDistributionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedfileFileDistributionResponseList() *PaginatedfileFileDistributionResponseList { + this := PaginatedfileFileDistributionResponseList{} + return &this +} + +// NewPaginatedfileFileDistributionResponseListWithDefaults instantiates a new PaginatedfileFileDistributionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedfileFileDistributionResponseListWithDefaults() *PaginatedfileFileDistributionResponseList { + this := PaginatedfileFileDistributionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedfileFileDistributionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedfileFileDistributionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedfileFileDistributionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedfileFileDistributionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedfileFileDistributionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedfileFileDistributionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedfileFileDistributionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedfileFileDistributionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedfileFileDistributionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedfileFileDistributionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedfileFileDistributionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedfileFileDistributionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedfileFileDistributionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedfileFileDistributionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedfileFileDistributionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedfileFileDistributionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedfileFileDistributionResponseList) GetResults() []FileFileDistributionResponse { + if o == nil || IsNil(o.Results) { + var ret []FileFileDistributionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedfileFileDistributionResponseList) GetResultsOk() ([]FileFileDistributionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedfileFileDistributionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FileFileDistributionResponse and assigns it to the Results field. +func (o *PaginatedfileFileDistributionResponseList) SetResults(v []FileFileDistributionResponse) { + o.Results = v +} + +func (o PaginatedfileFileDistributionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedfileFileDistributionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedfileFileDistributionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedfileFileDistributionResponseList := _PaginatedfileFileDistributionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedfileFileDistributionResponseList); err == nil { + *o = PaginatedfileFileDistributionResponseList(varPaginatedfileFileDistributionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedfileFileDistributionResponseList struct { + value *PaginatedfileFileDistributionResponseList + isSet bool +} + +func (v NullablePaginatedfileFileDistributionResponseList) Get() *PaginatedfileFileDistributionResponseList { + return v.value +} + +func (v *NullablePaginatedfileFileDistributionResponseList) Set(val *PaginatedfileFileDistributionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedfileFileDistributionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedfileFileDistributionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedfileFileDistributionResponseList(val *PaginatedfileFileDistributionResponseList) *NullablePaginatedfileFileDistributionResponseList { + return &NullablePaginatedfileFileDistributionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedfileFileDistributionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedfileFileDistributionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_publication_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_publication_response_list.go new file mode 100644 index 0000000000..c24335103d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_publication_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedfileFilePublicationResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedfileFilePublicationResponseList{} + +// PaginatedfileFilePublicationResponseList struct for PaginatedfileFilePublicationResponseList +type PaginatedfileFilePublicationResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []FileFilePublicationResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedfileFilePublicationResponseList PaginatedfileFilePublicationResponseList + +// NewPaginatedfileFilePublicationResponseList instantiates a new PaginatedfileFilePublicationResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedfileFilePublicationResponseList() *PaginatedfileFilePublicationResponseList { + this := PaginatedfileFilePublicationResponseList{} + return &this +} + +// NewPaginatedfileFilePublicationResponseListWithDefaults instantiates a new PaginatedfileFilePublicationResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedfileFilePublicationResponseListWithDefaults() *PaginatedfileFilePublicationResponseList { + this := PaginatedfileFilePublicationResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedfileFilePublicationResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedfileFilePublicationResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedfileFilePublicationResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedfileFilePublicationResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedfileFilePublicationResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedfileFilePublicationResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedfileFilePublicationResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedfileFilePublicationResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedfileFilePublicationResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedfileFilePublicationResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedfileFilePublicationResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedfileFilePublicationResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedfileFilePublicationResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedfileFilePublicationResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedfileFilePublicationResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedfileFilePublicationResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedfileFilePublicationResponseList) GetResults() []FileFilePublicationResponse { + if o == nil || IsNil(o.Results) { + var ret []FileFilePublicationResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedfileFilePublicationResponseList) GetResultsOk() ([]FileFilePublicationResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedfileFilePublicationResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FileFilePublicationResponse and assigns it to the Results field. +func (o *PaginatedfileFilePublicationResponseList) SetResults(v []FileFilePublicationResponse) { + o.Results = v +} + +func (o PaginatedfileFilePublicationResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedfileFilePublicationResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedfileFilePublicationResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedfileFilePublicationResponseList := _PaginatedfileFilePublicationResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedfileFilePublicationResponseList); err == nil { + *o = PaginatedfileFilePublicationResponseList(varPaginatedfileFilePublicationResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedfileFilePublicationResponseList struct { + value *PaginatedfileFilePublicationResponseList + isSet bool +} + +func (v NullablePaginatedfileFilePublicationResponseList) Get() *PaginatedfileFilePublicationResponseList { + return v.value +} + +func (v *NullablePaginatedfileFilePublicationResponseList) Set(val *PaginatedfileFilePublicationResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedfileFilePublicationResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedfileFilePublicationResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedfileFilePublicationResponseList(val *PaginatedfileFilePublicationResponseList) *NullablePaginatedfileFilePublicationResponseList { + return &NullablePaginatedfileFilePublicationResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedfileFilePublicationResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedfileFilePublicationResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_remote_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_remote_response_list.go new file mode 100644 index 0000000000..c5cab6c0bc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_remote_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedfileFileRemoteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedfileFileRemoteResponseList{} + +// PaginatedfileFileRemoteResponseList struct for PaginatedfileFileRemoteResponseList +type PaginatedfileFileRemoteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []FileFileRemoteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedfileFileRemoteResponseList PaginatedfileFileRemoteResponseList + +// NewPaginatedfileFileRemoteResponseList instantiates a new PaginatedfileFileRemoteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedfileFileRemoteResponseList() *PaginatedfileFileRemoteResponseList { + this := PaginatedfileFileRemoteResponseList{} + return &this +} + +// NewPaginatedfileFileRemoteResponseListWithDefaults instantiates a new PaginatedfileFileRemoteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedfileFileRemoteResponseListWithDefaults() *PaginatedfileFileRemoteResponseList { + this := PaginatedfileFileRemoteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedfileFileRemoteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedfileFileRemoteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedfileFileRemoteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedfileFileRemoteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedfileFileRemoteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedfileFileRemoteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedfileFileRemoteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedfileFileRemoteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedfileFileRemoteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedfileFileRemoteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedfileFileRemoteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedfileFileRemoteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedfileFileRemoteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedfileFileRemoteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedfileFileRemoteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedfileFileRemoteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedfileFileRemoteResponseList) GetResults() []FileFileRemoteResponse { + if o == nil || IsNil(o.Results) { + var ret []FileFileRemoteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedfileFileRemoteResponseList) GetResultsOk() ([]FileFileRemoteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedfileFileRemoteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FileFileRemoteResponse and assigns it to the Results field. +func (o *PaginatedfileFileRemoteResponseList) SetResults(v []FileFileRemoteResponse) { + o.Results = v +} + +func (o PaginatedfileFileRemoteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedfileFileRemoteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedfileFileRemoteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedfileFileRemoteResponseList := _PaginatedfileFileRemoteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedfileFileRemoteResponseList); err == nil { + *o = PaginatedfileFileRemoteResponseList(varPaginatedfileFileRemoteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedfileFileRemoteResponseList struct { + value *PaginatedfileFileRemoteResponseList + isSet bool +} + +func (v NullablePaginatedfileFileRemoteResponseList) Get() *PaginatedfileFileRemoteResponseList { + return v.value +} + +func (v *NullablePaginatedfileFileRemoteResponseList) Set(val *PaginatedfileFileRemoteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedfileFileRemoteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedfileFileRemoteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedfileFileRemoteResponseList(val *PaginatedfileFileRemoteResponseList) *NullablePaginatedfileFileRemoteResponseList { + return &NullablePaginatedfileFileRemoteResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedfileFileRemoteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedfileFileRemoteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_repository_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_repository_response_list.go new file mode 100644 index 0000000000..e4dd0511f9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedfile_file_repository_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedfileFileRepositoryResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedfileFileRepositoryResponseList{} + +// PaginatedfileFileRepositoryResponseList struct for PaginatedfileFileRepositoryResponseList +type PaginatedfileFileRepositoryResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []FileFileRepositoryResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedfileFileRepositoryResponseList PaginatedfileFileRepositoryResponseList + +// NewPaginatedfileFileRepositoryResponseList instantiates a new PaginatedfileFileRepositoryResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedfileFileRepositoryResponseList() *PaginatedfileFileRepositoryResponseList { + this := PaginatedfileFileRepositoryResponseList{} + return &this +} + +// NewPaginatedfileFileRepositoryResponseListWithDefaults instantiates a new PaginatedfileFileRepositoryResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedfileFileRepositoryResponseListWithDefaults() *PaginatedfileFileRepositoryResponseList { + this := PaginatedfileFileRepositoryResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedfileFileRepositoryResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedfileFileRepositoryResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedfileFileRepositoryResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedfileFileRepositoryResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedfileFileRepositoryResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedfileFileRepositoryResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedfileFileRepositoryResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedfileFileRepositoryResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedfileFileRepositoryResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedfileFileRepositoryResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedfileFileRepositoryResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedfileFileRepositoryResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedfileFileRepositoryResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedfileFileRepositoryResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedfileFileRepositoryResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedfileFileRepositoryResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedfileFileRepositoryResponseList) GetResults() []FileFileRepositoryResponse { + if o == nil || IsNil(o.Results) { + var ret []FileFileRepositoryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedfileFileRepositoryResponseList) GetResultsOk() ([]FileFileRepositoryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedfileFileRepositoryResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FileFileRepositoryResponse and assigns it to the Results field. +func (o *PaginatedfileFileRepositoryResponseList) SetResults(v []FileFileRepositoryResponse) { + o.Results = v +} + +func (o PaginatedfileFileRepositoryResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedfileFileRepositoryResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedfileFileRepositoryResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedfileFileRepositoryResponseList := _PaginatedfileFileRepositoryResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedfileFileRepositoryResponseList); err == nil { + *o = PaginatedfileFileRepositoryResponseList(varPaginatedfileFileRepositoryResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedfileFileRepositoryResponseList struct { + value *PaginatedfileFileRepositoryResponseList + isSet bool +} + +func (v NullablePaginatedfileFileRepositoryResponseList) Get() *PaginatedfileFileRepositoryResponseList { + return v.value +} + +func (v *NullablePaginatedfileFileRepositoryResponseList) Set(val *PaginatedfileFileRepositoryResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedfileFileRepositoryResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedfileFileRepositoryResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedfileFileRepositoryResponseList(val *PaginatedfileFileRepositoryResponseList) *NullablePaginatedfileFileRepositoryResponseList { + return &NullablePaginatedfileFileRepositoryResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedfileFileRepositoryResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedfileFileRepositoryResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_content_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_content_response_list.go new file mode 100644 index 0000000000..fd9eec719a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_content_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedgemGemContentResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedgemGemContentResponseList{} + +// PaginatedgemGemContentResponseList struct for PaginatedgemGemContentResponseList +type PaginatedgemGemContentResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []GemGemContentResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedgemGemContentResponseList PaginatedgemGemContentResponseList + +// NewPaginatedgemGemContentResponseList instantiates a new PaginatedgemGemContentResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedgemGemContentResponseList() *PaginatedgemGemContentResponseList { + this := PaginatedgemGemContentResponseList{} + return &this +} + +// NewPaginatedgemGemContentResponseListWithDefaults instantiates a new PaginatedgemGemContentResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedgemGemContentResponseListWithDefaults() *PaginatedgemGemContentResponseList { + this := PaginatedgemGemContentResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedgemGemContentResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedgemGemContentResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedgemGemContentResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedgemGemContentResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedgemGemContentResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedgemGemContentResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedgemGemContentResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedgemGemContentResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedgemGemContentResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedgemGemContentResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedgemGemContentResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedgemGemContentResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedgemGemContentResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedgemGemContentResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedgemGemContentResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedgemGemContentResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedgemGemContentResponseList) GetResults() []GemGemContentResponse { + if o == nil || IsNil(o.Results) { + var ret []GemGemContentResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedgemGemContentResponseList) GetResultsOk() ([]GemGemContentResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedgemGemContentResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []GemGemContentResponse and assigns it to the Results field. +func (o *PaginatedgemGemContentResponseList) SetResults(v []GemGemContentResponse) { + o.Results = v +} + +func (o PaginatedgemGemContentResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedgemGemContentResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedgemGemContentResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedgemGemContentResponseList := _PaginatedgemGemContentResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedgemGemContentResponseList); err == nil { + *o = PaginatedgemGemContentResponseList(varPaginatedgemGemContentResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedgemGemContentResponseList struct { + value *PaginatedgemGemContentResponseList + isSet bool +} + +func (v NullablePaginatedgemGemContentResponseList) Get() *PaginatedgemGemContentResponseList { + return v.value +} + +func (v *NullablePaginatedgemGemContentResponseList) Set(val *PaginatedgemGemContentResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedgemGemContentResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedgemGemContentResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedgemGemContentResponseList(val *PaginatedgemGemContentResponseList) *NullablePaginatedgemGemContentResponseList { + return &NullablePaginatedgemGemContentResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedgemGemContentResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedgemGemContentResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_distribution_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_distribution_response_list.go new file mode 100644 index 0000000000..0c64aa2f35 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_distribution_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedgemGemDistributionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedgemGemDistributionResponseList{} + +// PaginatedgemGemDistributionResponseList struct for PaginatedgemGemDistributionResponseList +type PaginatedgemGemDistributionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []GemGemDistributionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedgemGemDistributionResponseList PaginatedgemGemDistributionResponseList + +// NewPaginatedgemGemDistributionResponseList instantiates a new PaginatedgemGemDistributionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedgemGemDistributionResponseList() *PaginatedgemGemDistributionResponseList { + this := PaginatedgemGemDistributionResponseList{} + return &this +} + +// NewPaginatedgemGemDistributionResponseListWithDefaults instantiates a new PaginatedgemGemDistributionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedgemGemDistributionResponseListWithDefaults() *PaginatedgemGemDistributionResponseList { + this := PaginatedgemGemDistributionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedgemGemDistributionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedgemGemDistributionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedgemGemDistributionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedgemGemDistributionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedgemGemDistributionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedgemGemDistributionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedgemGemDistributionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedgemGemDistributionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedgemGemDistributionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedgemGemDistributionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedgemGemDistributionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedgemGemDistributionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedgemGemDistributionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedgemGemDistributionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedgemGemDistributionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedgemGemDistributionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedgemGemDistributionResponseList) GetResults() []GemGemDistributionResponse { + if o == nil || IsNil(o.Results) { + var ret []GemGemDistributionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedgemGemDistributionResponseList) GetResultsOk() ([]GemGemDistributionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedgemGemDistributionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []GemGemDistributionResponse and assigns it to the Results field. +func (o *PaginatedgemGemDistributionResponseList) SetResults(v []GemGemDistributionResponse) { + o.Results = v +} + +func (o PaginatedgemGemDistributionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedgemGemDistributionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedgemGemDistributionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedgemGemDistributionResponseList := _PaginatedgemGemDistributionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedgemGemDistributionResponseList); err == nil { + *o = PaginatedgemGemDistributionResponseList(varPaginatedgemGemDistributionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedgemGemDistributionResponseList struct { + value *PaginatedgemGemDistributionResponseList + isSet bool +} + +func (v NullablePaginatedgemGemDistributionResponseList) Get() *PaginatedgemGemDistributionResponseList { + return v.value +} + +func (v *NullablePaginatedgemGemDistributionResponseList) Set(val *PaginatedgemGemDistributionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedgemGemDistributionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedgemGemDistributionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedgemGemDistributionResponseList(val *PaginatedgemGemDistributionResponseList) *NullablePaginatedgemGemDistributionResponseList { + return &NullablePaginatedgemGemDistributionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedgemGemDistributionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedgemGemDistributionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_publication_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_publication_response_list.go new file mode 100644 index 0000000000..73c3128d11 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_publication_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedgemGemPublicationResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedgemGemPublicationResponseList{} + +// PaginatedgemGemPublicationResponseList struct for PaginatedgemGemPublicationResponseList +type PaginatedgemGemPublicationResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []GemGemPublicationResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedgemGemPublicationResponseList PaginatedgemGemPublicationResponseList + +// NewPaginatedgemGemPublicationResponseList instantiates a new PaginatedgemGemPublicationResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedgemGemPublicationResponseList() *PaginatedgemGemPublicationResponseList { + this := PaginatedgemGemPublicationResponseList{} + return &this +} + +// NewPaginatedgemGemPublicationResponseListWithDefaults instantiates a new PaginatedgemGemPublicationResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedgemGemPublicationResponseListWithDefaults() *PaginatedgemGemPublicationResponseList { + this := PaginatedgemGemPublicationResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedgemGemPublicationResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedgemGemPublicationResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedgemGemPublicationResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedgemGemPublicationResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedgemGemPublicationResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedgemGemPublicationResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedgemGemPublicationResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedgemGemPublicationResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedgemGemPublicationResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedgemGemPublicationResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedgemGemPublicationResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedgemGemPublicationResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedgemGemPublicationResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedgemGemPublicationResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedgemGemPublicationResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedgemGemPublicationResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedgemGemPublicationResponseList) GetResults() []GemGemPublicationResponse { + if o == nil || IsNil(o.Results) { + var ret []GemGemPublicationResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedgemGemPublicationResponseList) GetResultsOk() ([]GemGemPublicationResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedgemGemPublicationResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []GemGemPublicationResponse and assigns it to the Results field. +func (o *PaginatedgemGemPublicationResponseList) SetResults(v []GemGemPublicationResponse) { + o.Results = v +} + +func (o PaginatedgemGemPublicationResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedgemGemPublicationResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedgemGemPublicationResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedgemGemPublicationResponseList := _PaginatedgemGemPublicationResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedgemGemPublicationResponseList); err == nil { + *o = PaginatedgemGemPublicationResponseList(varPaginatedgemGemPublicationResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedgemGemPublicationResponseList struct { + value *PaginatedgemGemPublicationResponseList + isSet bool +} + +func (v NullablePaginatedgemGemPublicationResponseList) Get() *PaginatedgemGemPublicationResponseList { + return v.value +} + +func (v *NullablePaginatedgemGemPublicationResponseList) Set(val *PaginatedgemGemPublicationResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedgemGemPublicationResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedgemGemPublicationResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedgemGemPublicationResponseList(val *PaginatedgemGemPublicationResponseList) *NullablePaginatedgemGemPublicationResponseList { + return &NullablePaginatedgemGemPublicationResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedgemGemPublicationResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedgemGemPublicationResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_remote_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_remote_response_list.go new file mode 100644 index 0000000000..7351547517 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_remote_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedgemGemRemoteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedgemGemRemoteResponseList{} + +// PaginatedgemGemRemoteResponseList struct for PaginatedgemGemRemoteResponseList +type PaginatedgemGemRemoteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []GemGemRemoteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedgemGemRemoteResponseList PaginatedgemGemRemoteResponseList + +// NewPaginatedgemGemRemoteResponseList instantiates a new PaginatedgemGemRemoteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedgemGemRemoteResponseList() *PaginatedgemGemRemoteResponseList { + this := PaginatedgemGemRemoteResponseList{} + return &this +} + +// NewPaginatedgemGemRemoteResponseListWithDefaults instantiates a new PaginatedgemGemRemoteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedgemGemRemoteResponseListWithDefaults() *PaginatedgemGemRemoteResponseList { + this := PaginatedgemGemRemoteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedgemGemRemoteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedgemGemRemoteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedgemGemRemoteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedgemGemRemoteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedgemGemRemoteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedgemGemRemoteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedgemGemRemoteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedgemGemRemoteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedgemGemRemoteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedgemGemRemoteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedgemGemRemoteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedgemGemRemoteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedgemGemRemoteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedgemGemRemoteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedgemGemRemoteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedgemGemRemoteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedgemGemRemoteResponseList) GetResults() []GemGemRemoteResponse { + if o == nil || IsNil(o.Results) { + var ret []GemGemRemoteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedgemGemRemoteResponseList) GetResultsOk() ([]GemGemRemoteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedgemGemRemoteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []GemGemRemoteResponse and assigns it to the Results field. +func (o *PaginatedgemGemRemoteResponseList) SetResults(v []GemGemRemoteResponse) { + o.Results = v +} + +func (o PaginatedgemGemRemoteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedgemGemRemoteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedgemGemRemoteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedgemGemRemoteResponseList := _PaginatedgemGemRemoteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedgemGemRemoteResponseList); err == nil { + *o = PaginatedgemGemRemoteResponseList(varPaginatedgemGemRemoteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedgemGemRemoteResponseList struct { + value *PaginatedgemGemRemoteResponseList + isSet bool +} + +func (v NullablePaginatedgemGemRemoteResponseList) Get() *PaginatedgemGemRemoteResponseList { + return v.value +} + +func (v *NullablePaginatedgemGemRemoteResponseList) Set(val *PaginatedgemGemRemoteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedgemGemRemoteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedgemGemRemoteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedgemGemRemoteResponseList(val *PaginatedgemGemRemoteResponseList) *NullablePaginatedgemGemRemoteResponseList { + return &NullablePaginatedgemGemRemoteResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedgemGemRemoteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedgemGemRemoteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_repository_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_repository_response_list.go new file mode 100644 index 0000000000..b9dc90a495 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedgem_gem_repository_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedgemGemRepositoryResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedgemGemRepositoryResponseList{} + +// PaginatedgemGemRepositoryResponseList struct for PaginatedgemGemRepositoryResponseList +type PaginatedgemGemRepositoryResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []GemGemRepositoryResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedgemGemRepositoryResponseList PaginatedgemGemRepositoryResponseList + +// NewPaginatedgemGemRepositoryResponseList instantiates a new PaginatedgemGemRepositoryResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedgemGemRepositoryResponseList() *PaginatedgemGemRepositoryResponseList { + this := PaginatedgemGemRepositoryResponseList{} + return &this +} + +// NewPaginatedgemGemRepositoryResponseListWithDefaults instantiates a new PaginatedgemGemRepositoryResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedgemGemRepositoryResponseListWithDefaults() *PaginatedgemGemRepositoryResponseList { + this := PaginatedgemGemRepositoryResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedgemGemRepositoryResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedgemGemRepositoryResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedgemGemRepositoryResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedgemGemRepositoryResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedgemGemRepositoryResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedgemGemRepositoryResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedgemGemRepositoryResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedgemGemRepositoryResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedgemGemRepositoryResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedgemGemRepositoryResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedgemGemRepositoryResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedgemGemRepositoryResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedgemGemRepositoryResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedgemGemRepositoryResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedgemGemRepositoryResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedgemGemRepositoryResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedgemGemRepositoryResponseList) GetResults() []GemGemRepositoryResponse { + if o == nil || IsNil(o.Results) { + var ret []GemGemRepositoryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedgemGemRepositoryResponseList) GetResultsOk() ([]GemGemRepositoryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedgemGemRepositoryResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []GemGemRepositoryResponse and assigns it to the Results field. +func (o *PaginatedgemGemRepositoryResponseList) SetResults(v []GemGemRepositoryResponse) { + o.Results = v +} + +func (o PaginatedgemGemRepositoryResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedgemGemRepositoryResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedgemGemRepositoryResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedgemGemRepositoryResponseList := _PaginatedgemGemRepositoryResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedgemGemRepositoryResponseList); err == nil { + *o = PaginatedgemGemRepositoryResponseList(varPaginatedgemGemRepositoryResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedgemGemRepositoryResponseList struct { + value *PaginatedgemGemRepositoryResponseList + isSet bool +} + +func (v NullablePaginatedgemGemRepositoryResponseList) Get() *PaginatedgemGemRepositoryResponseList { + return v.value +} + +func (v *NullablePaginatedgemGemRepositoryResponseList) Set(val *PaginatedgemGemRepositoryResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedgemGemRepositoryResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedgemGemRepositoryResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedgemGemRepositoryResponseList(val *PaginatedgemGemRepositoryResponseList) *NullablePaginatedgemGemRepositoryResponseList { + return &NullablePaginatedgemGemRepositoryResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedgemGemRepositoryResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedgemGemRepositoryResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_artifact_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_artifact_response_list.go new file mode 100644 index 0000000000..a8d57ec381 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_artifact_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedmavenMavenArtifactResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedmavenMavenArtifactResponseList{} + +// PaginatedmavenMavenArtifactResponseList struct for PaginatedmavenMavenArtifactResponseList +type PaginatedmavenMavenArtifactResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []MavenMavenArtifactResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedmavenMavenArtifactResponseList PaginatedmavenMavenArtifactResponseList + +// NewPaginatedmavenMavenArtifactResponseList instantiates a new PaginatedmavenMavenArtifactResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedmavenMavenArtifactResponseList() *PaginatedmavenMavenArtifactResponseList { + this := PaginatedmavenMavenArtifactResponseList{} + return &this +} + +// NewPaginatedmavenMavenArtifactResponseListWithDefaults instantiates a new PaginatedmavenMavenArtifactResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedmavenMavenArtifactResponseListWithDefaults() *PaginatedmavenMavenArtifactResponseList { + this := PaginatedmavenMavenArtifactResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedmavenMavenArtifactResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedmavenMavenArtifactResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedmavenMavenArtifactResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedmavenMavenArtifactResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedmavenMavenArtifactResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedmavenMavenArtifactResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedmavenMavenArtifactResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedmavenMavenArtifactResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedmavenMavenArtifactResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedmavenMavenArtifactResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedmavenMavenArtifactResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedmavenMavenArtifactResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedmavenMavenArtifactResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedmavenMavenArtifactResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedmavenMavenArtifactResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedmavenMavenArtifactResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedmavenMavenArtifactResponseList) GetResults() []MavenMavenArtifactResponse { + if o == nil || IsNil(o.Results) { + var ret []MavenMavenArtifactResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedmavenMavenArtifactResponseList) GetResultsOk() ([]MavenMavenArtifactResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedmavenMavenArtifactResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []MavenMavenArtifactResponse and assigns it to the Results field. +func (o *PaginatedmavenMavenArtifactResponseList) SetResults(v []MavenMavenArtifactResponse) { + o.Results = v +} + +func (o PaginatedmavenMavenArtifactResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedmavenMavenArtifactResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedmavenMavenArtifactResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedmavenMavenArtifactResponseList := _PaginatedmavenMavenArtifactResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedmavenMavenArtifactResponseList); err == nil { + *o = PaginatedmavenMavenArtifactResponseList(varPaginatedmavenMavenArtifactResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedmavenMavenArtifactResponseList struct { + value *PaginatedmavenMavenArtifactResponseList + isSet bool +} + +func (v NullablePaginatedmavenMavenArtifactResponseList) Get() *PaginatedmavenMavenArtifactResponseList { + return v.value +} + +func (v *NullablePaginatedmavenMavenArtifactResponseList) Set(val *PaginatedmavenMavenArtifactResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedmavenMavenArtifactResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedmavenMavenArtifactResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedmavenMavenArtifactResponseList(val *PaginatedmavenMavenArtifactResponseList) *NullablePaginatedmavenMavenArtifactResponseList { + return &NullablePaginatedmavenMavenArtifactResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedmavenMavenArtifactResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedmavenMavenArtifactResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_distribution_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_distribution_response_list.go new file mode 100644 index 0000000000..52db2fb478 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_distribution_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedmavenMavenDistributionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedmavenMavenDistributionResponseList{} + +// PaginatedmavenMavenDistributionResponseList struct for PaginatedmavenMavenDistributionResponseList +type PaginatedmavenMavenDistributionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []MavenMavenDistributionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedmavenMavenDistributionResponseList PaginatedmavenMavenDistributionResponseList + +// NewPaginatedmavenMavenDistributionResponseList instantiates a new PaginatedmavenMavenDistributionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedmavenMavenDistributionResponseList() *PaginatedmavenMavenDistributionResponseList { + this := PaginatedmavenMavenDistributionResponseList{} + return &this +} + +// NewPaginatedmavenMavenDistributionResponseListWithDefaults instantiates a new PaginatedmavenMavenDistributionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedmavenMavenDistributionResponseListWithDefaults() *PaginatedmavenMavenDistributionResponseList { + this := PaginatedmavenMavenDistributionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedmavenMavenDistributionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedmavenMavenDistributionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedmavenMavenDistributionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedmavenMavenDistributionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedmavenMavenDistributionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedmavenMavenDistributionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedmavenMavenDistributionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedmavenMavenDistributionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedmavenMavenDistributionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedmavenMavenDistributionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedmavenMavenDistributionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedmavenMavenDistributionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedmavenMavenDistributionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedmavenMavenDistributionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedmavenMavenDistributionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedmavenMavenDistributionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedmavenMavenDistributionResponseList) GetResults() []MavenMavenDistributionResponse { + if o == nil || IsNil(o.Results) { + var ret []MavenMavenDistributionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedmavenMavenDistributionResponseList) GetResultsOk() ([]MavenMavenDistributionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedmavenMavenDistributionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []MavenMavenDistributionResponse and assigns it to the Results field. +func (o *PaginatedmavenMavenDistributionResponseList) SetResults(v []MavenMavenDistributionResponse) { + o.Results = v +} + +func (o PaginatedmavenMavenDistributionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedmavenMavenDistributionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedmavenMavenDistributionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedmavenMavenDistributionResponseList := _PaginatedmavenMavenDistributionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedmavenMavenDistributionResponseList); err == nil { + *o = PaginatedmavenMavenDistributionResponseList(varPaginatedmavenMavenDistributionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedmavenMavenDistributionResponseList struct { + value *PaginatedmavenMavenDistributionResponseList + isSet bool +} + +func (v NullablePaginatedmavenMavenDistributionResponseList) Get() *PaginatedmavenMavenDistributionResponseList { + return v.value +} + +func (v *NullablePaginatedmavenMavenDistributionResponseList) Set(val *PaginatedmavenMavenDistributionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedmavenMavenDistributionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedmavenMavenDistributionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedmavenMavenDistributionResponseList(val *PaginatedmavenMavenDistributionResponseList) *NullablePaginatedmavenMavenDistributionResponseList { + return &NullablePaginatedmavenMavenDistributionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedmavenMavenDistributionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedmavenMavenDistributionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_remote_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_remote_response_list.go new file mode 100644 index 0000000000..e895ada2af --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_remote_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedmavenMavenRemoteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedmavenMavenRemoteResponseList{} + +// PaginatedmavenMavenRemoteResponseList struct for PaginatedmavenMavenRemoteResponseList +type PaginatedmavenMavenRemoteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []MavenMavenRemoteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedmavenMavenRemoteResponseList PaginatedmavenMavenRemoteResponseList + +// NewPaginatedmavenMavenRemoteResponseList instantiates a new PaginatedmavenMavenRemoteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedmavenMavenRemoteResponseList() *PaginatedmavenMavenRemoteResponseList { + this := PaginatedmavenMavenRemoteResponseList{} + return &this +} + +// NewPaginatedmavenMavenRemoteResponseListWithDefaults instantiates a new PaginatedmavenMavenRemoteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedmavenMavenRemoteResponseListWithDefaults() *PaginatedmavenMavenRemoteResponseList { + this := PaginatedmavenMavenRemoteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedmavenMavenRemoteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedmavenMavenRemoteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedmavenMavenRemoteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedmavenMavenRemoteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedmavenMavenRemoteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedmavenMavenRemoteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedmavenMavenRemoteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedmavenMavenRemoteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedmavenMavenRemoteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedmavenMavenRemoteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedmavenMavenRemoteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedmavenMavenRemoteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedmavenMavenRemoteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedmavenMavenRemoteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedmavenMavenRemoteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedmavenMavenRemoteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedmavenMavenRemoteResponseList) GetResults() []MavenMavenRemoteResponse { + if o == nil || IsNil(o.Results) { + var ret []MavenMavenRemoteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedmavenMavenRemoteResponseList) GetResultsOk() ([]MavenMavenRemoteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedmavenMavenRemoteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []MavenMavenRemoteResponse and assigns it to the Results field. +func (o *PaginatedmavenMavenRemoteResponseList) SetResults(v []MavenMavenRemoteResponse) { + o.Results = v +} + +func (o PaginatedmavenMavenRemoteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedmavenMavenRemoteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedmavenMavenRemoteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedmavenMavenRemoteResponseList := _PaginatedmavenMavenRemoteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedmavenMavenRemoteResponseList); err == nil { + *o = PaginatedmavenMavenRemoteResponseList(varPaginatedmavenMavenRemoteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedmavenMavenRemoteResponseList struct { + value *PaginatedmavenMavenRemoteResponseList + isSet bool +} + +func (v NullablePaginatedmavenMavenRemoteResponseList) Get() *PaginatedmavenMavenRemoteResponseList { + return v.value +} + +func (v *NullablePaginatedmavenMavenRemoteResponseList) Set(val *PaginatedmavenMavenRemoteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedmavenMavenRemoteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedmavenMavenRemoteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedmavenMavenRemoteResponseList(val *PaginatedmavenMavenRemoteResponseList) *NullablePaginatedmavenMavenRemoteResponseList { + return &NullablePaginatedmavenMavenRemoteResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedmavenMavenRemoteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedmavenMavenRemoteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_repository_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_repository_response_list.go new file mode 100644 index 0000000000..124f8ec0a6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedmaven_maven_repository_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedmavenMavenRepositoryResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedmavenMavenRepositoryResponseList{} + +// PaginatedmavenMavenRepositoryResponseList struct for PaginatedmavenMavenRepositoryResponseList +type PaginatedmavenMavenRepositoryResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []MavenMavenRepositoryResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedmavenMavenRepositoryResponseList PaginatedmavenMavenRepositoryResponseList + +// NewPaginatedmavenMavenRepositoryResponseList instantiates a new PaginatedmavenMavenRepositoryResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedmavenMavenRepositoryResponseList() *PaginatedmavenMavenRepositoryResponseList { + this := PaginatedmavenMavenRepositoryResponseList{} + return &this +} + +// NewPaginatedmavenMavenRepositoryResponseListWithDefaults instantiates a new PaginatedmavenMavenRepositoryResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedmavenMavenRepositoryResponseListWithDefaults() *PaginatedmavenMavenRepositoryResponseList { + this := PaginatedmavenMavenRepositoryResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedmavenMavenRepositoryResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedmavenMavenRepositoryResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedmavenMavenRepositoryResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedmavenMavenRepositoryResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedmavenMavenRepositoryResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedmavenMavenRepositoryResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedmavenMavenRepositoryResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedmavenMavenRepositoryResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedmavenMavenRepositoryResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedmavenMavenRepositoryResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedmavenMavenRepositoryResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedmavenMavenRepositoryResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedmavenMavenRepositoryResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedmavenMavenRepositoryResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedmavenMavenRepositoryResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedmavenMavenRepositoryResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedmavenMavenRepositoryResponseList) GetResults() []MavenMavenRepositoryResponse { + if o == nil || IsNil(o.Results) { + var ret []MavenMavenRepositoryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedmavenMavenRepositoryResponseList) GetResultsOk() ([]MavenMavenRepositoryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedmavenMavenRepositoryResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []MavenMavenRepositoryResponse and assigns it to the Results field. +func (o *PaginatedmavenMavenRepositoryResponseList) SetResults(v []MavenMavenRepositoryResponse) { + o.Results = v +} + +func (o PaginatedmavenMavenRepositoryResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedmavenMavenRepositoryResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedmavenMavenRepositoryResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedmavenMavenRepositoryResponseList := _PaginatedmavenMavenRepositoryResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedmavenMavenRepositoryResponseList); err == nil { + *o = PaginatedmavenMavenRepositoryResponseList(varPaginatedmavenMavenRepositoryResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedmavenMavenRepositoryResponseList struct { + value *PaginatedmavenMavenRepositoryResponseList + isSet bool +} + +func (v NullablePaginatedmavenMavenRepositoryResponseList) Get() *PaginatedmavenMavenRepositoryResponseList { + return v.value +} + +func (v *NullablePaginatedmavenMavenRepositoryResponseList) Set(val *PaginatedmavenMavenRepositoryResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedmavenMavenRepositoryResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedmavenMavenRepositoryResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedmavenMavenRepositoryResponseList(val *PaginatedmavenMavenRepositoryResponseList) *NullablePaginatedmavenMavenRepositoryResponseList { + return &NullablePaginatedmavenMavenRepositoryResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedmavenMavenRepositoryResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedmavenMavenRepositoryResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_commit_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_commit_response_list.go new file mode 100644 index 0000000000..307b0b0212 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_commit_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedostreeOstreeCommitResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedostreeOstreeCommitResponseList{} + +// PaginatedostreeOstreeCommitResponseList struct for PaginatedostreeOstreeCommitResponseList +type PaginatedostreeOstreeCommitResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []OstreeOstreeCommitResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedostreeOstreeCommitResponseList PaginatedostreeOstreeCommitResponseList + +// NewPaginatedostreeOstreeCommitResponseList instantiates a new PaginatedostreeOstreeCommitResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedostreeOstreeCommitResponseList() *PaginatedostreeOstreeCommitResponseList { + this := PaginatedostreeOstreeCommitResponseList{} + return &this +} + +// NewPaginatedostreeOstreeCommitResponseListWithDefaults instantiates a new PaginatedostreeOstreeCommitResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedostreeOstreeCommitResponseListWithDefaults() *PaginatedostreeOstreeCommitResponseList { + this := PaginatedostreeOstreeCommitResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeCommitResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeCommitResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeCommitResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedostreeOstreeCommitResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeCommitResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeCommitResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeCommitResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedostreeOstreeCommitResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedostreeOstreeCommitResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedostreeOstreeCommitResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeCommitResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeCommitResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeCommitResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedostreeOstreeCommitResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedostreeOstreeCommitResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedostreeOstreeCommitResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeCommitResponseList) GetResults() []OstreeOstreeCommitResponse { + if o == nil || IsNil(o.Results) { + var ret []OstreeOstreeCommitResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeCommitResponseList) GetResultsOk() ([]OstreeOstreeCommitResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeCommitResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []OstreeOstreeCommitResponse and assigns it to the Results field. +func (o *PaginatedostreeOstreeCommitResponseList) SetResults(v []OstreeOstreeCommitResponse) { + o.Results = v +} + +func (o PaginatedostreeOstreeCommitResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedostreeOstreeCommitResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedostreeOstreeCommitResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedostreeOstreeCommitResponseList := _PaginatedostreeOstreeCommitResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedostreeOstreeCommitResponseList); err == nil { + *o = PaginatedostreeOstreeCommitResponseList(varPaginatedostreeOstreeCommitResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedostreeOstreeCommitResponseList struct { + value *PaginatedostreeOstreeCommitResponseList + isSet bool +} + +func (v NullablePaginatedostreeOstreeCommitResponseList) Get() *PaginatedostreeOstreeCommitResponseList { + return v.value +} + +func (v *NullablePaginatedostreeOstreeCommitResponseList) Set(val *PaginatedostreeOstreeCommitResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedostreeOstreeCommitResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedostreeOstreeCommitResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedostreeOstreeCommitResponseList(val *PaginatedostreeOstreeCommitResponseList) *NullablePaginatedostreeOstreeCommitResponseList { + return &NullablePaginatedostreeOstreeCommitResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedostreeOstreeCommitResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedostreeOstreeCommitResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_config_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_config_response_list.go new file mode 100644 index 0000000000..c5af6059d0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_config_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedostreeOstreeConfigResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedostreeOstreeConfigResponseList{} + +// PaginatedostreeOstreeConfigResponseList struct for PaginatedostreeOstreeConfigResponseList +type PaginatedostreeOstreeConfigResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []OstreeOstreeConfigResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedostreeOstreeConfigResponseList PaginatedostreeOstreeConfigResponseList + +// NewPaginatedostreeOstreeConfigResponseList instantiates a new PaginatedostreeOstreeConfigResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedostreeOstreeConfigResponseList() *PaginatedostreeOstreeConfigResponseList { + this := PaginatedostreeOstreeConfigResponseList{} + return &this +} + +// NewPaginatedostreeOstreeConfigResponseListWithDefaults instantiates a new PaginatedostreeOstreeConfigResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedostreeOstreeConfigResponseListWithDefaults() *PaginatedostreeOstreeConfigResponseList { + this := PaginatedostreeOstreeConfigResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeConfigResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeConfigResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeConfigResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedostreeOstreeConfigResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeConfigResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeConfigResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeConfigResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedostreeOstreeConfigResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedostreeOstreeConfigResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedostreeOstreeConfigResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeConfigResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeConfigResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeConfigResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedostreeOstreeConfigResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedostreeOstreeConfigResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedostreeOstreeConfigResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeConfigResponseList) GetResults() []OstreeOstreeConfigResponse { + if o == nil || IsNil(o.Results) { + var ret []OstreeOstreeConfigResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeConfigResponseList) GetResultsOk() ([]OstreeOstreeConfigResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeConfigResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []OstreeOstreeConfigResponse and assigns it to the Results field. +func (o *PaginatedostreeOstreeConfigResponseList) SetResults(v []OstreeOstreeConfigResponse) { + o.Results = v +} + +func (o PaginatedostreeOstreeConfigResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedostreeOstreeConfigResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedostreeOstreeConfigResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedostreeOstreeConfigResponseList := _PaginatedostreeOstreeConfigResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedostreeOstreeConfigResponseList); err == nil { + *o = PaginatedostreeOstreeConfigResponseList(varPaginatedostreeOstreeConfigResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedostreeOstreeConfigResponseList struct { + value *PaginatedostreeOstreeConfigResponseList + isSet bool +} + +func (v NullablePaginatedostreeOstreeConfigResponseList) Get() *PaginatedostreeOstreeConfigResponseList { + return v.value +} + +func (v *NullablePaginatedostreeOstreeConfigResponseList) Set(val *PaginatedostreeOstreeConfigResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedostreeOstreeConfigResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedostreeOstreeConfigResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedostreeOstreeConfigResponseList(val *PaginatedostreeOstreeConfigResponseList) *NullablePaginatedostreeOstreeConfigResponseList { + return &NullablePaginatedostreeOstreeConfigResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedostreeOstreeConfigResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedostreeOstreeConfigResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_content_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_content_response_list.go new file mode 100644 index 0000000000..798ab986fd --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_content_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedostreeOstreeContentResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedostreeOstreeContentResponseList{} + +// PaginatedostreeOstreeContentResponseList struct for PaginatedostreeOstreeContentResponseList +type PaginatedostreeOstreeContentResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []OstreeOstreeContentResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedostreeOstreeContentResponseList PaginatedostreeOstreeContentResponseList + +// NewPaginatedostreeOstreeContentResponseList instantiates a new PaginatedostreeOstreeContentResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedostreeOstreeContentResponseList() *PaginatedostreeOstreeContentResponseList { + this := PaginatedostreeOstreeContentResponseList{} + return &this +} + +// NewPaginatedostreeOstreeContentResponseListWithDefaults instantiates a new PaginatedostreeOstreeContentResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedostreeOstreeContentResponseListWithDefaults() *PaginatedostreeOstreeContentResponseList { + this := PaginatedostreeOstreeContentResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeContentResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeContentResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeContentResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedostreeOstreeContentResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeContentResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeContentResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeContentResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedostreeOstreeContentResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedostreeOstreeContentResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedostreeOstreeContentResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeContentResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeContentResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeContentResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedostreeOstreeContentResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedostreeOstreeContentResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedostreeOstreeContentResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeContentResponseList) GetResults() []OstreeOstreeContentResponse { + if o == nil || IsNil(o.Results) { + var ret []OstreeOstreeContentResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeContentResponseList) GetResultsOk() ([]OstreeOstreeContentResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeContentResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []OstreeOstreeContentResponse and assigns it to the Results field. +func (o *PaginatedostreeOstreeContentResponseList) SetResults(v []OstreeOstreeContentResponse) { + o.Results = v +} + +func (o PaginatedostreeOstreeContentResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedostreeOstreeContentResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedostreeOstreeContentResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedostreeOstreeContentResponseList := _PaginatedostreeOstreeContentResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedostreeOstreeContentResponseList); err == nil { + *o = PaginatedostreeOstreeContentResponseList(varPaginatedostreeOstreeContentResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedostreeOstreeContentResponseList struct { + value *PaginatedostreeOstreeContentResponseList + isSet bool +} + +func (v NullablePaginatedostreeOstreeContentResponseList) Get() *PaginatedostreeOstreeContentResponseList { + return v.value +} + +func (v *NullablePaginatedostreeOstreeContentResponseList) Set(val *PaginatedostreeOstreeContentResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedostreeOstreeContentResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedostreeOstreeContentResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedostreeOstreeContentResponseList(val *PaginatedostreeOstreeContentResponseList) *NullablePaginatedostreeOstreeContentResponseList { + return &NullablePaginatedostreeOstreeContentResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedostreeOstreeContentResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedostreeOstreeContentResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_distribution_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_distribution_response_list.go new file mode 100644 index 0000000000..b03a34cfe6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_distribution_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedostreeOstreeDistributionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedostreeOstreeDistributionResponseList{} + +// PaginatedostreeOstreeDistributionResponseList struct for PaginatedostreeOstreeDistributionResponseList +type PaginatedostreeOstreeDistributionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []OstreeOstreeDistributionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedostreeOstreeDistributionResponseList PaginatedostreeOstreeDistributionResponseList + +// NewPaginatedostreeOstreeDistributionResponseList instantiates a new PaginatedostreeOstreeDistributionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedostreeOstreeDistributionResponseList() *PaginatedostreeOstreeDistributionResponseList { + this := PaginatedostreeOstreeDistributionResponseList{} + return &this +} + +// NewPaginatedostreeOstreeDistributionResponseListWithDefaults instantiates a new PaginatedostreeOstreeDistributionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedostreeOstreeDistributionResponseListWithDefaults() *PaginatedostreeOstreeDistributionResponseList { + this := PaginatedostreeOstreeDistributionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeDistributionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeDistributionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeDistributionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedostreeOstreeDistributionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeDistributionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeDistributionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeDistributionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedostreeOstreeDistributionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedostreeOstreeDistributionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedostreeOstreeDistributionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeDistributionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeDistributionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeDistributionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedostreeOstreeDistributionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedostreeOstreeDistributionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedostreeOstreeDistributionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeDistributionResponseList) GetResults() []OstreeOstreeDistributionResponse { + if o == nil || IsNil(o.Results) { + var ret []OstreeOstreeDistributionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeDistributionResponseList) GetResultsOk() ([]OstreeOstreeDistributionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeDistributionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []OstreeOstreeDistributionResponse and assigns it to the Results field. +func (o *PaginatedostreeOstreeDistributionResponseList) SetResults(v []OstreeOstreeDistributionResponse) { + o.Results = v +} + +func (o PaginatedostreeOstreeDistributionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedostreeOstreeDistributionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedostreeOstreeDistributionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedostreeOstreeDistributionResponseList := _PaginatedostreeOstreeDistributionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedostreeOstreeDistributionResponseList); err == nil { + *o = PaginatedostreeOstreeDistributionResponseList(varPaginatedostreeOstreeDistributionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedostreeOstreeDistributionResponseList struct { + value *PaginatedostreeOstreeDistributionResponseList + isSet bool +} + +func (v NullablePaginatedostreeOstreeDistributionResponseList) Get() *PaginatedostreeOstreeDistributionResponseList { + return v.value +} + +func (v *NullablePaginatedostreeOstreeDistributionResponseList) Set(val *PaginatedostreeOstreeDistributionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedostreeOstreeDistributionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedostreeOstreeDistributionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedostreeOstreeDistributionResponseList(val *PaginatedostreeOstreeDistributionResponseList) *NullablePaginatedostreeOstreeDistributionResponseList { + return &NullablePaginatedostreeOstreeDistributionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedostreeOstreeDistributionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedostreeOstreeDistributionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_object_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_object_response_list.go new file mode 100644 index 0000000000..fdca3603af --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_object_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedostreeOstreeObjectResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedostreeOstreeObjectResponseList{} + +// PaginatedostreeOstreeObjectResponseList struct for PaginatedostreeOstreeObjectResponseList +type PaginatedostreeOstreeObjectResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []OstreeOstreeObjectResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedostreeOstreeObjectResponseList PaginatedostreeOstreeObjectResponseList + +// NewPaginatedostreeOstreeObjectResponseList instantiates a new PaginatedostreeOstreeObjectResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedostreeOstreeObjectResponseList() *PaginatedostreeOstreeObjectResponseList { + this := PaginatedostreeOstreeObjectResponseList{} + return &this +} + +// NewPaginatedostreeOstreeObjectResponseListWithDefaults instantiates a new PaginatedostreeOstreeObjectResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedostreeOstreeObjectResponseListWithDefaults() *PaginatedostreeOstreeObjectResponseList { + this := PaginatedostreeOstreeObjectResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeObjectResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeObjectResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeObjectResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedostreeOstreeObjectResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeObjectResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeObjectResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeObjectResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedostreeOstreeObjectResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedostreeOstreeObjectResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedostreeOstreeObjectResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeObjectResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeObjectResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeObjectResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedostreeOstreeObjectResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedostreeOstreeObjectResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedostreeOstreeObjectResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeObjectResponseList) GetResults() []OstreeOstreeObjectResponse { + if o == nil || IsNil(o.Results) { + var ret []OstreeOstreeObjectResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeObjectResponseList) GetResultsOk() ([]OstreeOstreeObjectResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeObjectResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []OstreeOstreeObjectResponse and assigns it to the Results field. +func (o *PaginatedostreeOstreeObjectResponseList) SetResults(v []OstreeOstreeObjectResponse) { + o.Results = v +} + +func (o PaginatedostreeOstreeObjectResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedostreeOstreeObjectResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedostreeOstreeObjectResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedostreeOstreeObjectResponseList := _PaginatedostreeOstreeObjectResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedostreeOstreeObjectResponseList); err == nil { + *o = PaginatedostreeOstreeObjectResponseList(varPaginatedostreeOstreeObjectResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedostreeOstreeObjectResponseList struct { + value *PaginatedostreeOstreeObjectResponseList + isSet bool +} + +func (v NullablePaginatedostreeOstreeObjectResponseList) Get() *PaginatedostreeOstreeObjectResponseList { + return v.value +} + +func (v *NullablePaginatedostreeOstreeObjectResponseList) Set(val *PaginatedostreeOstreeObjectResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedostreeOstreeObjectResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedostreeOstreeObjectResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedostreeOstreeObjectResponseList(val *PaginatedostreeOstreeObjectResponseList) *NullablePaginatedostreeOstreeObjectResponseList { + return &NullablePaginatedostreeOstreeObjectResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedostreeOstreeObjectResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedostreeOstreeObjectResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_ref_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_ref_response_list.go new file mode 100644 index 0000000000..05d6393ee7 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_ref_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedostreeOstreeRefResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedostreeOstreeRefResponseList{} + +// PaginatedostreeOstreeRefResponseList struct for PaginatedostreeOstreeRefResponseList +type PaginatedostreeOstreeRefResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []OstreeOstreeRefResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedostreeOstreeRefResponseList PaginatedostreeOstreeRefResponseList + +// NewPaginatedostreeOstreeRefResponseList instantiates a new PaginatedostreeOstreeRefResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedostreeOstreeRefResponseList() *PaginatedostreeOstreeRefResponseList { + this := PaginatedostreeOstreeRefResponseList{} + return &this +} + +// NewPaginatedostreeOstreeRefResponseListWithDefaults instantiates a new PaginatedostreeOstreeRefResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedostreeOstreeRefResponseListWithDefaults() *PaginatedostreeOstreeRefResponseList { + this := PaginatedostreeOstreeRefResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeRefResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeRefResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeRefResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedostreeOstreeRefResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeRefResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeRefResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeRefResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedostreeOstreeRefResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedostreeOstreeRefResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedostreeOstreeRefResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeRefResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeRefResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeRefResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedostreeOstreeRefResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedostreeOstreeRefResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedostreeOstreeRefResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeRefResponseList) GetResults() []OstreeOstreeRefResponse { + if o == nil || IsNil(o.Results) { + var ret []OstreeOstreeRefResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeRefResponseList) GetResultsOk() ([]OstreeOstreeRefResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeRefResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []OstreeOstreeRefResponse and assigns it to the Results field. +func (o *PaginatedostreeOstreeRefResponseList) SetResults(v []OstreeOstreeRefResponse) { + o.Results = v +} + +func (o PaginatedostreeOstreeRefResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedostreeOstreeRefResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedostreeOstreeRefResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedostreeOstreeRefResponseList := _PaginatedostreeOstreeRefResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedostreeOstreeRefResponseList); err == nil { + *o = PaginatedostreeOstreeRefResponseList(varPaginatedostreeOstreeRefResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedostreeOstreeRefResponseList struct { + value *PaginatedostreeOstreeRefResponseList + isSet bool +} + +func (v NullablePaginatedostreeOstreeRefResponseList) Get() *PaginatedostreeOstreeRefResponseList { + return v.value +} + +func (v *NullablePaginatedostreeOstreeRefResponseList) Set(val *PaginatedostreeOstreeRefResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedostreeOstreeRefResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedostreeOstreeRefResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedostreeOstreeRefResponseList(val *PaginatedostreeOstreeRefResponseList) *NullablePaginatedostreeOstreeRefResponseList { + return &NullablePaginatedostreeOstreeRefResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedostreeOstreeRefResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedostreeOstreeRefResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_remote_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_remote_response_list.go new file mode 100644 index 0000000000..ed0e209f01 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_remote_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedostreeOstreeRemoteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedostreeOstreeRemoteResponseList{} + +// PaginatedostreeOstreeRemoteResponseList struct for PaginatedostreeOstreeRemoteResponseList +type PaginatedostreeOstreeRemoteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []OstreeOstreeRemoteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedostreeOstreeRemoteResponseList PaginatedostreeOstreeRemoteResponseList + +// NewPaginatedostreeOstreeRemoteResponseList instantiates a new PaginatedostreeOstreeRemoteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedostreeOstreeRemoteResponseList() *PaginatedostreeOstreeRemoteResponseList { + this := PaginatedostreeOstreeRemoteResponseList{} + return &this +} + +// NewPaginatedostreeOstreeRemoteResponseListWithDefaults instantiates a new PaginatedostreeOstreeRemoteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedostreeOstreeRemoteResponseListWithDefaults() *PaginatedostreeOstreeRemoteResponseList { + this := PaginatedostreeOstreeRemoteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeRemoteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeRemoteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeRemoteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedostreeOstreeRemoteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeRemoteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeRemoteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeRemoteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedostreeOstreeRemoteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedostreeOstreeRemoteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedostreeOstreeRemoteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeRemoteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeRemoteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeRemoteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedostreeOstreeRemoteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedostreeOstreeRemoteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedostreeOstreeRemoteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeRemoteResponseList) GetResults() []OstreeOstreeRemoteResponse { + if o == nil || IsNil(o.Results) { + var ret []OstreeOstreeRemoteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeRemoteResponseList) GetResultsOk() ([]OstreeOstreeRemoteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeRemoteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []OstreeOstreeRemoteResponse and assigns it to the Results field. +func (o *PaginatedostreeOstreeRemoteResponseList) SetResults(v []OstreeOstreeRemoteResponse) { + o.Results = v +} + +func (o PaginatedostreeOstreeRemoteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedostreeOstreeRemoteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedostreeOstreeRemoteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedostreeOstreeRemoteResponseList := _PaginatedostreeOstreeRemoteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedostreeOstreeRemoteResponseList); err == nil { + *o = PaginatedostreeOstreeRemoteResponseList(varPaginatedostreeOstreeRemoteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedostreeOstreeRemoteResponseList struct { + value *PaginatedostreeOstreeRemoteResponseList + isSet bool +} + +func (v NullablePaginatedostreeOstreeRemoteResponseList) Get() *PaginatedostreeOstreeRemoteResponseList { + return v.value +} + +func (v *NullablePaginatedostreeOstreeRemoteResponseList) Set(val *PaginatedostreeOstreeRemoteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedostreeOstreeRemoteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedostreeOstreeRemoteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedostreeOstreeRemoteResponseList(val *PaginatedostreeOstreeRemoteResponseList) *NullablePaginatedostreeOstreeRemoteResponseList { + return &NullablePaginatedostreeOstreeRemoteResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedostreeOstreeRemoteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedostreeOstreeRemoteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_repository_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_repository_response_list.go new file mode 100644 index 0000000000..02eb796ca7 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_repository_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedostreeOstreeRepositoryResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedostreeOstreeRepositoryResponseList{} + +// PaginatedostreeOstreeRepositoryResponseList struct for PaginatedostreeOstreeRepositoryResponseList +type PaginatedostreeOstreeRepositoryResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []OstreeOstreeRepositoryResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedostreeOstreeRepositoryResponseList PaginatedostreeOstreeRepositoryResponseList + +// NewPaginatedostreeOstreeRepositoryResponseList instantiates a new PaginatedostreeOstreeRepositoryResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedostreeOstreeRepositoryResponseList() *PaginatedostreeOstreeRepositoryResponseList { + this := PaginatedostreeOstreeRepositoryResponseList{} + return &this +} + +// NewPaginatedostreeOstreeRepositoryResponseListWithDefaults instantiates a new PaginatedostreeOstreeRepositoryResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedostreeOstreeRepositoryResponseListWithDefaults() *PaginatedostreeOstreeRepositoryResponseList { + this := PaginatedostreeOstreeRepositoryResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeRepositoryResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeRepositoryResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeRepositoryResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedostreeOstreeRepositoryResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeRepositoryResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeRepositoryResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeRepositoryResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedostreeOstreeRepositoryResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedostreeOstreeRepositoryResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedostreeOstreeRepositoryResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeRepositoryResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeRepositoryResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeRepositoryResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedostreeOstreeRepositoryResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedostreeOstreeRepositoryResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedostreeOstreeRepositoryResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeRepositoryResponseList) GetResults() []OstreeOstreeRepositoryResponse { + if o == nil || IsNil(o.Results) { + var ret []OstreeOstreeRepositoryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeRepositoryResponseList) GetResultsOk() ([]OstreeOstreeRepositoryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeRepositoryResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []OstreeOstreeRepositoryResponse and assigns it to the Results field. +func (o *PaginatedostreeOstreeRepositoryResponseList) SetResults(v []OstreeOstreeRepositoryResponse) { + o.Results = v +} + +func (o PaginatedostreeOstreeRepositoryResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedostreeOstreeRepositoryResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedostreeOstreeRepositoryResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedostreeOstreeRepositoryResponseList := _PaginatedostreeOstreeRepositoryResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedostreeOstreeRepositoryResponseList); err == nil { + *o = PaginatedostreeOstreeRepositoryResponseList(varPaginatedostreeOstreeRepositoryResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedostreeOstreeRepositoryResponseList struct { + value *PaginatedostreeOstreeRepositoryResponseList + isSet bool +} + +func (v NullablePaginatedostreeOstreeRepositoryResponseList) Get() *PaginatedostreeOstreeRepositoryResponseList { + return v.value +} + +func (v *NullablePaginatedostreeOstreeRepositoryResponseList) Set(val *PaginatedostreeOstreeRepositoryResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedostreeOstreeRepositoryResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedostreeOstreeRepositoryResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedostreeOstreeRepositoryResponseList(val *PaginatedostreeOstreeRepositoryResponseList) *NullablePaginatedostreeOstreeRepositoryResponseList { + return &NullablePaginatedostreeOstreeRepositoryResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedostreeOstreeRepositoryResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedostreeOstreeRepositoryResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_summary_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_summary_response_list.go new file mode 100644 index 0000000000..5f33582ef0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedostree_ostree_summary_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedostreeOstreeSummaryResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedostreeOstreeSummaryResponseList{} + +// PaginatedostreeOstreeSummaryResponseList struct for PaginatedostreeOstreeSummaryResponseList +type PaginatedostreeOstreeSummaryResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []OstreeOstreeSummaryResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedostreeOstreeSummaryResponseList PaginatedostreeOstreeSummaryResponseList + +// NewPaginatedostreeOstreeSummaryResponseList instantiates a new PaginatedostreeOstreeSummaryResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedostreeOstreeSummaryResponseList() *PaginatedostreeOstreeSummaryResponseList { + this := PaginatedostreeOstreeSummaryResponseList{} + return &this +} + +// NewPaginatedostreeOstreeSummaryResponseListWithDefaults instantiates a new PaginatedostreeOstreeSummaryResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedostreeOstreeSummaryResponseListWithDefaults() *PaginatedostreeOstreeSummaryResponseList { + this := PaginatedostreeOstreeSummaryResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeSummaryResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeSummaryResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeSummaryResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedostreeOstreeSummaryResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeSummaryResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeSummaryResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeSummaryResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedostreeOstreeSummaryResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedostreeOstreeSummaryResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedostreeOstreeSummaryResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedostreeOstreeSummaryResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedostreeOstreeSummaryResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeSummaryResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedostreeOstreeSummaryResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedostreeOstreeSummaryResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedostreeOstreeSummaryResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedostreeOstreeSummaryResponseList) GetResults() []OstreeOstreeSummaryResponse { + if o == nil || IsNil(o.Results) { + var ret []OstreeOstreeSummaryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedostreeOstreeSummaryResponseList) GetResultsOk() ([]OstreeOstreeSummaryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedostreeOstreeSummaryResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []OstreeOstreeSummaryResponse and assigns it to the Results field. +func (o *PaginatedostreeOstreeSummaryResponseList) SetResults(v []OstreeOstreeSummaryResponse) { + o.Results = v +} + +func (o PaginatedostreeOstreeSummaryResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedostreeOstreeSummaryResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedostreeOstreeSummaryResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedostreeOstreeSummaryResponseList := _PaginatedostreeOstreeSummaryResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedostreeOstreeSummaryResponseList); err == nil { + *o = PaginatedostreeOstreeSummaryResponseList(varPaginatedostreeOstreeSummaryResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedostreeOstreeSummaryResponseList struct { + value *PaginatedostreeOstreeSummaryResponseList + isSet bool +} + +func (v NullablePaginatedostreeOstreeSummaryResponseList) Get() *PaginatedostreeOstreeSummaryResponseList { + return v.value +} + +func (v *NullablePaginatedostreeOstreeSummaryResponseList) Set(val *PaginatedostreeOstreeSummaryResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedostreeOstreeSummaryResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedostreeOstreeSummaryResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedostreeOstreeSummaryResponseList(val *PaginatedostreeOstreeSummaryResponseList) *NullablePaginatedostreeOstreeSummaryResponseList { + return &NullablePaginatedostreeOstreeSummaryResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedostreeOstreeSummaryResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedostreeOstreeSummaryResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_distribution_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_distribution_response_list.go new file mode 100644 index 0000000000..952bcdfaec --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_distribution_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedpythonPythonDistributionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedpythonPythonDistributionResponseList{} + +// PaginatedpythonPythonDistributionResponseList struct for PaginatedpythonPythonDistributionResponseList +type PaginatedpythonPythonDistributionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PythonPythonDistributionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedpythonPythonDistributionResponseList PaginatedpythonPythonDistributionResponseList + +// NewPaginatedpythonPythonDistributionResponseList instantiates a new PaginatedpythonPythonDistributionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedpythonPythonDistributionResponseList() *PaginatedpythonPythonDistributionResponseList { + this := PaginatedpythonPythonDistributionResponseList{} + return &this +} + +// NewPaginatedpythonPythonDistributionResponseListWithDefaults instantiates a new PaginatedpythonPythonDistributionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedpythonPythonDistributionResponseListWithDefaults() *PaginatedpythonPythonDistributionResponseList { + this := PaginatedpythonPythonDistributionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedpythonPythonDistributionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedpythonPythonDistributionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedpythonPythonDistributionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedpythonPythonDistributionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedpythonPythonDistributionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedpythonPythonDistributionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedpythonPythonDistributionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedpythonPythonDistributionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedpythonPythonDistributionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedpythonPythonDistributionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedpythonPythonDistributionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedpythonPythonDistributionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedpythonPythonDistributionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedpythonPythonDistributionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedpythonPythonDistributionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedpythonPythonDistributionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedpythonPythonDistributionResponseList) GetResults() []PythonPythonDistributionResponse { + if o == nil || IsNil(o.Results) { + var ret []PythonPythonDistributionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedpythonPythonDistributionResponseList) GetResultsOk() ([]PythonPythonDistributionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedpythonPythonDistributionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []PythonPythonDistributionResponse and assigns it to the Results field. +func (o *PaginatedpythonPythonDistributionResponseList) SetResults(v []PythonPythonDistributionResponse) { + o.Results = v +} + +func (o PaginatedpythonPythonDistributionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedpythonPythonDistributionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedpythonPythonDistributionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedpythonPythonDistributionResponseList := _PaginatedpythonPythonDistributionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedpythonPythonDistributionResponseList); err == nil { + *o = PaginatedpythonPythonDistributionResponseList(varPaginatedpythonPythonDistributionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedpythonPythonDistributionResponseList struct { + value *PaginatedpythonPythonDistributionResponseList + isSet bool +} + +func (v NullablePaginatedpythonPythonDistributionResponseList) Get() *PaginatedpythonPythonDistributionResponseList { + return v.value +} + +func (v *NullablePaginatedpythonPythonDistributionResponseList) Set(val *PaginatedpythonPythonDistributionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedpythonPythonDistributionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedpythonPythonDistributionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedpythonPythonDistributionResponseList(val *PaginatedpythonPythonDistributionResponseList) *NullablePaginatedpythonPythonDistributionResponseList { + return &NullablePaginatedpythonPythonDistributionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedpythonPythonDistributionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedpythonPythonDistributionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_package_content_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_package_content_response_list.go new file mode 100644 index 0000000000..45730485c6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_package_content_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedpythonPythonPackageContentResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedpythonPythonPackageContentResponseList{} + +// PaginatedpythonPythonPackageContentResponseList struct for PaginatedpythonPythonPackageContentResponseList +type PaginatedpythonPythonPackageContentResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PythonPythonPackageContentResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedpythonPythonPackageContentResponseList PaginatedpythonPythonPackageContentResponseList + +// NewPaginatedpythonPythonPackageContentResponseList instantiates a new PaginatedpythonPythonPackageContentResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedpythonPythonPackageContentResponseList() *PaginatedpythonPythonPackageContentResponseList { + this := PaginatedpythonPythonPackageContentResponseList{} + return &this +} + +// NewPaginatedpythonPythonPackageContentResponseListWithDefaults instantiates a new PaginatedpythonPythonPackageContentResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedpythonPythonPackageContentResponseListWithDefaults() *PaginatedpythonPythonPackageContentResponseList { + this := PaginatedpythonPythonPackageContentResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedpythonPythonPackageContentResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedpythonPythonPackageContentResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedpythonPythonPackageContentResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedpythonPythonPackageContentResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedpythonPythonPackageContentResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedpythonPythonPackageContentResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedpythonPythonPackageContentResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedpythonPythonPackageContentResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedpythonPythonPackageContentResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedpythonPythonPackageContentResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedpythonPythonPackageContentResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedpythonPythonPackageContentResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedpythonPythonPackageContentResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedpythonPythonPackageContentResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedpythonPythonPackageContentResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedpythonPythonPackageContentResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedpythonPythonPackageContentResponseList) GetResults() []PythonPythonPackageContentResponse { + if o == nil || IsNil(o.Results) { + var ret []PythonPythonPackageContentResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedpythonPythonPackageContentResponseList) GetResultsOk() ([]PythonPythonPackageContentResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedpythonPythonPackageContentResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []PythonPythonPackageContentResponse and assigns it to the Results field. +func (o *PaginatedpythonPythonPackageContentResponseList) SetResults(v []PythonPythonPackageContentResponse) { + o.Results = v +} + +func (o PaginatedpythonPythonPackageContentResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedpythonPythonPackageContentResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedpythonPythonPackageContentResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedpythonPythonPackageContentResponseList := _PaginatedpythonPythonPackageContentResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedpythonPythonPackageContentResponseList); err == nil { + *o = PaginatedpythonPythonPackageContentResponseList(varPaginatedpythonPythonPackageContentResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedpythonPythonPackageContentResponseList struct { + value *PaginatedpythonPythonPackageContentResponseList + isSet bool +} + +func (v NullablePaginatedpythonPythonPackageContentResponseList) Get() *PaginatedpythonPythonPackageContentResponseList { + return v.value +} + +func (v *NullablePaginatedpythonPythonPackageContentResponseList) Set(val *PaginatedpythonPythonPackageContentResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedpythonPythonPackageContentResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedpythonPythonPackageContentResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedpythonPythonPackageContentResponseList(val *PaginatedpythonPythonPackageContentResponseList) *NullablePaginatedpythonPythonPackageContentResponseList { + return &NullablePaginatedpythonPythonPackageContentResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedpythonPythonPackageContentResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedpythonPythonPackageContentResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_publication_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_publication_response_list.go new file mode 100644 index 0000000000..60d1c548a5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_publication_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedpythonPythonPublicationResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedpythonPythonPublicationResponseList{} + +// PaginatedpythonPythonPublicationResponseList struct for PaginatedpythonPythonPublicationResponseList +type PaginatedpythonPythonPublicationResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PythonPythonPublicationResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedpythonPythonPublicationResponseList PaginatedpythonPythonPublicationResponseList + +// NewPaginatedpythonPythonPublicationResponseList instantiates a new PaginatedpythonPythonPublicationResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedpythonPythonPublicationResponseList() *PaginatedpythonPythonPublicationResponseList { + this := PaginatedpythonPythonPublicationResponseList{} + return &this +} + +// NewPaginatedpythonPythonPublicationResponseListWithDefaults instantiates a new PaginatedpythonPythonPublicationResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedpythonPythonPublicationResponseListWithDefaults() *PaginatedpythonPythonPublicationResponseList { + this := PaginatedpythonPythonPublicationResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedpythonPythonPublicationResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedpythonPythonPublicationResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedpythonPythonPublicationResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedpythonPythonPublicationResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedpythonPythonPublicationResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedpythonPythonPublicationResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedpythonPythonPublicationResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedpythonPythonPublicationResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedpythonPythonPublicationResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedpythonPythonPublicationResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedpythonPythonPublicationResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedpythonPythonPublicationResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedpythonPythonPublicationResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedpythonPythonPublicationResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedpythonPythonPublicationResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedpythonPythonPublicationResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedpythonPythonPublicationResponseList) GetResults() []PythonPythonPublicationResponse { + if o == nil || IsNil(o.Results) { + var ret []PythonPythonPublicationResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedpythonPythonPublicationResponseList) GetResultsOk() ([]PythonPythonPublicationResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedpythonPythonPublicationResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []PythonPythonPublicationResponse and assigns it to the Results field. +func (o *PaginatedpythonPythonPublicationResponseList) SetResults(v []PythonPythonPublicationResponse) { + o.Results = v +} + +func (o PaginatedpythonPythonPublicationResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedpythonPythonPublicationResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedpythonPythonPublicationResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedpythonPythonPublicationResponseList := _PaginatedpythonPythonPublicationResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedpythonPythonPublicationResponseList); err == nil { + *o = PaginatedpythonPythonPublicationResponseList(varPaginatedpythonPythonPublicationResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedpythonPythonPublicationResponseList struct { + value *PaginatedpythonPythonPublicationResponseList + isSet bool +} + +func (v NullablePaginatedpythonPythonPublicationResponseList) Get() *PaginatedpythonPythonPublicationResponseList { + return v.value +} + +func (v *NullablePaginatedpythonPythonPublicationResponseList) Set(val *PaginatedpythonPythonPublicationResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedpythonPythonPublicationResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedpythonPythonPublicationResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedpythonPythonPublicationResponseList(val *PaginatedpythonPythonPublicationResponseList) *NullablePaginatedpythonPythonPublicationResponseList { + return &NullablePaginatedpythonPythonPublicationResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedpythonPythonPublicationResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedpythonPythonPublicationResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_remote_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_remote_response_list.go new file mode 100644 index 0000000000..682d8d52a0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_remote_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedpythonPythonRemoteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedpythonPythonRemoteResponseList{} + +// PaginatedpythonPythonRemoteResponseList struct for PaginatedpythonPythonRemoteResponseList +type PaginatedpythonPythonRemoteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PythonPythonRemoteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedpythonPythonRemoteResponseList PaginatedpythonPythonRemoteResponseList + +// NewPaginatedpythonPythonRemoteResponseList instantiates a new PaginatedpythonPythonRemoteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedpythonPythonRemoteResponseList() *PaginatedpythonPythonRemoteResponseList { + this := PaginatedpythonPythonRemoteResponseList{} + return &this +} + +// NewPaginatedpythonPythonRemoteResponseListWithDefaults instantiates a new PaginatedpythonPythonRemoteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedpythonPythonRemoteResponseListWithDefaults() *PaginatedpythonPythonRemoteResponseList { + this := PaginatedpythonPythonRemoteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedpythonPythonRemoteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedpythonPythonRemoteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedpythonPythonRemoteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedpythonPythonRemoteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedpythonPythonRemoteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedpythonPythonRemoteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedpythonPythonRemoteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedpythonPythonRemoteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedpythonPythonRemoteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedpythonPythonRemoteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedpythonPythonRemoteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedpythonPythonRemoteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedpythonPythonRemoteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedpythonPythonRemoteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedpythonPythonRemoteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedpythonPythonRemoteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedpythonPythonRemoteResponseList) GetResults() []PythonPythonRemoteResponse { + if o == nil || IsNil(o.Results) { + var ret []PythonPythonRemoteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedpythonPythonRemoteResponseList) GetResultsOk() ([]PythonPythonRemoteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedpythonPythonRemoteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []PythonPythonRemoteResponse and assigns it to the Results field. +func (o *PaginatedpythonPythonRemoteResponseList) SetResults(v []PythonPythonRemoteResponse) { + o.Results = v +} + +func (o PaginatedpythonPythonRemoteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedpythonPythonRemoteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedpythonPythonRemoteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedpythonPythonRemoteResponseList := _PaginatedpythonPythonRemoteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedpythonPythonRemoteResponseList); err == nil { + *o = PaginatedpythonPythonRemoteResponseList(varPaginatedpythonPythonRemoteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedpythonPythonRemoteResponseList struct { + value *PaginatedpythonPythonRemoteResponseList + isSet bool +} + +func (v NullablePaginatedpythonPythonRemoteResponseList) Get() *PaginatedpythonPythonRemoteResponseList { + return v.value +} + +func (v *NullablePaginatedpythonPythonRemoteResponseList) Set(val *PaginatedpythonPythonRemoteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedpythonPythonRemoteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedpythonPythonRemoteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedpythonPythonRemoteResponseList(val *PaginatedpythonPythonRemoteResponseList) *NullablePaginatedpythonPythonRemoteResponseList { + return &NullablePaginatedpythonPythonRemoteResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedpythonPythonRemoteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedpythonPythonRemoteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_repository_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_repository_response_list.go new file mode 100644 index 0000000000..4a0d8b84a9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedpython_python_repository_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedpythonPythonRepositoryResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedpythonPythonRepositoryResponseList{} + +// PaginatedpythonPythonRepositoryResponseList struct for PaginatedpythonPythonRepositoryResponseList +type PaginatedpythonPythonRepositoryResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []PythonPythonRepositoryResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedpythonPythonRepositoryResponseList PaginatedpythonPythonRepositoryResponseList + +// NewPaginatedpythonPythonRepositoryResponseList instantiates a new PaginatedpythonPythonRepositoryResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedpythonPythonRepositoryResponseList() *PaginatedpythonPythonRepositoryResponseList { + this := PaginatedpythonPythonRepositoryResponseList{} + return &this +} + +// NewPaginatedpythonPythonRepositoryResponseListWithDefaults instantiates a new PaginatedpythonPythonRepositoryResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedpythonPythonRepositoryResponseListWithDefaults() *PaginatedpythonPythonRepositoryResponseList { + this := PaginatedpythonPythonRepositoryResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedpythonPythonRepositoryResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedpythonPythonRepositoryResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedpythonPythonRepositoryResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedpythonPythonRepositoryResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedpythonPythonRepositoryResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedpythonPythonRepositoryResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedpythonPythonRepositoryResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedpythonPythonRepositoryResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedpythonPythonRepositoryResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedpythonPythonRepositoryResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedpythonPythonRepositoryResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedpythonPythonRepositoryResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedpythonPythonRepositoryResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedpythonPythonRepositoryResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedpythonPythonRepositoryResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedpythonPythonRepositoryResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedpythonPythonRepositoryResponseList) GetResults() []PythonPythonRepositoryResponse { + if o == nil || IsNil(o.Results) { + var ret []PythonPythonRepositoryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedpythonPythonRepositoryResponseList) GetResultsOk() ([]PythonPythonRepositoryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedpythonPythonRepositoryResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []PythonPythonRepositoryResponse and assigns it to the Results field. +func (o *PaginatedpythonPythonRepositoryResponseList) SetResults(v []PythonPythonRepositoryResponse) { + o.Results = v +} + +func (o PaginatedpythonPythonRepositoryResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedpythonPythonRepositoryResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedpythonPythonRepositoryResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedpythonPythonRepositoryResponseList := _PaginatedpythonPythonRepositoryResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedpythonPythonRepositoryResponseList); err == nil { + *o = PaginatedpythonPythonRepositoryResponseList(varPaginatedpythonPythonRepositoryResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedpythonPythonRepositoryResponseList struct { + value *PaginatedpythonPythonRepositoryResponseList + isSet bool +} + +func (v NullablePaginatedpythonPythonRepositoryResponseList) Get() *PaginatedpythonPythonRepositoryResponseList { + return v.value +} + +func (v *NullablePaginatedpythonPythonRepositoryResponseList) Set(val *PaginatedpythonPythonRepositoryResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedpythonPythonRepositoryResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedpythonPythonRepositoryResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedpythonPythonRepositoryResponseList(val *PaginatedpythonPythonRepositoryResponseList) *NullablePaginatedpythonPythonRepositoryResponseList { + return &NullablePaginatedpythonPythonRepositoryResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedpythonPythonRepositoryResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedpythonPythonRepositoryResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_distribution_tree_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_distribution_tree_response_list.go new file mode 100644 index 0000000000..c6554f95a2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_distribution_tree_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmDistributionTreeResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmDistributionTreeResponseList{} + +// PaginatedrpmDistributionTreeResponseList struct for PaginatedrpmDistributionTreeResponseList +type PaginatedrpmDistributionTreeResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmDistributionTreeResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmDistributionTreeResponseList PaginatedrpmDistributionTreeResponseList + +// NewPaginatedrpmDistributionTreeResponseList instantiates a new PaginatedrpmDistributionTreeResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmDistributionTreeResponseList() *PaginatedrpmDistributionTreeResponseList { + this := PaginatedrpmDistributionTreeResponseList{} + return &this +} + +// NewPaginatedrpmDistributionTreeResponseListWithDefaults instantiates a new PaginatedrpmDistributionTreeResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmDistributionTreeResponseListWithDefaults() *PaginatedrpmDistributionTreeResponseList { + this := PaginatedrpmDistributionTreeResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmDistributionTreeResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmDistributionTreeResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmDistributionTreeResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmDistributionTreeResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmDistributionTreeResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmDistributionTreeResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmDistributionTreeResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmDistributionTreeResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmDistributionTreeResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmDistributionTreeResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmDistributionTreeResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmDistributionTreeResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmDistributionTreeResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmDistributionTreeResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmDistributionTreeResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmDistributionTreeResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmDistributionTreeResponseList) GetResults() []RpmDistributionTreeResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmDistributionTreeResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmDistributionTreeResponseList) GetResultsOk() ([]RpmDistributionTreeResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmDistributionTreeResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmDistributionTreeResponse and assigns it to the Results field. +func (o *PaginatedrpmDistributionTreeResponseList) SetResults(v []RpmDistributionTreeResponse) { + o.Results = v +} + +func (o PaginatedrpmDistributionTreeResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmDistributionTreeResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmDistributionTreeResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmDistributionTreeResponseList := _PaginatedrpmDistributionTreeResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmDistributionTreeResponseList); err == nil { + *o = PaginatedrpmDistributionTreeResponseList(varPaginatedrpmDistributionTreeResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmDistributionTreeResponseList struct { + value *PaginatedrpmDistributionTreeResponseList + isSet bool +} + +func (v NullablePaginatedrpmDistributionTreeResponseList) Get() *PaginatedrpmDistributionTreeResponseList { + return v.value +} + +func (v *NullablePaginatedrpmDistributionTreeResponseList) Set(val *PaginatedrpmDistributionTreeResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmDistributionTreeResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmDistributionTreeResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmDistributionTreeResponseList(val *PaginatedrpmDistributionTreeResponseList) *NullablePaginatedrpmDistributionTreeResponseList { + return &NullablePaginatedrpmDistributionTreeResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmDistributionTreeResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmDistributionTreeResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_modulemd_defaults_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_modulemd_defaults_response_list.go new file mode 100644 index 0000000000..6062cb61b6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_modulemd_defaults_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmModulemdDefaultsResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmModulemdDefaultsResponseList{} + +// PaginatedrpmModulemdDefaultsResponseList struct for PaginatedrpmModulemdDefaultsResponseList +type PaginatedrpmModulemdDefaultsResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmModulemdDefaultsResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmModulemdDefaultsResponseList PaginatedrpmModulemdDefaultsResponseList + +// NewPaginatedrpmModulemdDefaultsResponseList instantiates a new PaginatedrpmModulemdDefaultsResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmModulemdDefaultsResponseList() *PaginatedrpmModulemdDefaultsResponseList { + this := PaginatedrpmModulemdDefaultsResponseList{} + return &this +} + +// NewPaginatedrpmModulemdDefaultsResponseListWithDefaults instantiates a new PaginatedrpmModulemdDefaultsResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmModulemdDefaultsResponseListWithDefaults() *PaginatedrpmModulemdDefaultsResponseList { + this := PaginatedrpmModulemdDefaultsResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmModulemdDefaultsResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmModulemdDefaultsResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmModulemdDefaultsResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmModulemdDefaultsResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmModulemdDefaultsResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmModulemdDefaultsResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmModulemdDefaultsResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmModulemdDefaultsResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmModulemdDefaultsResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmModulemdDefaultsResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmModulemdDefaultsResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmModulemdDefaultsResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmModulemdDefaultsResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmModulemdDefaultsResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmModulemdDefaultsResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmModulemdDefaultsResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmModulemdDefaultsResponseList) GetResults() []RpmModulemdDefaultsResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmModulemdDefaultsResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmModulemdDefaultsResponseList) GetResultsOk() ([]RpmModulemdDefaultsResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmModulemdDefaultsResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmModulemdDefaultsResponse and assigns it to the Results field. +func (o *PaginatedrpmModulemdDefaultsResponseList) SetResults(v []RpmModulemdDefaultsResponse) { + o.Results = v +} + +func (o PaginatedrpmModulemdDefaultsResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmModulemdDefaultsResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmModulemdDefaultsResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmModulemdDefaultsResponseList := _PaginatedrpmModulemdDefaultsResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmModulemdDefaultsResponseList); err == nil { + *o = PaginatedrpmModulemdDefaultsResponseList(varPaginatedrpmModulemdDefaultsResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmModulemdDefaultsResponseList struct { + value *PaginatedrpmModulemdDefaultsResponseList + isSet bool +} + +func (v NullablePaginatedrpmModulemdDefaultsResponseList) Get() *PaginatedrpmModulemdDefaultsResponseList { + return v.value +} + +func (v *NullablePaginatedrpmModulemdDefaultsResponseList) Set(val *PaginatedrpmModulemdDefaultsResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmModulemdDefaultsResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmModulemdDefaultsResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmModulemdDefaultsResponseList(val *PaginatedrpmModulemdDefaultsResponseList) *NullablePaginatedrpmModulemdDefaultsResponseList { + return &NullablePaginatedrpmModulemdDefaultsResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmModulemdDefaultsResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmModulemdDefaultsResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_modulemd_obsolete_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_modulemd_obsolete_response_list.go new file mode 100644 index 0000000000..4a23f72ddc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_modulemd_obsolete_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmModulemdObsoleteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmModulemdObsoleteResponseList{} + +// PaginatedrpmModulemdObsoleteResponseList struct for PaginatedrpmModulemdObsoleteResponseList +type PaginatedrpmModulemdObsoleteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmModulemdObsoleteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmModulemdObsoleteResponseList PaginatedrpmModulemdObsoleteResponseList + +// NewPaginatedrpmModulemdObsoleteResponseList instantiates a new PaginatedrpmModulemdObsoleteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmModulemdObsoleteResponseList() *PaginatedrpmModulemdObsoleteResponseList { + this := PaginatedrpmModulemdObsoleteResponseList{} + return &this +} + +// NewPaginatedrpmModulemdObsoleteResponseListWithDefaults instantiates a new PaginatedrpmModulemdObsoleteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmModulemdObsoleteResponseListWithDefaults() *PaginatedrpmModulemdObsoleteResponseList { + this := PaginatedrpmModulemdObsoleteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmModulemdObsoleteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmModulemdObsoleteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmModulemdObsoleteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmModulemdObsoleteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmModulemdObsoleteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmModulemdObsoleteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmModulemdObsoleteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmModulemdObsoleteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmModulemdObsoleteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmModulemdObsoleteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmModulemdObsoleteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmModulemdObsoleteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmModulemdObsoleteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmModulemdObsoleteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmModulemdObsoleteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmModulemdObsoleteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmModulemdObsoleteResponseList) GetResults() []RpmModulemdObsoleteResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmModulemdObsoleteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmModulemdObsoleteResponseList) GetResultsOk() ([]RpmModulemdObsoleteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmModulemdObsoleteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmModulemdObsoleteResponse and assigns it to the Results field. +func (o *PaginatedrpmModulemdObsoleteResponseList) SetResults(v []RpmModulemdObsoleteResponse) { + o.Results = v +} + +func (o PaginatedrpmModulemdObsoleteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmModulemdObsoleteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmModulemdObsoleteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmModulemdObsoleteResponseList := _PaginatedrpmModulemdObsoleteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmModulemdObsoleteResponseList); err == nil { + *o = PaginatedrpmModulemdObsoleteResponseList(varPaginatedrpmModulemdObsoleteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmModulemdObsoleteResponseList struct { + value *PaginatedrpmModulemdObsoleteResponseList + isSet bool +} + +func (v NullablePaginatedrpmModulemdObsoleteResponseList) Get() *PaginatedrpmModulemdObsoleteResponseList { + return v.value +} + +func (v *NullablePaginatedrpmModulemdObsoleteResponseList) Set(val *PaginatedrpmModulemdObsoleteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmModulemdObsoleteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmModulemdObsoleteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmModulemdObsoleteResponseList(val *PaginatedrpmModulemdObsoleteResponseList) *NullablePaginatedrpmModulemdObsoleteResponseList { + return &NullablePaginatedrpmModulemdObsoleteResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmModulemdObsoleteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmModulemdObsoleteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_modulemd_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_modulemd_response_list.go new file mode 100644 index 0000000000..dd822b11ac --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_modulemd_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmModulemdResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmModulemdResponseList{} + +// PaginatedrpmModulemdResponseList struct for PaginatedrpmModulemdResponseList +type PaginatedrpmModulemdResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmModulemdResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmModulemdResponseList PaginatedrpmModulemdResponseList + +// NewPaginatedrpmModulemdResponseList instantiates a new PaginatedrpmModulemdResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmModulemdResponseList() *PaginatedrpmModulemdResponseList { + this := PaginatedrpmModulemdResponseList{} + return &this +} + +// NewPaginatedrpmModulemdResponseListWithDefaults instantiates a new PaginatedrpmModulemdResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmModulemdResponseListWithDefaults() *PaginatedrpmModulemdResponseList { + this := PaginatedrpmModulemdResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmModulemdResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmModulemdResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmModulemdResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmModulemdResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmModulemdResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmModulemdResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmModulemdResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmModulemdResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmModulemdResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmModulemdResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmModulemdResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmModulemdResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmModulemdResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmModulemdResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmModulemdResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmModulemdResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmModulemdResponseList) GetResults() []RpmModulemdResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmModulemdResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmModulemdResponseList) GetResultsOk() ([]RpmModulemdResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmModulemdResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmModulemdResponse and assigns it to the Results field. +func (o *PaginatedrpmModulemdResponseList) SetResults(v []RpmModulemdResponse) { + o.Results = v +} + +func (o PaginatedrpmModulemdResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmModulemdResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmModulemdResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmModulemdResponseList := _PaginatedrpmModulemdResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmModulemdResponseList); err == nil { + *o = PaginatedrpmModulemdResponseList(varPaginatedrpmModulemdResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmModulemdResponseList struct { + value *PaginatedrpmModulemdResponseList + isSet bool +} + +func (v NullablePaginatedrpmModulemdResponseList) Get() *PaginatedrpmModulemdResponseList { + return v.value +} + +func (v *NullablePaginatedrpmModulemdResponseList) Set(val *PaginatedrpmModulemdResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmModulemdResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmModulemdResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmModulemdResponseList(val *PaginatedrpmModulemdResponseList) *NullablePaginatedrpmModulemdResponseList { + return &NullablePaginatedrpmModulemdResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmModulemdResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmModulemdResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_category_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_category_response_list.go new file mode 100644 index 0000000000..e8cc33879e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_category_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmPackageCategoryResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmPackageCategoryResponseList{} + +// PaginatedrpmPackageCategoryResponseList struct for PaginatedrpmPackageCategoryResponseList +type PaginatedrpmPackageCategoryResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmPackageCategoryResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmPackageCategoryResponseList PaginatedrpmPackageCategoryResponseList + +// NewPaginatedrpmPackageCategoryResponseList instantiates a new PaginatedrpmPackageCategoryResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmPackageCategoryResponseList() *PaginatedrpmPackageCategoryResponseList { + this := PaginatedrpmPackageCategoryResponseList{} + return &this +} + +// NewPaginatedrpmPackageCategoryResponseListWithDefaults instantiates a new PaginatedrpmPackageCategoryResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmPackageCategoryResponseListWithDefaults() *PaginatedrpmPackageCategoryResponseList { + this := PaginatedrpmPackageCategoryResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmPackageCategoryResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmPackageCategoryResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmPackageCategoryResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmPackageCategoryResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmPackageCategoryResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmPackageCategoryResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmPackageCategoryResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmPackageCategoryResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmPackageCategoryResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmPackageCategoryResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmPackageCategoryResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmPackageCategoryResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmPackageCategoryResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmPackageCategoryResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmPackageCategoryResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmPackageCategoryResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmPackageCategoryResponseList) GetResults() []RpmPackageCategoryResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmPackageCategoryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmPackageCategoryResponseList) GetResultsOk() ([]RpmPackageCategoryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmPackageCategoryResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmPackageCategoryResponse and assigns it to the Results field. +func (o *PaginatedrpmPackageCategoryResponseList) SetResults(v []RpmPackageCategoryResponse) { + o.Results = v +} + +func (o PaginatedrpmPackageCategoryResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmPackageCategoryResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmPackageCategoryResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmPackageCategoryResponseList := _PaginatedrpmPackageCategoryResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmPackageCategoryResponseList); err == nil { + *o = PaginatedrpmPackageCategoryResponseList(varPaginatedrpmPackageCategoryResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmPackageCategoryResponseList struct { + value *PaginatedrpmPackageCategoryResponseList + isSet bool +} + +func (v NullablePaginatedrpmPackageCategoryResponseList) Get() *PaginatedrpmPackageCategoryResponseList { + return v.value +} + +func (v *NullablePaginatedrpmPackageCategoryResponseList) Set(val *PaginatedrpmPackageCategoryResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmPackageCategoryResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmPackageCategoryResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmPackageCategoryResponseList(val *PaginatedrpmPackageCategoryResponseList) *NullablePaginatedrpmPackageCategoryResponseList { + return &NullablePaginatedrpmPackageCategoryResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmPackageCategoryResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmPackageCategoryResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_environment_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_environment_response_list.go new file mode 100644 index 0000000000..3e7a2ad875 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_environment_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmPackageEnvironmentResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmPackageEnvironmentResponseList{} + +// PaginatedrpmPackageEnvironmentResponseList struct for PaginatedrpmPackageEnvironmentResponseList +type PaginatedrpmPackageEnvironmentResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmPackageEnvironmentResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmPackageEnvironmentResponseList PaginatedrpmPackageEnvironmentResponseList + +// NewPaginatedrpmPackageEnvironmentResponseList instantiates a new PaginatedrpmPackageEnvironmentResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmPackageEnvironmentResponseList() *PaginatedrpmPackageEnvironmentResponseList { + this := PaginatedrpmPackageEnvironmentResponseList{} + return &this +} + +// NewPaginatedrpmPackageEnvironmentResponseListWithDefaults instantiates a new PaginatedrpmPackageEnvironmentResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmPackageEnvironmentResponseListWithDefaults() *PaginatedrpmPackageEnvironmentResponseList { + this := PaginatedrpmPackageEnvironmentResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmPackageEnvironmentResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmPackageEnvironmentResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmPackageEnvironmentResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmPackageEnvironmentResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmPackageEnvironmentResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmPackageEnvironmentResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmPackageEnvironmentResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmPackageEnvironmentResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmPackageEnvironmentResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmPackageEnvironmentResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmPackageEnvironmentResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmPackageEnvironmentResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmPackageEnvironmentResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmPackageEnvironmentResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmPackageEnvironmentResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmPackageEnvironmentResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmPackageEnvironmentResponseList) GetResults() []RpmPackageEnvironmentResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmPackageEnvironmentResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmPackageEnvironmentResponseList) GetResultsOk() ([]RpmPackageEnvironmentResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmPackageEnvironmentResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmPackageEnvironmentResponse and assigns it to the Results field. +func (o *PaginatedrpmPackageEnvironmentResponseList) SetResults(v []RpmPackageEnvironmentResponse) { + o.Results = v +} + +func (o PaginatedrpmPackageEnvironmentResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmPackageEnvironmentResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmPackageEnvironmentResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmPackageEnvironmentResponseList := _PaginatedrpmPackageEnvironmentResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmPackageEnvironmentResponseList); err == nil { + *o = PaginatedrpmPackageEnvironmentResponseList(varPaginatedrpmPackageEnvironmentResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmPackageEnvironmentResponseList struct { + value *PaginatedrpmPackageEnvironmentResponseList + isSet bool +} + +func (v NullablePaginatedrpmPackageEnvironmentResponseList) Get() *PaginatedrpmPackageEnvironmentResponseList { + return v.value +} + +func (v *NullablePaginatedrpmPackageEnvironmentResponseList) Set(val *PaginatedrpmPackageEnvironmentResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmPackageEnvironmentResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmPackageEnvironmentResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmPackageEnvironmentResponseList(val *PaginatedrpmPackageEnvironmentResponseList) *NullablePaginatedrpmPackageEnvironmentResponseList { + return &NullablePaginatedrpmPackageEnvironmentResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmPackageEnvironmentResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmPackageEnvironmentResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_group_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_group_response_list.go new file mode 100644 index 0000000000..17521d33d6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_group_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmPackageGroupResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmPackageGroupResponseList{} + +// PaginatedrpmPackageGroupResponseList struct for PaginatedrpmPackageGroupResponseList +type PaginatedrpmPackageGroupResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmPackageGroupResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmPackageGroupResponseList PaginatedrpmPackageGroupResponseList + +// NewPaginatedrpmPackageGroupResponseList instantiates a new PaginatedrpmPackageGroupResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmPackageGroupResponseList() *PaginatedrpmPackageGroupResponseList { + this := PaginatedrpmPackageGroupResponseList{} + return &this +} + +// NewPaginatedrpmPackageGroupResponseListWithDefaults instantiates a new PaginatedrpmPackageGroupResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmPackageGroupResponseListWithDefaults() *PaginatedrpmPackageGroupResponseList { + this := PaginatedrpmPackageGroupResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmPackageGroupResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmPackageGroupResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmPackageGroupResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmPackageGroupResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmPackageGroupResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmPackageGroupResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmPackageGroupResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmPackageGroupResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmPackageGroupResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmPackageGroupResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmPackageGroupResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmPackageGroupResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmPackageGroupResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmPackageGroupResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmPackageGroupResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmPackageGroupResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmPackageGroupResponseList) GetResults() []RpmPackageGroupResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmPackageGroupResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmPackageGroupResponseList) GetResultsOk() ([]RpmPackageGroupResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmPackageGroupResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmPackageGroupResponse and assigns it to the Results field. +func (o *PaginatedrpmPackageGroupResponseList) SetResults(v []RpmPackageGroupResponse) { + o.Results = v +} + +func (o PaginatedrpmPackageGroupResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmPackageGroupResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmPackageGroupResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmPackageGroupResponseList := _PaginatedrpmPackageGroupResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmPackageGroupResponseList); err == nil { + *o = PaginatedrpmPackageGroupResponseList(varPaginatedrpmPackageGroupResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmPackageGroupResponseList struct { + value *PaginatedrpmPackageGroupResponseList + isSet bool +} + +func (v NullablePaginatedrpmPackageGroupResponseList) Get() *PaginatedrpmPackageGroupResponseList { + return v.value +} + +func (v *NullablePaginatedrpmPackageGroupResponseList) Set(val *PaginatedrpmPackageGroupResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmPackageGroupResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmPackageGroupResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmPackageGroupResponseList(val *PaginatedrpmPackageGroupResponseList) *NullablePaginatedrpmPackageGroupResponseList { + return &NullablePaginatedrpmPackageGroupResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmPackageGroupResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmPackageGroupResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_langpacks_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_langpacks_response_list.go new file mode 100644 index 0000000000..57632a5ca6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_langpacks_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmPackageLangpacksResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmPackageLangpacksResponseList{} + +// PaginatedrpmPackageLangpacksResponseList struct for PaginatedrpmPackageLangpacksResponseList +type PaginatedrpmPackageLangpacksResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmPackageLangpacksResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmPackageLangpacksResponseList PaginatedrpmPackageLangpacksResponseList + +// NewPaginatedrpmPackageLangpacksResponseList instantiates a new PaginatedrpmPackageLangpacksResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmPackageLangpacksResponseList() *PaginatedrpmPackageLangpacksResponseList { + this := PaginatedrpmPackageLangpacksResponseList{} + return &this +} + +// NewPaginatedrpmPackageLangpacksResponseListWithDefaults instantiates a new PaginatedrpmPackageLangpacksResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmPackageLangpacksResponseListWithDefaults() *PaginatedrpmPackageLangpacksResponseList { + this := PaginatedrpmPackageLangpacksResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmPackageLangpacksResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmPackageLangpacksResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmPackageLangpacksResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmPackageLangpacksResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmPackageLangpacksResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmPackageLangpacksResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmPackageLangpacksResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmPackageLangpacksResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmPackageLangpacksResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmPackageLangpacksResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmPackageLangpacksResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmPackageLangpacksResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmPackageLangpacksResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmPackageLangpacksResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmPackageLangpacksResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmPackageLangpacksResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmPackageLangpacksResponseList) GetResults() []RpmPackageLangpacksResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmPackageLangpacksResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmPackageLangpacksResponseList) GetResultsOk() ([]RpmPackageLangpacksResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmPackageLangpacksResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmPackageLangpacksResponse and assigns it to the Results field. +func (o *PaginatedrpmPackageLangpacksResponseList) SetResults(v []RpmPackageLangpacksResponse) { + o.Results = v +} + +func (o PaginatedrpmPackageLangpacksResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmPackageLangpacksResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmPackageLangpacksResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmPackageLangpacksResponseList := _PaginatedrpmPackageLangpacksResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmPackageLangpacksResponseList); err == nil { + *o = PaginatedrpmPackageLangpacksResponseList(varPaginatedrpmPackageLangpacksResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmPackageLangpacksResponseList struct { + value *PaginatedrpmPackageLangpacksResponseList + isSet bool +} + +func (v NullablePaginatedrpmPackageLangpacksResponseList) Get() *PaginatedrpmPackageLangpacksResponseList { + return v.value +} + +func (v *NullablePaginatedrpmPackageLangpacksResponseList) Set(val *PaginatedrpmPackageLangpacksResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmPackageLangpacksResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmPackageLangpacksResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmPackageLangpacksResponseList(val *PaginatedrpmPackageLangpacksResponseList) *NullablePaginatedrpmPackageLangpacksResponseList { + return &NullablePaginatedrpmPackageLangpacksResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmPackageLangpacksResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmPackageLangpacksResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_response_list.go new file mode 100644 index 0000000000..645172f7d2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_package_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmPackageResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmPackageResponseList{} + +// PaginatedrpmPackageResponseList struct for PaginatedrpmPackageResponseList +type PaginatedrpmPackageResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmPackageResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmPackageResponseList PaginatedrpmPackageResponseList + +// NewPaginatedrpmPackageResponseList instantiates a new PaginatedrpmPackageResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmPackageResponseList() *PaginatedrpmPackageResponseList { + this := PaginatedrpmPackageResponseList{} + return &this +} + +// NewPaginatedrpmPackageResponseListWithDefaults instantiates a new PaginatedrpmPackageResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmPackageResponseListWithDefaults() *PaginatedrpmPackageResponseList { + this := PaginatedrpmPackageResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmPackageResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmPackageResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmPackageResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmPackageResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmPackageResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmPackageResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmPackageResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmPackageResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmPackageResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmPackageResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmPackageResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmPackageResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmPackageResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmPackageResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmPackageResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmPackageResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmPackageResponseList) GetResults() []RpmPackageResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmPackageResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmPackageResponseList) GetResultsOk() ([]RpmPackageResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmPackageResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmPackageResponse and assigns it to the Results field. +func (o *PaginatedrpmPackageResponseList) SetResults(v []RpmPackageResponse) { + o.Results = v +} + +func (o PaginatedrpmPackageResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmPackageResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmPackageResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmPackageResponseList := _PaginatedrpmPackageResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmPackageResponseList); err == nil { + *o = PaginatedrpmPackageResponseList(varPaginatedrpmPackageResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmPackageResponseList struct { + value *PaginatedrpmPackageResponseList + isSet bool +} + +func (v NullablePaginatedrpmPackageResponseList) Get() *PaginatedrpmPackageResponseList { + return v.value +} + +func (v *NullablePaginatedrpmPackageResponseList) Set(val *PaginatedrpmPackageResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmPackageResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmPackageResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmPackageResponseList(val *PaginatedrpmPackageResponseList) *NullablePaginatedrpmPackageResponseList { + return &NullablePaginatedrpmPackageResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmPackageResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmPackageResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_repo_metadata_file_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_repo_metadata_file_response_list.go new file mode 100644 index 0000000000..9285f48a02 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_repo_metadata_file_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmRepoMetadataFileResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmRepoMetadataFileResponseList{} + +// PaginatedrpmRepoMetadataFileResponseList struct for PaginatedrpmRepoMetadataFileResponseList +type PaginatedrpmRepoMetadataFileResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmRepoMetadataFileResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmRepoMetadataFileResponseList PaginatedrpmRepoMetadataFileResponseList + +// NewPaginatedrpmRepoMetadataFileResponseList instantiates a new PaginatedrpmRepoMetadataFileResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmRepoMetadataFileResponseList() *PaginatedrpmRepoMetadataFileResponseList { + this := PaginatedrpmRepoMetadataFileResponseList{} + return &this +} + +// NewPaginatedrpmRepoMetadataFileResponseListWithDefaults instantiates a new PaginatedrpmRepoMetadataFileResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmRepoMetadataFileResponseListWithDefaults() *PaginatedrpmRepoMetadataFileResponseList { + this := PaginatedrpmRepoMetadataFileResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmRepoMetadataFileResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmRepoMetadataFileResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmRepoMetadataFileResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmRepoMetadataFileResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmRepoMetadataFileResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmRepoMetadataFileResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmRepoMetadataFileResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmRepoMetadataFileResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmRepoMetadataFileResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmRepoMetadataFileResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmRepoMetadataFileResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmRepoMetadataFileResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmRepoMetadataFileResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmRepoMetadataFileResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmRepoMetadataFileResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmRepoMetadataFileResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmRepoMetadataFileResponseList) GetResults() []RpmRepoMetadataFileResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmRepoMetadataFileResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmRepoMetadataFileResponseList) GetResultsOk() ([]RpmRepoMetadataFileResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmRepoMetadataFileResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmRepoMetadataFileResponse and assigns it to the Results field. +func (o *PaginatedrpmRepoMetadataFileResponseList) SetResults(v []RpmRepoMetadataFileResponse) { + o.Results = v +} + +func (o PaginatedrpmRepoMetadataFileResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmRepoMetadataFileResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmRepoMetadataFileResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmRepoMetadataFileResponseList := _PaginatedrpmRepoMetadataFileResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmRepoMetadataFileResponseList); err == nil { + *o = PaginatedrpmRepoMetadataFileResponseList(varPaginatedrpmRepoMetadataFileResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmRepoMetadataFileResponseList struct { + value *PaginatedrpmRepoMetadataFileResponseList + isSet bool +} + +func (v NullablePaginatedrpmRepoMetadataFileResponseList) Get() *PaginatedrpmRepoMetadataFileResponseList { + return v.value +} + +func (v *NullablePaginatedrpmRepoMetadataFileResponseList) Set(val *PaginatedrpmRepoMetadataFileResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmRepoMetadataFileResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmRepoMetadataFileResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmRepoMetadataFileResponseList(val *PaginatedrpmRepoMetadataFileResponseList) *NullablePaginatedrpmRepoMetadataFileResponseList { + return &NullablePaginatedrpmRepoMetadataFileResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmRepoMetadataFileResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmRepoMetadataFileResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_alternate_content_source_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_alternate_content_source_response_list.go new file mode 100644 index 0000000000..f1706dae26 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_alternate_content_source_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmRpmAlternateContentSourceResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmRpmAlternateContentSourceResponseList{} + +// PaginatedrpmRpmAlternateContentSourceResponseList struct for PaginatedrpmRpmAlternateContentSourceResponseList +type PaginatedrpmRpmAlternateContentSourceResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmRpmAlternateContentSourceResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmRpmAlternateContentSourceResponseList PaginatedrpmRpmAlternateContentSourceResponseList + +// NewPaginatedrpmRpmAlternateContentSourceResponseList instantiates a new PaginatedrpmRpmAlternateContentSourceResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmRpmAlternateContentSourceResponseList() *PaginatedrpmRpmAlternateContentSourceResponseList { + this := PaginatedrpmRpmAlternateContentSourceResponseList{} + return &this +} + +// NewPaginatedrpmRpmAlternateContentSourceResponseListWithDefaults instantiates a new PaginatedrpmRpmAlternateContentSourceResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmRpmAlternateContentSourceResponseListWithDefaults() *PaginatedrpmRpmAlternateContentSourceResponseList { + this := PaginatedrpmRpmAlternateContentSourceResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) GetResults() []RpmRpmAlternateContentSourceResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmRpmAlternateContentSourceResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) GetResultsOk() ([]RpmRpmAlternateContentSourceResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmRpmAlternateContentSourceResponse and assigns it to the Results field. +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) SetResults(v []RpmRpmAlternateContentSourceResponse) { + o.Results = v +} + +func (o PaginatedrpmRpmAlternateContentSourceResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmRpmAlternateContentSourceResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmRpmAlternateContentSourceResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmRpmAlternateContentSourceResponseList := _PaginatedrpmRpmAlternateContentSourceResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmRpmAlternateContentSourceResponseList); err == nil { + *o = PaginatedrpmRpmAlternateContentSourceResponseList(varPaginatedrpmRpmAlternateContentSourceResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmRpmAlternateContentSourceResponseList struct { + value *PaginatedrpmRpmAlternateContentSourceResponseList + isSet bool +} + +func (v NullablePaginatedrpmRpmAlternateContentSourceResponseList) Get() *PaginatedrpmRpmAlternateContentSourceResponseList { + return v.value +} + +func (v *NullablePaginatedrpmRpmAlternateContentSourceResponseList) Set(val *PaginatedrpmRpmAlternateContentSourceResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmRpmAlternateContentSourceResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmRpmAlternateContentSourceResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmRpmAlternateContentSourceResponseList(val *PaginatedrpmRpmAlternateContentSourceResponseList) *NullablePaginatedrpmRpmAlternateContentSourceResponseList { + return &NullablePaginatedrpmRpmAlternateContentSourceResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmRpmAlternateContentSourceResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmRpmAlternateContentSourceResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_distribution_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_distribution_response_list.go new file mode 100644 index 0000000000..cb99491d13 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_distribution_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmRpmDistributionResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmRpmDistributionResponseList{} + +// PaginatedrpmRpmDistributionResponseList struct for PaginatedrpmRpmDistributionResponseList +type PaginatedrpmRpmDistributionResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmRpmDistributionResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmRpmDistributionResponseList PaginatedrpmRpmDistributionResponseList + +// NewPaginatedrpmRpmDistributionResponseList instantiates a new PaginatedrpmRpmDistributionResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmRpmDistributionResponseList() *PaginatedrpmRpmDistributionResponseList { + this := PaginatedrpmRpmDistributionResponseList{} + return &this +} + +// NewPaginatedrpmRpmDistributionResponseListWithDefaults instantiates a new PaginatedrpmRpmDistributionResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmRpmDistributionResponseListWithDefaults() *PaginatedrpmRpmDistributionResponseList { + this := PaginatedrpmRpmDistributionResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmRpmDistributionResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmRpmDistributionResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmRpmDistributionResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmRpmDistributionResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmRpmDistributionResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmRpmDistributionResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmRpmDistributionResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmRpmDistributionResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmRpmDistributionResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmRpmDistributionResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmRpmDistributionResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmRpmDistributionResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmRpmDistributionResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmRpmDistributionResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmRpmDistributionResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmRpmDistributionResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmRpmDistributionResponseList) GetResults() []RpmRpmDistributionResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmRpmDistributionResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmRpmDistributionResponseList) GetResultsOk() ([]RpmRpmDistributionResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmRpmDistributionResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmRpmDistributionResponse and assigns it to the Results field. +func (o *PaginatedrpmRpmDistributionResponseList) SetResults(v []RpmRpmDistributionResponse) { + o.Results = v +} + +func (o PaginatedrpmRpmDistributionResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmRpmDistributionResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmRpmDistributionResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmRpmDistributionResponseList := _PaginatedrpmRpmDistributionResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmRpmDistributionResponseList); err == nil { + *o = PaginatedrpmRpmDistributionResponseList(varPaginatedrpmRpmDistributionResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmRpmDistributionResponseList struct { + value *PaginatedrpmRpmDistributionResponseList + isSet bool +} + +func (v NullablePaginatedrpmRpmDistributionResponseList) Get() *PaginatedrpmRpmDistributionResponseList { + return v.value +} + +func (v *NullablePaginatedrpmRpmDistributionResponseList) Set(val *PaginatedrpmRpmDistributionResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmRpmDistributionResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmRpmDistributionResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmRpmDistributionResponseList(val *PaginatedrpmRpmDistributionResponseList) *NullablePaginatedrpmRpmDistributionResponseList { + return &NullablePaginatedrpmRpmDistributionResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmRpmDistributionResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmRpmDistributionResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_publication_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_publication_response_list.go new file mode 100644 index 0000000000..1e5d395120 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_publication_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmRpmPublicationResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmRpmPublicationResponseList{} + +// PaginatedrpmRpmPublicationResponseList struct for PaginatedrpmRpmPublicationResponseList +type PaginatedrpmRpmPublicationResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmRpmPublicationResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmRpmPublicationResponseList PaginatedrpmRpmPublicationResponseList + +// NewPaginatedrpmRpmPublicationResponseList instantiates a new PaginatedrpmRpmPublicationResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmRpmPublicationResponseList() *PaginatedrpmRpmPublicationResponseList { + this := PaginatedrpmRpmPublicationResponseList{} + return &this +} + +// NewPaginatedrpmRpmPublicationResponseListWithDefaults instantiates a new PaginatedrpmRpmPublicationResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmRpmPublicationResponseListWithDefaults() *PaginatedrpmRpmPublicationResponseList { + this := PaginatedrpmRpmPublicationResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmRpmPublicationResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmRpmPublicationResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmRpmPublicationResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmRpmPublicationResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmRpmPublicationResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmRpmPublicationResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmRpmPublicationResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmRpmPublicationResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmRpmPublicationResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmRpmPublicationResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmRpmPublicationResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmRpmPublicationResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmRpmPublicationResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmRpmPublicationResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmRpmPublicationResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmRpmPublicationResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmRpmPublicationResponseList) GetResults() []RpmRpmPublicationResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmRpmPublicationResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmRpmPublicationResponseList) GetResultsOk() ([]RpmRpmPublicationResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmRpmPublicationResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmRpmPublicationResponse and assigns it to the Results field. +func (o *PaginatedrpmRpmPublicationResponseList) SetResults(v []RpmRpmPublicationResponse) { + o.Results = v +} + +func (o PaginatedrpmRpmPublicationResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmRpmPublicationResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmRpmPublicationResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmRpmPublicationResponseList := _PaginatedrpmRpmPublicationResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmRpmPublicationResponseList); err == nil { + *o = PaginatedrpmRpmPublicationResponseList(varPaginatedrpmRpmPublicationResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmRpmPublicationResponseList struct { + value *PaginatedrpmRpmPublicationResponseList + isSet bool +} + +func (v NullablePaginatedrpmRpmPublicationResponseList) Get() *PaginatedrpmRpmPublicationResponseList { + return v.value +} + +func (v *NullablePaginatedrpmRpmPublicationResponseList) Set(val *PaginatedrpmRpmPublicationResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmRpmPublicationResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmRpmPublicationResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmRpmPublicationResponseList(val *PaginatedrpmRpmPublicationResponseList) *NullablePaginatedrpmRpmPublicationResponseList { + return &NullablePaginatedrpmRpmPublicationResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmRpmPublicationResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmRpmPublicationResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_remote_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_remote_response_list.go new file mode 100644 index 0000000000..edfef30b14 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_remote_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmRpmRemoteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmRpmRemoteResponseList{} + +// PaginatedrpmRpmRemoteResponseList struct for PaginatedrpmRpmRemoteResponseList +type PaginatedrpmRpmRemoteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmRpmRemoteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmRpmRemoteResponseList PaginatedrpmRpmRemoteResponseList + +// NewPaginatedrpmRpmRemoteResponseList instantiates a new PaginatedrpmRpmRemoteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmRpmRemoteResponseList() *PaginatedrpmRpmRemoteResponseList { + this := PaginatedrpmRpmRemoteResponseList{} + return &this +} + +// NewPaginatedrpmRpmRemoteResponseListWithDefaults instantiates a new PaginatedrpmRpmRemoteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmRpmRemoteResponseListWithDefaults() *PaginatedrpmRpmRemoteResponseList { + this := PaginatedrpmRpmRemoteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmRpmRemoteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmRpmRemoteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmRpmRemoteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmRpmRemoteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmRpmRemoteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmRpmRemoteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmRpmRemoteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmRpmRemoteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmRpmRemoteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmRpmRemoteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmRpmRemoteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmRpmRemoteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmRpmRemoteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmRpmRemoteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmRpmRemoteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmRpmRemoteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmRpmRemoteResponseList) GetResults() []RpmRpmRemoteResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmRpmRemoteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmRpmRemoteResponseList) GetResultsOk() ([]RpmRpmRemoteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmRpmRemoteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmRpmRemoteResponse and assigns it to the Results field. +func (o *PaginatedrpmRpmRemoteResponseList) SetResults(v []RpmRpmRemoteResponse) { + o.Results = v +} + +func (o PaginatedrpmRpmRemoteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmRpmRemoteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmRpmRemoteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmRpmRemoteResponseList := _PaginatedrpmRpmRemoteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmRpmRemoteResponseList); err == nil { + *o = PaginatedrpmRpmRemoteResponseList(varPaginatedrpmRpmRemoteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmRpmRemoteResponseList struct { + value *PaginatedrpmRpmRemoteResponseList + isSet bool +} + +func (v NullablePaginatedrpmRpmRemoteResponseList) Get() *PaginatedrpmRpmRemoteResponseList { + return v.value +} + +func (v *NullablePaginatedrpmRpmRemoteResponseList) Set(val *PaginatedrpmRpmRemoteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmRpmRemoteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmRpmRemoteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmRpmRemoteResponseList(val *PaginatedrpmRpmRemoteResponseList) *NullablePaginatedrpmRpmRemoteResponseList { + return &NullablePaginatedrpmRpmRemoteResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmRpmRemoteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmRpmRemoteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_repository_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_repository_response_list.go new file mode 100644 index 0000000000..f612c42707 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_rpm_repository_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmRpmRepositoryResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmRpmRepositoryResponseList{} + +// PaginatedrpmRpmRepositoryResponseList struct for PaginatedrpmRpmRepositoryResponseList +type PaginatedrpmRpmRepositoryResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmRpmRepositoryResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmRpmRepositoryResponseList PaginatedrpmRpmRepositoryResponseList + +// NewPaginatedrpmRpmRepositoryResponseList instantiates a new PaginatedrpmRpmRepositoryResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmRpmRepositoryResponseList() *PaginatedrpmRpmRepositoryResponseList { + this := PaginatedrpmRpmRepositoryResponseList{} + return &this +} + +// NewPaginatedrpmRpmRepositoryResponseListWithDefaults instantiates a new PaginatedrpmRpmRepositoryResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmRpmRepositoryResponseListWithDefaults() *PaginatedrpmRpmRepositoryResponseList { + this := PaginatedrpmRpmRepositoryResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmRpmRepositoryResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmRpmRepositoryResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmRpmRepositoryResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmRpmRepositoryResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmRpmRepositoryResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmRpmRepositoryResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmRpmRepositoryResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmRpmRepositoryResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmRpmRepositoryResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmRpmRepositoryResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmRpmRepositoryResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmRpmRepositoryResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmRpmRepositoryResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmRpmRepositoryResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmRpmRepositoryResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmRpmRepositoryResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmRpmRepositoryResponseList) GetResults() []RpmRpmRepositoryResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmRpmRepositoryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmRpmRepositoryResponseList) GetResultsOk() ([]RpmRpmRepositoryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmRpmRepositoryResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmRpmRepositoryResponse and assigns it to the Results field. +func (o *PaginatedrpmRpmRepositoryResponseList) SetResults(v []RpmRpmRepositoryResponse) { + o.Results = v +} + +func (o PaginatedrpmRpmRepositoryResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmRpmRepositoryResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmRpmRepositoryResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmRpmRepositoryResponseList := _PaginatedrpmRpmRepositoryResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmRpmRepositoryResponseList); err == nil { + *o = PaginatedrpmRpmRepositoryResponseList(varPaginatedrpmRpmRepositoryResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmRpmRepositoryResponseList struct { + value *PaginatedrpmRpmRepositoryResponseList + isSet bool +} + +func (v NullablePaginatedrpmRpmRepositoryResponseList) Get() *PaginatedrpmRpmRepositoryResponseList { + return v.value +} + +func (v *NullablePaginatedrpmRpmRepositoryResponseList) Set(val *PaginatedrpmRpmRepositoryResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmRpmRepositoryResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmRpmRepositoryResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmRpmRepositoryResponseList(val *PaginatedrpmRpmRepositoryResponseList) *NullablePaginatedrpmRpmRepositoryResponseList { + return &NullablePaginatedrpmRpmRepositoryResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmRpmRepositoryResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmRpmRepositoryResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_uln_remote_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_uln_remote_response_list.go new file mode 100644 index 0000000000..fd69f16855 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_uln_remote_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmUlnRemoteResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmUlnRemoteResponseList{} + +// PaginatedrpmUlnRemoteResponseList struct for PaginatedrpmUlnRemoteResponseList +type PaginatedrpmUlnRemoteResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmUlnRemoteResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmUlnRemoteResponseList PaginatedrpmUlnRemoteResponseList + +// NewPaginatedrpmUlnRemoteResponseList instantiates a new PaginatedrpmUlnRemoteResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmUlnRemoteResponseList() *PaginatedrpmUlnRemoteResponseList { + this := PaginatedrpmUlnRemoteResponseList{} + return &this +} + +// NewPaginatedrpmUlnRemoteResponseListWithDefaults instantiates a new PaginatedrpmUlnRemoteResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmUlnRemoteResponseListWithDefaults() *PaginatedrpmUlnRemoteResponseList { + this := PaginatedrpmUlnRemoteResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmUlnRemoteResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmUlnRemoteResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmUlnRemoteResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmUlnRemoteResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmUlnRemoteResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmUlnRemoteResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmUlnRemoteResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmUlnRemoteResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmUlnRemoteResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmUlnRemoteResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmUlnRemoteResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmUlnRemoteResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmUlnRemoteResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmUlnRemoteResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmUlnRemoteResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmUlnRemoteResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmUlnRemoteResponseList) GetResults() []RpmUlnRemoteResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmUlnRemoteResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmUlnRemoteResponseList) GetResultsOk() ([]RpmUlnRemoteResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmUlnRemoteResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmUlnRemoteResponse and assigns it to the Results field. +func (o *PaginatedrpmUlnRemoteResponseList) SetResults(v []RpmUlnRemoteResponse) { + o.Results = v +} + +func (o PaginatedrpmUlnRemoteResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmUlnRemoteResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmUlnRemoteResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmUlnRemoteResponseList := _PaginatedrpmUlnRemoteResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmUlnRemoteResponseList); err == nil { + *o = PaginatedrpmUlnRemoteResponseList(varPaginatedrpmUlnRemoteResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmUlnRemoteResponseList struct { + value *PaginatedrpmUlnRemoteResponseList + isSet bool +} + +func (v NullablePaginatedrpmUlnRemoteResponseList) Get() *PaginatedrpmUlnRemoteResponseList { + return v.value +} + +func (v *NullablePaginatedrpmUlnRemoteResponseList) Set(val *PaginatedrpmUlnRemoteResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmUlnRemoteResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmUlnRemoteResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmUlnRemoteResponseList(val *PaginatedrpmUlnRemoteResponseList) *NullablePaginatedrpmUlnRemoteResponseList { + return &NullablePaginatedrpmUlnRemoteResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmUlnRemoteResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmUlnRemoteResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_update_record_response_list.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_update_record_response_list.go new file mode 100644 index 0000000000..90eabb8446 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_paginatedrpm_update_record_response_list.go @@ -0,0 +1,283 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PaginatedrpmUpdateRecordResponseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedrpmUpdateRecordResponseList{} + +// PaginatedrpmUpdateRecordResponseList struct for PaginatedrpmUpdateRecordResponseList +type PaginatedrpmUpdateRecordResponseList struct { + Count *int32 `json:"count,omitempty"` + Next NullableString `json:"next,omitempty"` + Previous NullableString `json:"previous,omitempty"` + Results []RpmUpdateRecordResponse `json:"results,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PaginatedrpmUpdateRecordResponseList PaginatedrpmUpdateRecordResponseList + +// NewPaginatedrpmUpdateRecordResponseList instantiates a new PaginatedrpmUpdateRecordResponseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedrpmUpdateRecordResponseList() *PaginatedrpmUpdateRecordResponseList { + this := PaginatedrpmUpdateRecordResponseList{} + return &this +} + +// NewPaginatedrpmUpdateRecordResponseListWithDefaults instantiates a new PaginatedrpmUpdateRecordResponseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedrpmUpdateRecordResponseListWithDefaults() *PaginatedrpmUpdateRecordResponseList { + this := PaginatedrpmUpdateRecordResponseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedrpmUpdateRecordResponseList) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmUpdateRecordResponseList) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedrpmUpdateRecordResponseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *PaginatedrpmUpdateRecordResponseList) SetCount(v int32) { + o.Count = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmUpdateRecordResponseList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmUpdateRecordResponseList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedrpmUpdateRecordResponseList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedrpmUpdateRecordResponseList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedrpmUpdateRecordResponseList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedrpmUpdateRecordResponseList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedrpmUpdateRecordResponseList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedrpmUpdateRecordResponseList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedrpmUpdateRecordResponseList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedrpmUpdateRecordResponseList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedrpmUpdateRecordResponseList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedrpmUpdateRecordResponseList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedrpmUpdateRecordResponseList) GetResults() []RpmUpdateRecordResponse { + if o == nil || IsNil(o.Results) { + var ret []RpmUpdateRecordResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedrpmUpdateRecordResponseList) GetResultsOk() ([]RpmUpdateRecordResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedrpmUpdateRecordResponseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RpmUpdateRecordResponse and assigns it to the Results field. +func (o *PaginatedrpmUpdateRecordResponseList) SetResults(v []RpmUpdateRecordResponse) { + o.Results = v +} + +func (o PaginatedrpmUpdateRecordResponseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedrpmUpdateRecordResponseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PaginatedrpmUpdateRecordResponseList) UnmarshalJSON(bytes []byte) (err error) { + varPaginatedrpmUpdateRecordResponseList := _PaginatedrpmUpdateRecordResponseList{} + + if err = json.Unmarshal(bytes, &varPaginatedrpmUpdateRecordResponseList); err == nil { + *o = PaginatedrpmUpdateRecordResponseList(varPaginatedrpmUpdateRecordResponseList) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "count") + delete(additionalProperties, "next") + delete(additionalProperties, "previous") + delete(additionalProperties, "results") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePaginatedrpmUpdateRecordResponseList struct { + value *PaginatedrpmUpdateRecordResponseList + isSet bool +} + +func (v NullablePaginatedrpmUpdateRecordResponseList) Get() *PaginatedrpmUpdateRecordResponseList { + return v.value +} + +func (v *NullablePaginatedrpmUpdateRecordResponseList) Set(val *PaginatedrpmUpdateRecordResponseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedrpmUpdateRecordResponseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedrpmUpdateRecordResponseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedrpmUpdateRecordResponseList(val *PaginatedrpmUpdateRecordResponseList) *NullablePaginatedrpmUpdateRecordResponseList { + return &NullablePaginatedrpmUpdateRecordResponseList{value: val, isSet: true} +} + +func (v NullablePaginatedrpmUpdateRecordResponseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedrpmUpdateRecordResponseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_access_policy.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_access_policy.go new file mode 100644 index 0000000000..2e3df37752 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_access_policy.go @@ -0,0 +1,267 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedAccessPolicy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedAccessPolicy{} + +// PatchedAccessPolicy Serializer for AccessPolicy. +type PatchedAccessPolicy struct { + // List of callables that define the new permissions to be created for new objects.This is deprecated. Use `creation_hooks` instead. + PermissionsAssignment []map[string]interface{} `json:"permissions_assignment,omitempty"` + // List of callables that may associate user roles for new objects. + CreationHooks []map[string]interface{} `json:"creation_hooks,omitempty"` + // List of policy statements defining the policy. + Statements []map[string]interface{} `json:"statements,omitempty"` + // A callable for performing queryset scoping. See plugin documentation for valid callables. Set to blank to turn off queryset scoping. + QuerysetScoping map[string]interface{} `json:"queryset_scoping,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedAccessPolicy PatchedAccessPolicy + +// NewPatchedAccessPolicy instantiates a new PatchedAccessPolicy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedAccessPolicy() *PatchedAccessPolicy { + this := PatchedAccessPolicy{} + return &this +} + +// NewPatchedAccessPolicyWithDefaults instantiates a new PatchedAccessPolicy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedAccessPolicyWithDefaults() *PatchedAccessPolicy { + this := PatchedAccessPolicy{} + return &this +} + +// GetPermissionsAssignment returns the PermissionsAssignment field value if set, zero value otherwise. +func (o *PatchedAccessPolicy) GetPermissionsAssignment() []map[string]interface{} { + if o == nil || IsNil(o.PermissionsAssignment) { + var ret []map[string]interface{} + return ret + } + return o.PermissionsAssignment +} + +// GetPermissionsAssignmentOk returns a tuple with the PermissionsAssignment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedAccessPolicy) GetPermissionsAssignmentOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.PermissionsAssignment) { + return nil, false + } + return o.PermissionsAssignment, true +} + +// HasPermissionsAssignment returns a boolean if a field has been set. +func (o *PatchedAccessPolicy) HasPermissionsAssignment() bool { + if o != nil && !IsNil(o.PermissionsAssignment) { + return true + } + + return false +} + +// SetPermissionsAssignment gets a reference to the given []map[string]interface{} and assigns it to the PermissionsAssignment field. +func (o *PatchedAccessPolicy) SetPermissionsAssignment(v []map[string]interface{}) { + o.PermissionsAssignment = v +} + +// GetCreationHooks returns the CreationHooks field value if set, zero value otherwise. +func (o *PatchedAccessPolicy) GetCreationHooks() []map[string]interface{} { + if o == nil || IsNil(o.CreationHooks) { + var ret []map[string]interface{} + return ret + } + return o.CreationHooks +} + +// GetCreationHooksOk returns a tuple with the CreationHooks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedAccessPolicy) GetCreationHooksOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.CreationHooks) { + return nil, false + } + return o.CreationHooks, true +} + +// HasCreationHooks returns a boolean if a field has been set. +func (o *PatchedAccessPolicy) HasCreationHooks() bool { + if o != nil && !IsNil(o.CreationHooks) { + return true + } + + return false +} + +// SetCreationHooks gets a reference to the given []map[string]interface{} and assigns it to the CreationHooks field. +func (o *PatchedAccessPolicy) SetCreationHooks(v []map[string]interface{}) { + o.CreationHooks = v +} + +// GetStatements returns the Statements field value if set, zero value otherwise. +func (o *PatchedAccessPolicy) GetStatements() []map[string]interface{} { + if o == nil || IsNil(o.Statements) { + var ret []map[string]interface{} + return ret + } + return o.Statements +} + +// GetStatementsOk returns a tuple with the Statements field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedAccessPolicy) GetStatementsOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Statements) { + return nil, false + } + return o.Statements, true +} + +// HasStatements returns a boolean if a field has been set. +func (o *PatchedAccessPolicy) HasStatements() bool { + if o != nil && !IsNil(o.Statements) { + return true + } + + return false +} + +// SetStatements gets a reference to the given []map[string]interface{} and assigns it to the Statements field. +func (o *PatchedAccessPolicy) SetStatements(v []map[string]interface{}) { + o.Statements = v +} + +// GetQuerysetScoping returns the QuerysetScoping field value if set, zero value otherwise. +func (o *PatchedAccessPolicy) GetQuerysetScoping() map[string]interface{} { + if o == nil || IsNil(o.QuerysetScoping) { + var ret map[string]interface{} + return ret + } + return o.QuerysetScoping +} + +// GetQuerysetScopingOk returns a tuple with the QuerysetScoping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedAccessPolicy) GetQuerysetScopingOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.QuerysetScoping) { + return map[string]interface{}{}, false + } + return o.QuerysetScoping, true +} + +// HasQuerysetScoping returns a boolean if a field has been set. +func (o *PatchedAccessPolicy) HasQuerysetScoping() bool { + if o != nil && !IsNil(o.QuerysetScoping) { + return true + } + + return false +} + +// SetQuerysetScoping gets a reference to the given map[string]interface{} and assigns it to the QuerysetScoping field. +func (o *PatchedAccessPolicy) SetQuerysetScoping(v map[string]interface{}) { + o.QuerysetScoping = v +} + +func (o PatchedAccessPolicy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedAccessPolicy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PermissionsAssignment) { + toSerialize["permissions_assignment"] = o.PermissionsAssignment + } + if !IsNil(o.CreationHooks) { + toSerialize["creation_hooks"] = o.CreationHooks + } + if !IsNil(o.Statements) { + toSerialize["statements"] = o.Statements + } + if !IsNil(o.QuerysetScoping) { + toSerialize["queryset_scoping"] = o.QuerysetScoping + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedAccessPolicy) UnmarshalJSON(bytes []byte) (err error) { + varPatchedAccessPolicy := _PatchedAccessPolicy{} + + if err = json.Unmarshal(bytes, &varPatchedAccessPolicy); err == nil { + *o = PatchedAccessPolicy(varPatchedAccessPolicy) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "permissions_assignment") + delete(additionalProperties, "creation_hooks") + delete(additionalProperties, "statements") + delete(additionalProperties, "queryset_scoping") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedAccessPolicy struct { + value *PatchedAccessPolicy + isSet bool +} + +func (v NullablePatchedAccessPolicy) Get() *PatchedAccessPolicy { + return v.value +} + +func (v *NullablePatchedAccessPolicy) Set(val *PatchedAccessPolicy) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedAccessPolicy) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedAccessPolicy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedAccessPolicy(val *PatchedAccessPolicy) *NullablePatchedAccessPolicy { + return &NullablePatchedAccessPolicy{value: val, isSet: true} +} + +func (v NullablePatchedAccessPolicy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedAccessPolicy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_collection.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_collection.go new file mode 100644 index 0000000000..0ca7543665 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_collection.go @@ -0,0 +1,152 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedCollection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedCollection{} + +// PatchedCollection A serializer for a Collection. +type PatchedCollection struct { + Deprecated *bool `json:"deprecated,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedCollection PatchedCollection + +// NewPatchedCollection instantiates a new PatchedCollection object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedCollection() *PatchedCollection { + this := PatchedCollection{} + return &this +} + +// NewPatchedCollectionWithDefaults instantiates a new PatchedCollection object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedCollectionWithDefaults() *PatchedCollection { + this := PatchedCollection{} + return &this +} + +// GetDeprecated returns the Deprecated field value if set, zero value otherwise. +func (o *PatchedCollection) GetDeprecated() bool { + if o == nil || IsNil(o.Deprecated) { + var ret bool + return ret + } + return *o.Deprecated +} + +// GetDeprecatedOk returns a tuple with the Deprecated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCollection) GetDeprecatedOk() (*bool, bool) { + if o == nil || IsNil(o.Deprecated) { + return nil, false + } + return o.Deprecated, true +} + +// HasDeprecated returns a boolean if a field has been set. +func (o *PatchedCollection) HasDeprecated() bool { + if o != nil && !IsNil(o.Deprecated) { + return true + } + + return false +} + +// SetDeprecated gets a reference to the given bool and assigns it to the Deprecated field. +func (o *PatchedCollection) SetDeprecated(v bool) { + o.Deprecated = &v +} + +func (o PatchedCollection) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedCollection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Deprecated) { + toSerialize["deprecated"] = o.Deprecated + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedCollection) UnmarshalJSON(bytes []byte) (err error) { + varPatchedCollection := _PatchedCollection{} + + if err = json.Unmarshal(bytes, &varPatchedCollection); err == nil { + *o = PatchedCollection(varPatchedCollection) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "deprecated") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedCollection struct { + value *PatchedCollection + isSet bool +} + +func (v NullablePatchedCollection) Get() *PatchedCollection { + return v.value +} + +func (v *NullablePatchedCollection) Set(val *PatchedCollection) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedCollection) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedCollection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedCollection(val *PatchedCollection) *NullablePatchedCollection { + return &NullablePatchedCollection{value: val, isSet: true} +} + +func (v NullablePatchedCollection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedCollection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_content_redirect_content_guard.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_content_redirect_content_guard.go new file mode 100644 index 0000000000..768e5e5498 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_content_redirect_content_guard.go @@ -0,0 +1,201 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedContentRedirectContentGuard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedContentRedirectContentGuard{} + +// PatchedContentRedirectContentGuard A serializer for ContentRedirectContentGuard. +type PatchedContentRedirectContentGuard struct { + // The unique name. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedContentRedirectContentGuard PatchedContentRedirectContentGuard + +// NewPatchedContentRedirectContentGuard instantiates a new PatchedContentRedirectContentGuard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedContentRedirectContentGuard() *PatchedContentRedirectContentGuard { + this := PatchedContentRedirectContentGuard{} + return &this +} + +// NewPatchedContentRedirectContentGuardWithDefaults instantiates a new PatchedContentRedirectContentGuard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedContentRedirectContentGuardWithDefaults() *PatchedContentRedirectContentGuard { + this := PatchedContentRedirectContentGuard{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedContentRedirectContentGuard) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedContentRedirectContentGuard) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedContentRedirectContentGuard) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedContentRedirectContentGuard) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedContentRedirectContentGuard) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedContentRedirectContentGuard) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedContentRedirectContentGuard) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedContentRedirectContentGuard) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedContentRedirectContentGuard) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedContentRedirectContentGuard) UnsetDescription() { + o.Description.Unset() +} + +func (o PatchedContentRedirectContentGuard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedContentRedirectContentGuard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedContentRedirectContentGuard) UnmarshalJSON(bytes []byte) (err error) { + varPatchedContentRedirectContentGuard := _PatchedContentRedirectContentGuard{} + + if err = json.Unmarshal(bytes, &varPatchedContentRedirectContentGuard); err == nil { + *o = PatchedContentRedirectContentGuard(varPatchedContentRedirectContentGuard) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedContentRedirectContentGuard struct { + value *PatchedContentRedirectContentGuard + isSet bool +} + +func (v NullablePatchedContentRedirectContentGuard) Get() *PatchedContentRedirectContentGuard { + return v.value +} + +func (v *NullablePatchedContentRedirectContentGuard) Set(val *PatchedContentRedirectContentGuard) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedContentRedirectContentGuard) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedContentRedirectContentGuard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedContentRedirectContentGuard(val *PatchedContentRedirectContentGuard) *NullablePatchedContentRedirectContentGuard { + return &NullablePatchedContentRedirectContentGuard{value: val, isSet: true} +} + +func (v NullablePatchedContentRedirectContentGuard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedContentRedirectContentGuard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_domain.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_domain.go new file mode 100644 index 0000000000..d2a974a4b5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_domain.go @@ -0,0 +1,360 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedDomain type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedDomain{} + +// PatchedDomain Serializer for Domain. +type PatchedDomain struct { + // A name for this domain. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + StorageClass *StorageClassEnum `json:"storage_class,omitempty"` + // Settings for storage class. + StorageSettings map[string]interface{} `json:"storage_settings,omitempty"` + // Boolean to have the content app redirect to object storage. + RedirectToObjectStorage *bool `json:"redirect_to_object_storage,omitempty"` + // Boolean to hide distributions with a content guard in the content app. + HideGuardedDistributions *bool `json:"hide_guarded_distributions,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedDomain PatchedDomain + +// NewPatchedDomain instantiates a new PatchedDomain object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedDomain() *PatchedDomain { + this := PatchedDomain{} + var redirectToObjectStorage bool = true + this.RedirectToObjectStorage = &redirectToObjectStorage + var hideGuardedDistributions bool = false + this.HideGuardedDistributions = &hideGuardedDistributions + return &this +} + +// NewPatchedDomainWithDefaults instantiates a new PatchedDomain object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedDomainWithDefaults() *PatchedDomain { + this := PatchedDomain{} + var redirectToObjectStorage bool = true + this.RedirectToObjectStorage = &redirectToObjectStorage + var hideGuardedDistributions bool = false + this.HideGuardedDistributions = &hideGuardedDistributions + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedDomain) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDomain) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedDomain) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedDomain) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedDomain) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedDomain) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedDomain) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedDomain) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedDomain) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedDomain) UnsetDescription() { + o.Description.Unset() +} + +// GetStorageClass returns the StorageClass field value if set, zero value otherwise. +func (o *PatchedDomain) GetStorageClass() StorageClassEnum { + if o == nil || IsNil(o.StorageClass) { + var ret StorageClassEnum + return ret + } + return *o.StorageClass +} + +// GetStorageClassOk returns a tuple with the StorageClass field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDomain) GetStorageClassOk() (*StorageClassEnum, bool) { + if o == nil || IsNil(o.StorageClass) { + return nil, false + } + return o.StorageClass, true +} + +// HasStorageClass returns a boolean if a field has been set. +func (o *PatchedDomain) HasStorageClass() bool { + if o != nil && !IsNil(o.StorageClass) { + return true + } + + return false +} + +// SetStorageClass gets a reference to the given StorageClassEnum and assigns it to the StorageClass field. +func (o *PatchedDomain) SetStorageClass(v StorageClassEnum) { + o.StorageClass = &v +} + +// GetStorageSettings returns the StorageSettings field value if set, zero value otherwise. +func (o *PatchedDomain) GetStorageSettings() map[string]interface{} { + if o == nil || IsNil(o.StorageSettings) { + var ret map[string]interface{} + return ret + } + return o.StorageSettings +} + +// GetStorageSettingsOk returns a tuple with the StorageSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDomain) GetStorageSettingsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.StorageSettings) { + return map[string]interface{}{}, false + } + return o.StorageSettings, true +} + +// HasStorageSettings returns a boolean if a field has been set. +func (o *PatchedDomain) HasStorageSettings() bool { + if o != nil && !IsNil(o.StorageSettings) { + return true + } + + return false +} + +// SetStorageSettings gets a reference to the given map[string]interface{} and assigns it to the StorageSettings field. +func (o *PatchedDomain) SetStorageSettings(v map[string]interface{}) { + o.StorageSettings = v +} + +// GetRedirectToObjectStorage returns the RedirectToObjectStorage field value if set, zero value otherwise. +func (o *PatchedDomain) GetRedirectToObjectStorage() bool { + if o == nil || IsNil(o.RedirectToObjectStorage) { + var ret bool + return ret + } + return *o.RedirectToObjectStorage +} + +// GetRedirectToObjectStorageOk returns a tuple with the RedirectToObjectStorage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDomain) GetRedirectToObjectStorageOk() (*bool, bool) { + if o == nil || IsNil(o.RedirectToObjectStorage) { + return nil, false + } + return o.RedirectToObjectStorage, true +} + +// HasRedirectToObjectStorage returns a boolean if a field has been set. +func (o *PatchedDomain) HasRedirectToObjectStorage() bool { + if o != nil && !IsNil(o.RedirectToObjectStorage) { + return true + } + + return false +} + +// SetRedirectToObjectStorage gets a reference to the given bool and assigns it to the RedirectToObjectStorage field. +func (o *PatchedDomain) SetRedirectToObjectStorage(v bool) { + o.RedirectToObjectStorage = &v +} + +// GetHideGuardedDistributions returns the HideGuardedDistributions field value if set, zero value otherwise. +func (o *PatchedDomain) GetHideGuardedDistributions() bool { + if o == nil || IsNil(o.HideGuardedDistributions) { + var ret bool + return ret + } + return *o.HideGuardedDistributions +} + +// GetHideGuardedDistributionsOk returns a tuple with the HideGuardedDistributions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDomain) GetHideGuardedDistributionsOk() (*bool, bool) { + if o == nil || IsNil(o.HideGuardedDistributions) { + return nil, false + } + return o.HideGuardedDistributions, true +} + +// HasHideGuardedDistributions returns a boolean if a field has been set. +func (o *PatchedDomain) HasHideGuardedDistributions() bool { + if o != nil && !IsNil(o.HideGuardedDistributions) { + return true + } + + return false +} + +// SetHideGuardedDistributions gets a reference to the given bool and assigns it to the HideGuardedDistributions field. +func (o *PatchedDomain) SetHideGuardedDistributions(v bool) { + o.HideGuardedDistributions = &v +} + +func (o PatchedDomain) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedDomain) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.StorageClass) { + toSerialize["storage_class"] = o.StorageClass + } + if !IsNil(o.StorageSettings) { + toSerialize["storage_settings"] = o.StorageSettings + } + if !IsNil(o.RedirectToObjectStorage) { + toSerialize["redirect_to_object_storage"] = o.RedirectToObjectStorage + } + if !IsNil(o.HideGuardedDistributions) { + toSerialize["hide_guarded_distributions"] = o.HideGuardedDistributions + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedDomain) UnmarshalJSON(bytes []byte) (err error) { + varPatchedDomain := _PatchedDomain{} + + if err = json.Unmarshal(bytes, &varPatchedDomain); err == nil { + *o = PatchedDomain(varPatchedDomain) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "storage_class") + delete(additionalProperties, "storage_settings") + delete(additionalProperties, "redirect_to_object_storage") + delete(additionalProperties, "hide_guarded_distributions") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedDomain struct { + value *PatchedDomain + isSet bool +} + +func (v NullablePatchedDomain) Get() *PatchedDomain { + return v.value +} + +func (v *NullablePatchedDomain) Set(val *PatchedDomain) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedDomain) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedDomain) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedDomain(val *PatchedDomain) *NullablePatchedDomain { + return &NullablePatchedDomain{value: val, isSet: true} +} + +func (v NullablePatchedDomain) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedDomain) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_filesystem_exporter.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_filesystem_exporter.go new file mode 100644 index 0000000000..a0b0031e3a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_filesystem_exporter.go @@ -0,0 +1,232 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedFilesystemExporter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedFilesystemExporter{} + +// PatchedFilesystemExporter Serializer for FilesystemExporters. +type PatchedFilesystemExporter struct { + // Unique name of the file system exporter. + Name *string `json:"name,omitempty"` + // File system location to export to. + Path *string `json:"path,omitempty"` + Method *MethodEnum `json:"method,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedFilesystemExporter PatchedFilesystemExporter + +// NewPatchedFilesystemExporter instantiates a new PatchedFilesystemExporter object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedFilesystemExporter() *PatchedFilesystemExporter { + this := PatchedFilesystemExporter{} + var method MethodEnum = METHODENUM_WRITE + this.Method = &method + return &this +} + +// NewPatchedFilesystemExporterWithDefaults instantiates a new PatchedFilesystemExporter object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedFilesystemExporterWithDefaults() *PatchedFilesystemExporter { + this := PatchedFilesystemExporter{} + var method MethodEnum = METHODENUM_WRITE + this.Method = &method + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedFilesystemExporter) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFilesystemExporter) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedFilesystemExporter) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedFilesystemExporter) SetName(v string) { + o.Name = &v +} + +// GetPath returns the Path field value if set, zero value otherwise. +func (o *PatchedFilesystemExporter) GetPath() string { + if o == nil || IsNil(o.Path) { + var ret string + return ret + } + return *o.Path +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFilesystemExporter) GetPathOk() (*string, bool) { + if o == nil || IsNil(o.Path) { + return nil, false + } + return o.Path, true +} + +// HasPath returns a boolean if a field has been set. +func (o *PatchedFilesystemExporter) HasPath() bool { + if o != nil && !IsNil(o.Path) { + return true + } + + return false +} + +// SetPath gets a reference to the given string and assigns it to the Path field. +func (o *PatchedFilesystemExporter) SetPath(v string) { + o.Path = &v +} + +// GetMethod returns the Method field value if set, zero value otherwise. +func (o *PatchedFilesystemExporter) GetMethod() MethodEnum { + if o == nil || IsNil(o.Method) { + var ret MethodEnum + return ret + } + return *o.Method +} + +// GetMethodOk returns a tuple with the Method field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFilesystemExporter) GetMethodOk() (*MethodEnum, bool) { + if o == nil || IsNil(o.Method) { + return nil, false + } + return o.Method, true +} + +// HasMethod returns a boolean if a field has been set. +func (o *PatchedFilesystemExporter) HasMethod() bool { + if o != nil && !IsNil(o.Method) { + return true + } + + return false +} + +// SetMethod gets a reference to the given MethodEnum and assigns it to the Method field. +func (o *PatchedFilesystemExporter) SetMethod(v MethodEnum) { + o.Method = &v +} + +func (o PatchedFilesystemExporter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedFilesystemExporter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Path) { + toSerialize["path"] = o.Path + } + if !IsNil(o.Method) { + toSerialize["method"] = o.Method + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedFilesystemExporter) UnmarshalJSON(bytes []byte) (err error) { + varPatchedFilesystemExporter := _PatchedFilesystemExporter{} + + if err = json.Unmarshal(bytes, &varPatchedFilesystemExporter); err == nil { + *o = PatchedFilesystemExporter(varPatchedFilesystemExporter) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "path") + delete(additionalProperties, "method") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedFilesystemExporter struct { + value *PatchedFilesystemExporter + isSet bool +} + +func (v NullablePatchedFilesystemExporter) Get() *PatchedFilesystemExporter { + return v.value +} + +func (v *NullablePatchedFilesystemExporter) Set(val *PatchedFilesystemExporter) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedFilesystemExporter) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedFilesystemExporter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedFilesystemExporter(val *PatchedFilesystemExporter) *NullablePatchedFilesystemExporter { + return &NullablePatchedFilesystemExporter{value: val, isSet: true} +} + +func (v NullablePatchedFilesystemExporter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedFilesystemExporter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_group.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_group.go new file mode 100644 index 0000000000..eb9bc3f627 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_group.go @@ -0,0 +1,153 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedGroup{} + +// PatchedGroup Serializer for Group. +type PatchedGroup struct { + // Name + Name *string `json:"name,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedGroup PatchedGroup + +// NewPatchedGroup instantiates a new PatchedGroup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedGroup() *PatchedGroup { + this := PatchedGroup{} + return &this +} + +// NewPatchedGroupWithDefaults instantiates a new PatchedGroup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedGroupWithDefaults() *PatchedGroup { + this := PatchedGroup{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedGroup) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedGroup) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedGroup) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedGroup) SetName(v string) { + o.Name = &v +} + +func (o PatchedGroup) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedGroup) UnmarshalJSON(bytes []byte) (err error) { + varPatchedGroup := _PatchedGroup{} + + if err = json.Unmarshal(bytes, &varPatchedGroup); err == nil { + *o = PatchedGroup(varPatchedGroup) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedGroup struct { + value *PatchedGroup + isSet bool +} + +func (v NullablePatchedGroup) Get() *PatchedGroup { + return v.value +} + +func (v *NullablePatchedGroup) Set(val *PatchedGroup) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedGroup) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedGroup(val *PatchedGroup) *NullablePatchedGroup { + return &NullablePatchedGroup{value: val, isSet: true} +} + +func (v NullablePatchedGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_pulp_exporter.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_pulp_exporter.go new file mode 100644 index 0000000000..38ab0abede --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_pulp_exporter.go @@ -0,0 +1,276 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedPulpExporter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedPulpExporter{} + +// PatchedPulpExporter Serializer for pulp exporters. +type PatchedPulpExporter struct { + // Unique name of the file system exporter. + Name *string `json:"name,omitempty"` + // File system directory to store exported tar.gzs. + Path *string `json:"path,omitempty"` + Repositories []string `json:"repositories,omitempty"` + // Last attempted export for this PulpExporter + LastExport NullableString `json:"last_export,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedPulpExporter PatchedPulpExporter + +// NewPatchedPulpExporter instantiates a new PatchedPulpExporter object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedPulpExporter() *PatchedPulpExporter { + this := PatchedPulpExporter{} + return &this +} + +// NewPatchedPulpExporterWithDefaults instantiates a new PatchedPulpExporter object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedPulpExporterWithDefaults() *PatchedPulpExporter { + this := PatchedPulpExporter{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedPulpExporter) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedPulpExporter) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedPulpExporter) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedPulpExporter) SetName(v string) { + o.Name = &v +} + +// GetPath returns the Path field value if set, zero value otherwise. +func (o *PatchedPulpExporter) GetPath() string { + if o == nil || IsNil(o.Path) { + var ret string + return ret + } + return *o.Path +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedPulpExporter) GetPathOk() (*string, bool) { + if o == nil || IsNil(o.Path) { + return nil, false + } + return o.Path, true +} + +// HasPath returns a boolean if a field has been set. +func (o *PatchedPulpExporter) HasPath() bool { + if o != nil && !IsNil(o.Path) { + return true + } + + return false +} + +// SetPath gets a reference to the given string and assigns it to the Path field. +func (o *PatchedPulpExporter) SetPath(v string) { + o.Path = &v +} + +// GetRepositories returns the Repositories field value if set, zero value otherwise. +func (o *PatchedPulpExporter) GetRepositories() []string { + if o == nil || IsNil(o.Repositories) { + var ret []string + return ret + } + return o.Repositories +} + +// GetRepositoriesOk returns a tuple with the Repositories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedPulpExporter) GetRepositoriesOk() ([]string, bool) { + if o == nil || IsNil(o.Repositories) { + return nil, false + } + return o.Repositories, true +} + +// HasRepositories returns a boolean if a field has been set. +func (o *PatchedPulpExporter) HasRepositories() bool { + if o != nil && !IsNil(o.Repositories) { + return true + } + + return false +} + +// SetRepositories gets a reference to the given []string and assigns it to the Repositories field. +func (o *PatchedPulpExporter) SetRepositories(v []string) { + o.Repositories = v +} + +// GetLastExport returns the LastExport field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedPulpExporter) GetLastExport() string { + if o == nil || IsNil(o.LastExport.Get()) { + var ret string + return ret + } + return *o.LastExport.Get() +} + +// GetLastExportOk returns a tuple with the LastExport field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedPulpExporter) GetLastExportOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LastExport.Get(), o.LastExport.IsSet() +} + +// HasLastExport returns a boolean if a field has been set. +func (o *PatchedPulpExporter) HasLastExport() bool { + if o != nil && o.LastExport.IsSet() { + return true + } + + return false +} + +// SetLastExport gets a reference to the given NullableString and assigns it to the LastExport field. +func (o *PatchedPulpExporter) SetLastExport(v string) { + o.LastExport.Set(&v) +} +// SetLastExportNil sets the value for LastExport to be an explicit nil +func (o *PatchedPulpExporter) SetLastExportNil() { + o.LastExport.Set(nil) +} + +// UnsetLastExport ensures that no value is present for LastExport, not even an explicit nil +func (o *PatchedPulpExporter) UnsetLastExport() { + o.LastExport.Unset() +} + +func (o PatchedPulpExporter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedPulpExporter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Path) { + toSerialize["path"] = o.Path + } + if !IsNil(o.Repositories) { + toSerialize["repositories"] = o.Repositories + } + if o.LastExport.IsSet() { + toSerialize["last_export"] = o.LastExport.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedPulpExporter) UnmarshalJSON(bytes []byte) (err error) { + varPatchedPulpExporter := _PatchedPulpExporter{} + + if err = json.Unmarshal(bytes, &varPatchedPulpExporter); err == nil { + *o = PatchedPulpExporter(varPatchedPulpExporter) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "path") + delete(additionalProperties, "repositories") + delete(additionalProperties, "last_export") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedPulpExporter struct { + value *PatchedPulpExporter + isSet bool +} + +func (v NullablePatchedPulpExporter) Get() *PatchedPulpExporter { + return v.value +} + +func (v *NullablePatchedPulpExporter) Set(val *PatchedPulpExporter) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedPulpExporter) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedPulpExporter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedPulpExporter(val *PatchedPulpExporter) *NullablePatchedPulpExporter { + return &NullablePatchedPulpExporter{value: val, isSet: true} +} + +func (v NullablePatchedPulpExporter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedPulpExporter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_pulp_importer.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_pulp_importer.go new file mode 100644 index 0000000000..7a2c9223d2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_pulp_importer.go @@ -0,0 +1,191 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedPulpImporter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedPulpImporter{} + +// PatchedPulpImporter Serializer for PulpImporters. +type PatchedPulpImporter struct { + // Unique name of the Importer. + Name *string `json:"name,omitempty"` + // Mapping of repo names in an export file to the repo names in Pulp. For example, if the export has a repo named 'foo' and the repo to import content into was 'bar', the mapping would be \"{'foo': 'bar'}\". + RepoMapping *map[string]string `json:"repo_mapping,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedPulpImporter PatchedPulpImporter + +// NewPatchedPulpImporter instantiates a new PatchedPulpImporter object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedPulpImporter() *PatchedPulpImporter { + this := PatchedPulpImporter{} + return &this +} + +// NewPatchedPulpImporterWithDefaults instantiates a new PatchedPulpImporter object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedPulpImporterWithDefaults() *PatchedPulpImporter { + this := PatchedPulpImporter{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedPulpImporter) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedPulpImporter) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedPulpImporter) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedPulpImporter) SetName(v string) { + o.Name = &v +} + +// GetRepoMapping returns the RepoMapping field value if set, zero value otherwise. +func (o *PatchedPulpImporter) GetRepoMapping() map[string]string { + if o == nil || IsNil(o.RepoMapping) { + var ret map[string]string + return ret + } + return *o.RepoMapping +} + +// GetRepoMappingOk returns a tuple with the RepoMapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedPulpImporter) GetRepoMappingOk() (*map[string]string, bool) { + if o == nil || IsNil(o.RepoMapping) { + return nil, false + } + return o.RepoMapping, true +} + +// HasRepoMapping returns a boolean if a field has been set. +func (o *PatchedPulpImporter) HasRepoMapping() bool { + if o != nil && !IsNil(o.RepoMapping) { + return true + } + + return false +} + +// SetRepoMapping gets a reference to the given map[string]string and assigns it to the RepoMapping field. +func (o *PatchedPulpImporter) SetRepoMapping(v map[string]string) { + o.RepoMapping = &v +} + +func (o PatchedPulpImporter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedPulpImporter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.RepoMapping) { + toSerialize["repo_mapping"] = o.RepoMapping + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedPulpImporter) UnmarshalJSON(bytes []byte) (err error) { + varPatchedPulpImporter := _PatchedPulpImporter{} + + if err = json.Unmarshal(bytes, &varPatchedPulpImporter); err == nil { + *o = PatchedPulpImporter(varPatchedPulpImporter) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "repo_mapping") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedPulpImporter struct { + value *PatchedPulpImporter + isSet bool +} + +func (v NullablePatchedPulpImporter) Get() *PatchedPulpImporter { + return v.value +} + +func (v *NullablePatchedPulpImporter) Set(val *PatchedPulpImporter) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedPulpImporter) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedPulpImporter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedPulpImporter(val *PatchedPulpImporter) *NullablePatchedPulpImporter { + return &NullablePatchedPulpImporter{value: val, isSet: true} +} + +func (v NullablePatchedPulpImporter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedPulpImporter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_rbac_content_guard.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_rbac_content_guard.go new file mode 100644 index 0000000000..af17a2e4ad --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_rbac_content_guard.go @@ -0,0 +1,201 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedRBACContentGuard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedRBACContentGuard{} + +// PatchedRBACContentGuard Base serializer for use with :class:`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. +type PatchedRBACContentGuard struct { + // The unique name. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedRBACContentGuard PatchedRBACContentGuard + +// NewPatchedRBACContentGuard instantiates a new PatchedRBACContentGuard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedRBACContentGuard() *PatchedRBACContentGuard { + this := PatchedRBACContentGuard{} + return &this +} + +// NewPatchedRBACContentGuardWithDefaults instantiates a new PatchedRBACContentGuard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedRBACContentGuardWithDefaults() *PatchedRBACContentGuard { + this := PatchedRBACContentGuard{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedRBACContentGuard) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRBACContentGuard) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedRBACContentGuard) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedRBACContentGuard) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedRBACContentGuard) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedRBACContentGuard) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedRBACContentGuard) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedRBACContentGuard) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedRBACContentGuard) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedRBACContentGuard) UnsetDescription() { + o.Description.Unset() +} + +func (o PatchedRBACContentGuard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedRBACContentGuard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedRBACContentGuard) UnmarshalJSON(bytes []byte) (err error) { + varPatchedRBACContentGuard := _PatchedRBACContentGuard{} + + if err = json.Unmarshal(bytes, &varPatchedRBACContentGuard); err == nil { + *o = PatchedRBACContentGuard(varPatchedRBACContentGuard) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedRBACContentGuard struct { + value *PatchedRBACContentGuard + isSet bool +} + +func (v NullablePatchedRBACContentGuard) Get() *PatchedRBACContentGuard { + return v.value +} + +func (v *NullablePatchedRBACContentGuard) Set(val *PatchedRBACContentGuard) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedRBACContentGuard) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedRBACContentGuard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedRBACContentGuard(val *PatchedRBACContentGuard) *NullablePatchedRBACContentGuard { + return &NullablePatchedRBACContentGuard{value: val, isSet: true} +} + +func (v NullablePatchedRBACContentGuard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedRBACContentGuard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_role.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_role.go new file mode 100644 index 0000000000..a6ccb96df4 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_role.go @@ -0,0 +1,239 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedRole type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedRole{} + +// PatchedRole Serializer for Role. +type PatchedRole struct { + // The name of this role. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // List of permissions defining the role. + Permissions []string `json:"permissions,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedRole PatchedRole + +// NewPatchedRole instantiates a new PatchedRole object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedRole() *PatchedRole { + this := PatchedRole{} + return &this +} + +// NewPatchedRoleWithDefaults instantiates a new PatchedRole object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedRoleWithDefaults() *PatchedRole { + this := PatchedRole{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedRole) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRole) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedRole) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedRole) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedRole) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedRole) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedRole) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedRole) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedRole) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedRole) UnsetDescription() { + o.Description.Unset() +} + +// GetPermissions returns the Permissions field value if set, zero value otherwise. +func (o *PatchedRole) GetPermissions() []string { + if o == nil || IsNil(o.Permissions) { + var ret []string + return ret + } + return o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRole) GetPermissionsOk() ([]string, bool) { + if o == nil || IsNil(o.Permissions) { + return nil, false + } + return o.Permissions, true +} + +// HasPermissions returns a boolean if a field has been set. +func (o *PatchedRole) HasPermissions() bool { + if o != nil && !IsNil(o.Permissions) { + return true + } + + return false +} + +// SetPermissions gets a reference to the given []string and assigns it to the Permissions field. +func (o *PatchedRole) SetPermissions(v []string) { + o.Permissions = v +} + +func (o PatchedRole) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedRole) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Permissions) { + toSerialize["permissions"] = o.Permissions + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedRole) UnmarshalJSON(bytes []byte) (err error) { + varPatchedRole := _PatchedRole{} + + if err = json.Unmarshal(bytes, &varPatchedRole); err == nil { + *o = PatchedRole(varPatchedRole) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "permissions") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedRole struct { + value *PatchedRole + isSet bool +} + +func (v NullablePatchedRole) Get() *PatchedRole { + return v.value +} + +func (v *NullablePatchedRole) Set(val *PatchedRole) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedRole) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedRole(val *PatchedRole) *NullablePatchedRole { + return &NullablePatchedRole{value: val, isSet: true} +} + +func (v NullablePatchedRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_task_cancel.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_task_cancel.go new file mode 100644 index 0000000000..308d32b08d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_task_cancel.go @@ -0,0 +1,153 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedTaskCancel type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedTaskCancel{} + +// PatchedTaskCancel Base serializer for use with :class:`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. +type PatchedTaskCancel struct { + // The desired state of the task. Only 'canceled' is accepted. + State *string `json:"state,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedTaskCancel PatchedTaskCancel + +// NewPatchedTaskCancel instantiates a new PatchedTaskCancel object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedTaskCancel() *PatchedTaskCancel { + this := PatchedTaskCancel{} + return &this +} + +// NewPatchedTaskCancelWithDefaults instantiates a new PatchedTaskCancel object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedTaskCancelWithDefaults() *PatchedTaskCancel { + this := PatchedTaskCancel{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *PatchedTaskCancel) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedTaskCancel) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *PatchedTaskCancel) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *PatchedTaskCancel) SetState(v string) { + o.State = &v +} + +func (o PatchedTaskCancel) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedTaskCancel) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedTaskCancel) UnmarshalJSON(bytes []byte) (err error) { + varPatchedTaskCancel := _PatchedTaskCancel{} + + if err = json.Unmarshal(bytes, &varPatchedTaskCancel); err == nil { + *o = PatchedTaskCancel(varPatchedTaskCancel) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "state") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedTaskCancel struct { + value *PatchedTaskCancel + isSet bool +} + +func (v NullablePatchedTaskCancel) Get() *PatchedTaskCancel { + return v.value +} + +func (v *NullablePatchedTaskCancel) Set(val *PatchedTaskCancel) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedTaskCancel) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedTaskCancel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedTaskCancel(val *PatchedTaskCancel) *NullablePatchedTaskCancel { + return &NullablePatchedTaskCancel{value: val, isSet: true} +} + +func (v NullablePatchedTaskCancel) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedTaskCancel) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_upstream_pulp.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_upstream_pulp.go new file mode 100644 index 0000000000..46016724c8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_upstream_pulp.go @@ -0,0 +1,603 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedUpstreamPulp type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedUpstreamPulp{} + +// PatchedUpstreamPulp Serializer for a Server. +type PatchedUpstreamPulp struct { + // A unique name for this Pulp server. + Name *string `json:"name,omitempty"` + // The transport, hostname, and an optional port of the Pulp server. e.g. https://example.com + BaseUrl *string `json:"base_url,omitempty"` + // The API root. Defaults to '/pulp/'. + ApiRoot *string `json:"api_root,omitempty"` + // The domain of the Pulp server if enabled. + Domain NullableString `json:"domain,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + // One or more comma separated labels that will be used to filter distributions on the upstream Pulp. E.g. \"foo=bar,key=val\" or \"foo,key\" + PulpLabelSelect NullableString `json:"pulp_label_select,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedUpstreamPulp PatchedUpstreamPulp + +// NewPatchedUpstreamPulp instantiates a new PatchedUpstreamPulp object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedUpstreamPulp() *PatchedUpstreamPulp { + this := PatchedUpstreamPulp{} + return &this +} + +// NewPatchedUpstreamPulpWithDefaults instantiates a new PatchedUpstreamPulp object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedUpstreamPulpWithDefaults() *PatchedUpstreamPulp { + this := PatchedUpstreamPulp{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedUpstreamPulp) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUpstreamPulp) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedUpstreamPulp) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedUpstreamPulp) SetName(v string) { + o.Name = &v +} + +// GetBaseUrl returns the BaseUrl field value if set, zero value otherwise. +func (o *PatchedUpstreamPulp) GetBaseUrl() string { + if o == nil || IsNil(o.BaseUrl) { + var ret string + return ret + } + return *o.BaseUrl +} + +// GetBaseUrlOk returns a tuple with the BaseUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUpstreamPulp) GetBaseUrlOk() (*string, bool) { + if o == nil || IsNil(o.BaseUrl) { + return nil, false + } + return o.BaseUrl, true +} + +// HasBaseUrl returns a boolean if a field has been set. +func (o *PatchedUpstreamPulp) HasBaseUrl() bool { + if o != nil && !IsNil(o.BaseUrl) { + return true + } + + return false +} + +// SetBaseUrl gets a reference to the given string and assigns it to the BaseUrl field. +func (o *PatchedUpstreamPulp) SetBaseUrl(v string) { + o.BaseUrl = &v +} + +// GetApiRoot returns the ApiRoot field value if set, zero value otherwise. +func (o *PatchedUpstreamPulp) GetApiRoot() string { + if o == nil || IsNil(o.ApiRoot) { + var ret string + return ret + } + return *o.ApiRoot +} + +// GetApiRootOk returns a tuple with the ApiRoot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUpstreamPulp) GetApiRootOk() (*string, bool) { + if o == nil || IsNil(o.ApiRoot) { + return nil, false + } + return o.ApiRoot, true +} + +// HasApiRoot returns a boolean if a field has been set. +func (o *PatchedUpstreamPulp) HasApiRoot() bool { + if o != nil && !IsNil(o.ApiRoot) { + return true + } + + return false +} + +// SetApiRoot gets a reference to the given string and assigns it to the ApiRoot field. +func (o *PatchedUpstreamPulp) SetApiRoot(v string) { + o.ApiRoot = &v +} + +// GetDomain returns the Domain field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedUpstreamPulp) GetDomain() string { + if o == nil || IsNil(o.Domain.Get()) { + var ret string + return ret + } + return *o.Domain.Get() +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedUpstreamPulp) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Domain.Get(), o.Domain.IsSet() +} + +// HasDomain returns a boolean if a field has been set. +func (o *PatchedUpstreamPulp) HasDomain() bool { + if o != nil && o.Domain.IsSet() { + return true + } + + return false +} + +// SetDomain gets a reference to the given NullableString and assigns it to the Domain field. +func (o *PatchedUpstreamPulp) SetDomain(v string) { + o.Domain.Set(&v) +} +// SetDomainNil sets the value for Domain to be an explicit nil +func (o *PatchedUpstreamPulp) SetDomainNil() { + o.Domain.Set(nil) +} + +// UnsetDomain ensures that no value is present for Domain, not even an explicit nil +func (o *PatchedUpstreamPulp) UnsetDomain() { + o.Domain.Unset() +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedUpstreamPulp) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedUpstreamPulp) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PatchedUpstreamPulp) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PatchedUpstreamPulp) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PatchedUpstreamPulp) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PatchedUpstreamPulp) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedUpstreamPulp) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedUpstreamPulp) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PatchedUpstreamPulp) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PatchedUpstreamPulp) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PatchedUpstreamPulp) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PatchedUpstreamPulp) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedUpstreamPulp) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedUpstreamPulp) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PatchedUpstreamPulp) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PatchedUpstreamPulp) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PatchedUpstreamPulp) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PatchedUpstreamPulp) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PatchedUpstreamPulp) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUpstreamPulp) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PatchedUpstreamPulp) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PatchedUpstreamPulp) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedUpstreamPulp) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedUpstreamPulp) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatchedUpstreamPulp) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *PatchedUpstreamPulp) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *PatchedUpstreamPulp) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *PatchedUpstreamPulp) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedUpstreamPulp) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedUpstreamPulp) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatchedUpstreamPulp) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PatchedUpstreamPulp) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PatchedUpstreamPulp) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PatchedUpstreamPulp) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabelSelect returns the PulpLabelSelect field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedUpstreamPulp) GetPulpLabelSelect() string { + if o == nil || IsNil(o.PulpLabelSelect.Get()) { + var ret string + return ret + } + return *o.PulpLabelSelect.Get() +} + +// GetPulpLabelSelectOk returns a tuple with the PulpLabelSelect field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedUpstreamPulp) GetPulpLabelSelectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PulpLabelSelect.Get(), o.PulpLabelSelect.IsSet() +} + +// HasPulpLabelSelect returns a boolean if a field has been set. +func (o *PatchedUpstreamPulp) HasPulpLabelSelect() bool { + if o != nil && o.PulpLabelSelect.IsSet() { + return true + } + + return false +} + +// SetPulpLabelSelect gets a reference to the given NullableString and assigns it to the PulpLabelSelect field. +func (o *PatchedUpstreamPulp) SetPulpLabelSelect(v string) { + o.PulpLabelSelect.Set(&v) +} +// SetPulpLabelSelectNil sets the value for PulpLabelSelect to be an explicit nil +func (o *PatchedUpstreamPulp) SetPulpLabelSelectNil() { + o.PulpLabelSelect.Set(nil) +} + +// UnsetPulpLabelSelect ensures that no value is present for PulpLabelSelect, not even an explicit nil +func (o *PatchedUpstreamPulp) UnsetPulpLabelSelect() { + o.PulpLabelSelect.Unset() +} + +func (o PatchedUpstreamPulp) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedUpstreamPulp) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.BaseUrl) { + toSerialize["base_url"] = o.BaseUrl + } + if !IsNil(o.ApiRoot) { + toSerialize["api_root"] = o.ApiRoot + } + if o.Domain.IsSet() { + toSerialize["domain"] = o.Domain.Get() + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.PulpLabelSelect.IsSet() { + toSerialize["pulp_label_select"] = o.PulpLabelSelect.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedUpstreamPulp) UnmarshalJSON(bytes []byte) (err error) { + varPatchedUpstreamPulp := _PatchedUpstreamPulp{} + + if err = json.Unmarshal(bytes, &varPatchedUpstreamPulp); err == nil { + *o = PatchedUpstreamPulp(varPatchedUpstreamPulp) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "base_url") + delete(additionalProperties, "api_root") + delete(additionalProperties, "domain") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_label_select") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedUpstreamPulp struct { + value *PatchedUpstreamPulp + isSet bool +} + +func (v NullablePatchedUpstreamPulp) Get() *PatchedUpstreamPulp { + return v.value +} + +func (v *NullablePatchedUpstreamPulp) Set(val *PatchedUpstreamPulp) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedUpstreamPulp) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedUpstreamPulp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedUpstreamPulp(val *PatchedUpstreamPulp) *NullablePatchedUpstreamPulp { + return &NullablePatchedUpstreamPulp{value: val, isSet: true} +} + +func (v NullablePatchedUpstreamPulp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedUpstreamPulp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_user.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_user.go new file mode 100644 index 0000000000..b3fb495eac --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patched_user.go @@ -0,0 +1,399 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedUser{} + +// PatchedUser Serializer for User. +type PatchedUser struct { + // Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + Username *string `json:"username,omitempty"` + // Users password. Set to ``null`` to disable password authentication. + Password NullableString `json:"password,omitempty"` + // First name + FirstName *string `json:"first_name,omitempty"` + // Last name + LastName *string `json:"last_name,omitempty"` + // Email address + Email *string `json:"email,omitempty"` + // Designates whether the user can log into this admin site. + IsStaff *bool `json:"is_staff,omitempty"` + // Designates whether this user should be treated as active. + IsActive *bool `json:"is_active,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedUser PatchedUser + +// NewPatchedUser instantiates a new PatchedUser object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedUser() *PatchedUser { + this := PatchedUser{} + var isStaff bool = false + this.IsStaff = &isStaff + var isActive bool = true + this.IsActive = &isActive + return &this +} + +// NewPatchedUserWithDefaults instantiates a new PatchedUser object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedUserWithDefaults() *PatchedUser { + this := PatchedUser{} + var isStaff bool = false + this.IsStaff = &isStaff + var isActive bool = true + this.IsActive = &isActive + return &this +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *PatchedUser) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUser) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatchedUser) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *PatchedUser) SetUsername(v string) { + o.Username = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedUser) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedUser) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatchedUser) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PatchedUser) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PatchedUser) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PatchedUser) UnsetPassword() { + o.Password.Unset() +} + +// GetFirstName returns the FirstName field value if set, zero value otherwise. +func (o *PatchedUser) GetFirstName() string { + if o == nil || IsNil(o.FirstName) { + var ret string + return ret + } + return *o.FirstName +} + +// GetFirstNameOk returns a tuple with the FirstName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUser) GetFirstNameOk() (*string, bool) { + if o == nil || IsNil(o.FirstName) { + return nil, false + } + return o.FirstName, true +} + +// HasFirstName returns a boolean if a field has been set. +func (o *PatchedUser) HasFirstName() bool { + if o != nil && !IsNil(o.FirstName) { + return true + } + + return false +} + +// SetFirstName gets a reference to the given string and assigns it to the FirstName field. +func (o *PatchedUser) SetFirstName(v string) { + o.FirstName = &v +} + +// GetLastName returns the LastName field value if set, zero value otherwise. +func (o *PatchedUser) GetLastName() string { + if o == nil || IsNil(o.LastName) { + var ret string + return ret + } + return *o.LastName +} + +// GetLastNameOk returns a tuple with the LastName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUser) GetLastNameOk() (*string, bool) { + if o == nil || IsNil(o.LastName) { + return nil, false + } + return o.LastName, true +} + +// HasLastName returns a boolean if a field has been set. +func (o *PatchedUser) HasLastName() bool { + if o != nil && !IsNil(o.LastName) { + return true + } + + return false +} + +// SetLastName gets a reference to the given string and assigns it to the LastName field. +func (o *PatchedUser) SetLastName(v string) { + o.LastName = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *PatchedUser) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUser) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *PatchedUser) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *PatchedUser) SetEmail(v string) { + o.Email = &v +} + +// GetIsStaff returns the IsStaff field value if set, zero value otherwise. +func (o *PatchedUser) GetIsStaff() bool { + if o == nil || IsNil(o.IsStaff) { + var ret bool + return ret + } + return *o.IsStaff +} + +// GetIsStaffOk returns a tuple with the IsStaff field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUser) GetIsStaffOk() (*bool, bool) { + if o == nil || IsNil(o.IsStaff) { + return nil, false + } + return o.IsStaff, true +} + +// HasIsStaff returns a boolean if a field has been set. +func (o *PatchedUser) HasIsStaff() bool { + if o != nil && !IsNil(o.IsStaff) { + return true + } + + return false +} + +// SetIsStaff gets a reference to the given bool and assigns it to the IsStaff field. +func (o *PatchedUser) SetIsStaff(v bool) { + o.IsStaff = &v +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise. +func (o *PatchedUser) GetIsActive() bool { + if o == nil || IsNil(o.IsActive) { + var ret bool + return ret + } + return *o.IsActive +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUser) GetIsActiveOk() (*bool, bool) { + if o == nil || IsNil(o.IsActive) { + return nil, false + } + return o.IsActive, true +} + +// HasIsActive returns a boolean if a field has been set. +func (o *PatchedUser) HasIsActive() bool { + if o != nil && !IsNil(o.IsActive) { + return true + } + + return false +} + +// SetIsActive gets a reference to the given bool and assigns it to the IsActive field. +func (o *PatchedUser) SetIsActive(v bool) { + o.IsActive = &v +} + +func (o PatchedUser) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.FirstName) { + toSerialize["first_name"] = o.FirstName + } + if !IsNil(o.LastName) { + toSerialize["last_name"] = o.LastName + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.IsStaff) { + toSerialize["is_staff"] = o.IsStaff + } + if !IsNil(o.IsActive) { + toSerialize["is_active"] = o.IsActive + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedUser) UnmarshalJSON(bytes []byte) (err error) { + varPatchedUser := _PatchedUser{} + + if err = json.Unmarshal(bytes, &varPatchedUser); err == nil { + *o = PatchedUser(varPatchedUser) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "first_name") + delete(additionalProperties, "last_name") + delete(additionalProperties, "email") + delete(additionalProperties, "is_staff") + delete(additionalProperties, "is_active") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedUser struct { + value *PatchedUser + isSet bool +} + +func (v NullablePatchedUser) Get() *PatchedUser { + return v.value +} + +func (v *NullablePatchedUser) Set(val *PatchedUser) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedUser) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedUser(val *PatchedUser) *NullablePatchedUser { + return &NullablePatchedUser{value: val, isSet: true} +} + +func (v NullablePatchedUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_ansible_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_ansible_distribution.go new file mode 100644 index 0000000000..73eb8284c3 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_ansible_distribution.go @@ -0,0 +1,372 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedansibleAnsibleDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedansibleAnsibleDistribution{} + +// PatchedansibleAnsibleDistribution Serializer for Ansible Distributions. +type PatchedansibleAnsibleDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath *string `json:"base_path,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name *string `json:"name,omitempty"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // RepositoryVersion to be served + RepositoryVersion NullableString `json:"repository_version,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedansibleAnsibleDistribution PatchedansibleAnsibleDistribution + +// NewPatchedansibleAnsibleDistribution instantiates a new PatchedansibleAnsibleDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedansibleAnsibleDistribution() *PatchedansibleAnsibleDistribution { + this := PatchedansibleAnsibleDistribution{} + return &this +} + +// NewPatchedansibleAnsibleDistributionWithDefaults instantiates a new PatchedansibleAnsibleDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedansibleAnsibleDistributionWithDefaults() *PatchedansibleAnsibleDistribution { + this := PatchedansibleAnsibleDistribution{} + return &this +} + +// GetBasePath returns the BasePath field value if set, zero value otherwise. +func (o *PatchedansibleAnsibleDistribution) GetBasePath() string { + if o == nil || IsNil(o.BasePath) { + var ret string + return ret + } + return *o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleAnsibleDistribution) GetBasePathOk() (*string, bool) { + if o == nil || IsNil(o.BasePath) { + return nil, false + } + return o.BasePath, true +} + +// HasBasePath returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleDistribution) HasBasePath() bool { + if o != nil && !IsNil(o.BasePath) { + return true + } + + return false +} + +// SetBasePath gets a reference to the given string and assigns it to the BasePath field. +func (o *PatchedansibleAnsibleDistribution) SetBasePath(v string) { + o.BasePath = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleAnsibleDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleAnsibleDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *PatchedansibleAnsibleDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *PatchedansibleAnsibleDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *PatchedansibleAnsibleDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedansibleAnsibleDistribution) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleAnsibleDistribution) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleDistribution) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedansibleAnsibleDistribution) SetName(v string) { + o.Name = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleAnsibleDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleAnsibleDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *PatchedansibleAnsibleDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *PatchedansibleAnsibleDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *PatchedansibleAnsibleDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleAnsibleDistribution) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion.Get()) { + var ret string + return ret + } + return *o.RepositoryVersion.Get() +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleAnsibleDistribution) GetRepositoryVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RepositoryVersion.Get(), o.RepositoryVersion.IsSet() +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleDistribution) HasRepositoryVersion() bool { + if o != nil && o.RepositoryVersion.IsSet() { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given NullableString and assigns it to the RepositoryVersion field. +func (o *PatchedansibleAnsibleDistribution) SetRepositoryVersion(v string) { + o.RepositoryVersion.Set(&v) +} +// SetRepositoryVersionNil sets the value for RepositoryVersion to be an explicit nil +func (o *PatchedansibleAnsibleDistribution) SetRepositoryVersionNil() { + o.RepositoryVersion.Set(nil) +} + +// UnsetRepositoryVersion ensures that no value is present for RepositoryVersion, not even an explicit nil +func (o *PatchedansibleAnsibleDistribution) UnsetRepositoryVersion() { + o.RepositoryVersion.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedansibleAnsibleDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleAnsibleDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedansibleAnsibleDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +func (o PatchedansibleAnsibleDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedansibleAnsibleDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasePath) { + toSerialize["base_path"] = o.BasePath + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.RepositoryVersion.IsSet() { + toSerialize["repository_version"] = o.RepositoryVersion.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedansibleAnsibleDistribution) UnmarshalJSON(bytes []byte) (err error) { + varPatchedansibleAnsibleDistribution := _PatchedansibleAnsibleDistribution{} + + if err = json.Unmarshal(bytes, &varPatchedansibleAnsibleDistribution); err == nil { + *o = PatchedansibleAnsibleDistribution(varPatchedansibleAnsibleDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "pulp_labels") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedansibleAnsibleDistribution struct { + value *PatchedansibleAnsibleDistribution + isSet bool +} + +func (v NullablePatchedansibleAnsibleDistribution) Get() *PatchedansibleAnsibleDistribution { + return v.value +} + +func (v *NullablePatchedansibleAnsibleDistribution) Set(val *PatchedansibleAnsibleDistribution) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedansibleAnsibleDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedansibleAnsibleDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedansibleAnsibleDistribution(val *PatchedansibleAnsibleDistribution) *NullablePatchedansibleAnsibleDistribution { + return &NullablePatchedansibleAnsibleDistribution{value: val, isSet: true} +} + +func (v NullablePatchedansibleAnsibleDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedansibleAnsibleDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_ansible_namespace_metadata.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_ansible_namespace_metadata.go new file mode 100644 index 0000000000..7ea0814a66 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_ansible_namespace_metadata.go @@ -0,0 +1,382 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the PatchedansibleAnsibleNamespaceMetadata type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedansibleAnsibleNamespaceMetadata{} + +// PatchedansibleAnsibleNamespaceMetadata A serializer for Namespaces. +type PatchedansibleAnsibleNamespaceMetadata struct { + // Required named, only accepts lowercase, numbers and underscores. + Name *string `json:"name,omitempty"` + // Optional namespace company owner. + Company *string `json:"company,omitempty"` + // Optional namespace contact email. + Email *string `json:"email,omitempty"` + // Optional short description. + Description *string `json:"description,omitempty"` + // Optional resource page in markdown format. + Resources *string `json:"resources,omitempty"` + // Labeled related links. + Links []NamespaceLink `json:"links,omitempty"` + // Optional avatar image for Namespace + Avatar **os.File `json:"avatar,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedansibleAnsibleNamespaceMetadata PatchedansibleAnsibleNamespaceMetadata + +// NewPatchedansibleAnsibleNamespaceMetadata instantiates a new PatchedansibleAnsibleNamespaceMetadata object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedansibleAnsibleNamespaceMetadata() *PatchedansibleAnsibleNamespaceMetadata { + this := PatchedansibleAnsibleNamespaceMetadata{} + return &this +} + +// NewPatchedansibleAnsibleNamespaceMetadataWithDefaults instantiates a new PatchedansibleAnsibleNamespaceMetadata object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedansibleAnsibleNamespaceMetadataWithDefaults() *PatchedansibleAnsibleNamespaceMetadata { + this := PatchedansibleAnsibleNamespaceMetadata{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedansibleAnsibleNamespaceMetadata) SetName(v string) { + o.Name = &v +} + +// GetCompany returns the Company field value if set, zero value otherwise. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetCompany() string { + if o == nil || IsNil(o.Company) { + var ret string + return ret + } + return *o.Company +} + +// GetCompanyOk returns a tuple with the Company field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetCompanyOk() (*string, bool) { + if o == nil || IsNil(o.Company) { + return nil, false + } + return o.Company, true +} + +// HasCompany returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) HasCompany() bool { + if o != nil && !IsNil(o.Company) { + return true + } + + return false +} + +// SetCompany gets a reference to the given string and assigns it to the Company field. +func (o *PatchedansibleAnsibleNamespaceMetadata) SetCompany(v string) { + o.Company = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *PatchedansibleAnsibleNamespaceMetadata) SetEmail(v string) { + o.Email = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PatchedansibleAnsibleNamespaceMetadata) SetDescription(v string) { + o.Description = &v +} + +// GetResources returns the Resources field value if set, zero value otherwise. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetResources() string { + if o == nil || IsNil(o.Resources) { + var ret string + return ret + } + return *o.Resources +} + +// GetResourcesOk returns a tuple with the Resources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetResourcesOk() (*string, bool) { + if o == nil || IsNil(o.Resources) { + return nil, false + } + return o.Resources, true +} + +// HasResources returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) HasResources() bool { + if o != nil && !IsNil(o.Resources) { + return true + } + + return false +} + +// SetResources gets a reference to the given string and assigns it to the Resources field. +func (o *PatchedansibleAnsibleNamespaceMetadata) SetResources(v string) { + o.Resources = &v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetLinks() []NamespaceLink { + if o == nil || IsNil(o.Links) { + var ret []NamespaceLink + return ret + } + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetLinksOk() ([]NamespaceLink, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given []NamespaceLink and assigns it to the Links field. +func (o *PatchedansibleAnsibleNamespaceMetadata) SetLinks(v []NamespaceLink) { + o.Links = v +} + +// GetAvatar returns the Avatar field value if set, zero value otherwise. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetAvatar() *os.File { + if o == nil || IsNil(o.Avatar) { + var ret *os.File + return ret + } + return *o.Avatar +} + +// GetAvatarOk returns a tuple with the Avatar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) GetAvatarOk() (**os.File, bool) { + if o == nil || IsNil(o.Avatar) { + return nil, false + } + return o.Avatar, true +} + +// HasAvatar returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleNamespaceMetadata) HasAvatar() bool { + if o != nil && !IsNil(o.Avatar) { + return true + } + + return false +} + +// SetAvatar gets a reference to the given *os.File and assigns it to the Avatar field. +func (o *PatchedansibleAnsibleNamespaceMetadata) SetAvatar(v *os.File) { + o.Avatar = &v +} + +func (o PatchedansibleAnsibleNamespaceMetadata) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedansibleAnsibleNamespaceMetadata) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Company) { + toSerialize["company"] = o.Company + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Resources) { + toSerialize["resources"] = o.Resources + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Avatar) { + toSerialize["avatar"] = o.Avatar + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedansibleAnsibleNamespaceMetadata) UnmarshalJSON(bytes []byte) (err error) { + varPatchedansibleAnsibleNamespaceMetadata := _PatchedansibleAnsibleNamespaceMetadata{} + + if err = json.Unmarshal(bytes, &varPatchedansibleAnsibleNamespaceMetadata); err == nil { + *o = PatchedansibleAnsibleNamespaceMetadata(varPatchedansibleAnsibleNamespaceMetadata) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "company") + delete(additionalProperties, "email") + delete(additionalProperties, "description") + delete(additionalProperties, "resources") + delete(additionalProperties, "links") + delete(additionalProperties, "avatar") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedansibleAnsibleNamespaceMetadata struct { + value *PatchedansibleAnsibleNamespaceMetadata + isSet bool +} + +func (v NullablePatchedansibleAnsibleNamespaceMetadata) Get() *PatchedansibleAnsibleNamespaceMetadata { + return v.value +} + +func (v *NullablePatchedansibleAnsibleNamespaceMetadata) Set(val *PatchedansibleAnsibleNamespaceMetadata) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedansibleAnsibleNamespaceMetadata) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedansibleAnsibleNamespaceMetadata) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedansibleAnsibleNamespaceMetadata(val *PatchedansibleAnsibleNamespaceMetadata) *NullablePatchedansibleAnsibleNamespaceMetadata { + return &NullablePatchedansibleAnsibleNamespaceMetadata{value: val, isSet: true} +} + +func (v NullablePatchedansibleAnsibleNamespaceMetadata) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedansibleAnsibleNamespaceMetadata) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_ansible_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_ansible_repository.go new file mode 100644 index 0000000000..1362a46e57 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_ansible_repository.go @@ -0,0 +1,468 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the PatchedansibleAnsibleRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedansibleAnsibleRepository{} + +// PatchedansibleAnsibleRepository Serializer for Ansible Repositories. +type PatchedansibleAnsibleRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // Last synced metadata time. + LastSyncedMetadataTime NullableTime `json:"last_synced_metadata_time,omitempty"` + // Gpg public key to verify collection signatures against + Gpgkey NullableString `json:"gpgkey,omitempty"` + Private *bool `json:"private,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedansibleAnsibleRepository PatchedansibleAnsibleRepository + +// NewPatchedansibleAnsibleRepository instantiates a new PatchedansibleAnsibleRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedansibleAnsibleRepository() *PatchedansibleAnsibleRepository { + this := PatchedansibleAnsibleRepository{} + return &this +} + +// NewPatchedansibleAnsibleRepositoryWithDefaults instantiates a new PatchedansibleAnsibleRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedansibleAnsibleRepositoryWithDefaults() *PatchedansibleAnsibleRepository { + this := PatchedansibleAnsibleRepository{} + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedansibleAnsibleRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleAnsibleRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedansibleAnsibleRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedansibleAnsibleRepository) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleAnsibleRepository) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleRepository) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedansibleAnsibleRepository) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleAnsibleRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleAnsibleRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedansibleAnsibleRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedansibleAnsibleRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedansibleAnsibleRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleAnsibleRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleAnsibleRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *PatchedansibleAnsibleRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *PatchedansibleAnsibleRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *PatchedansibleAnsibleRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleAnsibleRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleAnsibleRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PatchedansibleAnsibleRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PatchedansibleAnsibleRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PatchedansibleAnsibleRepository) UnsetRemote() { + o.Remote.Unset() +} + +// GetLastSyncedMetadataTime returns the LastSyncedMetadataTime field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleAnsibleRepository) GetLastSyncedMetadataTime() time.Time { + if o == nil || IsNil(o.LastSyncedMetadataTime.Get()) { + var ret time.Time + return ret + } + return *o.LastSyncedMetadataTime.Get() +} + +// GetLastSyncedMetadataTimeOk returns a tuple with the LastSyncedMetadataTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleAnsibleRepository) GetLastSyncedMetadataTimeOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastSyncedMetadataTime.Get(), o.LastSyncedMetadataTime.IsSet() +} + +// HasLastSyncedMetadataTime returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleRepository) HasLastSyncedMetadataTime() bool { + if o != nil && o.LastSyncedMetadataTime.IsSet() { + return true + } + + return false +} + +// SetLastSyncedMetadataTime gets a reference to the given NullableTime and assigns it to the LastSyncedMetadataTime field. +func (o *PatchedansibleAnsibleRepository) SetLastSyncedMetadataTime(v time.Time) { + o.LastSyncedMetadataTime.Set(&v) +} +// SetLastSyncedMetadataTimeNil sets the value for LastSyncedMetadataTime to be an explicit nil +func (o *PatchedansibleAnsibleRepository) SetLastSyncedMetadataTimeNil() { + o.LastSyncedMetadataTime.Set(nil) +} + +// UnsetLastSyncedMetadataTime ensures that no value is present for LastSyncedMetadataTime, not even an explicit nil +func (o *PatchedansibleAnsibleRepository) UnsetLastSyncedMetadataTime() { + o.LastSyncedMetadataTime.Unset() +} + +// GetGpgkey returns the Gpgkey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleAnsibleRepository) GetGpgkey() string { + if o == nil || IsNil(o.Gpgkey.Get()) { + var ret string + return ret + } + return *o.Gpgkey.Get() +} + +// GetGpgkeyOk returns a tuple with the Gpgkey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleAnsibleRepository) GetGpgkeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Gpgkey.Get(), o.Gpgkey.IsSet() +} + +// HasGpgkey returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleRepository) HasGpgkey() bool { + if o != nil && o.Gpgkey.IsSet() { + return true + } + + return false +} + +// SetGpgkey gets a reference to the given NullableString and assigns it to the Gpgkey field. +func (o *PatchedansibleAnsibleRepository) SetGpgkey(v string) { + o.Gpgkey.Set(&v) +} +// SetGpgkeyNil sets the value for Gpgkey to be an explicit nil +func (o *PatchedansibleAnsibleRepository) SetGpgkeyNil() { + o.Gpgkey.Set(nil) +} + +// UnsetGpgkey ensures that no value is present for Gpgkey, not even an explicit nil +func (o *PatchedansibleAnsibleRepository) UnsetGpgkey() { + o.Gpgkey.Unset() +} + +// GetPrivate returns the Private field value if set, zero value otherwise. +func (o *PatchedansibleAnsibleRepository) GetPrivate() bool { + if o == nil || IsNil(o.Private) { + var ret bool + return ret + } + return *o.Private +} + +// GetPrivateOk returns a tuple with the Private field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleAnsibleRepository) GetPrivateOk() (*bool, bool) { + if o == nil || IsNil(o.Private) { + return nil, false + } + return o.Private, true +} + +// HasPrivate returns a boolean if a field has been set. +func (o *PatchedansibleAnsibleRepository) HasPrivate() bool { + if o != nil && !IsNil(o.Private) { + return true + } + + return false +} + +// SetPrivate gets a reference to the given bool and assigns it to the Private field. +func (o *PatchedansibleAnsibleRepository) SetPrivate(v bool) { + o.Private = &v +} + +func (o PatchedansibleAnsibleRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedansibleAnsibleRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if o.LastSyncedMetadataTime.IsSet() { + toSerialize["last_synced_metadata_time"] = o.LastSyncedMetadataTime.Get() + } + if o.Gpgkey.IsSet() { + toSerialize["gpgkey"] = o.Gpgkey.Get() + } + if !IsNil(o.Private) { + toSerialize["private"] = o.Private + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedansibleAnsibleRepository) UnmarshalJSON(bytes []byte) (err error) { + varPatchedansibleAnsibleRepository := _PatchedansibleAnsibleRepository{} + + if err = json.Unmarshal(bytes, &varPatchedansibleAnsibleRepository); err == nil { + *o = PatchedansibleAnsibleRepository(varPatchedansibleAnsibleRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "last_synced_metadata_time") + delete(additionalProperties, "gpgkey") + delete(additionalProperties, "private") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedansibleAnsibleRepository struct { + value *PatchedansibleAnsibleRepository + isSet bool +} + +func (v NullablePatchedansibleAnsibleRepository) Get() *PatchedansibleAnsibleRepository { + return v.value +} + +func (v *NullablePatchedansibleAnsibleRepository) Set(val *PatchedansibleAnsibleRepository) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedansibleAnsibleRepository) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedansibleAnsibleRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedansibleAnsibleRepository(val *PatchedansibleAnsibleRepository) *NullablePatchedansibleAnsibleRepository { + return &NullablePatchedansibleAnsibleRepository{value: val, isSet: true} +} + +func (v NullablePatchedansibleAnsibleRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedansibleAnsibleRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_collection_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_collection_remote.go new file mode 100644 index 0000000000..3f1be6542f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_collection_remote.go @@ -0,0 +1,1293 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedansibleCollectionRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedansibleCollectionRemote{} + +// PatchedansibleCollectionRemote A serializer for Collection Remotes. +type PatchedansibleCollectionRemote struct { + // A unique name for this remote. + Name *string `json:"name,omitempty"` + // The URL of an external content source. + Url *string `json:"url,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *PolicyDb6Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // The string version of Collection requirements yaml. + RequirementsFile NullableString `json:"requirements_file,omitempty"` + // The URL to receive a session token from, e.g. used with Automation Hub. + AuthUrl NullableString `json:"auth_url,omitempty"` + // The token key to use for authentication. See https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#configuring-the-ansible-galaxy-clientfor more details + Token NullableString `json:"token,omitempty"` + // Sync dependencies for collections specified via requirements file + SyncDependencies *bool `json:"sync_dependencies,omitempty"` + // Sync only collections that have a signature + SignedOnly *bool `json:"signed_only,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedansibleCollectionRemote PatchedansibleCollectionRemote + +// NewPatchedansibleCollectionRemote instantiates a new PatchedansibleCollectionRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedansibleCollectionRemote() *PatchedansibleCollectionRemote { + this := PatchedansibleCollectionRemote{} + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + var syncDependencies bool = true + this.SyncDependencies = &syncDependencies + var signedOnly bool = false + this.SignedOnly = &signedOnly + return &this +} + +// NewPatchedansibleCollectionRemoteWithDefaults instantiates a new PatchedansibleCollectionRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedansibleCollectionRemoteWithDefaults() *PatchedansibleCollectionRemote { + this := PatchedansibleCollectionRemote{} + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + var syncDependencies bool = true + this.SyncDependencies = &syncDependencies + var signedOnly bool = false + this.SignedOnly = &signedOnly + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedansibleCollectionRemote) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleCollectionRemote) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedansibleCollectionRemote) SetName(v string) { + o.Name = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PatchedansibleCollectionRemote) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleCollectionRemote) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PatchedansibleCollectionRemote) SetUrl(v string) { + o.Url = &v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PatchedansibleCollectionRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PatchedansibleCollectionRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PatchedansibleCollectionRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PatchedansibleCollectionRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleCollectionRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PatchedansibleCollectionRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PatchedansibleCollectionRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *PatchedansibleCollectionRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *PatchedansibleCollectionRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *PatchedansibleCollectionRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PatchedansibleCollectionRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedansibleCollectionRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleCollectionRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedansibleCollectionRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PatchedansibleCollectionRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PatchedansibleCollectionRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PatchedansibleCollectionRemote) GetPolicy() PolicyDb6Enum { + if o == nil || IsNil(o.Policy) { + var ret PolicyDb6Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleCollectionRemote) GetPolicyOk() (*PolicyDb6Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given PolicyDb6Enum and assigns it to the Policy field. +func (o *PatchedansibleCollectionRemote) SetPolicy(v PolicyDb6Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PatchedansibleCollectionRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PatchedansibleCollectionRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PatchedansibleCollectionRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PatchedansibleCollectionRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PatchedansibleCollectionRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleCollectionRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PatchedansibleCollectionRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PatchedansibleCollectionRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetRequirementsFile returns the RequirementsFile field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetRequirementsFile() string { + if o == nil || IsNil(o.RequirementsFile.Get()) { + var ret string + return ret + } + return *o.RequirementsFile.Get() +} + +// GetRequirementsFileOk returns a tuple with the RequirementsFile field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetRequirementsFileOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RequirementsFile.Get(), o.RequirementsFile.IsSet() +} + +// HasRequirementsFile returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasRequirementsFile() bool { + if o != nil && o.RequirementsFile.IsSet() { + return true + } + + return false +} + +// SetRequirementsFile gets a reference to the given NullableString and assigns it to the RequirementsFile field. +func (o *PatchedansibleCollectionRemote) SetRequirementsFile(v string) { + o.RequirementsFile.Set(&v) +} +// SetRequirementsFileNil sets the value for RequirementsFile to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetRequirementsFileNil() { + o.RequirementsFile.Set(nil) +} + +// UnsetRequirementsFile ensures that no value is present for RequirementsFile, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetRequirementsFile() { + o.RequirementsFile.Unset() +} + +// GetAuthUrl returns the AuthUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetAuthUrl() string { + if o == nil || IsNil(o.AuthUrl.Get()) { + var ret string + return ret + } + return *o.AuthUrl.Get() +} + +// GetAuthUrlOk returns a tuple with the AuthUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetAuthUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.AuthUrl.Get(), o.AuthUrl.IsSet() +} + +// HasAuthUrl returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasAuthUrl() bool { + if o != nil && o.AuthUrl.IsSet() { + return true + } + + return false +} + +// SetAuthUrl gets a reference to the given NullableString and assigns it to the AuthUrl field. +func (o *PatchedansibleCollectionRemote) SetAuthUrl(v string) { + o.AuthUrl.Set(&v) +} +// SetAuthUrlNil sets the value for AuthUrl to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetAuthUrlNil() { + o.AuthUrl.Set(nil) +} + +// UnsetAuthUrl ensures that no value is present for AuthUrl, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetAuthUrl() { + o.AuthUrl.Unset() +} + +// GetToken returns the Token field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleCollectionRemote) GetToken() string { + if o == nil || IsNil(o.Token.Get()) { + var ret string + return ret + } + return *o.Token.Get() +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleCollectionRemote) GetTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Token.Get(), o.Token.IsSet() +} + +// HasToken returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasToken() bool { + if o != nil && o.Token.IsSet() { + return true + } + + return false +} + +// SetToken gets a reference to the given NullableString and assigns it to the Token field. +func (o *PatchedansibleCollectionRemote) SetToken(v string) { + o.Token.Set(&v) +} +// SetTokenNil sets the value for Token to be an explicit nil +func (o *PatchedansibleCollectionRemote) SetTokenNil() { + o.Token.Set(nil) +} + +// UnsetToken ensures that no value is present for Token, not even an explicit nil +func (o *PatchedansibleCollectionRemote) UnsetToken() { + o.Token.Unset() +} + +// GetSyncDependencies returns the SyncDependencies field value if set, zero value otherwise. +func (o *PatchedansibleCollectionRemote) GetSyncDependencies() bool { + if o == nil || IsNil(o.SyncDependencies) { + var ret bool + return ret + } + return *o.SyncDependencies +} + +// GetSyncDependenciesOk returns a tuple with the SyncDependencies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleCollectionRemote) GetSyncDependenciesOk() (*bool, bool) { + if o == nil || IsNil(o.SyncDependencies) { + return nil, false + } + return o.SyncDependencies, true +} + +// HasSyncDependencies returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasSyncDependencies() bool { + if o != nil && !IsNil(o.SyncDependencies) { + return true + } + + return false +} + +// SetSyncDependencies gets a reference to the given bool and assigns it to the SyncDependencies field. +func (o *PatchedansibleCollectionRemote) SetSyncDependencies(v bool) { + o.SyncDependencies = &v +} + +// GetSignedOnly returns the SignedOnly field value if set, zero value otherwise. +func (o *PatchedansibleCollectionRemote) GetSignedOnly() bool { + if o == nil || IsNil(o.SignedOnly) { + var ret bool + return ret + } + return *o.SignedOnly +} + +// GetSignedOnlyOk returns a tuple with the SignedOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleCollectionRemote) GetSignedOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.SignedOnly) { + return nil, false + } + return o.SignedOnly, true +} + +// HasSignedOnly returns a boolean if a field has been set. +func (o *PatchedansibleCollectionRemote) HasSignedOnly() bool { + if o != nil && !IsNil(o.SignedOnly) { + return true + } + + return false +} + +// SetSignedOnly gets a reference to the given bool and assigns it to the SignedOnly field. +func (o *PatchedansibleCollectionRemote) SetSignedOnly(v bool) { + o.SignedOnly = &v +} + +func (o PatchedansibleCollectionRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedansibleCollectionRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if o.RequirementsFile.IsSet() { + toSerialize["requirements_file"] = o.RequirementsFile.Get() + } + if o.AuthUrl.IsSet() { + toSerialize["auth_url"] = o.AuthUrl.Get() + } + if o.Token.IsSet() { + toSerialize["token"] = o.Token.Get() + } + if !IsNil(o.SyncDependencies) { + toSerialize["sync_dependencies"] = o.SyncDependencies + } + if !IsNil(o.SignedOnly) { + toSerialize["signed_only"] = o.SignedOnly + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedansibleCollectionRemote) UnmarshalJSON(bytes []byte) (err error) { + varPatchedansibleCollectionRemote := _PatchedansibleCollectionRemote{} + + if err = json.Unmarshal(bytes, &varPatchedansibleCollectionRemote); err == nil { + *o = PatchedansibleCollectionRemote(varPatchedansibleCollectionRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "requirements_file") + delete(additionalProperties, "auth_url") + delete(additionalProperties, "token") + delete(additionalProperties, "sync_dependencies") + delete(additionalProperties, "signed_only") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedansibleCollectionRemote struct { + value *PatchedansibleCollectionRemote + isSet bool +} + +func (v NullablePatchedansibleCollectionRemote) Get() *PatchedansibleCollectionRemote { + return v.value +} + +func (v *NullablePatchedansibleCollectionRemote) Set(val *PatchedansibleCollectionRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedansibleCollectionRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedansibleCollectionRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedansibleCollectionRemote(val *PatchedansibleCollectionRemote) *NullablePatchedansibleCollectionRemote { + return &NullablePatchedansibleCollectionRemote{value: val, isSet: true} +} + +func (v NullablePatchedansibleCollectionRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedansibleCollectionRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_git_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_git_remote.go new file mode 100644 index 0000000000..1c87fe3f32 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_git_remote.go @@ -0,0 +1,1100 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedansibleGitRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedansibleGitRemote{} + +// PatchedansibleGitRemote A serializer for Git Collection Remotes. +type PatchedansibleGitRemote struct { + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // The URL of an external content source. + Url *string `json:"url,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // A unique name for this remote. + Name *string `json:"name,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // If True, only metadata about the content will be stored in Pulp. Clients will retrieve content from the remote URL. + MetadataOnly *bool `json:"metadata_only,omitempty"` + // A git ref. e.g.: branch, tag, or commit sha. + GitRef *string `json:"git_ref,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedansibleGitRemote PatchedansibleGitRemote + +// NewPatchedansibleGitRemote instantiates a new PatchedansibleGitRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedansibleGitRemote() *PatchedansibleGitRemote { + this := PatchedansibleGitRemote{} + return &this +} + +// NewPatchedansibleGitRemoteWithDefaults instantiates a new PatchedansibleGitRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedansibleGitRemoteWithDefaults() *PatchedansibleGitRemote { + this := PatchedansibleGitRemote{} + return &this +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PatchedansibleGitRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleGitRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PatchedansibleGitRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PatchedansibleGitRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleGitRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PatchedansibleGitRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *PatchedansibleGitRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *PatchedansibleGitRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedansibleGitRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleGitRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedansibleGitRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PatchedansibleGitRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PatchedansibleGitRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PatchedansibleGitRemote) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleGitRemote) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PatchedansibleGitRemote) SetUrl(v string) { + o.Url = &v +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PatchedansibleGitRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PatchedansibleGitRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PatchedansibleGitRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PatchedansibleGitRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PatchedansibleGitRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PatchedansibleGitRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PatchedansibleGitRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PatchedansibleGitRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *PatchedansibleGitRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *PatchedansibleGitRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PatchedansibleGitRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PatchedansibleGitRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PatchedansibleGitRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PatchedansibleGitRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PatchedansibleGitRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PatchedansibleGitRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PatchedansibleGitRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PatchedansibleGitRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PatchedansibleGitRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PatchedansibleGitRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedansibleGitRemote) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleGitRemote) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedansibleGitRemote) SetName(v string) { + o.Name = &v +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PatchedansibleGitRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PatchedansibleGitRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *PatchedansibleGitRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *PatchedansibleGitRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleGitRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleGitRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PatchedansibleGitRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PatchedansibleGitRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PatchedansibleGitRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMetadataOnly returns the MetadataOnly field value if set, zero value otherwise. +func (o *PatchedansibleGitRemote) GetMetadataOnly() bool { + if o == nil || IsNil(o.MetadataOnly) { + var ret bool + return ret + } + return *o.MetadataOnly +} + +// GetMetadataOnlyOk returns a tuple with the MetadataOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleGitRemote) GetMetadataOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.MetadataOnly) { + return nil, false + } + return o.MetadataOnly, true +} + +// HasMetadataOnly returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasMetadataOnly() bool { + if o != nil && !IsNil(o.MetadataOnly) { + return true + } + + return false +} + +// SetMetadataOnly gets a reference to the given bool and assigns it to the MetadataOnly field. +func (o *PatchedansibleGitRemote) SetMetadataOnly(v bool) { + o.MetadataOnly = &v +} + +// GetGitRef returns the GitRef field value if set, zero value otherwise. +func (o *PatchedansibleGitRemote) GetGitRef() string { + if o == nil || IsNil(o.GitRef) { + var ret string + return ret + } + return *o.GitRef +} + +// GetGitRefOk returns a tuple with the GitRef field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleGitRemote) GetGitRefOk() (*string, bool) { + if o == nil || IsNil(o.GitRef) { + return nil, false + } + return o.GitRef, true +} + +// HasGitRef returns a boolean if a field has been set. +func (o *PatchedansibleGitRemote) HasGitRef() bool { + if o != nil && !IsNil(o.GitRef) { + return true + } + + return false +} + +// SetGitRef gets a reference to the given string and assigns it to the GitRef field. +func (o *PatchedansibleGitRemote) SetGitRef(v string) { + o.GitRef = &v +} + +func (o PatchedansibleGitRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedansibleGitRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if !IsNil(o.MetadataOnly) { + toSerialize["metadata_only"] = o.MetadataOnly + } + if !IsNil(o.GitRef) { + toSerialize["git_ref"] = o.GitRef + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedansibleGitRemote) UnmarshalJSON(bytes []byte) (err error) { + varPatchedansibleGitRemote := _PatchedansibleGitRemote{} + + if err = json.Unmarshal(bytes, &varPatchedansibleGitRemote); err == nil { + *o = PatchedansibleGitRemote(varPatchedansibleGitRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "headers") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "url") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "username") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "password") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "name") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "metadata_only") + delete(additionalProperties, "git_ref") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedansibleGitRemote struct { + value *PatchedansibleGitRemote + isSet bool +} + +func (v NullablePatchedansibleGitRemote) Get() *PatchedansibleGitRemote { + return v.value +} + +func (v *NullablePatchedansibleGitRemote) Set(val *PatchedansibleGitRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedansibleGitRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedansibleGitRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedansibleGitRemote(val *PatchedansibleGitRemote) *NullablePatchedansibleGitRemote { + return &NullablePatchedansibleGitRemote{value: val, isSet: true} +} + +func (v NullablePatchedansibleGitRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedansibleGitRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_role_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_role_remote.go new file mode 100644 index 0000000000..c7a55715a0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedansible_role_remote.go @@ -0,0 +1,1065 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedansibleRoleRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedansibleRoleRemote{} + +// PatchedansibleRoleRemote A serializer for Ansible Remotes. +type PatchedansibleRoleRemote struct { + // A unique name for this remote. + Name *string `json:"name,omitempty"` + // The URL of an external content source. + Url *string `json:"url,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *PolicyDb6Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedansibleRoleRemote PatchedansibleRoleRemote + +// NewPatchedansibleRoleRemote instantiates a new PatchedansibleRoleRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedansibleRoleRemote() *PatchedansibleRoleRemote { + this := PatchedansibleRoleRemote{} + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewPatchedansibleRoleRemoteWithDefaults instantiates a new PatchedansibleRoleRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedansibleRoleRemoteWithDefaults() *PatchedansibleRoleRemote { + this := PatchedansibleRoleRemote{} + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedansibleRoleRemote) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleRoleRemote) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedansibleRoleRemote) SetName(v string) { + o.Name = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PatchedansibleRoleRemote) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleRoleRemote) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PatchedansibleRoleRemote) SetUrl(v string) { + o.Url = &v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PatchedansibleRoleRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PatchedansibleRoleRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PatchedansibleRoleRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PatchedansibleRoleRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PatchedansibleRoleRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PatchedansibleRoleRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PatchedansibleRoleRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleRoleRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PatchedansibleRoleRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PatchedansibleRoleRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PatchedansibleRoleRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *PatchedansibleRoleRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *PatchedansibleRoleRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *PatchedansibleRoleRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *PatchedansibleRoleRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *PatchedansibleRoleRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *PatchedansibleRoleRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PatchedansibleRoleRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PatchedansibleRoleRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedansibleRoleRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleRoleRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedansibleRoleRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PatchedansibleRoleRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PatchedansibleRoleRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PatchedansibleRoleRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PatchedansibleRoleRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PatchedansibleRoleRemote) GetPolicy() PolicyDb6Enum { + if o == nil || IsNil(o.Policy) { + var ret PolicyDb6Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleRoleRemote) GetPolicyOk() (*PolicyDb6Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given PolicyDb6Enum and assigns it to the Policy field. +func (o *PatchedansibleRoleRemote) SetPolicy(v PolicyDb6Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PatchedansibleRoleRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PatchedansibleRoleRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PatchedansibleRoleRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PatchedansibleRoleRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PatchedansibleRoleRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PatchedansibleRoleRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PatchedansibleRoleRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PatchedansibleRoleRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PatchedansibleRoleRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedansibleRoleRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PatchedansibleRoleRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedansibleRoleRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedansibleRoleRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PatchedansibleRoleRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PatchedansibleRoleRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PatchedansibleRoleRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PatchedansibleRoleRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +func (o PatchedansibleRoleRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedansibleRoleRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedansibleRoleRemote) UnmarshalJSON(bytes []byte) (err error) { + varPatchedansibleRoleRemote := _PatchedansibleRoleRemote{} + + if err = json.Unmarshal(bytes, &varPatchedansibleRoleRemote); err == nil { + *o = PatchedansibleRoleRemote(varPatchedansibleRoleRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedansibleRoleRemote struct { + value *PatchedansibleRoleRemote + isSet bool +} + +func (v NullablePatchedansibleRoleRemote) Get() *PatchedansibleRoleRemote { + return v.value +} + +func (v *NullablePatchedansibleRoleRemote) Set(val *PatchedansibleRoleRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedansibleRoleRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedansibleRoleRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedansibleRoleRemote(val *PatchedansibleRoleRemote) *NullablePatchedansibleRoleRemote { + return &NullablePatchedansibleRoleRemote{value: val, isSet: true} +} + +func (v NullablePatchedansibleRoleRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedansibleRoleRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcertguard_rhsm_cert_guard.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcertguard_rhsm_cert_guard.go new file mode 100644 index 0000000000..2f0c7f8793 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcertguard_rhsm_cert_guard.go @@ -0,0 +1,239 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedcertguardRHSMCertGuard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedcertguardRHSMCertGuard{} + +// PatchedcertguardRHSMCertGuard RHSM Content Guard Serializer. +type PatchedcertguardRHSMCertGuard struct { + // The unique name. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // A Certificate Authority (CA) certificate (or a bundle thereof) used to verify client-certificate authenticity. + CaCertificate *string `json:"ca_certificate,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedcertguardRHSMCertGuard PatchedcertguardRHSMCertGuard + +// NewPatchedcertguardRHSMCertGuard instantiates a new PatchedcertguardRHSMCertGuard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedcertguardRHSMCertGuard() *PatchedcertguardRHSMCertGuard { + this := PatchedcertguardRHSMCertGuard{} + return &this +} + +// NewPatchedcertguardRHSMCertGuardWithDefaults instantiates a new PatchedcertguardRHSMCertGuard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedcertguardRHSMCertGuardWithDefaults() *PatchedcertguardRHSMCertGuard { + this := PatchedcertguardRHSMCertGuard{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedcertguardRHSMCertGuard) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcertguardRHSMCertGuard) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedcertguardRHSMCertGuard) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedcertguardRHSMCertGuard) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcertguardRHSMCertGuard) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcertguardRHSMCertGuard) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedcertguardRHSMCertGuard) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedcertguardRHSMCertGuard) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedcertguardRHSMCertGuard) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedcertguardRHSMCertGuard) UnsetDescription() { + o.Description.Unset() +} + +// GetCaCertificate returns the CaCertificate field value if set, zero value otherwise. +func (o *PatchedcertguardRHSMCertGuard) GetCaCertificate() string { + if o == nil || IsNil(o.CaCertificate) { + var ret string + return ret + } + return *o.CaCertificate +} + +// GetCaCertificateOk returns a tuple with the CaCertificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcertguardRHSMCertGuard) GetCaCertificateOk() (*string, bool) { + if o == nil || IsNil(o.CaCertificate) { + return nil, false + } + return o.CaCertificate, true +} + +// HasCaCertificate returns a boolean if a field has been set. +func (o *PatchedcertguardRHSMCertGuard) HasCaCertificate() bool { + if o != nil && !IsNil(o.CaCertificate) { + return true + } + + return false +} + +// SetCaCertificate gets a reference to the given string and assigns it to the CaCertificate field. +func (o *PatchedcertguardRHSMCertGuard) SetCaCertificate(v string) { + o.CaCertificate = &v +} + +func (o PatchedcertguardRHSMCertGuard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedcertguardRHSMCertGuard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.CaCertificate) { + toSerialize["ca_certificate"] = o.CaCertificate + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedcertguardRHSMCertGuard) UnmarshalJSON(bytes []byte) (err error) { + varPatchedcertguardRHSMCertGuard := _PatchedcertguardRHSMCertGuard{} + + if err = json.Unmarshal(bytes, &varPatchedcertguardRHSMCertGuard); err == nil { + *o = PatchedcertguardRHSMCertGuard(varPatchedcertguardRHSMCertGuard) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "ca_certificate") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedcertguardRHSMCertGuard struct { + value *PatchedcertguardRHSMCertGuard + isSet bool +} + +func (v NullablePatchedcertguardRHSMCertGuard) Get() *PatchedcertguardRHSMCertGuard { + return v.value +} + +func (v *NullablePatchedcertguardRHSMCertGuard) Set(val *PatchedcertguardRHSMCertGuard) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedcertguardRHSMCertGuard) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedcertguardRHSMCertGuard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedcertguardRHSMCertGuard(val *PatchedcertguardRHSMCertGuard) *NullablePatchedcertguardRHSMCertGuard { + return &NullablePatchedcertguardRHSMCertGuard{value: val, isSet: true} +} + +func (v NullablePatchedcertguardRHSMCertGuard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedcertguardRHSMCertGuard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcertguard_x509_cert_guard.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcertguard_x509_cert_guard.go new file mode 100644 index 0000000000..59811403fb --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcertguard_x509_cert_guard.go @@ -0,0 +1,239 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedcertguardX509CertGuard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedcertguardX509CertGuard{} + +// PatchedcertguardX509CertGuard X.509 Content Guard Serializer. +type PatchedcertguardX509CertGuard struct { + // The unique name. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // A Certificate Authority (CA) certificate (or a bundle thereof) used to verify client-certificate authenticity. + CaCertificate *string `json:"ca_certificate,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedcertguardX509CertGuard PatchedcertguardX509CertGuard + +// NewPatchedcertguardX509CertGuard instantiates a new PatchedcertguardX509CertGuard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedcertguardX509CertGuard() *PatchedcertguardX509CertGuard { + this := PatchedcertguardX509CertGuard{} + return &this +} + +// NewPatchedcertguardX509CertGuardWithDefaults instantiates a new PatchedcertguardX509CertGuard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedcertguardX509CertGuardWithDefaults() *PatchedcertguardX509CertGuard { + this := PatchedcertguardX509CertGuard{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedcertguardX509CertGuard) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcertguardX509CertGuard) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedcertguardX509CertGuard) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedcertguardX509CertGuard) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcertguardX509CertGuard) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcertguardX509CertGuard) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedcertguardX509CertGuard) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedcertguardX509CertGuard) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedcertguardX509CertGuard) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedcertguardX509CertGuard) UnsetDescription() { + o.Description.Unset() +} + +// GetCaCertificate returns the CaCertificate field value if set, zero value otherwise. +func (o *PatchedcertguardX509CertGuard) GetCaCertificate() string { + if o == nil || IsNil(o.CaCertificate) { + var ret string + return ret + } + return *o.CaCertificate +} + +// GetCaCertificateOk returns a tuple with the CaCertificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcertguardX509CertGuard) GetCaCertificateOk() (*string, bool) { + if o == nil || IsNil(o.CaCertificate) { + return nil, false + } + return o.CaCertificate, true +} + +// HasCaCertificate returns a boolean if a field has been set. +func (o *PatchedcertguardX509CertGuard) HasCaCertificate() bool { + if o != nil && !IsNil(o.CaCertificate) { + return true + } + + return false +} + +// SetCaCertificate gets a reference to the given string and assigns it to the CaCertificate field. +func (o *PatchedcertguardX509CertGuard) SetCaCertificate(v string) { + o.CaCertificate = &v +} + +func (o PatchedcertguardX509CertGuard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedcertguardX509CertGuard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.CaCertificate) { + toSerialize["ca_certificate"] = o.CaCertificate + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedcertguardX509CertGuard) UnmarshalJSON(bytes []byte) (err error) { + varPatchedcertguardX509CertGuard := _PatchedcertguardX509CertGuard{} + + if err = json.Unmarshal(bytes, &varPatchedcertguardX509CertGuard); err == nil { + *o = PatchedcertguardX509CertGuard(varPatchedcertguardX509CertGuard) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "ca_certificate") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedcertguardX509CertGuard struct { + value *PatchedcertguardX509CertGuard + isSet bool +} + +func (v NullablePatchedcertguardX509CertGuard) Get() *PatchedcertguardX509CertGuard { + return v.value +} + +func (v *NullablePatchedcertguardX509CertGuard) Set(val *PatchedcertguardX509CertGuard) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedcertguardX509CertGuard) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedcertguardX509CertGuard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedcertguardX509CertGuard(val *PatchedcertguardX509CertGuard) *NullablePatchedcertguardX509CertGuard { + return &NullablePatchedcertguardX509CertGuard{value: val, isSet: true} +} + +func (v NullablePatchedcertguardX509CertGuard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedcertguardX509CertGuard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_distribution.go new file mode 100644 index 0000000000..f51e571349 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_distribution.go @@ -0,0 +1,490 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedcontainerContainerDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedcontainerContainerDistribution{} + +// PatchedcontainerContainerDistribution A serializer for ContainerDistribution. +type PatchedcontainerContainerDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath *string `json:"base_path,omitempty"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name *string `json:"name,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // An optional content-guard. If none is specified, a default one will be used. + ContentGuard *string `json:"content_guard,omitempty"` + // RepositoryVersion to be served + RepositoryVersion NullableString `json:"repository_version,omitempty"` + // Restrict pull access to explicitly authorized users. Defaults to unrestricted pull access. + Private *bool `json:"private,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedcontainerContainerDistribution PatchedcontainerContainerDistribution + +// NewPatchedcontainerContainerDistribution instantiates a new PatchedcontainerContainerDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedcontainerContainerDistribution() *PatchedcontainerContainerDistribution { + this := PatchedcontainerContainerDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// NewPatchedcontainerContainerDistributionWithDefaults instantiates a new PatchedcontainerContainerDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedcontainerContainerDistributionWithDefaults() *PatchedcontainerContainerDistribution { + this := PatchedcontainerContainerDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value if set, zero value otherwise. +func (o *PatchedcontainerContainerDistribution) GetBasePath() string { + if o == nil || IsNil(o.BasePath) { + var ret string + return ret + } + return *o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerDistribution) GetBasePathOk() (*string, bool) { + if o == nil || IsNil(o.BasePath) { + return nil, false + } + return o.BasePath, true +} + +// HasBasePath returns a boolean if a field has been set. +func (o *PatchedcontainerContainerDistribution) HasBasePath() bool { + if o != nil && !IsNil(o.BasePath) { + return true + } + + return false +} + +// SetBasePath gets a reference to the given string and assigns it to the BasePath field. +func (o *PatchedcontainerContainerDistribution) SetBasePath(v string) { + o.BasePath = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *PatchedcontainerContainerDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *PatchedcontainerContainerDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *PatchedcontainerContainerDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *PatchedcontainerContainerDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedcontainerContainerDistribution) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerDistribution) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedcontainerContainerDistribution) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedcontainerContainerDistribution) SetName(v string) { + o.Name = &v +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *PatchedcontainerContainerDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *PatchedcontainerContainerDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *PatchedcontainerContainerDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedcontainerContainerDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedcontainerContainerDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedcontainerContainerDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise. +func (o *PatchedcontainerContainerDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard) { + var ret string + return ret + } + return *o.ContentGuard +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerDistribution) GetContentGuardOk() (*string, bool) { + if o == nil || IsNil(o.ContentGuard) { + return nil, false + } + return o.ContentGuard, true +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *PatchedcontainerContainerDistribution) HasContentGuard() bool { + if o != nil && !IsNil(o.ContentGuard) { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given string and assigns it to the ContentGuard field. +func (o *PatchedcontainerContainerDistribution) SetContentGuard(v string) { + o.ContentGuard = &v +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerDistribution) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion.Get()) { + var ret string + return ret + } + return *o.RepositoryVersion.Get() +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerDistribution) GetRepositoryVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RepositoryVersion.Get(), o.RepositoryVersion.IsSet() +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *PatchedcontainerContainerDistribution) HasRepositoryVersion() bool { + if o != nil && o.RepositoryVersion.IsSet() { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given NullableString and assigns it to the RepositoryVersion field. +func (o *PatchedcontainerContainerDistribution) SetRepositoryVersion(v string) { + o.RepositoryVersion.Set(&v) +} +// SetRepositoryVersionNil sets the value for RepositoryVersion to be an explicit nil +func (o *PatchedcontainerContainerDistribution) SetRepositoryVersionNil() { + o.RepositoryVersion.Set(nil) +} + +// UnsetRepositoryVersion ensures that no value is present for RepositoryVersion, not even an explicit nil +func (o *PatchedcontainerContainerDistribution) UnsetRepositoryVersion() { + o.RepositoryVersion.Unset() +} + +// GetPrivate returns the Private field value if set, zero value otherwise. +func (o *PatchedcontainerContainerDistribution) GetPrivate() bool { + if o == nil || IsNil(o.Private) { + var ret bool + return ret + } + return *o.Private +} + +// GetPrivateOk returns a tuple with the Private field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerDistribution) GetPrivateOk() (*bool, bool) { + if o == nil || IsNil(o.Private) { + return nil, false + } + return o.Private, true +} + +// HasPrivate returns a boolean if a field has been set. +func (o *PatchedcontainerContainerDistribution) HasPrivate() bool { + if o != nil && !IsNil(o.Private) { + return true + } + + return false +} + +// SetPrivate gets a reference to the given bool and assigns it to the Private field. +func (o *PatchedcontainerContainerDistribution) SetPrivate(v bool) { + o.Private = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerDistribution) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerDistribution) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedcontainerContainerDistribution) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedcontainerContainerDistribution) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedcontainerContainerDistribution) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedcontainerContainerDistribution) UnsetDescription() { + o.Description.Unset() +} + +func (o PatchedcontainerContainerDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedcontainerContainerDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasePath) { + toSerialize["base_path"] = o.BasePath + } + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.ContentGuard) { + toSerialize["content_guard"] = o.ContentGuard + } + if o.RepositoryVersion.IsSet() { + toSerialize["repository_version"] = o.RepositoryVersion.Get() + } + if !IsNil(o.Private) { + toSerialize["private"] = o.Private + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedcontainerContainerDistribution) UnmarshalJSON(bytes []byte) (err error) { + varPatchedcontainerContainerDistribution := _PatchedcontainerContainerDistribution{} + + if err = json.Unmarshal(bytes, &varPatchedcontainerContainerDistribution); err == nil { + *o = PatchedcontainerContainerDistribution(varPatchedcontainerContainerDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "repository") + delete(additionalProperties, "name") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "private") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedcontainerContainerDistribution struct { + value *PatchedcontainerContainerDistribution + isSet bool +} + +func (v NullablePatchedcontainerContainerDistribution) Get() *PatchedcontainerContainerDistribution { + return v.value +} + +func (v *NullablePatchedcontainerContainerDistribution) Set(val *PatchedcontainerContainerDistribution) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedcontainerContainerDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedcontainerContainerDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedcontainerContainerDistribution(val *PatchedcontainerContainerDistribution) *NullablePatchedcontainerContainerDistribution { + return &NullablePatchedcontainerContainerDistribution{value: val, isSet: true} +} + +func (v NullablePatchedcontainerContainerDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedcontainerContainerDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_push_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_push_repository.go new file mode 100644 index 0000000000..5a53f75e2d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_push_repository.go @@ -0,0 +1,334 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedcontainerContainerPushRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedcontainerContainerPushRepository{} + +// PatchedcontainerContainerPushRepository Serializer for Container Push Repositories. +type PatchedcontainerContainerPushRepository struct { + // A reference to an associated signing service. + ManifestSigningService NullableString `json:"manifest_signing_service,omitempty"` + // A unique name for this repository. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedcontainerContainerPushRepository PatchedcontainerContainerPushRepository + +// NewPatchedcontainerContainerPushRepository instantiates a new PatchedcontainerContainerPushRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedcontainerContainerPushRepository() *PatchedcontainerContainerPushRepository { + this := PatchedcontainerContainerPushRepository{} + return &this +} + +// NewPatchedcontainerContainerPushRepositoryWithDefaults instantiates a new PatchedcontainerContainerPushRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedcontainerContainerPushRepositoryWithDefaults() *PatchedcontainerContainerPushRepository { + this := PatchedcontainerContainerPushRepository{} + return &this +} + +// GetManifestSigningService returns the ManifestSigningService field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerPushRepository) GetManifestSigningService() string { + if o == nil || IsNil(o.ManifestSigningService.Get()) { + var ret string + return ret + } + return *o.ManifestSigningService.Get() +} + +// GetManifestSigningServiceOk returns a tuple with the ManifestSigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerPushRepository) GetManifestSigningServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ManifestSigningService.Get(), o.ManifestSigningService.IsSet() +} + +// HasManifestSigningService returns a boolean if a field has been set. +func (o *PatchedcontainerContainerPushRepository) HasManifestSigningService() bool { + if o != nil && o.ManifestSigningService.IsSet() { + return true + } + + return false +} + +// SetManifestSigningService gets a reference to the given NullableString and assigns it to the ManifestSigningService field. +func (o *PatchedcontainerContainerPushRepository) SetManifestSigningService(v string) { + o.ManifestSigningService.Set(&v) +} +// SetManifestSigningServiceNil sets the value for ManifestSigningService to be an explicit nil +func (o *PatchedcontainerContainerPushRepository) SetManifestSigningServiceNil() { + o.ManifestSigningService.Set(nil) +} + +// UnsetManifestSigningService ensures that no value is present for ManifestSigningService, not even an explicit nil +func (o *PatchedcontainerContainerPushRepository) UnsetManifestSigningService() { + o.ManifestSigningService.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedcontainerContainerPushRepository) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerPushRepository) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedcontainerContainerPushRepository) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedcontainerContainerPushRepository) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerPushRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerPushRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedcontainerContainerPushRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedcontainerContainerPushRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedcontainerContainerPushRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedcontainerContainerPushRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerPushRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerPushRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *PatchedcontainerContainerPushRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *PatchedcontainerContainerPushRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *PatchedcontainerContainerPushRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *PatchedcontainerContainerPushRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedcontainerContainerPushRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerPushRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedcontainerContainerPushRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedcontainerContainerPushRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +func (o PatchedcontainerContainerPushRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedcontainerContainerPushRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ManifestSigningService.IsSet() { + toSerialize["manifest_signing_service"] = o.ManifestSigningService.Get() + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedcontainerContainerPushRepository) UnmarshalJSON(bytes []byte) (err error) { + varPatchedcontainerContainerPushRepository := _PatchedcontainerContainerPushRepository{} + + if err = json.Unmarshal(bytes, &varPatchedcontainerContainerPushRepository); err == nil { + *o = PatchedcontainerContainerPushRepository(varPatchedcontainerContainerPushRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "manifest_signing_service") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "pulp_labels") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedcontainerContainerPushRepository struct { + value *PatchedcontainerContainerPushRepository + isSet bool +} + +func (v NullablePatchedcontainerContainerPushRepository) Get() *PatchedcontainerContainerPushRepository { + return v.value +} + +func (v *NullablePatchedcontainerContainerPushRepository) Set(val *PatchedcontainerContainerPushRepository) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedcontainerContainerPushRepository) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedcontainerContainerPushRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedcontainerContainerPushRepository(val *PatchedcontainerContainerPushRepository) *NullablePatchedcontainerContainerPushRepository { + return &NullablePatchedcontainerContainerPushRepository{value: val, isSet: true} +} + +func (v NullablePatchedcontainerContainerPushRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedcontainerContainerPushRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_remote.go new file mode 100644 index 0000000000..930a0721e1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_remote.go @@ -0,0 +1,1219 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedcontainerContainerRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedcontainerContainerRemote{} + +// PatchedcontainerContainerRemote A Serializer for ContainerRemote. +type PatchedcontainerContainerRemote struct { + // A unique name for this remote. + Name *string `json:"name,omitempty"` + // The URL of an external content source. + Url *string `json:"url,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // Name of the upstream repository + UpstreamName *string `json:"upstream_name,omitempty"` + // A list of tags to include during sync. Wildcards *, ? are recognized. 'include_tags' is evaluated before 'exclude_tags'. + IncludeTags []string `json:"include_tags,omitempty"` + // A list of tags to exclude during sync. Wildcards *, ? are recognized. 'exclude_tags' is evaluated after 'include_tags'. + ExcludeTags []string `json:"exclude_tags,omitempty"` + // A URL to a sigstore to download image signatures from + Sigstore *string `json:"sigstore,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedcontainerContainerRemote PatchedcontainerContainerRemote + +// NewPatchedcontainerContainerRemote instantiates a new PatchedcontainerContainerRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedcontainerContainerRemote() *PatchedcontainerContainerRemote { + this := PatchedcontainerContainerRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewPatchedcontainerContainerRemoteWithDefaults instantiates a new PatchedcontainerContainerRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedcontainerContainerRemoteWithDefaults() *PatchedcontainerContainerRemote { + this := PatchedcontainerContainerRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedcontainerContainerRemote) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerRemote) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedcontainerContainerRemote) SetName(v string) { + o.Name = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PatchedcontainerContainerRemote) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerRemote) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PatchedcontainerContainerRemote) SetUrl(v string) { + o.Url = &v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PatchedcontainerContainerRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PatchedcontainerContainerRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PatchedcontainerContainerRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PatchedcontainerContainerRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PatchedcontainerContainerRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PatchedcontainerContainerRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *PatchedcontainerContainerRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *PatchedcontainerContainerRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *PatchedcontainerContainerRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PatchedcontainerContainerRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedcontainerContainerRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedcontainerContainerRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PatchedcontainerContainerRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PatchedcontainerContainerRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PatchedcontainerContainerRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *PatchedcontainerContainerRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PatchedcontainerContainerRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PatchedcontainerContainerRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PatchedcontainerContainerRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PatchedcontainerContainerRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PatchedcontainerContainerRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PatchedcontainerContainerRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PatchedcontainerContainerRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PatchedcontainerContainerRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PatchedcontainerContainerRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetUpstreamName returns the UpstreamName field value if set, zero value otherwise. +func (o *PatchedcontainerContainerRemote) GetUpstreamName() string { + if o == nil || IsNil(o.UpstreamName) { + var ret string + return ret + } + return *o.UpstreamName +} + +// GetUpstreamNameOk returns a tuple with the UpstreamName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerRemote) GetUpstreamNameOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamName) { + return nil, false + } + return o.UpstreamName, true +} + +// HasUpstreamName returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasUpstreamName() bool { + if o != nil && !IsNil(o.UpstreamName) { + return true + } + + return false +} + +// SetUpstreamName gets a reference to the given string and assigns it to the UpstreamName field. +func (o *PatchedcontainerContainerRemote) SetUpstreamName(v string) { + o.UpstreamName = &v +} + +// GetIncludeTags returns the IncludeTags field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetIncludeTags() []string { + if o == nil { + var ret []string + return ret + } + return o.IncludeTags +} + +// GetIncludeTagsOk returns a tuple with the IncludeTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetIncludeTagsOk() ([]string, bool) { + if o == nil || IsNil(o.IncludeTags) { + return nil, false + } + return o.IncludeTags, true +} + +// HasIncludeTags returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasIncludeTags() bool { + if o != nil && IsNil(o.IncludeTags) { + return true + } + + return false +} + +// SetIncludeTags gets a reference to the given []string and assigns it to the IncludeTags field. +func (o *PatchedcontainerContainerRemote) SetIncludeTags(v []string) { + o.IncludeTags = v +} + +// GetExcludeTags returns the ExcludeTags field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRemote) GetExcludeTags() []string { + if o == nil { + var ret []string + return ret + } + return o.ExcludeTags +} + +// GetExcludeTagsOk returns a tuple with the ExcludeTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRemote) GetExcludeTagsOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeTags) { + return nil, false + } + return o.ExcludeTags, true +} + +// HasExcludeTags returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasExcludeTags() bool { + if o != nil && IsNil(o.ExcludeTags) { + return true + } + + return false +} + +// SetExcludeTags gets a reference to the given []string and assigns it to the ExcludeTags field. +func (o *PatchedcontainerContainerRemote) SetExcludeTags(v []string) { + o.ExcludeTags = v +} + +// GetSigstore returns the Sigstore field value if set, zero value otherwise. +func (o *PatchedcontainerContainerRemote) GetSigstore() string { + if o == nil || IsNil(o.Sigstore) { + var ret string + return ret + } + return *o.Sigstore +} + +// GetSigstoreOk returns a tuple with the Sigstore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerRemote) GetSigstoreOk() (*string, bool) { + if o == nil || IsNil(o.Sigstore) { + return nil, false + } + return o.Sigstore, true +} + +// HasSigstore returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRemote) HasSigstore() bool { + if o != nil && !IsNil(o.Sigstore) { + return true + } + + return false +} + +// SetSigstore gets a reference to the given string and assigns it to the Sigstore field. +func (o *PatchedcontainerContainerRemote) SetSigstore(v string) { + o.Sigstore = &v +} + +func (o PatchedcontainerContainerRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedcontainerContainerRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.UpstreamName) { + toSerialize["upstream_name"] = o.UpstreamName + } + if o.IncludeTags != nil { + toSerialize["include_tags"] = o.IncludeTags + } + if o.ExcludeTags != nil { + toSerialize["exclude_tags"] = o.ExcludeTags + } + if !IsNil(o.Sigstore) { + toSerialize["sigstore"] = o.Sigstore + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedcontainerContainerRemote) UnmarshalJSON(bytes []byte) (err error) { + varPatchedcontainerContainerRemote := _PatchedcontainerContainerRemote{} + + if err = json.Unmarshal(bytes, &varPatchedcontainerContainerRemote); err == nil { + *o = PatchedcontainerContainerRemote(varPatchedcontainerContainerRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "upstream_name") + delete(additionalProperties, "include_tags") + delete(additionalProperties, "exclude_tags") + delete(additionalProperties, "sigstore") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedcontainerContainerRemote struct { + value *PatchedcontainerContainerRemote + isSet bool +} + +func (v NullablePatchedcontainerContainerRemote) Get() *PatchedcontainerContainerRemote { + return v.value +} + +func (v *NullablePatchedcontainerContainerRemote) Set(val *PatchedcontainerContainerRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedcontainerContainerRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedcontainerContainerRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedcontainerContainerRemote(val *PatchedcontainerContainerRemote) *NullablePatchedcontainerContainerRemote { + return &NullablePatchedcontainerContainerRemote{value: val, isSet: true} +} + +func (v NullablePatchedcontainerContainerRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedcontainerContainerRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_repository.go new file mode 100644 index 0000000000..b956513c2f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedcontainer_container_repository.go @@ -0,0 +1,382 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedcontainerContainerRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedcontainerContainerRepository{} + +// PatchedcontainerContainerRepository Serializer for Container Repositories. +type PatchedcontainerContainerRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // A reference to an associated signing service. + ManifestSigningService NullableString `json:"manifest_signing_service,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedcontainerContainerRepository PatchedcontainerContainerRepository + +// NewPatchedcontainerContainerRepository instantiates a new PatchedcontainerContainerRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedcontainerContainerRepository() *PatchedcontainerContainerRepository { + this := PatchedcontainerContainerRepository{} + return &this +} + +// NewPatchedcontainerContainerRepositoryWithDefaults instantiates a new PatchedcontainerContainerRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedcontainerContainerRepositoryWithDefaults() *PatchedcontainerContainerRepository { + this := PatchedcontainerContainerRepository{} + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedcontainerContainerRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedcontainerContainerRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedcontainerContainerRepository) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedcontainerContainerRepository) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRepository) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedcontainerContainerRepository) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedcontainerContainerRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedcontainerContainerRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedcontainerContainerRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *PatchedcontainerContainerRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *PatchedcontainerContainerRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *PatchedcontainerContainerRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PatchedcontainerContainerRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PatchedcontainerContainerRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PatchedcontainerContainerRepository) UnsetRemote() { + o.Remote.Unset() +} + +// GetManifestSigningService returns the ManifestSigningService field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedcontainerContainerRepository) GetManifestSigningService() string { + if o == nil || IsNil(o.ManifestSigningService.Get()) { + var ret string + return ret + } + return *o.ManifestSigningService.Get() +} + +// GetManifestSigningServiceOk returns a tuple with the ManifestSigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedcontainerContainerRepository) GetManifestSigningServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ManifestSigningService.Get(), o.ManifestSigningService.IsSet() +} + +// HasManifestSigningService returns a boolean if a field has been set. +func (o *PatchedcontainerContainerRepository) HasManifestSigningService() bool { + if o != nil && o.ManifestSigningService.IsSet() { + return true + } + + return false +} + +// SetManifestSigningService gets a reference to the given NullableString and assigns it to the ManifestSigningService field. +func (o *PatchedcontainerContainerRepository) SetManifestSigningService(v string) { + o.ManifestSigningService.Set(&v) +} +// SetManifestSigningServiceNil sets the value for ManifestSigningService to be an explicit nil +func (o *PatchedcontainerContainerRepository) SetManifestSigningServiceNil() { + o.ManifestSigningService.Set(nil) +} + +// UnsetManifestSigningService ensures that no value is present for ManifestSigningService, not even an explicit nil +func (o *PatchedcontainerContainerRepository) UnsetManifestSigningService() { + o.ManifestSigningService.Unset() +} + +func (o PatchedcontainerContainerRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedcontainerContainerRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if o.ManifestSigningService.IsSet() { + toSerialize["manifest_signing_service"] = o.ManifestSigningService.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedcontainerContainerRepository) UnmarshalJSON(bytes []byte) (err error) { + varPatchedcontainerContainerRepository := _PatchedcontainerContainerRepository{} + + if err = json.Unmarshal(bytes, &varPatchedcontainerContainerRepository); err == nil { + *o = PatchedcontainerContainerRepository(varPatchedcontainerContainerRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "manifest_signing_service") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedcontainerContainerRepository struct { + value *PatchedcontainerContainerRepository + isSet bool +} + +func (v NullablePatchedcontainerContainerRepository) Get() *PatchedcontainerContainerRepository { + return v.value +} + +func (v *NullablePatchedcontainerContainerRepository) Set(val *PatchedcontainerContainerRepository) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedcontainerContainerRepository) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedcontainerContainerRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedcontainerContainerRepository(val *PatchedcontainerContainerRepository) *NullablePatchedcontainerContainerRepository { + return &NullablePatchedcontainerContainerRepository{value: val, isSet: true} +} + +func (v NullablePatchedcontainerContainerRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedcontainerContainerRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patcheddeb_apt_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patcheddeb_apt_distribution.go new file mode 100644 index 0000000000..33f5c6779e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patcheddeb_apt_distribution.go @@ -0,0 +1,414 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatcheddebAptDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatcheddebAptDistribution{} + +// PatcheddebAptDistribution Serializer for AptDistributions. +type PatcheddebAptDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath *string `json:"base_path,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name *string `json:"name,omitempty"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatcheddebAptDistribution PatcheddebAptDistribution + +// NewPatcheddebAptDistribution instantiates a new PatcheddebAptDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatcheddebAptDistribution() *PatcheddebAptDistribution { + this := PatcheddebAptDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// NewPatcheddebAptDistributionWithDefaults instantiates a new PatcheddebAptDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatcheddebAptDistributionWithDefaults() *PatcheddebAptDistribution { + this := PatcheddebAptDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value if set, zero value otherwise. +func (o *PatcheddebAptDistribution) GetBasePath() string { + if o == nil || IsNil(o.BasePath) { + var ret string + return ret + } + return *o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptDistribution) GetBasePathOk() (*string, bool) { + if o == nil || IsNil(o.BasePath) { + return nil, false + } + return o.BasePath, true +} + +// HasBasePath returns a boolean if a field has been set. +func (o *PatcheddebAptDistribution) HasBasePath() bool { + if o != nil && !IsNil(o.BasePath) { + return true + } + + return false +} + +// SetBasePath gets a reference to the given string and assigns it to the BasePath field. +func (o *PatcheddebAptDistribution) SetBasePath(v string) { + o.BasePath = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *PatcheddebAptDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *PatcheddebAptDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *PatcheddebAptDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *PatcheddebAptDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *PatcheddebAptDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *PatcheddebAptDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *PatcheddebAptDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatcheddebAptDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatcheddebAptDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatcheddebAptDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatcheddebAptDistribution) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptDistribution) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatcheddebAptDistribution) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatcheddebAptDistribution) SetName(v string) { + o.Name = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *PatcheddebAptDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *PatcheddebAptDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *PatcheddebAptDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *PatcheddebAptDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptDistribution) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptDistribution) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *PatcheddebAptDistribution) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *PatcheddebAptDistribution) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *PatcheddebAptDistribution) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *PatcheddebAptDistribution) UnsetPublication() { + o.Publication.Unset() +} + +func (o PatcheddebAptDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatcheddebAptDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasePath) { + toSerialize["base_path"] = o.BasePath + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatcheddebAptDistribution) UnmarshalJSON(bytes []byte) (err error) { + varPatcheddebAptDistribution := _PatcheddebAptDistribution{} + + if err = json.Unmarshal(bytes, &varPatcheddebAptDistribution); err == nil { + *o = PatcheddebAptDistribution(varPatcheddebAptDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatcheddebAptDistribution struct { + value *PatcheddebAptDistribution + isSet bool +} + +func (v NullablePatcheddebAptDistribution) Get() *PatcheddebAptDistribution { + return v.value +} + +func (v *NullablePatcheddebAptDistribution) Set(val *PatcheddebAptDistribution) { + v.value = val + v.isSet = true +} + +func (v NullablePatcheddebAptDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullablePatcheddebAptDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatcheddebAptDistribution(val *PatcheddebAptDistribution) *NullablePatcheddebAptDistribution { + return &NullablePatcheddebAptDistribution{value: val, isSet: true} +} + +func (v NullablePatcheddebAptDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatcheddebAptDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patcheddeb_apt_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patcheddeb_apt_remote.go new file mode 100644 index 0000000000..7c90f0daac --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patcheddeb_apt_remote.go @@ -0,0 +1,1399 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatcheddebAptRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatcheddebAptRemote{} + +// PatcheddebAptRemote A Serializer for AptRemote. +type PatcheddebAptRemote struct { + // A unique name for this remote. + Name *string `json:"name,omitempty"` + // The URL of an external content source. + Url *string `json:"url,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // Whitespace separated list of distributions to sync. The distribution is the path from the repository root to the \"Release\" file you want to access. This is often, but not always, equal to either the codename or the suite of the release you want to sync. If the repository you are trying to sync uses \"flat repository format\", the distribution must end with a \"/\". Based on \"/etc/apt/sources.list\" syntax. + Distributions *string `json:"distributions,omitempty"` + // Whitespace separatet list of components to sync. If none are supplied, all that are available will be synchronized. Leave blank for repositores using \"flat repository format\". + Components NullableString `json:"components,omitempty"` + // Whitespace separated list of architectures to sync If none are supplied, all that are available will be synchronized. A list of valid architecture specification strings can be found by running \"dpkg-architecture -L\". A sync will download the intersection of the list of architectures provided via this field and those provided by the relevant \"Release\" file. Architecture=\"all\" is always synchronized and does not need to be provided here. + Architectures NullableString `json:"architectures,omitempty"` + // Sync source packages + SyncSources *bool `json:"sync_sources,omitempty"` + // Sync installer packages + SyncUdebs *bool `json:"sync_udebs,omitempty"` + // Sync installer files + SyncInstaller *bool `json:"sync_installer,omitempty"` + // Gpg public key to verify origin releases against + Gpgkey NullableString `json:"gpgkey,omitempty"` + // By default, upstream repositories that declare architectures and corresponding package indices in their Release files without actually publishing them, will fail to synchronize. Set this flag to True to allow the synchronization of such \"partial mirrors\" instead. Alternatively, you could make your remote filter by architectures for which the upstream repository does have indices. + IgnoreMissingPackageIndices *bool `json:"ignore_missing_package_indices,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatcheddebAptRemote PatcheddebAptRemote + +// NewPatcheddebAptRemote instantiates a new PatcheddebAptRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatcheddebAptRemote() *PatcheddebAptRemote { + this := PatcheddebAptRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewPatcheddebAptRemoteWithDefaults instantiates a new PatcheddebAptRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatcheddebAptRemoteWithDefaults() *PatcheddebAptRemote { + this := PatcheddebAptRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatcheddebAptRemote) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptRemote) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatcheddebAptRemote) SetName(v string) { + o.Name = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PatcheddebAptRemote) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptRemote) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PatcheddebAptRemote) SetUrl(v string) { + o.Url = &v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PatcheddebAptRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PatcheddebAptRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PatcheddebAptRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PatcheddebAptRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PatcheddebAptRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PatcheddebAptRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PatcheddebAptRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PatcheddebAptRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PatcheddebAptRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PatcheddebAptRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *PatcheddebAptRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *PatcheddebAptRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *PatcheddebAptRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *PatcheddebAptRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *PatcheddebAptRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *PatcheddebAptRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PatcheddebAptRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PatcheddebAptRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatcheddebAptRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatcheddebAptRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PatcheddebAptRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PatcheddebAptRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PatcheddebAptRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PatcheddebAptRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PatcheddebAptRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *PatcheddebAptRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PatcheddebAptRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PatcheddebAptRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PatcheddebAptRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PatcheddebAptRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PatcheddebAptRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PatcheddebAptRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PatcheddebAptRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PatcheddebAptRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PatcheddebAptRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PatcheddebAptRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PatcheddebAptRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PatcheddebAptRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetDistributions returns the Distributions field value if set, zero value otherwise. +func (o *PatcheddebAptRemote) GetDistributions() string { + if o == nil || IsNil(o.Distributions) { + var ret string + return ret + } + return *o.Distributions +} + +// GetDistributionsOk returns a tuple with the Distributions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptRemote) GetDistributionsOk() (*string, bool) { + if o == nil || IsNil(o.Distributions) { + return nil, false + } + return o.Distributions, true +} + +// HasDistributions returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasDistributions() bool { + if o != nil && !IsNil(o.Distributions) { + return true + } + + return false +} + +// SetDistributions gets a reference to the given string and assigns it to the Distributions field. +func (o *PatcheddebAptRemote) SetDistributions(v string) { + o.Distributions = &v +} + +// GetComponents returns the Components field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetComponents() string { + if o == nil || IsNil(o.Components.Get()) { + var ret string + return ret + } + return *o.Components.Get() +} + +// GetComponentsOk returns a tuple with the Components field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetComponentsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Components.Get(), o.Components.IsSet() +} + +// HasComponents returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasComponents() bool { + if o != nil && o.Components.IsSet() { + return true + } + + return false +} + +// SetComponents gets a reference to the given NullableString and assigns it to the Components field. +func (o *PatcheddebAptRemote) SetComponents(v string) { + o.Components.Set(&v) +} +// SetComponentsNil sets the value for Components to be an explicit nil +func (o *PatcheddebAptRemote) SetComponentsNil() { + o.Components.Set(nil) +} + +// UnsetComponents ensures that no value is present for Components, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetComponents() { + o.Components.Unset() +} + +// GetArchitectures returns the Architectures field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetArchitectures() string { + if o == nil || IsNil(o.Architectures.Get()) { + var ret string + return ret + } + return *o.Architectures.Get() +} + +// GetArchitecturesOk returns a tuple with the Architectures field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetArchitecturesOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Architectures.Get(), o.Architectures.IsSet() +} + +// HasArchitectures returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasArchitectures() bool { + if o != nil && o.Architectures.IsSet() { + return true + } + + return false +} + +// SetArchitectures gets a reference to the given NullableString and assigns it to the Architectures field. +func (o *PatcheddebAptRemote) SetArchitectures(v string) { + o.Architectures.Set(&v) +} +// SetArchitecturesNil sets the value for Architectures to be an explicit nil +func (o *PatcheddebAptRemote) SetArchitecturesNil() { + o.Architectures.Set(nil) +} + +// UnsetArchitectures ensures that no value is present for Architectures, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetArchitectures() { + o.Architectures.Unset() +} + +// GetSyncSources returns the SyncSources field value if set, zero value otherwise. +func (o *PatcheddebAptRemote) GetSyncSources() bool { + if o == nil || IsNil(o.SyncSources) { + var ret bool + return ret + } + return *o.SyncSources +} + +// GetSyncSourcesOk returns a tuple with the SyncSources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptRemote) GetSyncSourcesOk() (*bool, bool) { + if o == nil || IsNil(o.SyncSources) { + return nil, false + } + return o.SyncSources, true +} + +// HasSyncSources returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasSyncSources() bool { + if o != nil && !IsNil(o.SyncSources) { + return true + } + + return false +} + +// SetSyncSources gets a reference to the given bool and assigns it to the SyncSources field. +func (o *PatcheddebAptRemote) SetSyncSources(v bool) { + o.SyncSources = &v +} + +// GetSyncUdebs returns the SyncUdebs field value if set, zero value otherwise. +func (o *PatcheddebAptRemote) GetSyncUdebs() bool { + if o == nil || IsNil(o.SyncUdebs) { + var ret bool + return ret + } + return *o.SyncUdebs +} + +// GetSyncUdebsOk returns a tuple with the SyncUdebs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptRemote) GetSyncUdebsOk() (*bool, bool) { + if o == nil || IsNil(o.SyncUdebs) { + return nil, false + } + return o.SyncUdebs, true +} + +// HasSyncUdebs returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasSyncUdebs() bool { + if o != nil && !IsNil(o.SyncUdebs) { + return true + } + + return false +} + +// SetSyncUdebs gets a reference to the given bool and assigns it to the SyncUdebs field. +func (o *PatcheddebAptRemote) SetSyncUdebs(v bool) { + o.SyncUdebs = &v +} + +// GetSyncInstaller returns the SyncInstaller field value if set, zero value otherwise. +func (o *PatcheddebAptRemote) GetSyncInstaller() bool { + if o == nil || IsNil(o.SyncInstaller) { + var ret bool + return ret + } + return *o.SyncInstaller +} + +// GetSyncInstallerOk returns a tuple with the SyncInstaller field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptRemote) GetSyncInstallerOk() (*bool, bool) { + if o == nil || IsNil(o.SyncInstaller) { + return nil, false + } + return o.SyncInstaller, true +} + +// HasSyncInstaller returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasSyncInstaller() bool { + if o != nil && !IsNil(o.SyncInstaller) { + return true + } + + return false +} + +// SetSyncInstaller gets a reference to the given bool and assigns it to the SyncInstaller field. +func (o *PatcheddebAptRemote) SetSyncInstaller(v bool) { + o.SyncInstaller = &v +} + +// GetGpgkey returns the Gpgkey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRemote) GetGpgkey() string { + if o == nil || IsNil(o.Gpgkey.Get()) { + var ret string + return ret + } + return *o.Gpgkey.Get() +} + +// GetGpgkeyOk returns a tuple with the Gpgkey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRemote) GetGpgkeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Gpgkey.Get(), o.Gpgkey.IsSet() +} + +// HasGpgkey returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasGpgkey() bool { + if o != nil && o.Gpgkey.IsSet() { + return true + } + + return false +} + +// SetGpgkey gets a reference to the given NullableString and assigns it to the Gpgkey field. +func (o *PatcheddebAptRemote) SetGpgkey(v string) { + o.Gpgkey.Set(&v) +} +// SetGpgkeyNil sets the value for Gpgkey to be an explicit nil +func (o *PatcheddebAptRemote) SetGpgkeyNil() { + o.Gpgkey.Set(nil) +} + +// UnsetGpgkey ensures that no value is present for Gpgkey, not even an explicit nil +func (o *PatcheddebAptRemote) UnsetGpgkey() { + o.Gpgkey.Unset() +} + +// GetIgnoreMissingPackageIndices returns the IgnoreMissingPackageIndices field value if set, zero value otherwise. +func (o *PatcheddebAptRemote) GetIgnoreMissingPackageIndices() bool { + if o == nil || IsNil(o.IgnoreMissingPackageIndices) { + var ret bool + return ret + } + return *o.IgnoreMissingPackageIndices +} + +// GetIgnoreMissingPackageIndicesOk returns a tuple with the IgnoreMissingPackageIndices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptRemote) GetIgnoreMissingPackageIndicesOk() (*bool, bool) { + if o == nil || IsNil(o.IgnoreMissingPackageIndices) { + return nil, false + } + return o.IgnoreMissingPackageIndices, true +} + +// HasIgnoreMissingPackageIndices returns a boolean if a field has been set. +func (o *PatcheddebAptRemote) HasIgnoreMissingPackageIndices() bool { + if o != nil && !IsNil(o.IgnoreMissingPackageIndices) { + return true + } + + return false +} + +// SetIgnoreMissingPackageIndices gets a reference to the given bool and assigns it to the IgnoreMissingPackageIndices field. +func (o *PatcheddebAptRemote) SetIgnoreMissingPackageIndices(v bool) { + o.IgnoreMissingPackageIndices = &v +} + +func (o PatcheddebAptRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatcheddebAptRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.Distributions) { + toSerialize["distributions"] = o.Distributions + } + if o.Components.IsSet() { + toSerialize["components"] = o.Components.Get() + } + if o.Architectures.IsSet() { + toSerialize["architectures"] = o.Architectures.Get() + } + if !IsNil(o.SyncSources) { + toSerialize["sync_sources"] = o.SyncSources + } + if !IsNil(o.SyncUdebs) { + toSerialize["sync_udebs"] = o.SyncUdebs + } + if !IsNil(o.SyncInstaller) { + toSerialize["sync_installer"] = o.SyncInstaller + } + if o.Gpgkey.IsSet() { + toSerialize["gpgkey"] = o.Gpgkey.Get() + } + if !IsNil(o.IgnoreMissingPackageIndices) { + toSerialize["ignore_missing_package_indices"] = o.IgnoreMissingPackageIndices + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatcheddebAptRemote) UnmarshalJSON(bytes []byte) (err error) { + varPatcheddebAptRemote := _PatcheddebAptRemote{} + + if err = json.Unmarshal(bytes, &varPatcheddebAptRemote); err == nil { + *o = PatcheddebAptRemote(varPatcheddebAptRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "distributions") + delete(additionalProperties, "components") + delete(additionalProperties, "architectures") + delete(additionalProperties, "sync_sources") + delete(additionalProperties, "sync_udebs") + delete(additionalProperties, "sync_installer") + delete(additionalProperties, "gpgkey") + delete(additionalProperties, "ignore_missing_package_indices") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatcheddebAptRemote struct { + value *PatcheddebAptRemote + isSet bool +} + +func (v NullablePatcheddebAptRemote) Get() *PatcheddebAptRemote { + return v.value +} + +func (v *NullablePatcheddebAptRemote) Set(val *PatcheddebAptRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePatcheddebAptRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePatcheddebAptRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatcheddebAptRemote(val *PatcheddebAptRemote) *NullablePatcheddebAptRemote { + return &NullablePatcheddebAptRemote{value: val, isSet: true} +} + +func (v NullablePatcheddebAptRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatcheddebAptRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patcheddeb_apt_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patcheddeb_apt_repository.go new file mode 100644 index 0000000000..3ba95d6c8c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patcheddeb_apt_repository.go @@ -0,0 +1,334 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatcheddebAptRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatcheddebAptRepository{} + +// PatcheddebAptRepository A Serializer for AptRepository. +type PatcheddebAptRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatcheddebAptRepository PatcheddebAptRepository + +// NewPatcheddebAptRepository instantiates a new PatcheddebAptRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatcheddebAptRepository() *PatcheddebAptRepository { + this := PatcheddebAptRepository{} + return &this +} + +// NewPatcheddebAptRepositoryWithDefaults instantiates a new PatcheddebAptRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatcheddebAptRepositoryWithDefaults() *PatcheddebAptRepository { + this := PatcheddebAptRepository{} + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatcheddebAptRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatcheddebAptRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatcheddebAptRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatcheddebAptRepository) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatcheddebAptRepository) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatcheddebAptRepository) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatcheddebAptRepository) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatcheddebAptRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatcheddebAptRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatcheddebAptRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatcheddebAptRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *PatcheddebAptRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *PatcheddebAptRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *PatcheddebAptRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *PatcheddebAptRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatcheddebAptRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatcheddebAptRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatcheddebAptRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PatcheddebAptRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PatcheddebAptRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PatcheddebAptRepository) UnsetRemote() { + o.Remote.Unset() +} + +func (o PatcheddebAptRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatcheddebAptRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatcheddebAptRepository) UnmarshalJSON(bytes []byte) (err error) { + varPatcheddebAptRepository := _PatcheddebAptRepository{} + + if err = json.Unmarshal(bytes, &varPatcheddebAptRepository); err == nil { + *o = PatcheddebAptRepository(varPatcheddebAptRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatcheddebAptRepository struct { + value *PatcheddebAptRepository + isSet bool +} + +func (v NullablePatcheddebAptRepository) Get() *PatcheddebAptRepository { + return v.value +} + +func (v *NullablePatcheddebAptRepository) Set(val *PatcheddebAptRepository) { + v.value = val + v.isSet = true +} + +func (v NullablePatcheddebAptRepository) IsSet() bool { + return v.isSet +} + +func (v *NullablePatcheddebAptRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatcheddebAptRepository(val *PatcheddebAptRepository) *NullablePatcheddebAptRepository { + return &NullablePatcheddebAptRepository{value: val, isSet: true} +} + +func (v NullablePatcheddebAptRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatcheddebAptRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_alternate_content_source.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_alternate_content_source.go new file mode 100644 index 0000000000..f76c951700 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_alternate_content_source.go @@ -0,0 +1,278 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the PatchedfileFileAlternateContentSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedfileFileAlternateContentSource{} + +// PatchedfileFileAlternateContentSource Serializer for File alternate content source. +type PatchedfileFileAlternateContentSource struct { + // Name of Alternate Content Source. + Name *string `json:"name,omitempty"` + // Date of last refresh of AlternateContentSource. + LastRefreshed NullableTime `json:"last_refreshed,omitempty"` + // List of paths that will be appended to the Remote url when searching for content. + Paths []string `json:"paths,omitempty"` + // The remote to provide alternate content source. + Remote *string `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedfileFileAlternateContentSource PatchedfileFileAlternateContentSource + +// NewPatchedfileFileAlternateContentSource instantiates a new PatchedfileFileAlternateContentSource object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedfileFileAlternateContentSource() *PatchedfileFileAlternateContentSource { + this := PatchedfileFileAlternateContentSource{} + return &this +} + +// NewPatchedfileFileAlternateContentSourceWithDefaults instantiates a new PatchedfileFileAlternateContentSource object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedfileFileAlternateContentSourceWithDefaults() *PatchedfileFileAlternateContentSource { + this := PatchedfileFileAlternateContentSource{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedfileFileAlternateContentSource) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileAlternateContentSource) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedfileFileAlternateContentSource) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedfileFileAlternateContentSource) SetName(v string) { + o.Name = &v +} + +// GetLastRefreshed returns the LastRefreshed field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileAlternateContentSource) GetLastRefreshed() time.Time { + if o == nil || IsNil(o.LastRefreshed.Get()) { + var ret time.Time + return ret + } + return *o.LastRefreshed.Get() +} + +// GetLastRefreshedOk returns a tuple with the LastRefreshed field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileAlternateContentSource) GetLastRefreshedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastRefreshed.Get(), o.LastRefreshed.IsSet() +} + +// HasLastRefreshed returns a boolean if a field has been set. +func (o *PatchedfileFileAlternateContentSource) HasLastRefreshed() bool { + if o != nil && o.LastRefreshed.IsSet() { + return true + } + + return false +} + +// SetLastRefreshed gets a reference to the given NullableTime and assigns it to the LastRefreshed field. +func (o *PatchedfileFileAlternateContentSource) SetLastRefreshed(v time.Time) { + o.LastRefreshed.Set(&v) +} +// SetLastRefreshedNil sets the value for LastRefreshed to be an explicit nil +func (o *PatchedfileFileAlternateContentSource) SetLastRefreshedNil() { + o.LastRefreshed.Set(nil) +} + +// UnsetLastRefreshed ensures that no value is present for LastRefreshed, not even an explicit nil +func (o *PatchedfileFileAlternateContentSource) UnsetLastRefreshed() { + o.LastRefreshed.Unset() +} + +// GetPaths returns the Paths field value if set, zero value otherwise. +func (o *PatchedfileFileAlternateContentSource) GetPaths() []string { + if o == nil || IsNil(o.Paths) { + var ret []string + return ret + } + return o.Paths +} + +// GetPathsOk returns a tuple with the Paths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileAlternateContentSource) GetPathsOk() ([]string, bool) { + if o == nil || IsNil(o.Paths) { + return nil, false + } + return o.Paths, true +} + +// HasPaths returns a boolean if a field has been set. +func (o *PatchedfileFileAlternateContentSource) HasPaths() bool { + if o != nil && !IsNil(o.Paths) { + return true + } + + return false +} + +// SetPaths gets a reference to the given []string and assigns it to the Paths field. +func (o *PatchedfileFileAlternateContentSource) SetPaths(v []string) { + o.Paths = v +} + +// GetRemote returns the Remote field value if set, zero value otherwise. +func (o *PatchedfileFileAlternateContentSource) GetRemote() string { + if o == nil || IsNil(o.Remote) { + var ret string + return ret + } + return *o.Remote +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileAlternateContentSource) GetRemoteOk() (*string, bool) { + if o == nil || IsNil(o.Remote) { + return nil, false + } + return o.Remote, true +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatchedfileFileAlternateContentSource) HasRemote() bool { + if o != nil && !IsNil(o.Remote) { + return true + } + + return false +} + +// SetRemote gets a reference to the given string and assigns it to the Remote field. +func (o *PatchedfileFileAlternateContentSource) SetRemote(v string) { + o.Remote = &v +} + +func (o PatchedfileFileAlternateContentSource) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedfileFileAlternateContentSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.LastRefreshed.IsSet() { + toSerialize["last_refreshed"] = o.LastRefreshed.Get() + } + if !IsNil(o.Paths) { + toSerialize["paths"] = o.Paths + } + if !IsNil(o.Remote) { + toSerialize["remote"] = o.Remote + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedfileFileAlternateContentSource) UnmarshalJSON(bytes []byte) (err error) { + varPatchedfileFileAlternateContentSource := _PatchedfileFileAlternateContentSource{} + + if err = json.Unmarshal(bytes, &varPatchedfileFileAlternateContentSource); err == nil { + *o = PatchedfileFileAlternateContentSource(varPatchedfileFileAlternateContentSource) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "last_refreshed") + delete(additionalProperties, "paths") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedfileFileAlternateContentSource struct { + value *PatchedfileFileAlternateContentSource + isSet bool +} + +func (v NullablePatchedfileFileAlternateContentSource) Get() *PatchedfileFileAlternateContentSource { + return v.value +} + +func (v *NullablePatchedfileFileAlternateContentSource) Set(val *PatchedfileFileAlternateContentSource) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedfileFileAlternateContentSource) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedfileFileAlternateContentSource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedfileFileAlternateContentSource(val *PatchedfileFileAlternateContentSource) *NullablePatchedfileFileAlternateContentSource { + return &NullablePatchedfileFileAlternateContentSource{value: val, isSet: true} +} + +func (v NullablePatchedfileFileAlternateContentSource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedfileFileAlternateContentSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_distribution.go new file mode 100644 index 0000000000..39737b8bde --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_distribution.go @@ -0,0 +1,414 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedfileFileDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedfileFileDistribution{} + +// PatchedfileFileDistribution Serializer for File Distributions. +type PatchedfileFileDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath *string `json:"base_path,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name *string `json:"name,omitempty"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedfileFileDistribution PatchedfileFileDistribution + +// NewPatchedfileFileDistribution instantiates a new PatchedfileFileDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedfileFileDistribution() *PatchedfileFileDistribution { + this := PatchedfileFileDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// NewPatchedfileFileDistributionWithDefaults instantiates a new PatchedfileFileDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedfileFileDistributionWithDefaults() *PatchedfileFileDistribution { + this := PatchedfileFileDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value if set, zero value otherwise. +func (o *PatchedfileFileDistribution) GetBasePath() string { + if o == nil || IsNil(o.BasePath) { + var ret string + return ret + } + return *o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileDistribution) GetBasePathOk() (*string, bool) { + if o == nil || IsNil(o.BasePath) { + return nil, false + } + return o.BasePath, true +} + +// HasBasePath returns a boolean if a field has been set. +func (o *PatchedfileFileDistribution) HasBasePath() bool { + if o != nil && !IsNil(o.BasePath) { + return true + } + + return false +} + +// SetBasePath gets a reference to the given string and assigns it to the BasePath field. +func (o *PatchedfileFileDistribution) SetBasePath(v string) { + o.BasePath = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *PatchedfileFileDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *PatchedfileFileDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *PatchedfileFileDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *PatchedfileFileDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *PatchedfileFileDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *PatchedfileFileDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *PatchedfileFileDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedfileFileDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedfileFileDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedfileFileDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedfileFileDistribution) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileDistribution) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedfileFileDistribution) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedfileFileDistribution) SetName(v string) { + o.Name = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *PatchedfileFileDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *PatchedfileFileDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *PatchedfileFileDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *PatchedfileFileDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileDistribution) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileDistribution) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *PatchedfileFileDistribution) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *PatchedfileFileDistribution) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *PatchedfileFileDistribution) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *PatchedfileFileDistribution) UnsetPublication() { + o.Publication.Unset() +} + +func (o PatchedfileFileDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedfileFileDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasePath) { + toSerialize["base_path"] = o.BasePath + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedfileFileDistribution) UnmarshalJSON(bytes []byte) (err error) { + varPatchedfileFileDistribution := _PatchedfileFileDistribution{} + + if err = json.Unmarshal(bytes, &varPatchedfileFileDistribution); err == nil { + *o = PatchedfileFileDistribution(varPatchedfileFileDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedfileFileDistribution struct { + value *PatchedfileFileDistribution + isSet bool +} + +func (v NullablePatchedfileFileDistribution) Get() *PatchedfileFileDistribution { + return v.value +} + +func (v *NullablePatchedfileFileDistribution) Set(val *PatchedfileFileDistribution) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedfileFileDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedfileFileDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedfileFileDistribution(val *PatchedfileFileDistribution) *NullablePatchedfileFileDistribution { + return &NullablePatchedfileFileDistribution{value: val, isSet: true} +} + +func (v NullablePatchedfileFileDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedfileFileDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_remote.go new file mode 100644 index 0000000000..a33a3306d1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_remote.go @@ -0,0 +1,1065 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedfileFileRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedfileFileRemote{} + +// PatchedfileFileRemote Serializer for File Remotes. +type PatchedfileFileRemote struct { + // A unique name for this remote. + Name *string `json:"name,omitempty"` + // The URL of an external content source. + Url *string `json:"url,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedfileFileRemote PatchedfileFileRemote + +// NewPatchedfileFileRemote instantiates a new PatchedfileFileRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedfileFileRemote() *PatchedfileFileRemote { + this := PatchedfileFileRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewPatchedfileFileRemoteWithDefaults instantiates a new PatchedfileFileRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedfileFileRemoteWithDefaults() *PatchedfileFileRemote { + this := PatchedfileFileRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedfileFileRemote) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileRemote) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedfileFileRemote) SetName(v string) { + o.Name = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PatchedfileFileRemote) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileRemote) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PatchedfileFileRemote) SetUrl(v string) { + o.Url = &v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PatchedfileFileRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PatchedfileFileRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PatchedfileFileRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PatchedfileFileRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PatchedfileFileRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PatchedfileFileRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PatchedfileFileRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PatchedfileFileRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PatchedfileFileRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PatchedfileFileRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *PatchedfileFileRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *PatchedfileFileRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *PatchedfileFileRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *PatchedfileFileRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *PatchedfileFileRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *PatchedfileFileRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PatchedfileFileRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PatchedfileFileRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedfileFileRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedfileFileRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PatchedfileFileRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PatchedfileFileRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PatchedfileFileRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PatchedfileFileRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PatchedfileFileRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *PatchedfileFileRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PatchedfileFileRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PatchedfileFileRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PatchedfileFileRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PatchedfileFileRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PatchedfileFileRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PatchedfileFileRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PatchedfileFileRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PatchedfileFileRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PatchedfileFileRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PatchedfileFileRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PatchedfileFileRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PatchedfileFileRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PatchedfileFileRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PatchedfileFileRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +func (o PatchedfileFileRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedfileFileRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedfileFileRemote) UnmarshalJSON(bytes []byte) (err error) { + varPatchedfileFileRemote := _PatchedfileFileRemote{} + + if err = json.Unmarshal(bytes, &varPatchedfileFileRemote); err == nil { + *o = PatchedfileFileRemote(varPatchedfileFileRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedfileFileRemote struct { + value *PatchedfileFileRemote + isSet bool +} + +func (v NullablePatchedfileFileRemote) Get() *PatchedfileFileRemote { + return v.value +} + +func (v *NullablePatchedfileFileRemote) Set(val *PatchedfileFileRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedfileFileRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedfileFileRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedfileFileRemote(val *PatchedfileFileRemote) *NullablePatchedfileFileRemote { + return &NullablePatchedfileFileRemote{value: val, isSet: true} +} + +func (v NullablePatchedfileFileRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedfileFileRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_repository.go new file mode 100644 index 0000000000..ab82986a1f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedfile_file_repository.go @@ -0,0 +1,428 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedfileFileRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedfileFileRepository{} + +// PatchedfileFileRepository Serializer for File Repositories. +type PatchedfileFileRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. + Autopublish *bool `json:"autopublish,omitempty"` + // Filename to use for manifest file containing metadata for all the files. + Manifest NullableString `json:"manifest,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedfileFileRepository PatchedfileFileRepository + +// NewPatchedfileFileRepository instantiates a new PatchedfileFileRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedfileFileRepository() *PatchedfileFileRepository { + this := PatchedfileFileRepository{} + var autopublish bool = false + this.Autopublish = &autopublish + var manifest string = "PULP_MANIFEST" + this.Manifest = *NewNullableString(&manifest) + return &this +} + +// NewPatchedfileFileRepositoryWithDefaults instantiates a new PatchedfileFileRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedfileFileRepositoryWithDefaults() *PatchedfileFileRepository { + this := PatchedfileFileRepository{} + var autopublish bool = false + this.Autopublish = &autopublish + var manifest string = "PULP_MANIFEST" + this.Manifest = *NewNullableString(&manifest) + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedfileFileRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedfileFileRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedfileFileRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedfileFileRepository) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileRepository) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedfileFileRepository) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedfileFileRepository) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedfileFileRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedfileFileRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedfileFileRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedfileFileRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *PatchedfileFileRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *PatchedfileFileRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *PatchedfileFileRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *PatchedfileFileRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatchedfileFileRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PatchedfileFileRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PatchedfileFileRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PatchedfileFileRepository) UnsetRemote() { + o.Remote.Unset() +} + +// GetAutopublish returns the Autopublish field value if set, zero value otherwise. +func (o *PatchedfileFileRepository) GetAutopublish() bool { + if o == nil || IsNil(o.Autopublish) { + var ret bool + return ret + } + return *o.Autopublish +} + +// GetAutopublishOk returns a tuple with the Autopublish field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedfileFileRepository) GetAutopublishOk() (*bool, bool) { + if o == nil || IsNil(o.Autopublish) { + return nil, false + } + return o.Autopublish, true +} + +// HasAutopublish returns a boolean if a field has been set. +func (o *PatchedfileFileRepository) HasAutopublish() bool { + if o != nil && !IsNil(o.Autopublish) { + return true + } + + return false +} + +// SetAutopublish gets a reference to the given bool and assigns it to the Autopublish field. +func (o *PatchedfileFileRepository) SetAutopublish(v bool) { + o.Autopublish = &v +} + +// GetManifest returns the Manifest field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedfileFileRepository) GetManifest() string { + if o == nil || IsNil(o.Manifest.Get()) { + var ret string + return ret + } + return *o.Manifest.Get() +} + +// GetManifestOk returns a tuple with the Manifest field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedfileFileRepository) GetManifestOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Manifest.Get(), o.Manifest.IsSet() +} + +// HasManifest returns a boolean if a field has been set. +func (o *PatchedfileFileRepository) HasManifest() bool { + if o != nil && o.Manifest.IsSet() { + return true + } + + return false +} + +// SetManifest gets a reference to the given NullableString and assigns it to the Manifest field. +func (o *PatchedfileFileRepository) SetManifest(v string) { + o.Manifest.Set(&v) +} +// SetManifestNil sets the value for Manifest to be an explicit nil +func (o *PatchedfileFileRepository) SetManifestNil() { + o.Manifest.Set(nil) +} + +// UnsetManifest ensures that no value is present for Manifest, not even an explicit nil +func (o *PatchedfileFileRepository) UnsetManifest() { + o.Manifest.Unset() +} + +func (o PatchedfileFileRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedfileFileRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if !IsNil(o.Autopublish) { + toSerialize["autopublish"] = o.Autopublish + } + if o.Manifest.IsSet() { + toSerialize["manifest"] = o.Manifest.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedfileFileRepository) UnmarshalJSON(bytes []byte) (err error) { + varPatchedfileFileRepository := _PatchedfileFileRepository{} + + if err = json.Unmarshal(bytes, &varPatchedfileFileRepository); err == nil { + *o = PatchedfileFileRepository(varPatchedfileFileRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "autopublish") + delete(additionalProperties, "manifest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedfileFileRepository struct { + value *PatchedfileFileRepository + isSet bool +} + +func (v NullablePatchedfileFileRepository) Get() *PatchedfileFileRepository { + return v.value +} + +func (v *NullablePatchedfileFileRepository) Set(val *PatchedfileFileRepository) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedfileFileRepository) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedfileFileRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedfileFileRepository(val *PatchedfileFileRepository) *NullablePatchedfileFileRepository { + return &NullablePatchedfileFileRepository{value: val, isSet: true} +} + +func (v NullablePatchedfileFileRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedfileFileRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedgem_gem_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedgem_gem_distribution.go new file mode 100644 index 0000000000..9096732823 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedgem_gem_distribution.go @@ -0,0 +1,462 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedgemGemDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedgemGemDistribution{} + +// PatchedgemGemDistribution A Serializer for GemDistribution. +type PatchedgemGemDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath *string `json:"base_path,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name *string `json:"name,omitempty"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + // Remote that can be used to fetch content when using pull-through caching. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedgemGemDistribution PatchedgemGemDistribution + +// NewPatchedgemGemDistribution instantiates a new PatchedgemGemDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedgemGemDistribution() *PatchedgemGemDistribution { + this := PatchedgemGemDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// NewPatchedgemGemDistributionWithDefaults instantiates a new PatchedgemGemDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedgemGemDistributionWithDefaults() *PatchedgemGemDistribution { + this := PatchedgemGemDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value if set, zero value otherwise. +func (o *PatchedgemGemDistribution) GetBasePath() string { + if o == nil || IsNil(o.BasePath) { + var ret string + return ret + } + return *o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedgemGemDistribution) GetBasePathOk() (*string, bool) { + if o == nil || IsNil(o.BasePath) { + return nil, false + } + return o.BasePath, true +} + +// HasBasePath returns a boolean if a field has been set. +func (o *PatchedgemGemDistribution) HasBasePath() bool { + if o != nil && !IsNil(o.BasePath) { + return true + } + + return false +} + +// SetBasePath gets a reference to the given string and assigns it to the BasePath field. +func (o *PatchedgemGemDistribution) SetBasePath(v string) { + o.BasePath = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *PatchedgemGemDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *PatchedgemGemDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *PatchedgemGemDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *PatchedgemGemDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *PatchedgemGemDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedgemGemDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *PatchedgemGemDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *PatchedgemGemDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedgemGemDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedgemGemDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedgemGemDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedgemGemDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedgemGemDistribution) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedgemGemDistribution) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedgemGemDistribution) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedgemGemDistribution) SetName(v string) { + o.Name = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *PatchedgemGemDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *PatchedgemGemDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *PatchedgemGemDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *PatchedgemGemDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemDistribution) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemDistribution) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *PatchedgemGemDistribution) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *PatchedgemGemDistribution) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *PatchedgemGemDistribution) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *PatchedgemGemDistribution) UnsetPublication() { + o.Publication.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemDistribution) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemDistribution) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatchedgemGemDistribution) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PatchedgemGemDistribution) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PatchedgemGemDistribution) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PatchedgemGemDistribution) UnsetRemote() { + o.Remote.Unset() +} + +func (o PatchedgemGemDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedgemGemDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasePath) { + toSerialize["base_path"] = o.BasePath + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedgemGemDistribution) UnmarshalJSON(bytes []byte) (err error) { + varPatchedgemGemDistribution := _PatchedgemGemDistribution{} + + if err = json.Unmarshal(bytes, &varPatchedgemGemDistribution); err == nil { + *o = PatchedgemGemDistribution(varPatchedgemGemDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedgemGemDistribution struct { + value *PatchedgemGemDistribution + isSet bool +} + +func (v NullablePatchedgemGemDistribution) Get() *PatchedgemGemDistribution { + return v.value +} + +func (v *NullablePatchedgemGemDistribution) Set(val *PatchedgemGemDistribution) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedgemGemDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedgemGemDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedgemGemDistribution(val *PatchedgemGemDistribution) *NullablePatchedgemGemDistribution { + return &NullablePatchedgemGemDistribution{value: val, isSet: true} +} + +func (v NullablePatchedgemGemDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedgemGemDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedgem_gem_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedgem_gem_remote.go new file mode 100644 index 0000000000..64028e26aa --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedgem_gem_remote.go @@ -0,0 +1,1182 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedgemGemRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedgemGemRemote{} + +// PatchedgemGemRemote A Serializer for GemRemote. +type PatchedgemGemRemote struct { + // A unique name for this remote. + Name *string `json:"name,omitempty"` + // The URL of an external content source. + Url *string `json:"url,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + Prereleases *bool `json:"prereleases,omitempty"` + Includes map[string]string `json:"includes,omitempty"` + Excludes map[string]string `json:"excludes,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedgemGemRemote PatchedgemGemRemote + +// NewPatchedgemGemRemote instantiates a new PatchedgemGemRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedgemGemRemote() *PatchedgemGemRemote { + this := PatchedgemGemRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + var prereleases bool = false + this.Prereleases = &prereleases + return &this +} + +// NewPatchedgemGemRemoteWithDefaults instantiates a new PatchedgemGemRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedgemGemRemoteWithDefaults() *PatchedgemGemRemote { + this := PatchedgemGemRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + var prereleases bool = false + this.Prereleases = &prereleases + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedgemGemRemote) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedgemGemRemote) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedgemGemRemote) SetName(v string) { + o.Name = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PatchedgemGemRemote) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedgemGemRemote) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PatchedgemGemRemote) SetUrl(v string) { + o.Url = &v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PatchedgemGemRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PatchedgemGemRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PatchedgemGemRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PatchedgemGemRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PatchedgemGemRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PatchedgemGemRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PatchedgemGemRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedgemGemRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PatchedgemGemRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PatchedgemGemRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PatchedgemGemRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *PatchedgemGemRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *PatchedgemGemRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *PatchedgemGemRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *PatchedgemGemRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *PatchedgemGemRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *PatchedgemGemRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PatchedgemGemRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PatchedgemGemRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedgemGemRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedgemGemRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedgemGemRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PatchedgemGemRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PatchedgemGemRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PatchedgemGemRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PatchedgemGemRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PatchedgemGemRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedgemGemRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *PatchedgemGemRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PatchedgemGemRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PatchedgemGemRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PatchedgemGemRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PatchedgemGemRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PatchedgemGemRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PatchedgemGemRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PatchedgemGemRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PatchedgemGemRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PatchedgemGemRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedgemGemRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PatchedgemGemRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PatchedgemGemRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PatchedgemGemRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PatchedgemGemRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetPrereleases returns the Prereleases field value if set, zero value otherwise. +func (o *PatchedgemGemRemote) GetPrereleases() bool { + if o == nil || IsNil(o.Prereleases) { + var ret bool + return ret + } + return *o.Prereleases +} + +// GetPrereleasesOk returns a tuple with the Prereleases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedgemGemRemote) GetPrereleasesOk() (*bool, bool) { + if o == nil || IsNil(o.Prereleases) { + return nil, false + } + return o.Prereleases, true +} + +// HasPrereleases returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasPrereleases() bool { + if o != nil && !IsNil(o.Prereleases) { + return true + } + + return false +} + +// SetPrereleases gets a reference to the given bool and assigns it to the Prereleases field. +func (o *PatchedgemGemRemote) SetPrereleases(v bool) { + o.Prereleases = &v +} + +// GetIncludes returns the Includes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetIncludes() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + return o.Includes +} + +// GetIncludesOk returns a tuple with the Includes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetIncludesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Includes) { + return nil, false + } + return &o.Includes, true +} + +// HasIncludes returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasIncludes() bool { + if o != nil && IsNil(o.Includes) { + return true + } + + return false +} + +// SetIncludes gets a reference to the given map[string]string and assigns it to the Includes field. +func (o *PatchedgemGemRemote) SetIncludes(v map[string]string) { + o.Includes = v +} + +// GetExcludes returns the Excludes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRemote) GetExcludes() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + return o.Excludes +} + +// GetExcludesOk returns a tuple with the Excludes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRemote) GetExcludesOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Excludes) { + return nil, false + } + return &o.Excludes, true +} + +// HasExcludes returns a boolean if a field has been set. +func (o *PatchedgemGemRemote) HasExcludes() bool { + if o != nil && IsNil(o.Excludes) { + return true + } + + return false +} + +// SetExcludes gets a reference to the given map[string]string and assigns it to the Excludes field. +func (o *PatchedgemGemRemote) SetExcludes(v map[string]string) { + o.Excludes = v +} + +func (o PatchedgemGemRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedgemGemRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.Prereleases) { + toSerialize["prereleases"] = o.Prereleases + } + if o.Includes != nil { + toSerialize["includes"] = o.Includes + } + if o.Excludes != nil { + toSerialize["excludes"] = o.Excludes + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedgemGemRemote) UnmarshalJSON(bytes []byte) (err error) { + varPatchedgemGemRemote := _PatchedgemGemRemote{} + + if err = json.Unmarshal(bytes, &varPatchedgemGemRemote); err == nil { + *o = PatchedgemGemRemote(varPatchedgemGemRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "prereleases") + delete(additionalProperties, "includes") + delete(additionalProperties, "excludes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedgemGemRemote struct { + value *PatchedgemGemRemote + isSet bool +} + +func (v NullablePatchedgemGemRemote) Get() *PatchedgemGemRemote { + return v.value +} + +func (v *NullablePatchedgemGemRemote) Set(val *PatchedgemGemRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedgemGemRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedgemGemRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedgemGemRemote(val *PatchedgemGemRemote) *NullablePatchedgemGemRemote { + return &NullablePatchedgemGemRemote{value: val, isSet: true} +} + +func (v NullablePatchedgemGemRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedgemGemRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedgem_gem_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedgem_gem_repository.go new file mode 100644 index 0000000000..2c01fac3ab --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedgem_gem_repository.go @@ -0,0 +1,334 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedgemGemRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedgemGemRepository{} + +// PatchedgemGemRepository A Serializer for GemRepository. +type PatchedgemGemRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedgemGemRepository PatchedgemGemRepository + +// NewPatchedgemGemRepository instantiates a new PatchedgemGemRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedgemGemRepository() *PatchedgemGemRepository { + this := PatchedgemGemRepository{} + return &this +} + +// NewPatchedgemGemRepositoryWithDefaults instantiates a new PatchedgemGemRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedgemGemRepositoryWithDefaults() *PatchedgemGemRepository { + this := PatchedgemGemRepository{} + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedgemGemRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedgemGemRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedgemGemRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedgemGemRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedgemGemRepository) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedgemGemRepository) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedgemGemRepository) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedgemGemRepository) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedgemGemRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedgemGemRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedgemGemRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedgemGemRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *PatchedgemGemRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *PatchedgemGemRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *PatchedgemGemRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *PatchedgemGemRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedgemGemRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedgemGemRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatchedgemGemRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PatchedgemGemRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PatchedgemGemRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PatchedgemGemRepository) UnsetRemote() { + o.Remote.Unset() +} + +func (o PatchedgemGemRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedgemGemRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedgemGemRepository) UnmarshalJSON(bytes []byte) (err error) { + varPatchedgemGemRepository := _PatchedgemGemRepository{} + + if err = json.Unmarshal(bytes, &varPatchedgemGemRepository); err == nil { + *o = PatchedgemGemRepository(varPatchedgemGemRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedgemGemRepository struct { + value *PatchedgemGemRepository + isSet bool +} + +func (v NullablePatchedgemGemRepository) Get() *PatchedgemGemRepository { + return v.value +} + +func (v *NullablePatchedgemGemRepository) Set(val *PatchedgemGemRepository) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedgemGemRepository) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedgemGemRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedgemGemRepository(val *PatchedgemGemRepository) *NullablePatchedgemGemRepository { + return &NullablePatchedgemGemRepository{value: val, isSet: true} +} + +func (v NullablePatchedgemGemRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedgemGemRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedmaven_maven_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedmaven_maven_distribution.go new file mode 100644 index 0000000000..9e9f9dac13 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedmaven_maven_distribution.go @@ -0,0 +1,414 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedmavenMavenDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedmavenMavenDistribution{} + +// PatchedmavenMavenDistribution Serializer for Maven Distributions. +type PatchedmavenMavenDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath *string `json:"base_path,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name *string `json:"name,omitempty"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Remote that can be used to fetch content when using pull-through caching. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedmavenMavenDistribution PatchedmavenMavenDistribution + +// NewPatchedmavenMavenDistribution instantiates a new PatchedmavenMavenDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedmavenMavenDistribution() *PatchedmavenMavenDistribution { + this := PatchedmavenMavenDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// NewPatchedmavenMavenDistributionWithDefaults instantiates a new PatchedmavenMavenDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedmavenMavenDistributionWithDefaults() *PatchedmavenMavenDistribution { + this := PatchedmavenMavenDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value if set, zero value otherwise. +func (o *PatchedmavenMavenDistribution) GetBasePath() string { + if o == nil || IsNil(o.BasePath) { + var ret string + return ret + } + return *o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedmavenMavenDistribution) GetBasePathOk() (*string, bool) { + if o == nil || IsNil(o.BasePath) { + return nil, false + } + return o.BasePath, true +} + +// HasBasePath returns a boolean if a field has been set. +func (o *PatchedmavenMavenDistribution) HasBasePath() bool { + if o != nil && !IsNil(o.BasePath) { + return true + } + + return false +} + +// SetBasePath gets a reference to the given string and assigns it to the BasePath field. +func (o *PatchedmavenMavenDistribution) SetBasePath(v string) { + o.BasePath = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *PatchedmavenMavenDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *PatchedmavenMavenDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *PatchedmavenMavenDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *PatchedmavenMavenDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *PatchedmavenMavenDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedmavenMavenDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *PatchedmavenMavenDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *PatchedmavenMavenDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedmavenMavenDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedmavenMavenDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedmavenMavenDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedmavenMavenDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedmavenMavenDistribution) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedmavenMavenDistribution) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedmavenMavenDistribution) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedmavenMavenDistribution) SetName(v string) { + o.Name = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *PatchedmavenMavenDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *PatchedmavenMavenDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *PatchedmavenMavenDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *PatchedmavenMavenDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenDistribution) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenDistribution) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatchedmavenMavenDistribution) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PatchedmavenMavenDistribution) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PatchedmavenMavenDistribution) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PatchedmavenMavenDistribution) UnsetRemote() { + o.Remote.Unset() +} + +func (o PatchedmavenMavenDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedmavenMavenDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasePath) { + toSerialize["base_path"] = o.BasePath + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedmavenMavenDistribution) UnmarshalJSON(bytes []byte) (err error) { + varPatchedmavenMavenDistribution := _PatchedmavenMavenDistribution{} + + if err = json.Unmarshal(bytes, &varPatchedmavenMavenDistribution); err == nil { + *o = PatchedmavenMavenDistribution(varPatchedmavenMavenDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedmavenMavenDistribution struct { + value *PatchedmavenMavenDistribution + isSet bool +} + +func (v NullablePatchedmavenMavenDistribution) Get() *PatchedmavenMavenDistribution { + return v.value +} + +func (v *NullablePatchedmavenMavenDistribution) Set(val *PatchedmavenMavenDistribution) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedmavenMavenDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedmavenMavenDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedmavenMavenDistribution(val *PatchedmavenMavenDistribution) *NullablePatchedmavenMavenDistribution { + return &NullablePatchedmavenMavenDistribution{value: val, isSet: true} +} + +func (v NullablePatchedmavenMavenDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedmavenMavenDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedmaven_maven_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedmaven_maven_remote.go new file mode 100644 index 0000000000..c491f76116 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedmaven_maven_remote.go @@ -0,0 +1,1065 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedmavenMavenRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedmavenMavenRemote{} + +// PatchedmavenMavenRemote A Serializer for MavenRemote. Add any new fields if defined on MavenRemote. Similar to the example above, in MavenArtifactSerializer. Additional validators can be added to the parent validators list For example:: class Meta: validators = platform.RemoteSerializer.Meta.validators + [myValidator1, myValidator2] +type PatchedmavenMavenRemote struct { + // A unique name for this remote. + Name *string `json:"name,omitempty"` + // The URL of an external content source. + Url *string `json:"url,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *PolicyDb6Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedmavenMavenRemote PatchedmavenMavenRemote + +// NewPatchedmavenMavenRemote instantiates a new PatchedmavenMavenRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedmavenMavenRemote() *PatchedmavenMavenRemote { + this := PatchedmavenMavenRemote{} + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewPatchedmavenMavenRemoteWithDefaults instantiates a new PatchedmavenMavenRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedmavenMavenRemoteWithDefaults() *PatchedmavenMavenRemote { + this := PatchedmavenMavenRemote{} + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedmavenMavenRemote) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedmavenMavenRemote) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedmavenMavenRemote) SetName(v string) { + o.Name = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PatchedmavenMavenRemote) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedmavenMavenRemote) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PatchedmavenMavenRemote) SetUrl(v string) { + o.Url = &v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PatchedmavenMavenRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PatchedmavenMavenRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PatchedmavenMavenRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PatchedmavenMavenRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PatchedmavenMavenRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PatchedmavenMavenRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PatchedmavenMavenRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedmavenMavenRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PatchedmavenMavenRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PatchedmavenMavenRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PatchedmavenMavenRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *PatchedmavenMavenRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *PatchedmavenMavenRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *PatchedmavenMavenRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *PatchedmavenMavenRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *PatchedmavenMavenRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *PatchedmavenMavenRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PatchedmavenMavenRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PatchedmavenMavenRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedmavenMavenRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedmavenMavenRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedmavenMavenRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PatchedmavenMavenRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PatchedmavenMavenRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PatchedmavenMavenRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PatchedmavenMavenRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PatchedmavenMavenRemote) GetPolicy() PolicyDb6Enum { + if o == nil || IsNil(o.Policy) { + var ret PolicyDb6Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedmavenMavenRemote) GetPolicyOk() (*PolicyDb6Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given PolicyDb6Enum and assigns it to the Policy field. +func (o *PatchedmavenMavenRemote) SetPolicy(v PolicyDb6Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PatchedmavenMavenRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PatchedmavenMavenRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PatchedmavenMavenRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PatchedmavenMavenRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PatchedmavenMavenRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PatchedmavenMavenRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PatchedmavenMavenRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PatchedmavenMavenRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PatchedmavenMavenRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedmavenMavenRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PatchedmavenMavenRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PatchedmavenMavenRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PatchedmavenMavenRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PatchedmavenMavenRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PatchedmavenMavenRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +func (o PatchedmavenMavenRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedmavenMavenRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedmavenMavenRemote) UnmarshalJSON(bytes []byte) (err error) { + varPatchedmavenMavenRemote := _PatchedmavenMavenRemote{} + + if err = json.Unmarshal(bytes, &varPatchedmavenMavenRemote); err == nil { + *o = PatchedmavenMavenRemote(varPatchedmavenMavenRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedmavenMavenRemote struct { + value *PatchedmavenMavenRemote + isSet bool +} + +func (v NullablePatchedmavenMavenRemote) Get() *PatchedmavenMavenRemote { + return v.value +} + +func (v *NullablePatchedmavenMavenRemote) Set(val *PatchedmavenMavenRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedmavenMavenRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedmavenMavenRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedmavenMavenRemote(val *PatchedmavenMavenRemote) *NullablePatchedmavenMavenRemote { + return &NullablePatchedmavenMavenRemote{value: val, isSet: true} +} + +func (v NullablePatchedmavenMavenRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedmavenMavenRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedmaven_maven_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedmaven_maven_repository.go new file mode 100644 index 0000000000..7a9ca63173 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedmaven_maven_repository.go @@ -0,0 +1,334 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedmavenMavenRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedmavenMavenRepository{} + +// PatchedmavenMavenRepository Serializer for Maven Repositories. +type PatchedmavenMavenRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedmavenMavenRepository PatchedmavenMavenRepository + +// NewPatchedmavenMavenRepository instantiates a new PatchedmavenMavenRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedmavenMavenRepository() *PatchedmavenMavenRepository { + this := PatchedmavenMavenRepository{} + return &this +} + +// NewPatchedmavenMavenRepositoryWithDefaults instantiates a new PatchedmavenMavenRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedmavenMavenRepositoryWithDefaults() *PatchedmavenMavenRepository { + this := PatchedmavenMavenRepository{} + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedmavenMavenRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedmavenMavenRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedmavenMavenRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedmavenMavenRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedmavenMavenRepository) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedmavenMavenRepository) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedmavenMavenRepository) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedmavenMavenRepository) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedmavenMavenRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedmavenMavenRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedmavenMavenRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedmavenMavenRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *PatchedmavenMavenRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *PatchedmavenMavenRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *PatchedmavenMavenRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *PatchedmavenMavenRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedmavenMavenRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedmavenMavenRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatchedmavenMavenRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PatchedmavenMavenRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PatchedmavenMavenRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PatchedmavenMavenRepository) UnsetRemote() { + o.Remote.Unset() +} + +func (o PatchedmavenMavenRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedmavenMavenRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedmavenMavenRepository) UnmarshalJSON(bytes []byte) (err error) { + varPatchedmavenMavenRepository := _PatchedmavenMavenRepository{} + + if err = json.Unmarshal(bytes, &varPatchedmavenMavenRepository); err == nil { + *o = PatchedmavenMavenRepository(varPatchedmavenMavenRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedmavenMavenRepository struct { + value *PatchedmavenMavenRepository + isSet bool +} + +func (v NullablePatchedmavenMavenRepository) Get() *PatchedmavenMavenRepository { + return v.value +} + +func (v *NullablePatchedmavenMavenRepository) Set(val *PatchedmavenMavenRepository) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedmavenMavenRepository) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedmavenMavenRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedmavenMavenRepository(val *PatchedmavenMavenRepository) *NullablePatchedmavenMavenRepository { + return &NullablePatchedmavenMavenRepository{value: val, isSet: true} +} + +func (v NullablePatchedmavenMavenRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedmavenMavenRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedostree_ostree_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedostree_ostree_distribution.go new file mode 100644 index 0000000000..5befe6e25b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedostree_ostree_distribution.go @@ -0,0 +1,414 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedostreeOstreeDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedostreeOstreeDistribution{} + +// PatchedostreeOstreeDistribution A Serializer class for an OSTree distribution. +type PatchedostreeOstreeDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath *string `json:"base_path,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name *string `json:"name,omitempty"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // RepositoryVersion to be served + RepositoryVersion NullableString `json:"repository_version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedostreeOstreeDistribution PatchedostreeOstreeDistribution + +// NewPatchedostreeOstreeDistribution instantiates a new PatchedostreeOstreeDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedostreeOstreeDistribution() *PatchedostreeOstreeDistribution { + this := PatchedostreeOstreeDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// NewPatchedostreeOstreeDistributionWithDefaults instantiates a new PatchedostreeOstreeDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedostreeOstreeDistributionWithDefaults() *PatchedostreeOstreeDistribution { + this := PatchedostreeOstreeDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value if set, zero value otherwise. +func (o *PatchedostreeOstreeDistribution) GetBasePath() string { + if o == nil || IsNil(o.BasePath) { + var ret string + return ret + } + return *o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeDistribution) GetBasePathOk() (*string, bool) { + if o == nil || IsNil(o.BasePath) { + return nil, false + } + return o.BasePath, true +} + +// HasBasePath returns a boolean if a field has been set. +func (o *PatchedostreeOstreeDistribution) HasBasePath() bool { + if o != nil && !IsNil(o.BasePath) { + return true + } + + return false +} + +// SetBasePath gets a reference to the given string and assigns it to the BasePath field. +func (o *PatchedostreeOstreeDistribution) SetBasePath(v string) { + o.BasePath = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *PatchedostreeOstreeDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *PatchedostreeOstreeDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *PatchedostreeOstreeDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *PatchedostreeOstreeDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *PatchedostreeOstreeDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *PatchedostreeOstreeDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *PatchedostreeOstreeDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedostreeOstreeDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedostreeOstreeDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedostreeOstreeDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedostreeOstreeDistribution) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeDistribution) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedostreeOstreeDistribution) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedostreeOstreeDistribution) SetName(v string) { + o.Name = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *PatchedostreeOstreeDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *PatchedostreeOstreeDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *PatchedostreeOstreeDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *PatchedostreeOstreeDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeDistribution) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion.Get()) { + var ret string + return ret + } + return *o.RepositoryVersion.Get() +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeDistribution) GetRepositoryVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RepositoryVersion.Get(), o.RepositoryVersion.IsSet() +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *PatchedostreeOstreeDistribution) HasRepositoryVersion() bool { + if o != nil && o.RepositoryVersion.IsSet() { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given NullableString and assigns it to the RepositoryVersion field. +func (o *PatchedostreeOstreeDistribution) SetRepositoryVersion(v string) { + o.RepositoryVersion.Set(&v) +} +// SetRepositoryVersionNil sets the value for RepositoryVersion to be an explicit nil +func (o *PatchedostreeOstreeDistribution) SetRepositoryVersionNil() { + o.RepositoryVersion.Set(nil) +} + +// UnsetRepositoryVersion ensures that no value is present for RepositoryVersion, not even an explicit nil +func (o *PatchedostreeOstreeDistribution) UnsetRepositoryVersion() { + o.RepositoryVersion.Unset() +} + +func (o PatchedostreeOstreeDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedostreeOstreeDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasePath) { + toSerialize["base_path"] = o.BasePath + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.RepositoryVersion.IsSet() { + toSerialize["repository_version"] = o.RepositoryVersion.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedostreeOstreeDistribution) UnmarshalJSON(bytes []byte) (err error) { + varPatchedostreeOstreeDistribution := _PatchedostreeOstreeDistribution{} + + if err = json.Unmarshal(bytes, &varPatchedostreeOstreeDistribution); err == nil { + *o = PatchedostreeOstreeDistribution(varPatchedostreeOstreeDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "repository_version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedostreeOstreeDistribution struct { + value *PatchedostreeOstreeDistribution + isSet bool +} + +func (v NullablePatchedostreeOstreeDistribution) Get() *PatchedostreeOstreeDistribution { + return v.value +} + +func (v *NullablePatchedostreeOstreeDistribution) Set(val *PatchedostreeOstreeDistribution) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedostreeOstreeDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedostreeOstreeDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedostreeOstreeDistribution(val *PatchedostreeOstreeDistribution) *NullablePatchedostreeOstreeDistribution { + return &NullablePatchedostreeOstreeDistribution{value: val, isSet: true} +} + +func (v NullablePatchedostreeOstreeDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedostreeOstreeDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedostree_ostree_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedostree_ostree_remote.go new file mode 100644 index 0000000000..a9f6481a31 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedostree_ostree_remote.go @@ -0,0 +1,1185 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedostreeOstreeRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedostreeOstreeRemote{} + +// PatchedostreeOstreeRemote A Serializer class for a remote OSTree repository. +type PatchedostreeOstreeRemote struct { + // A unique name for this remote. + Name *string `json:"name,omitempty"` + // The URL of an external content source. + Url *string `json:"url,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy462Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // An option to specify how many commits to traverse. + Depth *int64 `json:"depth,omitempty"` + // A list of refs to include during a sync. The wildcards *, ? are recognized. 'include_refs' is evaluated before 'exclude_refs'. + IncludeRefs []string `json:"include_refs,omitempty"` + // A list of tags to exclude during a sync. The wildcards *, ? are recognized. 'exclude_refs' is evaluated after 'include_refs'. + ExcludeRefs []string `json:"exclude_refs,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedostreeOstreeRemote PatchedostreeOstreeRemote + +// NewPatchedostreeOstreeRemote instantiates a new PatchedostreeOstreeRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedostreeOstreeRemote() *PatchedostreeOstreeRemote { + this := PatchedostreeOstreeRemote{} + var policy Policy462Enum = POLICY462ENUM_IMMEDIATE + this.Policy = &policy + var depth int64 = 0 + this.Depth = &depth + return &this +} + +// NewPatchedostreeOstreeRemoteWithDefaults instantiates a new PatchedostreeOstreeRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedostreeOstreeRemoteWithDefaults() *PatchedostreeOstreeRemote { + this := PatchedostreeOstreeRemote{} + var policy Policy462Enum = POLICY462ENUM_IMMEDIATE + this.Policy = &policy + var depth int64 = 0 + this.Depth = &depth + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedostreeOstreeRemote) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeRemote) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedostreeOstreeRemote) SetName(v string) { + o.Name = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PatchedostreeOstreeRemote) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeRemote) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PatchedostreeOstreeRemote) SetUrl(v string) { + o.Url = &v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PatchedostreeOstreeRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PatchedostreeOstreeRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PatchedostreeOstreeRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PatchedostreeOstreeRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PatchedostreeOstreeRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PatchedostreeOstreeRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *PatchedostreeOstreeRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *PatchedostreeOstreeRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *PatchedostreeOstreeRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PatchedostreeOstreeRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedostreeOstreeRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedostreeOstreeRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PatchedostreeOstreeRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PatchedostreeOstreeRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PatchedostreeOstreeRemote) GetPolicy() Policy462Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy462Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeRemote) GetPolicyOk() (*Policy462Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy462Enum and assigns it to the Policy field. +func (o *PatchedostreeOstreeRemote) SetPolicy(v Policy462Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PatchedostreeOstreeRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PatchedostreeOstreeRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PatchedostreeOstreeRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PatchedostreeOstreeRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PatchedostreeOstreeRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PatchedostreeOstreeRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PatchedostreeOstreeRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PatchedostreeOstreeRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PatchedostreeOstreeRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetDepth returns the Depth field value if set, zero value otherwise. +func (o *PatchedostreeOstreeRemote) GetDepth() int64 { + if o == nil || IsNil(o.Depth) { + var ret int64 + return ret + } + return *o.Depth +} + +// GetDepthOk returns a tuple with the Depth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeRemote) GetDepthOk() (*int64, bool) { + if o == nil || IsNil(o.Depth) { + return nil, false + } + return o.Depth, true +} + +// HasDepth returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasDepth() bool { + if o != nil && !IsNil(o.Depth) { + return true + } + + return false +} + +// SetDepth gets a reference to the given int64 and assigns it to the Depth field. +func (o *PatchedostreeOstreeRemote) SetDepth(v int64) { + o.Depth = &v +} + +// GetIncludeRefs returns the IncludeRefs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetIncludeRefs() []string { + if o == nil { + var ret []string + return ret + } + return o.IncludeRefs +} + +// GetIncludeRefsOk returns a tuple with the IncludeRefs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetIncludeRefsOk() ([]string, bool) { + if o == nil || IsNil(o.IncludeRefs) { + return nil, false + } + return o.IncludeRefs, true +} + +// HasIncludeRefs returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasIncludeRefs() bool { + if o != nil && IsNil(o.IncludeRefs) { + return true + } + + return false +} + +// SetIncludeRefs gets a reference to the given []string and assigns it to the IncludeRefs field. +func (o *PatchedostreeOstreeRemote) SetIncludeRefs(v []string) { + o.IncludeRefs = v +} + +// GetExcludeRefs returns the ExcludeRefs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRemote) GetExcludeRefs() []string { + if o == nil { + var ret []string + return ret + } + return o.ExcludeRefs +} + +// GetExcludeRefsOk returns a tuple with the ExcludeRefs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRemote) GetExcludeRefsOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeRefs) { + return nil, false + } + return o.ExcludeRefs, true +} + +// HasExcludeRefs returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRemote) HasExcludeRefs() bool { + if o != nil && IsNil(o.ExcludeRefs) { + return true + } + + return false +} + +// SetExcludeRefs gets a reference to the given []string and assigns it to the ExcludeRefs field. +func (o *PatchedostreeOstreeRemote) SetExcludeRefs(v []string) { + o.ExcludeRefs = v +} + +func (o PatchedostreeOstreeRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedostreeOstreeRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.Depth) { + toSerialize["depth"] = o.Depth + } + if o.IncludeRefs != nil { + toSerialize["include_refs"] = o.IncludeRefs + } + if o.ExcludeRefs != nil { + toSerialize["exclude_refs"] = o.ExcludeRefs + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedostreeOstreeRemote) UnmarshalJSON(bytes []byte) (err error) { + varPatchedostreeOstreeRemote := _PatchedostreeOstreeRemote{} + + if err = json.Unmarshal(bytes, &varPatchedostreeOstreeRemote); err == nil { + *o = PatchedostreeOstreeRemote(varPatchedostreeOstreeRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "depth") + delete(additionalProperties, "include_refs") + delete(additionalProperties, "exclude_refs") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedostreeOstreeRemote struct { + value *PatchedostreeOstreeRemote + isSet bool +} + +func (v NullablePatchedostreeOstreeRemote) Get() *PatchedostreeOstreeRemote { + return v.value +} + +func (v *NullablePatchedostreeOstreeRemote) Set(val *PatchedostreeOstreeRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedostreeOstreeRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedostreeOstreeRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedostreeOstreeRemote(val *PatchedostreeOstreeRemote) *NullablePatchedostreeOstreeRemote { + return &NullablePatchedostreeOstreeRemote{value: val, isSet: true} +} + +func (v NullablePatchedostreeOstreeRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedostreeOstreeRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedostree_ostree_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedostree_ostree_repository.go new file mode 100644 index 0000000000..b63419878d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedostree_ostree_repository.go @@ -0,0 +1,375 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedostreeOstreeRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedostreeOstreeRepository{} + +// PatchedostreeOstreeRepository A Serializer class for an OSTree repository. +type PatchedostreeOstreeRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + ComputeDelta *bool `json:"compute_delta,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedostreeOstreeRepository PatchedostreeOstreeRepository + +// NewPatchedostreeOstreeRepository instantiates a new PatchedostreeOstreeRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedostreeOstreeRepository() *PatchedostreeOstreeRepository { + this := PatchedostreeOstreeRepository{} + var computeDelta bool = true + this.ComputeDelta = &computeDelta + return &this +} + +// NewPatchedostreeOstreeRepositoryWithDefaults instantiates a new PatchedostreeOstreeRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedostreeOstreeRepositoryWithDefaults() *PatchedostreeOstreeRepository { + this := PatchedostreeOstreeRepository{} + var computeDelta bool = true + this.ComputeDelta = &computeDelta + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedostreeOstreeRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedostreeOstreeRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedostreeOstreeRepository) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeRepository) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRepository) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedostreeOstreeRepository) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedostreeOstreeRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedostreeOstreeRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedostreeOstreeRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *PatchedostreeOstreeRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *PatchedostreeOstreeRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *PatchedostreeOstreeRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedostreeOstreeRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedostreeOstreeRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PatchedostreeOstreeRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PatchedostreeOstreeRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PatchedostreeOstreeRepository) UnsetRemote() { + o.Remote.Unset() +} + +// GetComputeDelta returns the ComputeDelta field value if set, zero value otherwise. +func (o *PatchedostreeOstreeRepository) GetComputeDelta() bool { + if o == nil || IsNil(o.ComputeDelta) { + var ret bool + return ret + } + return *o.ComputeDelta +} + +// GetComputeDeltaOk returns a tuple with the ComputeDelta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedostreeOstreeRepository) GetComputeDeltaOk() (*bool, bool) { + if o == nil || IsNil(o.ComputeDelta) { + return nil, false + } + return o.ComputeDelta, true +} + +// HasComputeDelta returns a boolean if a field has been set. +func (o *PatchedostreeOstreeRepository) HasComputeDelta() bool { + if o != nil && !IsNil(o.ComputeDelta) { + return true + } + + return false +} + +// SetComputeDelta gets a reference to the given bool and assigns it to the ComputeDelta field. +func (o *PatchedostreeOstreeRepository) SetComputeDelta(v bool) { + o.ComputeDelta = &v +} + +func (o PatchedostreeOstreeRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedostreeOstreeRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if !IsNil(o.ComputeDelta) { + toSerialize["compute_delta"] = o.ComputeDelta + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedostreeOstreeRepository) UnmarshalJSON(bytes []byte) (err error) { + varPatchedostreeOstreeRepository := _PatchedostreeOstreeRepository{} + + if err = json.Unmarshal(bytes, &varPatchedostreeOstreeRepository); err == nil { + *o = PatchedostreeOstreeRepository(varPatchedostreeOstreeRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "compute_delta") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedostreeOstreeRepository struct { + value *PatchedostreeOstreeRepository + isSet bool +} + +func (v NullablePatchedostreeOstreeRepository) Get() *PatchedostreeOstreeRepository { + return v.value +} + +func (v *NullablePatchedostreeOstreeRepository) Set(val *PatchedostreeOstreeRepository) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedostreeOstreeRepository) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedostreeOstreeRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedostreeOstreeRepository(val *PatchedostreeOstreeRepository) *NullablePatchedostreeOstreeRepository { + return &NullablePatchedostreeOstreeRepository{value: val, isSet: true} +} + +func (v NullablePatchedostreeOstreeRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedostreeOstreeRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedpython_python_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedpython_python_distribution.go new file mode 100644 index 0000000000..e8f37b7ce3 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedpython_python_distribution.go @@ -0,0 +1,504 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedpythonPythonDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedpythonPythonDistribution{} + +// PatchedpythonPythonDistribution Serializer for Pulp distributions for the Python type. +type PatchedpythonPythonDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath *string `json:"base_path,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name *string `json:"name,omitempty"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + // Allow packages to be uploaded to this index. + AllowUploads *bool `json:"allow_uploads,omitempty"` + // Remote that can be used to fetch content when using pull-through caching. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedpythonPythonDistribution PatchedpythonPythonDistribution + +// NewPatchedpythonPythonDistribution instantiates a new PatchedpythonPythonDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedpythonPythonDistribution() *PatchedpythonPythonDistribution { + this := PatchedpythonPythonDistribution{} + var hidden bool = false + this.Hidden = &hidden + var allowUploads bool = true + this.AllowUploads = &allowUploads + return &this +} + +// NewPatchedpythonPythonDistributionWithDefaults instantiates a new PatchedpythonPythonDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedpythonPythonDistributionWithDefaults() *PatchedpythonPythonDistribution { + this := PatchedpythonPythonDistribution{} + var hidden bool = false + this.Hidden = &hidden + var allowUploads bool = true + this.AllowUploads = &allowUploads + return &this +} + +// GetBasePath returns the BasePath field value if set, zero value otherwise. +func (o *PatchedpythonPythonDistribution) GetBasePath() string { + if o == nil || IsNil(o.BasePath) { + var ret string + return ret + } + return *o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonDistribution) GetBasePathOk() (*string, bool) { + if o == nil || IsNil(o.BasePath) { + return nil, false + } + return o.BasePath, true +} + +// HasBasePath returns a boolean if a field has been set. +func (o *PatchedpythonPythonDistribution) HasBasePath() bool { + if o != nil && !IsNil(o.BasePath) { + return true + } + + return false +} + +// SetBasePath gets a reference to the given string and assigns it to the BasePath field. +func (o *PatchedpythonPythonDistribution) SetBasePath(v string) { + o.BasePath = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *PatchedpythonPythonDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *PatchedpythonPythonDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *PatchedpythonPythonDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *PatchedpythonPythonDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *PatchedpythonPythonDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *PatchedpythonPythonDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *PatchedpythonPythonDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedpythonPythonDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedpythonPythonDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedpythonPythonDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedpythonPythonDistribution) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonDistribution) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedpythonPythonDistribution) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedpythonPythonDistribution) SetName(v string) { + o.Name = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *PatchedpythonPythonDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *PatchedpythonPythonDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *PatchedpythonPythonDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *PatchedpythonPythonDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonDistribution) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonDistribution) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *PatchedpythonPythonDistribution) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *PatchedpythonPythonDistribution) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *PatchedpythonPythonDistribution) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *PatchedpythonPythonDistribution) UnsetPublication() { + o.Publication.Unset() +} + +// GetAllowUploads returns the AllowUploads field value if set, zero value otherwise. +func (o *PatchedpythonPythonDistribution) GetAllowUploads() bool { + if o == nil || IsNil(o.AllowUploads) { + var ret bool + return ret + } + return *o.AllowUploads +} + +// GetAllowUploadsOk returns a tuple with the AllowUploads field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonDistribution) GetAllowUploadsOk() (*bool, bool) { + if o == nil || IsNil(o.AllowUploads) { + return nil, false + } + return o.AllowUploads, true +} + +// HasAllowUploads returns a boolean if a field has been set. +func (o *PatchedpythonPythonDistribution) HasAllowUploads() bool { + if o != nil && !IsNil(o.AllowUploads) { + return true + } + + return false +} + +// SetAllowUploads gets a reference to the given bool and assigns it to the AllowUploads field. +func (o *PatchedpythonPythonDistribution) SetAllowUploads(v bool) { + o.AllowUploads = &v +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonDistribution) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonDistribution) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatchedpythonPythonDistribution) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PatchedpythonPythonDistribution) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PatchedpythonPythonDistribution) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PatchedpythonPythonDistribution) UnsetRemote() { + o.Remote.Unset() +} + +func (o PatchedpythonPythonDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedpythonPythonDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasePath) { + toSerialize["base_path"] = o.BasePath + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + if !IsNil(o.AllowUploads) { + toSerialize["allow_uploads"] = o.AllowUploads + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedpythonPythonDistribution) UnmarshalJSON(bytes []byte) (err error) { + varPatchedpythonPythonDistribution := _PatchedpythonPythonDistribution{} + + if err = json.Unmarshal(bytes, &varPatchedpythonPythonDistribution); err == nil { + *o = PatchedpythonPythonDistribution(varPatchedpythonPythonDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + delete(additionalProperties, "allow_uploads") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedpythonPythonDistribution struct { + value *PatchedpythonPythonDistribution + isSet bool +} + +func (v NullablePatchedpythonPythonDistribution) Get() *PatchedpythonPythonDistribution { + return v.value +} + +func (v *NullablePatchedpythonPythonDistribution) Set(val *PatchedpythonPythonDistribution) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedpythonPythonDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedpythonPythonDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedpythonPythonDistribution(val *PatchedpythonPythonDistribution) *NullablePatchedpythonPythonDistribution { + return &NullablePatchedpythonPythonDistribution{value: val, isSet: true} +} + +func (v NullablePatchedpythonPythonDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedpythonPythonDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedpython_python_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedpython_python_remote.go new file mode 100644 index 0000000000..f1dce52c53 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedpython_python_remote.go @@ -0,0 +1,1297 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedpythonPythonRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedpythonPythonRemote{} + +// PatchedpythonPythonRemote A Serializer for PythonRemote. +type PatchedpythonPythonRemote struct { + // A unique name for this remote. + Name *string `json:"name,omitempty"` + // The URL of an external content source. + Url *string `json:"url,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // A list containing project specifiers for Python packages to include. + Includes []string `json:"includes,omitempty"` + // A list containing project specifiers for Python packages to exclude. + Excludes []string `json:"excludes,omitempty"` + // Whether or not to include pre-release packages in the sync. + Prereleases *bool `json:"prereleases,omitempty"` + // The package types to sync for Python content. Leave blank to get everypackage type. + PackageTypes []PackageTypesEnum `json:"package_types,omitempty"` + // The amount of latest versions of a package to keep on sync, includespre-releases if synced. Default 0 keeps all versions. + KeepLatestPackages *int64 `json:"keep_latest_packages,omitempty"` + // List of platforms to exclude syncing Python packages for. Possible valuesinclude: windows, macos, freebsd, and linux. + ExcludePlatforms []ExcludePlatformsEnum `json:"exclude_platforms,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedpythonPythonRemote PatchedpythonPythonRemote + +// NewPatchedpythonPythonRemote instantiates a new PatchedpythonPythonRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedpythonPythonRemote() *PatchedpythonPythonRemote { + this := PatchedpythonPythonRemote{} + var policy Policy762Enum = POLICY762ENUM_ON_DEMAND + this.Policy = &policy + var keepLatestPackages int64 = 0 + this.KeepLatestPackages = &keepLatestPackages + return &this +} + +// NewPatchedpythonPythonRemoteWithDefaults instantiates a new PatchedpythonPythonRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedpythonPythonRemoteWithDefaults() *PatchedpythonPythonRemote { + this := PatchedpythonPythonRemote{} + var policy Policy762Enum = POLICY762ENUM_ON_DEMAND + this.Policy = &policy + var keepLatestPackages int64 = 0 + this.KeepLatestPackages = &keepLatestPackages + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedpythonPythonRemote) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRemote) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedpythonPythonRemote) SetName(v string) { + o.Name = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PatchedpythonPythonRemote) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRemote) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PatchedpythonPythonRemote) SetUrl(v string) { + o.Url = &v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PatchedpythonPythonRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PatchedpythonPythonRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PatchedpythonPythonRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PatchedpythonPythonRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PatchedpythonPythonRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PatchedpythonPythonRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PatchedpythonPythonRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PatchedpythonPythonRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PatchedpythonPythonRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PatchedpythonPythonRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *PatchedpythonPythonRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *PatchedpythonPythonRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *PatchedpythonPythonRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *PatchedpythonPythonRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *PatchedpythonPythonRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *PatchedpythonPythonRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PatchedpythonPythonRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PatchedpythonPythonRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedpythonPythonRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedpythonPythonRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PatchedpythonPythonRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PatchedpythonPythonRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PatchedpythonPythonRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PatchedpythonPythonRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PatchedpythonPythonRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *PatchedpythonPythonRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PatchedpythonPythonRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PatchedpythonPythonRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PatchedpythonPythonRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PatchedpythonPythonRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PatchedpythonPythonRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PatchedpythonPythonRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PatchedpythonPythonRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PatchedpythonPythonRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PatchedpythonPythonRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PatchedpythonPythonRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PatchedpythonPythonRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PatchedpythonPythonRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PatchedpythonPythonRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetIncludes returns the Includes field value if set, zero value otherwise. +func (o *PatchedpythonPythonRemote) GetIncludes() []string { + if o == nil || IsNil(o.Includes) { + var ret []string + return ret + } + return o.Includes +} + +// GetIncludesOk returns a tuple with the Includes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRemote) GetIncludesOk() ([]string, bool) { + if o == nil || IsNil(o.Includes) { + return nil, false + } + return o.Includes, true +} + +// HasIncludes returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasIncludes() bool { + if o != nil && !IsNil(o.Includes) { + return true + } + + return false +} + +// SetIncludes gets a reference to the given []string and assigns it to the Includes field. +func (o *PatchedpythonPythonRemote) SetIncludes(v []string) { + o.Includes = v +} + +// GetExcludes returns the Excludes field value if set, zero value otherwise. +func (o *PatchedpythonPythonRemote) GetExcludes() []string { + if o == nil || IsNil(o.Excludes) { + var ret []string + return ret + } + return o.Excludes +} + +// GetExcludesOk returns a tuple with the Excludes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRemote) GetExcludesOk() ([]string, bool) { + if o == nil || IsNil(o.Excludes) { + return nil, false + } + return o.Excludes, true +} + +// HasExcludes returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasExcludes() bool { + if o != nil && !IsNil(o.Excludes) { + return true + } + + return false +} + +// SetExcludes gets a reference to the given []string and assigns it to the Excludes field. +func (o *PatchedpythonPythonRemote) SetExcludes(v []string) { + o.Excludes = v +} + +// GetPrereleases returns the Prereleases field value if set, zero value otherwise. +func (o *PatchedpythonPythonRemote) GetPrereleases() bool { + if o == nil || IsNil(o.Prereleases) { + var ret bool + return ret + } + return *o.Prereleases +} + +// GetPrereleasesOk returns a tuple with the Prereleases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRemote) GetPrereleasesOk() (*bool, bool) { + if o == nil || IsNil(o.Prereleases) { + return nil, false + } + return o.Prereleases, true +} + +// HasPrereleases returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasPrereleases() bool { + if o != nil && !IsNil(o.Prereleases) { + return true + } + + return false +} + +// SetPrereleases gets a reference to the given bool and assigns it to the Prereleases field. +func (o *PatchedpythonPythonRemote) SetPrereleases(v bool) { + o.Prereleases = &v +} + +// GetPackageTypes returns the PackageTypes field value if set, zero value otherwise. +func (o *PatchedpythonPythonRemote) GetPackageTypes() []PackageTypesEnum { + if o == nil || IsNil(o.PackageTypes) { + var ret []PackageTypesEnum + return ret + } + return o.PackageTypes +} + +// GetPackageTypesOk returns a tuple with the PackageTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRemote) GetPackageTypesOk() ([]PackageTypesEnum, bool) { + if o == nil || IsNil(o.PackageTypes) { + return nil, false + } + return o.PackageTypes, true +} + +// HasPackageTypes returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasPackageTypes() bool { + if o != nil && !IsNil(o.PackageTypes) { + return true + } + + return false +} + +// SetPackageTypes gets a reference to the given []PackageTypesEnum and assigns it to the PackageTypes field. +func (o *PatchedpythonPythonRemote) SetPackageTypes(v []PackageTypesEnum) { + o.PackageTypes = v +} + +// GetKeepLatestPackages returns the KeepLatestPackages field value if set, zero value otherwise. +func (o *PatchedpythonPythonRemote) GetKeepLatestPackages() int64 { + if o == nil || IsNil(o.KeepLatestPackages) { + var ret int64 + return ret + } + return *o.KeepLatestPackages +} + +// GetKeepLatestPackagesOk returns a tuple with the KeepLatestPackages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRemote) GetKeepLatestPackagesOk() (*int64, bool) { + if o == nil || IsNil(o.KeepLatestPackages) { + return nil, false + } + return o.KeepLatestPackages, true +} + +// HasKeepLatestPackages returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasKeepLatestPackages() bool { + if o != nil && !IsNil(o.KeepLatestPackages) { + return true + } + + return false +} + +// SetKeepLatestPackages gets a reference to the given int64 and assigns it to the KeepLatestPackages field. +func (o *PatchedpythonPythonRemote) SetKeepLatestPackages(v int64) { + o.KeepLatestPackages = &v +} + +// GetExcludePlatforms returns the ExcludePlatforms field value if set, zero value otherwise. +func (o *PatchedpythonPythonRemote) GetExcludePlatforms() []ExcludePlatformsEnum { + if o == nil || IsNil(o.ExcludePlatforms) { + var ret []ExcludePlatformsEnum + return ret + } + return o.ExcludePlatforms +} + +// GetExcludePlatformsOk returns a tuple with the ExcludePlatforms field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRemote) GetExcludePlatformsOk() ([]ExcludePlatformsEnum, bool) { + if o == nil || IsNil(o.ExcludePlatforms) { + return nil, false + } + return o.ExcludePlatforms, true +} + +// HasExcludePlatforms returns a boolean if a field has been set. +func (o *PatchedpythonPythonRemote) HasExcludePlatforms() bool { + if o != nil && !IsNil(o.ExcludePlatforms) { + return true + } + + return false +} + +// SetExcludePlatforms gets a reference to the given []ExcludePlatformsEnum and assigns it to the ExcludePlatforms field. +func (o *PatchedpythonPythonRemote) SetExcludePlatforms(v []ExcludePlatformsEnum) { + o.ExcludePlatforms = v +} + +func (o PatchedpythonPythonRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedpythonPythonRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.Includes) { + toSerialize["includes"] = o.Includes + } + if !IsNil(o.Excludes) { + toSerialize["excludes"] = o.Excludes + } + if !IsNil(o.Prereleases) { + toSerialize["prereleases"] = o.Prereleases + } + if !IsNil(o.PackageTypes) { + toSerialize["package_types"] = o.PackageTypes + } + if !IsNil(o.KeepLatestPackages) { + toSerialize["keep_latest_packages"] = o.KeepLatestPackages + } + if !IsNil(o.ExcludePlatforms) { + toSerialize["exclude_platforms"] = o.ExcludePlatforms + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedpythonPythonRemote) UnmarshalJSON(bytes []byte) (err error) { + varPatchedpythonPythonRemote := _PatchedpythonPythonRemote{} + + if err = json.Unmarshal(bytes, &varPatchedpythonPythonRemote); err == nil { + *o = PatchedpythonPythonRemote(varPatchedpythonPythonRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "includes") + delete(additionalProperties, "excludes") + delete(additionalProperties, "prereleases") + delete(additionalProperties, "package_types") + delete(additionalProperties, "keep_latest_packages") + delete(additionalProperties, "exclude_platforms") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedpythonPythonRemote struct { + value *PatchedpythonPythonRemote + isSet bool +} + +func (v NullablePatchedpythonPythonRemote) Get() *PatchedpythonPythonRemote { + return v.value +} + +func (v *NullablePatchedpythonPythonRemote) Set(val *PatchedpythonPythonRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedpythonPythonRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedpythonPythonRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedpythonPythonRemote(val *PatchedpythonPythonRemote) *NullablePatchedpythonPythonRemote { + return &NullablePatchedpythonPythonRemote{value: val, isSet: true} +} + +func (v NullablePatchedpythonPythonRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedpythonPythonRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedpython_python_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedpython_python_repository.go new file mode 100644 index 0000000000..e3c2f905a2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedpython_python_repository.go @@ -0,0 +1,376 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedpythonPythonRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedpythonPythonRepository{} + +// PatchedpythonPythonRepository Serializer for Python Repositories. +type PatchedpythonPythonRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. + Autopublish *bool `json:"autopublish,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedpythonPythonRepository PatchedpythonPythonRepository + +// NewPatchedpythonPythonRepository instantiates a new PatchedpythonPythonRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedpythonPythonRepository() *PatchedpythonPythonRepository { + this := PatchedpythonPythonRepository{} + var autopublish bool = false + this.Autopublish = &autopublish + return &this +} + +// NewPatchedpythonPythonRepositoryWithDefaults instantiates a new PatchedpythonPythonRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedpythonPythonRepositoryWithDefaults() *PatchedpythonPythonRepository { + this := PatchedpythonPythonRepository{} + var autopublish bool = false + this.Autopublish = &autopublish + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedpythonPythonRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedpythonPythonRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedpythonPythonRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedpythonPythonRepository) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRepository) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedpythonPythonRepository) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedpythonPythonRepository) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedpythonPythonRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedpythonPythonRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedpythonPythonRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedpythonPythonRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *PatchedpythonPythonRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *PatchedpythonPythonRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *PatchedpythonPythonRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *PatchedpythonPythonRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedpythonPythonRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedpythonPythonRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatchedpythonPythonRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PatchedpythonPythonRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PatchedpythonPythonRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PatchedpythonPythonRepository) UnsetRemote() { + o.Remote.Unset() +} + +// GetAutopublish returns the Autopublish field value if set, zero value otherwise. +func (o *PatchedpythonPythonRepository) GetAutopublish() bool { + if o == nil || IsNil(o.Autopublish) { + var ret bool + return ret + } + return *o.Autopublish +} + +// GetAutopublishOk returns a tuple with the Autopublish field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedpythonPythonRepository) GetAutopublishOk() (*bool, bool) { + if o == nil || IsNil(o.Autopublish) { + return nil, false + } + return o.Autopublish, true +} + +// HasAutopublish returns a boolean if a field has been set. +func (o *PatchedpythonPythonRepository) HasAutopublish() bool { + if o != nil && !IsNil(o.Autopublish) { + return true + } + + return false +} + +// SetAutopublish gets a reference to the given bool and assigns it to the Autopublish field. +func (o *PatchedpythonPythonRepository) SetAutopublish(v bool) { + o.Autopublish = &v +} + +func (o PatchedpythonPythonRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedpythonPythonRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if !IsNil(o.Autopublish) { + toSerialize["autopublish"] = o.Autopublish + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedpythonPythonRepository) UnmarshalJSON(bytes []byte) (err error) { + varPatchedpythonPythonRepository := _PatchedpythonPythonRepository{} + + if err = json.Unmarshal(bytes, &varPatchedpythonPythonRepository); err == nil { + *o = PatchedpythonPythonRepository(varPatchedpythonPythonRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "autopublish") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedpythonPythonRepository struct { + value *PatchedpythonPythonRepository + isSet bool +} + +func (v NullablePatchedpythonPythonRepository) Get() *PatchedpythonPythonRepository { + return v.value +} + +func (v *NullablePatchedpythonPythonRepository) Set(val *PatchedpythonPythonRepository) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedpythonPythonRepository) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedpythonPythonRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedpythonPythonRepository(val *PatchedpythonPythonRepository) *NullablePatchedpythonPythonRepository { + return &NullablePatchedpythonPythonRepository{value: val, isSet: true} +} + +func (v NullablePatchedpythonPythonRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedpythonPythonRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_alternate_content_source.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_alternate_content_source.go new file mode 100644 index 0000000000..d3c008c071 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_alternate_content_source.go @@ -0,0 +1,278 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the PatchedrpmRpmAlternateContentSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedrpmRpmAlternateContentSource{} + +// PatchedrpmRpmAlternateContentSource Serializer for RPM alternate content source. +type PatchedrpmRpmAlternateContentSource struct { + // Name of Alternate Content Source. + Name *string `json:"name,omitempty"` + // Date of last refresh of AlternateContentSource. + LastRefreshed NullableTime `json:"last_refreshed,omitempty"` + // List of paths that will be appended to the Remote url when searching for content. + Paths []string `json:"paths,omitempty"` + // The remote to provide alternate content source. + Remote *string `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedrpmRpmAlternateContentSource PatchedrpmRpmAlternateContentSource + +// NewPatchedrpmRpmAlternateContentSource instantiates a new PatchedrpmRpmAlternateContentSource object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedrpmRpmAlternateContentSource() *PatchedrpmRpmAlternateContentSource { + this := PatchedrpmRpmAlternateContentSource{} + return &this +} + +// NewPatchedrpmRpmAlternateContentSourceWithDefaults instantiates a new PatchedrpmRpmAlternateContentSource object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedrpmRpmAlternateContentSourceWithDefaults() *PatchedrpmRpmAlternateContentSource { + this := PatchedrpmRpmAlternateContentSource{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedrpmRpmAlternateContentSource) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmAlternateContentSource) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedrpmRpmAlternateContentSource) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedrpmRpmAlternateContentSource) SetName(v string) { + o.Name = &v +} + +// GetLastRefreshed returns the LastRefreshed field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmAlternateContentSource) GetLastRefreshed() time.Time { + if o == nil || IsNil(o.LastRefreshed.Get()) { + var ret time.Time + return ret + } + return *o.LastRefreshed.Get() +} + +// GetLastRefreshedOk returns a tuple with the LastRefreshed field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmAlternateContentSource) GetLastRefreshedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastRefreshed.Get(), o.LastRefreshed.IsSet() +} + +// HasLastRefreshed returns a boolean if a field has been set. +func (o *PatchedrpmRpmAlternateContentSource) HasLastRefreshed() bool { + if o != nil && o.LastRefreshed.IsSet() { + return true + } + + return false +} + +// SetLastRefreshed gets a reference to the given NullableTime and assigns it to the LastRefreshed field. +func (o *PatchedrpmRpmAlternateContentSource) SetLastRefreshed(v time.Time) { + o.LastRefreshed.Set(&v) +} +// SetLastRefreshedNil sets the value for LastRefreshed to be an explicit nil +func (o *PatchedrpmRpmAlternateContentSource) SetLastRefreshedNil() { + o.LastRefreshed.Set(nil) +} + +// UnsetLastRefreshed ensures that no value is present for LastRefreshed, not even an explicit nil +func (o *PatchedrpmRpmAlternateContentSource) UnsetLastRefreshed() { + o.LastRefreshed.Unset() +} + +// GetPaths returns the Paths field value if set, zero value otherwise. +func (o *PatchedrpmRpmAlternateContentSource) GetPaths() []string { + if o == nil || IsNil(o.Paths) { + var ret []string + return ret + } + return o.Paths +} + +// GetPathsOk returns a tuple with the Paths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmAlternateContentSource) GetPathsOk() ([]string, bool) { + if o == nil || IsNil(o.Paths) { + return nil, false + } + return o.Paths, true +} + +// HasPaths returns a boolean if a field has been set. +func (o *PatchedrpmRpmAlternateContentSource) HasPaths() bool { + if o != nil && !IsNil(o.Paths) { + return true + } + + return false +} + +// SetPaths gets a reference to the given []string and assigns it to the Paths field. +func (o *PatchedrpmRpmAlternateContentSource) SetPaths(v []string) { + o.Paths = v +} + +// GetRemote returns the Remote field value if set, zero value otherwise. +func (o *PatchedrpmRpmAlternateContentSource) GetRemote() string { + if o == nil || IsNil(o.Remote) { + var ret string + return ret + } + return *o.Remote +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmAlternateContentSource) GetRemoteOk() (*string, bool) { + if o == nil || IsNil(o.Remote) { + return nil, false + } + return o.Remote, true +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatchedrpmRpmAlternateContentSource) HasRemote() bool { + if o != nil && !IsNil(o.Remote) { + return true + } + + return false +} + +// SetRemote gets a reference to the given string and assigns it to the Remote field. +func (o *PatchedrpmRpmAlternateContentSource) SetRemote(v string) { + o.Remote = &v +} + +func (o PatchedrpmRpmAlternateContentSource) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedrpmRpmAlternateContentSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.LastRefreshed.IsSet() { + toSerialize["last_refreshed"] = o.LastRefreshed.Get() + } + if !IsNil(o.Paths) { + toSerialize["paths"] = o.Paths + } + if !IsNil(o.Remote) { + toSerialize["remote"] = o.Remote + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedrpmRpmAlternateContentSource) UnmarshalJSON(bytes []byte) (err error) { + varPatchedrpmRpmAlternateContentSource := _PatchedrpmRpmAlternateContentSource{} + + if err = json.Unmarshal(bytes, &varPatchedrpmRpmAlternateContentSource); err == nil { + *o = PatchedrpmRpmAlternateContentSource(varPatchedrpmRpmAlternateContentSource) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "last_refreshed") + delete(additionalProperties, "paths") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedrpmRpmAlternateContentSource struct { + value *PatchedrpmRpmAlternateContentSource + isSet bool +} + +func (v NullablePatchedrpmRpmAlternateContentSource) Get() *PatchedrpmRpmAlternateContentSource { + return v.value +} + +func (v *NullablePatchedrpmRpmAlternateContentSource) Set(val *PatchedrpmRpmAlternateContentSource) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedrpmRpmAlternateContentSource) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedrpmRpmAlternateContentSource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedrpmRpmAlternateContentSource(val *PatchedrpmRpmAlternateContentSource) *NullablePatchedrpmRpmAlternateContentSource { + return &NullablePatchedrpmRpmAlternateContentSource{value: val, isSet: true} +} + +func (v NullablePatchedrpmRpmAlternateContentSource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedrpmRpmAlternateContentSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_distribution.go new file mode 100644 index 0000000000..43a3bbd66f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_distribution.go @@ -0,0 +1,414 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedrpmRpmDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedrpmRpmDistribution{} + +// PatchedrpmRpmDistribution Serializer for RPM Distributions. +type PatchedrpmRpmDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath *string `json:"base_path,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name *string `json:"name,omitempty"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedrpmRpmDistribution PatchedrpmRpmDistribution + +// NewPatchedrpmRpmDistribution instantiates a new PatchedrpmRpmDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedrpmRpmDistribution() *PatchedrpmRpmDistribution { + this := PatchedrpmRpmDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// NewPatchedrpmRpmDistributionWithDefaults instantiates a new PatchedrpmRpmDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedrpmRpmDistributionWithDefaults() *PatchedrpmRpmDistribution { + this := PatchedrpmRpmDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value if set, zero value otherwise. +func (o *PatchedrpmRpmDistribution) GetBasePath() string { + if o == nil || IsNil(o.BasePath) { + var ret string + return ret + } + return *o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmDistribution) GetBasePathOk() (*string, bool) { + if o == nil || IsNil(o.BasePath) { + return nil, false + } + return o.BasePath, true +} + +// HasBasePath returns a boolean if a field has been set. +func (o *PatchedrpmRpmDistribution) HasBasePath() bool { + if o != nil && !IsNil(o.BasePath) { + return true + } + + return false +} + +// SetBasePath gets a reference to the given string and assigns it to the BasePath field. +func (o *PatchedrpmRpmDistribution) SetBasePath(v string) { + o.BasePath = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *PatchedrpmRpmDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *PatchedrpmRpmDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *PatchedrpmRpmDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *PatchedrpmRpmDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *PatchedrpmRpmDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *PatchedrpmRpmDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *PatchedrpmRpmDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedrpmRpmDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedrpmRpmDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedrpmRpmDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedrpmRpmDistribution) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmDistribution) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedrpmRpmDistribution) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedrpmRpmDistribution) SetName(v string) { + o.Name = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *PatchedrpmRpmDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *PatchedrpmRpmDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *PatchedrpmRpmDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *PatchedrpmRpmDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmDistribution) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmDistribution) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *PatchedrpmRpmDistribution) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *PatchedrpmRpmDistribution) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *PatchedrpmRpmDistribution) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *PatchedrpmRpmDistribution) UnsetPublication() { + o.Publication.Unset() +} + +func (o PatchedrpmRpmDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedrpmRpmDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BasePath) { + toSerialize["base_path"] = o.BasePath + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedrpmRpmDistribution) UnmarshalJSON(bytes []byte) (err error) { + varPatchedrpmRpmDistribution := _PatchedrpmRpmDistribution{} + + if err = json.Unmarshal(bytes, &varPatchedrpmRpmDistribution); err == nil { + *o = PatchedrpmRpmDistribution(varPatchedrpmRpmDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedrpmRpmDistribution struct { + value *PatchedrpmRpmDistribution + isSet bool +} + +func (v NullablePatchedrpmRpmDistribution) Get() *PatchedrpmRpmDistribution { + return v.value +} + +func (v *NullablePatchedrpmRpmDistribution) Set(val *PatchedrpmRpmDistribution) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedrpmRpmDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedrpmRpmDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedrpmRpmDistribution(val *PatchedrpmRpmDistribution) *NullablePatchedrpmRpmDistribution { + return &NullablePatchedrpmRpmDistribution{value: val, isSet: true} +} + +func (v NullablePatchedrpmRpmDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedrpmRpmDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_remote.go new file mode 100644 index 0000000000..743abefe74 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_remote.go @@ -0,0 +1,1113 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedrpmRpmRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedrpmRpmRemote{} + +// PatchedrpmRpmRemote A Serializer for RpmRemote. +type PatchedrpmRpmRemote struct { + // A unique name for this remote. + Name *string `json:"name,omitempty"` + // The URL of an external content source. + Url *string `json:"url,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // Authentication token for SLES repositories. + SlesAuthToken NullableString `json:"sles_auth_token,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedrpmRpmRemote PatchedrpmRpmRemote + +// NewPatchedrpmRpmRemote instantiates a new PatchedrpmRpmRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedrpmRpmRemote() *PatchedrpmRpmRemote { + this := PatchedrpmRpmRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewPatchedrpmRpmRemoteWithDefaults instantiates a new PatchedrpmRpmRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedrpmRpmRemoteWithDefaults() *PatchedrpmRpmRemote { + this := PatchedrpmRpmRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedrpmRpmRemote) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmRemote) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedrpmRpmRemote) SetName(v string) { + o.Name = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PatchedrpmRpmRemote) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmRemote) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PatchedrpmRpmRemote) SetUrl(v string) { + o.Url = &v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PatchedrpmRpmRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PatchedrpmRpmRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PatchedrpmRpmRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PatchedrpmRpmRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PatchedrpmRpmRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PatchedrpmRpmRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PatchedrpmRpmRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PatchedrpmRpmRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PatchedrpmRpmRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PatchedrpmRpmRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *PatchedrpmRpmRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *PatchedrpmRpmRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *PatchedrpmRpmRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *PatchedrpmRpmRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *PatchedrpmRpmRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *PatchedrpmRpmRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PatchedrpmRpmRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PatchedrpmRpmRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedrpmRpmRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedrpmRpmRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PatchedrpmRpmRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PatchedrpmRpmRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PatchedrpmRpmRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PatchedrpmRpmRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PatchedrpmRpmRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *PatchedrpmRpmRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PatchedrpmRpmRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PatchedrpmRpmRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PatchedrpmRpmRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PatchedrpmRpmRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PatchedrpmRpmRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PatchedrpmRpmRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PatchedrpmRpmRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PatchedrpmRpmRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PatchedrpmRpmRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PatchedrpmRpmRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PatchedrpmRpmRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PatchedrpmRpmRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetSlesAuthToken returns the SlesAuthToken field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRemote) GetSlesAuthToken() string { + if o == nil || IsNil(o.SlesAuthToken.Get()) { + var ret string + return ret + } + return *o.SlesAuthToken.Get() +} + +// GetSlesAuthTokenOk returns a tuple with the SlesAuthToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRemote) GetSlesAuthTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SlesAuthToken.Get(), o.SlesAuthToken.IsSet() +} + +// HasSlesAuthToken returns a boolean if a field has been set. +func (o *PatchedrpmRpmRemote) HasSlesAuthToken() bool { + if o != nil && o.SlesAuthToken.IsSet() { + return true + } + + return false +} + +// SetSlesAuthToken gets a reference to the given NullableString and assigns it to the SlesAuthToken field. +func (o *PatchedrpmRpmRemote) SetSlesAuthToken(v string) { + o.SlesAuthToken.Set(&v) +} +// SetSlesAuthTokenNil sets the value for SlesAuthToken to be an explicit nil +func (o *PatchedrpmRpmRemote) SetSlesAuthTokenNil() { + o.SlesAuthToken.Set(nil) +} + +// UnsetSlesAuthToken ensures that no value is present for SlesAuthToken, not even an explicit nil +func (o *PatchedrpmRpmRemote) UnsetSlesAuthToken() { + o.SlesAuthToken.Unset() +} + +func (o PatchedrpmRpmRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedrpmRpmRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if o.SlesAuthToken.IsSet() { + toSerialize["sles_auth_token"] = o.SlesAuthToken.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedrpmRpmRemote) UnmarshalJSON(bytes []byte) (err error) { + varPatchedrpmRpmRemote := _PatchedrpmRpmRemote{} + + if err = json.Unmarshal(bytes, &varPatchedrpmRpmRemote); err == nil { + *o = PatchedrpmRpmRemote(varPatchedrpmRpmRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "sles_auth_token") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedrpmRpmRemote struct { + value *PatchedrpmRpmRemote + isSet bool +} + +func (v NullablePatchedrpmRpmRemote) Get() *PatchedrpmRpmRemote { + return v.value +} + +func (v *NullablePatchedrpmRpmRemote) Set(val *PatchedrpmRpmRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedrpmRpmRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedrpmRpmRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedrpmRpmRemote(val *PatchedrpmRpmRemote) *NullablePatchedrpmRpmRemote { + return &NullablePatchedrpmRpmRemote{value: val, isSet: true} +} + +func (v NullablePatchedrpmRpmRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedrpmRpmRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_repository.go new file mode 100644 index 0000000000..4c3e48f3d9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_rpm_repository.go @@ -0,0 +1,682 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedrpmRpmRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedrpmRpmRepository{} + +// PatchedrpmRpmRepository Serializer for Rpm Repositories. +type PatchedrpmRpmRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name *string `json:"name,omitempty"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. + Autopublish *bool `json:"autopublish,omitempty"` + // A reference to an associated signing service. + MetadataSigningService NullableString `json:"metadata_signing_service,omitempty"` + // The number of versions of each package to keep in the repository; older versions will be purged. The default is '0', which will disable this feature and keep all versions of each package. + RetainPackageVersions *int64 `json:"retain_package_versions,omitempty"` + MetadataChecksumType NullableMetadataChecksumTypeEnum `json:"metadata_checksum_type,omitempty"` + PackageChecksumType NullablePackageChecksumTypeEnum `json:"package_checksum_type,omitempty"` + // An option specifying whether a client should perform a GPG signature check on packages. + Gpgcheck *int64 `json:"gpgcheck,omitempty"` + // An option specifying whether a client should perform a GPG signature check on the repodata. + RepoGpgcheck *int64 `json:"repo_gpgcheck,omitempty"` + // DEPRECATED: An option specifying whether Pulp should generate SQLite metadata. + SqliteMetadata *bool `json:"sqlite_metadata,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedrpmRpmRepository PatchedrpmRpmRepository + +// NewPatchedrpmRpmRepository instantiates a new PatchedrpmRpmRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedrpmRpmRepository() *PatchedrpmRpmRepository { + this := PatchedrpmRpmRepository{} + var autopublish bool = false + this.Autopublish = &autopublish + var gpgcheck int64 = 0 + this.Gpgcheck = &gpgcheck + var repoGpgcheck int64 = 0 + this.RepoGpgcheck = &repoGpgcheck + var sqliteMetadata bool = false + this.SqliteMetadata = &sqliteMetadata + return &this +} + +// NewPatchedrpmRpmRepositoryWithDefaults instantiates a new PatchedrpmRpmRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedrpmRpmRepositoryWithDefaults() *PatchedrpmRpmRepository { + this := PatchedrpmRpmRepository{} + var autopublish bool = false + this.Autopublish = &autopublish + var gpgcheck int64 = 0 + this.Gpgcheck = &gpgcheck + var repoGpgcheck int64 = 0 + this.RepoGpgcheck = &repoGpgcheck + var sqliteMetadata bool = false + this.SqliteMetadata = &sqliteMetadata + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedrpmRpmRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedrpmRpmRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedrpmRpmRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedrpmRpmRepository) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmRepository) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedrpmRpmRepository) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedrpmRpmRepository) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedrpmRpmRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PatchedrpmRpmRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PatchedrpmRpmRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PatchedrpmRpmRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *PatchedrpmRpmRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *PatchedrpmRpmRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *PatchedrpmRpmRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *PatchedrpmRpmRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PatchedrpmRpmRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PatchedrpmRpmRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PatchedrpmRpmRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PatchedrpmRpmRepository) UnsetRemote() { + o.Remote.Unset() +} + +// GetAutopublish returns the Autopublish field value if set, zero value otherwise. +func (o *PatchedrpmRpmRepository) GetAutopublish() bool { + if o == nil || IsNil(o.Autopublish) { + var ret bool + return ret + } + return *o.Autopublish +} + +// GetAutopublishOk returns a tuple with the Autopublish field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmRepository) GetAutopublishOk() (*bool, bool) { + if o == nil || IsNil(o.Autopublish) { + return nil, false + } + return o.Autopublish, true +} + +// HasAutopublish returns a boolean if a field has been set. +func (o *PatchedrpmRpmRepository) HasAutopublish() bool { + if o != nil && !IsNil(o.Autopublish) { + return true + } + + return false +} + +// SetAutopublish gets a reference to the given bool and assigns it to the Autopublish field. +func (o *PatchedrpmRpmRepository) SetAutopublish(v bool) { + o.Autopublish = &v +} + +// GetMetadataSigningService returns the MetadataSigningService field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRepository) GetMetadataSigningService() string { + if o == nil || IsNil(o.MetadataSigningService.Get()) { + var ret string + return ret + } + return *o.MetadataSigningService.Get() +} + +// GetMetadataSigningServiceOk returns a tuple with the MetadataSigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRepository) GetMetadataSigningServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MetadataSigningService.Get(), o.MetadataSigningService.IsSet() +} + +// HasMetadataSigningService returns a boolean if a field has been set. +func (o *PatchedrpmRpmRepository) HasMetadataSigningService() bool { + if o != nil && o.MetadataSigningService.IsSet() { + return true + } + + return false +} + +// SetMetadataSigningService gets a reference to the given NullableString and assigns it to the MetadataSigningService field. +func (o *PatchedrpmRpmRepository) SetMetadataSigningService(v string) { + o.MetadataSigningService.Set(&v) +} +// SetMetadataSigningServiceNil sets the value for MetadataSigningService to be an explicit nil +func (o *PatchedrpmRpmRepository) SetMetadataSigningServiceNil() { + o.MetadataSigningService.Set(nil) +} + +// UnsetMetadataSigningService ensures that no value is present for MetadataSigningService, not even an explicit nil +func (o *PatchedrpmRpmRepository) UnsetMetadataSigningService() { + o.MetadataSigningService.Unset() +} + +// GetRetainPackageVersions returns the RetainPackageVersions field value if set, zero value otherwise. +func (o *PatchedrpmRpmRepository) GetRetainPackageVersions() int64 { + if o == nil || IsNil(o.RetainPackageVersions) { + var ret int64 + return ret + } + return *o.RetainPackageVersions +} + +// GetRetainPackageVersionsOk returns a tuple with the RetainPackageVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmRepository) GetRetainPackageVersionsOk() (*int64, bool) { + if o == nil || IsNil(o.RetainPackageVersions) { + return nil, false + } + return o.RetainPackageVersions, true +} + +// HasRetainPackageVersions returns a boolean if a field has been set. +func (o *PatchedrpmRpmRepository) HasRetainPackageVersions() bool { + if o != nil && !IsNil(o.RetainPackageVersions) { + return true + } + + return false +} + +// SetRetainPackageVersions gets a reference to the given int64 and assigns it to the RetainPackageVersions field. +func (o *PatchedrpmRpmRepository) SetRetainPackageVersions(v int64) { + o.RetainPackageVersions = &v +} + +// GetMetadataChecksumType returns the MetadataChecksumType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRepository) GetMetadataChecksumType() MetadataChecksumTypeEnum { + if o == nil || IsNil(o.MetadataChecksumType.Get()) { + var ret MetadataChecksumTypeEnum + return ret + } + return *o.MetadataChecksumType.Get() +} + +// GetMetadataChecksumTypeOk returns a tuple with the MetadataChecksumType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRepository) GetMetadataChecksumTypeOk() (*MetadataChecksumTypeEnum, bool) { + if o == nil { + return nil, false + } + return o.MetadataChecksumType.Get(), o.MetadataChecksumType.IsSet() +} + +// HasMetadataChecksumType returns a boolean if a field has been set. +func (o *PatchedrpmRpmRepository) HasMetadataChecksumType() bool { + if o != nil && o.MetadataChecksumType.IsSet() { + return true + } + + return false +} + +// SetMetadataChecksumType gets a reference to the given NullableMetadataChecksumTypeEnum and assigns it to the MetadataChecksumType field. +func (o *PatchedrpmRpmRepository) SetMetadataChecksumType(v MetadataChecksumTypeEnum) { + o.MetadataChecksumType.Set(&v) +} +// SetMetadataChecksumTypeNil sets the value for MetadataChecksumType to be an explicit nil +func (o *PatchedrpmRpmRepository) SetMetadataChecksumTypeNil() { + o.MetadataChecksumType.Set(nil) +} + +// UnsetMetadataChecksumType ensures that no value is present for MetadataChecksumType, not even an explicit nil +func (o *PatchedrpmRpmRepository) UnsetMetadataChecksumType() { + o.MetadataChecksumType.Unset() +} + +// GetPackageChecksumType returns the PackageChecksumType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmRpmRepository) GetPackageChecksumType() PackageChecksumTypeEnum { + if o == nil || IsNil(o.PackageChecksumType.Get()) { + var ret PackageChecksumTypeEnum + return ret + } + return *o.PackageChecksumType.Get() +} + +// GetPackageChecksumTypeOk returns a tuple with the PackageChecksumType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmRpmRepository) GetPackageChecksumTypeOk() (*PackageChecksumTypeEnum, bool) { + if o == nil { + return nil, false + } + return o.PackageChecksumType.Get(), o.PackageChecksumType.IsSet() +} + +// HasPackageChecksumType returns a boolean if a field has been set. +func (o *PatchedrpmRpmRepository) HasPackageChecksumType() bool { + if o != nil && o.PackageChecksumType.IsSet() { + return true + } + + return false +} + +// SetPackageChecksumType gets a reference to the given NullablePackageChecksumTypeEnum and assigns it to the PackageChecksumType field. +func (o *PatchedrpmRpmRepository) SetPackageChecksumType(v PackageChecksumTypeEnum) { + o.PackageChecksumType.Set(&v) +} +// SetPackageChecksumTypeNil sets the value for PackageChecksumType to be an explicit nil +func (o *PatchedrpmRpmRepository) SetPackageChecksumTypeNil() { + o.PackageChecksumType.Set(nil) +} + +// UnsetPackageChecksumType ensures that no value is present for PackageChecksumType, not even an explicit nil +func (o *PatchedrpmRpmRepository) UnsetPackageChecksumType() { + o.PackageChecksumType.Unset() +} + +// GetGpgcheck returns the Gpgcheck field value if set, zero value otherwise. +func (o *PatchedrpmRpmRepository) GetGpgcheck() int64 { + if o == nil || IsNil(o.Gpgcheck) { + var ret int64 + return ret + } + return *o.Gpgcheck +} + +// GetGpgcheckOk returns a tuple with the Gpgcheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmRepository) GetGpgcheckOk() (*int64, bool) { + if o == nil || IsNil(o.Gpgcheck) { + return nil, false + } + return o.Gpgcheck, true +} + +// HasGpgcheck returns a boolean if a field has been set. +func (o *PatchedrpmRpmRepository) HasGpgcheck() bool { + if o != nil && !IsNil(o.Gpgcheck) { + return true + } + + return false +} + +// SetGpgcheck gets a reference to the given int64 and assigns it to the Gpgcheck field. +func (o *PatchedrpmRpmRepository) SetGpgcheck(v int64) { + o.Gpgcheck = &v +} + +// GetRepoGpgcheck returns the RepoGpgcheck field value if set, zero value otherwise. +func (o *PatchedrpmRpmRepository) GetRepoGpgcheck() int64 { + if o == nil || IsNil(o.RepoGpgcheck) { + var ret int64 + return ret + } + return *o.RepoGpgcheck +} + +// GetRepoGpgcheckOk returns a tuple with the RepoGpgcheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmRepository) GetRepoGpgcheckOk() (*int64, bool) { + if o == nil || IsNil(o.RepoGpgcheck) { + return nil, false + } + return o.RepoGpgcheck, true +} + +// HasRepoGpgcheck returns a boolean if a field has been set. +func (o *PatchedrpmRpmRepository) HasRepoGpgcheck() bool { + if o != nil && !IsNil(o.RepoGpgcheck) { + return true + } + + return false +} + +// SetRepoGpgcheck gets a reference to the given int64 and assigns it to the RepoGpgcheck field. +func (o *PatchedrpmRpmRepository) SetRepoGpgcheck(v int64) { + o.RepoGpgcheck = &v +} + +// GetSqliteMetadata returns the SqliteMetadata field value if set, zero value otherwise. +func (o *PatchedrpmRpmRepository) GetSqliteMetadata() bool { + if o == nil || IsNil(o.SqliteMetadata) { + var ret bool + return ret + } + return *o.SqliteMetadata +} + +// GetSqliteMetadataOk returns a tuple with the SqliteMetadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmRpmRepository) GetSqliteMetadataOk() (*bool, bool) { + if o == nil || IsNil(o.SqliteMetadata) { + return nil, false + } + return o.SqliteMetadata, true +} + +// HasSqliteMetadata returns a boolean if a field has been set. +func (o *PatchedrpmRpmRepository) HasSqliteMetadata() bool { + if o != nil && !IsNil(o.SqliteMetadata) { + return true + } + + return false +} + +// SetSqliteMetadata gets a reference to the given bool and assigns it to the SqliteMetadata field. +func (o *PatchedrpmRpmRepository) SetSqliteMetadata(v bool) { + o.SqliteMetadata = &v +} + +func (o PatchedrpmRpmRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedrpmRpmRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if !IsNil(o.Autopublish) { + toSerialize["autopublish"] = o.Autopublish + } + if o.MetadataSigningService.IsSet() { + toSerialize["metadata_signing_service"] = o.MetadataSigningService.Get() + } + if !IsNil(o.RetainPackageVersions) { + toSerialize["retain_package_versions"] = o.RetainPackageVersions + } + if o.MetadataChecksumType.IsSet() { + toSerialize["metadata_checksum_type"] = o.MetadataChecksumType.Get() + } + if o.PackageChecksumType.IsSet() { + toSerialize["package_checksum_type"] = o.PackageChecksumType.Get() + } + if !IsNil(o.Gpgcheck) { + toSerialize["gpgcheck"] = o.Gpgcheck + } + if !IsNil(o.RepoGpgcheck) { + toSerialize["repo_gpgcheck"] = o.RepoGpgcheck + } + if !IsNil(o.SqliteMetadata) { + toSerialize["sqlite_metadata"] = o.SqliteMetadata + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedrpmRpmRepository) UnmarshalJSON(bytes []byte) (err error) { + varPatchedrpmRpmRepository := _PatchedrpmRpmRepository{} + + if err = json.Unmarshal(bytes, &varPatchedrpmRpmRepository); err == nil { + *o = PatchedrpmRpmRepository(varPatchedrpmRpmRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "autopublish") + delete(additionalProperties, "metadata_signing_service") + delete(additionalProperties, "retain_package_versions") + delete(additionalProperties, "metadata_checksum_type") + delete(additionalProperties, "package_checksum_type") + delete(additionalProperties, "gpgcheck") + delete(additionalProperties, "repo_gpgcheck") + delete(additionalProperties, "sqlite_metadata") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedrpmRpmRepository struct { + value *PatchedrpmRpmRepository + isSet bool +} + +func (v NullablePatchedrpmRpmRepository) Get() *PatchedrpmRpmRepository { + return v.value +} + +func (v *NullablePatchedrpmRpmRepository) Set(val *PatchedrpmRpmRepository) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedrpmRpmRepository) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedrpmRpmRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedrpmRpmRepository(val *PatchedrpmRpmRepository) *NullablePatchedrpmRpmRepository { + return &NullablePatchedrpmRpmRepository{value: val, isSet: true} +} + +func (v NullablePatchedrpmRpmRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedrpmRpmRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_uln_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_uln_remote.go new file mode 100644 index 0000000000..a92eed34fd --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_patchedrpm_uln_remote.go @@ -0,0 +1,1093 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PatchedrpmUlnRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedrpmUlnRemote{} + +// PatchedrpmUlnRemote A Serializer for UlnRemote. +type PatchedrpmUlnRemote struct { + // A unique name for this remote. + Name *string `json:"name,omitempty"` + // The ULN repo URL of the remote content source.\"This is \"uln://\" followed by the channel name. E.g.: \"uln://ol7_x86_64_oracle\" + Url *string `json:"url,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // Your ULN account username. + Username *string `json:"username,omitempty"` + // Your ULN account password. + Password *string `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // Base URL of the ULN server. If the uln_server_base_url is not provided pulp_rpm willuse the contents of the DEFAULT_ULN_SERVER_BASE_URL setting instead. + UlnServerBaseUrl NullableString `json:"uln_server_base_url,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PatchedrpmUlnRemote PatchedrpmUlnRemote + +// NewPatchedrpmUlnRemote instantiates a new PatchedrpmUlnRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedrpmUlnRemote() *PatchedrpmUlnRemote { + this := PatchedrpmUlnRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewPatchedrpmUlnRemoteWithDefaults instantiates a new PatchedrpmUlnRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedrpmUlnRemoteWithDefaults() *PatchedrpmUlnRemote { + this := PatchedrpmUlnRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedrpmUlnRemote) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmUlnRemote) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedrpmUlnRemote) SetName(v string) { + o.Name = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PatchedrpmUlnRemote) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmUlnRemote) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PatchedrpmUlnRemote) SetUrl(v string) { + o.Url = &v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PatchedrpmUlnRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PatchedrpmUlnRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PatchedrpmUlnRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PatchedrpmUlnRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PatchedrpmUlnRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PatchedrpmUlnRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PatchedrpmUlnRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmUlnRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PatchedrpmUlnRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PatchedrpmUlnRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PatchedrpmUlnRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *PatchedrpmUlnRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *PatchedrpmUlnRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *PatchedrpmUlnRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *PatchedrpmUlnRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *PatchedrpmUlnRemote) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmUlnRemote) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *PatchedrpmUlnRemote) SetUsername(v string) { + o.Username = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *PatchedrpmUlnRemote) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmUlnRemote) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *PatchedrpmUlnRemote) SetPassword(v string) { + o.Password = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PatchedrpmUlnRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmUlnRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PatchedrpmUlnRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PatchedrpmUlnRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PatchedrpmUlnRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PatchedrpmUlnRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PatchedrpmUlnRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PatchedrpmUlnRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmUlnRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *PatchedrpmUlnRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PatchedrpmUlnRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PatchedrpmUlnRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PatchedrpmUlnRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PatchedrpmUlnRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PatchedrpmUlnRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PatchedrpmUlnRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PatchedrpmUlnRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PatchedrpmUlnRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PatchedrpmUlnRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedrpmUlnRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PatchedrpmUlnRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PatchedrpmUlnRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PatchedrpmUlnRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetUlnServerBaseUrl returns the UlnServerBaseUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedrpmUlnRemote) GetUlnServerBaseUrl() string { + if o == nil || IsNil(o.UlnServerBaseUrl.Get()) { + var ret string + return ret + } + return *o.UlnServerBaseUrl.Get() +} + +// GetUlnServerBaseUrlOk returns a tuple with the UlnServerBaseUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedrpmUlnRemote) GetUlnServerBaseUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UlnServerBaseUrl.Get(), o.UlnServerBaseUrl.IsSet() +} + +// HasUlnServerBaseUrl returns a boolean if a field has been set. +func (o *PatchedrpmUlnRemote) HasUlnServerBaseUrl() bool { + if o != nil && o.UlnServerBaseUrl.IsSet() { + return true + } + + return false +} + +// SetUlnServerBaseUrl gets a reference to the given NullableString and assigns it to the UlnServerBaseUrl field. +func (o *PatchedrpmUlnRemote) SetUlnServerBaseUrl(v string) { + o.UlnServerBaseUrl.Set(&v) +} +// SetUlnServerBaseUrlNil sets the value for UlnServerBaseUrl to be an explicit nil +func (o *PatchedrpmUlnRemote) SetUlnServerBaseUrlNil() { + o.UlnServerBaseUrl.Set(nil) +} + +// UnsetUlnServerBaseUrl ensures that no value is present for UlnServerBaseUrl, not even an explicit nil +func (o *PatchedrpmUlnRemote) UnsetUlnServerBaseUrl() { + o.UlnServerBaseUrl.Unset() +} + +func (o PatchedrpmUlnRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedrpmUlnRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if o.UlnServerBaseUrl.IsSet() { + toSerialize["uln_server_base_url"] = o.UlnServerBaseUrl.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PatchedrpmUlnRemote) UnmarshalJSON(bytes []byte) (err error) { + varPatchedrpmUlnRemote := _PatchedrpmUlnRemote{} + + if err = json.Unmarshal(bytes, &varPatchedrpmUlnRemote); err == nil { + *o = PatchedrpmUlnRemote(varPatchedrpmUlnRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "uln_server_base_url") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePatchedrpmUlnRemote struct { + value *PatchedrpmUlnRemote + isSet bool +} + +func (v NullablePatchedrpmUlnRemote) Get() *PatchedrpmUlnRemote { + return v.value +} + +func (v *NullablePatchedrpmUlnRemote) Set(val *PatchedrpmUlnRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedrpmUlnRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedrpmUlnRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedrpmUlnRemote(val *PatchedrpmUlnRemote) *NullablePatchedrpmUlnRemote { + return &NullablePatchedrpmUlnRemote{value: val, isSet: true} +} + +func (v NullablePatchedrpmUlnRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedrpmUlnRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_policy462_enum.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_policy462_enum.go new file mode 100644 index 0000000000..bdad0231cb --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_policy462_enum.go @@ -0,0 +1,112 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "fmt" +) + +// Policy462Enum * `immediate` - immediate * `on_demand` - on_demand +type Policy462Enum string + +// List of Policy462Enum +const ( + POLICY462ENUM_IMMEDIATE Policy462Enum = "immediate" + POLICY462ENUM_ON_DEMAND Policy462Enum = "on_demand" +) + +// All allowed values of Policy462Enum enum +var AllowedPolicy462EnumEnumValues = []Policy462Enum{ + "immediate", + "on_demand", +} + +func (v *Policy462Enum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := Policy462Enum(value) + for _, existing := range AllowedPolicy462EnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid Policy462Enum", value) +} + +// NewPolicy462EnumFromValue returns a pointer to a valid Policy462Enum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewPolicy462EnumFromValue(v string) (*Policy462Enum, error) { + ev := Policy462Enum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for Policy462Enum: valid values are %v", v, AllowedPolicy462EnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v Policy462Enum) IsValid() bool { + for _, existing := range AllowedPolicy462EnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to Policy462Enum value +func (v Policy462Enum) Ptr() *Policy462Enum { + return &v +} + +type NullablePolicy462Enum struct { + value *Policy462Enum + isSet bool +} + +func (v NullablePolicy462Enum) Get() *Policy462Enum { + return v.value +} + +func (v *NullablePolicy462Enum) Set(val *Policy462Enum) { + v.value = val + v.isSet = true +} + +func (v NullablePolicy462Enum) IsSet() bool { + return v.isSet +} + +func (v *NullablePolicy462Enum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePolicy462Enum(val *Policy462Enum) *NullablePolicy462Enum { + return &NullablePolicy462Enum{value: val, isSet: true} +} + +func (v NullablePolicy462Enum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePolicy462Enum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_policy762_enum.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_policy762_enum.go new file mode 100644 index 0000000000..55edfaade3 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_policy762_enum.go @@ -0,0 +1,114 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "fmt" +) + +// Policy762Enum * `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again. +type Policy762Enum string + +// List of Policy762Enum +const ( + POLICY762ENUM_IMMEDIATE Policy762Enum = "immediate" + POLICY762ENUM_ON_DEMAND Policy762Enum = "on_demand" + POLICY762ENUM_STREAMED Policy762Enum = "streamed" +) + +// All allowed values of Policy762Enum enum +var AllowedPolicy762EnumEnumValues = []Policy762Enum{ + "immediate", + "on_demand", + "streamed", +} + +func (v *Policy762Enum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := Policy762Enum(value) + for _, existing := range AllowedPolicy762EnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid Policy762Enum", value) +} + +// NewPolicy762EnumFromValue returns a pointer to a valid Policy762Enum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewPolicy762EnumFromValue(v string) (*Policy762Enum, error) { + ev := Policy762Enum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for Policy762Enum: valid values are %v", v, AllowedPolicy762EnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v Policy762Enum) IsValid() bool { + for _, existing := range AllowedPolicy762EnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to Policy762Enum value +func (v Policy762Enum) Ptr() *Policy762Enum { + return &v +} + +type NullablePolicy762Enum struct { + value *Policy762Enum + isSet bool +} + +func (v NullablePolicy762Enum) Get() *Policy762Enum { + return v.value +} + +func (v *NullablePolicy762Enum) Set(val *Policy762Enum) { + v.value = val + v.isSet = true +} + +func (v NullablePolicy762Enum) IsSet() bool { + return v.isSet +} + +func (v *NullablePolicy762Enum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePolicy762Enum(val *Policy762Enum) *NullablePolicy762Enum { + return &NullablePolicy762Enum{value: val, isSet: true} +} + +func (v NullablePolicy762Enum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePolicy762Enum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_policy_db6_enum.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_policy_db6_enum.go new file mode 100644 index 0000000000..90a53be78d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_policy_db6_enum.go @@ -0,0 +1,112 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "fmt" +) + +// PolicyDb6Enum * `immediate` - immediate * `When syncing, download all metadata and content now.` - When syncing, download all metadata and content now. +type PolicyDb6Enum string + +// List of PolicyDb6Enum +const ( + POLICYDB6ENUM_IMMEDIATE PolicyDb6Enum = "immediate" + POLICYDB6ENUM_WHEN_SYNCING_DOWNLOAD_ALL_METADATA_AND_CONTENT_NOW PolicyDb6Enum = "When syncing, download all metadata and content now." +) + +// All allowed values of PolicyDb6Enum enum +var AllowedPolicyDb6EnumEnumValues = []PolicyDb6Enum{ + "immediate", + "When syncing, download all metadata and content now.", +} + +func (v *PolicyDb6Enum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := PolicyDb6Enum(value) + for _, existing := range AllowedPolicyDb6EnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid PolicyDb6Enum", value) +} + +// NewPolicyDb6EnumFromValue returns a pointer to a valid PolicyDb6Enum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewPolicyDb6EnumFromValue(v string) (*PolicyDb6Enum, error) { + ev := PolicyDb6Enum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for PolicyDb6Enum: valid values are %v", v, AllowedPolicyDb6EnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v PolicyDb6Enum) IsValid() bool { + for _, existing := range AllowedPolicyDb6EnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to PolicyDb6Enum value +func (v PolicyDb6Enum) Ptr() *PolicyDb6Enum { + return &v +} + +type NullablePolicyDb6Enum struct { + value *PolicyDb6Enum + isSet bool +} + +func (v NullablePolicyDb6Enum) Get() *PolicyDb6Enum { + return v.value +} + +func (v *NullablePolicyDb6Enum) Set(val *PolicyDb6Enum) { + v.value = val + v.isSet = true +} + +func (v NullablePolicyDb6Enum) IsSet() bool { + return v.isSet +} + +func (v *NullablePolicyDb6Enum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePolicyDb6Enum(val *PolicyDb6Enum) *NullablePolicyDb6Enum { + return &NullablePolicyDb6Enum{value: val, isSet: true} +} + +func (v NullablePolicyDb6Enum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePolicyDb6Enum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_progress_report_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_progress_report_response.go new file mode 100644 index 0000000000..d8030be0c7 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_progress_report_response.go @@ -0,0 +1,353 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ProgressReportResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProgressReportResponse{} + +// ProgressReportResponse Base serializer for use with :class:`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. +type ProgressReportResponse struct { + // The message shown to the user for the progress report. + Message *string `json:"message,omitempty"` + // Identifies the type of progress report'. + Code *string `json:"code,omitempty"` + // The current state of the progress report. The possible values are: 'waiting', 'skipped', 'running', 'completed', 'failed', 'canceled' and 'canceling'. The default is 'waiting'. + State *string `json:"state,omitempty"` + // The total count of items. + Total *int64 `json:"total,omitempty"` + // The count of items already processed. Defaults to 0. + Done *int64 `json:"done,omitempty"` + // The suffix to be shown with the progress report. + Suffix NullableString `json:"suffix,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ProgressReportResponse ProgressReportResponse + +// NewProgressReportResponse instantiates a new ProgressReportResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProgressReportResponse() *ProgressReportResponse { + this := ProgressReportResponse{} + return &this +} + +// NewProgressReportResponseWithDefaults instantiates a new ProgressReportResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProgressReportResponseWithDefaults() *ProgressReportResponse { + this := ProgressReportResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ProgressReportResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProgressReportResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ProgressReportResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ProgressReportResponse) SetMessage(v string) { + o.Message = &v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *ProgressReportResponse) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProgressReportResponse) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *ProgressReportResponse) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *ProgressReportResponse) SetCode(v string) { + o.Code = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ProgressReportResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProgressReportResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ProgressReportResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ProgressReportResponse) SetState(v string) { + o.State = &v +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *ProgressReportResponse) GetTotal() int64 { + if o == nil || IsNil(o.Total) { + var ret int64 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProgressReportResponse) GetTotalOk() (*int64, bool) { + if o == nil || IsNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *ProgressReportResponse) HasTotal() bool { + if o != nil && !IsNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given int64 and assigns it to the Total field. +func (o *ProgressReportResponse) SetTotal(v int64) { + o.Total = &v +} + +// GetDone returns the Done field value if set, zero value otherwise. +func (o *ProgressReportResponse) GetDone() int64 { + if o == nil || IsNil(o.Done) { + var ret int64 + return ret + } + return *o.Done +} + +// GetDoneOk returns a tuple with the Done field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProgressReportResponse) GetDoneOk() (*int64, bool) { + if o == nil || IsNil(o.Done) { + return nil, false + } + return o.Done, true +} + +// HasDone returns a boolean if a field has been set. +func (o *ProgressReportResponse) HasDone() bool { + if o != nil && !IsNil(o.Done) { + return true + } + + return false +} + +// SetDone gets a reference to the given int64 and assigns it to the Done field. +func (o *ProgressReportResponse) SetDone(v int64) { + o.Done = &v +} + +// GetSuffix returns the Suffix field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ProgressReportResponse) GetSuffix() string { + if o == nil || IsNil(o.Suffix.Get()) { + var ret string + return ret + } + return *o.Suffix.Get() +} + +// GetSuffixOk returns a tuple with the Suffix field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ProgressReportResponse) GetSuffixOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Suffix.Get(), o.Suffix.IsSet() +} + +// HasSuffix returns a boolean if a field has been set. +func (o *ProgressReportResponse) HasSuffix() bool { + if o != nil && o.Suffix.IsSet() { + return true + } + + return false +} + +// SetSuffix gets a reference to the given NullableString and assigns it to the Suffix field. +func (o *ProgressReportResponse) SetSuffix(v string) { + o.Suffix.Set(&v) +} +// SetSuffixNil sets the value for Suffix to be an explicit nil +func (o *ProgressReportResponse) SetSuffixNil() { + o.Suffix.Set(nil) +} + +// UnsetSuffix ensures that no value is present for Suffix, not even an explicit nil +func (o *ProgressReportResponse) UnsetSuffix() { + o.Suffix.Unset() +} + +func (o ProgressReportResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProgressReportResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.Total) { + toSerialize["total"] = o.Total + } + if !IsNil(o.Done) { + toSerialize["done"] = o.Done + } + if o.Suffix.IsSet() { + toSerialize["suffix"] = o.Suffix.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ProgressReportResponse) UnmarshalJSON(bytes []byte) (err error) { + varProgressReportResponse := _ProgressReportResponse{} + + if err = json.Unmarshal(bytes, &varProgressReportResponse); err == nil { + *o = ProgressReportResponse(varProgressReportResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "message") + delete(additionalProperties, "code") + delete(additionalProperties, "state") + delete(additionalProperties, "total") + delete(additionalProperties, "done") + delete(additionalProperties, "suffix") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableProgressReportResponse struct { + value *ProgressReportResponse + isSet bool +} + +func (v NullableProgressReportResponse) Get() *ProgressReportResponse { + return v.value +} + +func (v *NullableProgressReportResponse) Set(val *ProgressReportResponse) { + v.value = val + v.isSet = true +} + +func (v NullableProgressReportResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableProgressReportResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProgressReportResponse(val *ProgressReportResponse) *NullableProgressReportResponse { + return &NullableProgressReportResponse{value: val, isSet: true} +} + +func (v NullableProgressReportResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProgressReportResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_publication_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_publication_response.go new file mode 100644 index 0000000000..ea08131da9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_publication_response.go @@ -0,0 +1,266 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the PublicationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PublicationResponse{} + +// PublicationResponse Base serializer for use with :class:`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. +type PublicationResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + RepositoryVersion *string `json:"repository_version,omitempty"` + // A URI of the repository to be published. + Repository *string `json:"repository,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PublicationResponse PublicationResponse + +// NewPublicationResponse instantiates a new PublicationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPublicationResponse() *PublicationResponse { + this := PublicationResponse{} + return &this +} + +// NewPublicationResponseWithDefaults instantiates a new PublicationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPublicationResponseWithDefaults() *PublicationResponse { + this := PublicationResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *PublicationResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicationResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *PublicationResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *PublicationResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *PublicationResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicationResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *PublicationResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *PublicationResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *PublicationResponse) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicationResponse) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *PublicationResponse) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *PublicationResponse) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *PublicationResponse) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicationResponse) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *PublicationResponse) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *PublicationResponse) SetRepository(v string) { + o.Repository = &v +} + +func (o PublicationResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PublicationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PublicationResponse) UnmarshalJSON(bytes []byte) (err error) { + varPublicationResponse := _PublicationResponse{} + + if err = json.Unmarshal(bytes, &varPublicationResponse); err == nil { + *o = PublicationResponse(varPublicationResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "repository") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePublicationResponse struct { + value *PublicationResponse + isSet bool +} + +func (v NullablePublicationResponse) Get() *PublicationResponse { + return v.value +} + +func (v *NullablePublicationResponse) Set(val *PublicationResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePublicationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePublicationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublicationResponse(val *PublicationResponse) *NullablePublicationResponse { + return &NullablePublicationResponse{value: val, isSet: true} +} + +func (v NullablePublicationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublicationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_export.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_export.go new file mode 100644 index 0000000000..508c6f060d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_export.go @@ -0,0 +1,361 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PulpExport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PulpExport{} + +// PulpExport Serializer for PulpExports. +type PulpExport struct { + // A URI of the task that ran the Export. + Task NullableString `json:"task,omitempty"` + // Do a Full (true) or Incremental (false) export. + Full *bool `json:"full,omitempty"` + // Generate report on what would be exported and disk-space required. + DryRun *bool `json:"dry_run,omitempty"` + // List of explicit repo-version hrefs to export (replaces current_version). + Versions []string `json:"versions,omitempty"` + // Chunk export-tarfile into pieces of chunk_size bytes. Recognizes units of B/KB/MB/GB/TB. A chunk has a maximum size of 1TB. + ChunkSize *string `json:"chunk_size,omitempty"` + // List of explicit last-exported-repo-version hrefs (replaces last_export). + StartVersions []string `json:"start_versions,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PulpExport PulpExport + +// NewPulpExport instantiates a new PulpExport object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPulpExport() *PulpExport { + this := PulpExport{} + var full bool = true + this.Full = &full + var dryRun bool = false + this.DryRun = &dryRun + return &this +} + +// NewPulpExportWithDefaults instantiates a new PulpExport object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPulpExportWithDefaults() *PulpExport { + this := PulpExport{} + var full bool = true + this.Full = &full + var dryRun bool = false + this.DryRun = &dryRun + return &this +} + +// GetTask returns the Task field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PulpExport) GetTask() string { + if o == nil || IsNil(o.Task.Get()) { + var ret string + return ret + } + return *o.Task.Get() +} + +// GetTaskOk returns a tuple with the Task field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PulpExport) GetTaskOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Task.Get(), o.Task.IsSet() +} + +// HasTask returns a boolean if a field has been set. +func (o *PulpExport) HasTask() bool { + if o != nil && o.Task.IsSet() { + return true + } + + return false +} + +// SetTask gets a reference to the given NullableString and assigns it to the Task field. +func (o *PulpExport) SetTask(v string) { + o.Task.Set(&v) +} +// SetTaskNil sets the value for Task to be an explicit nil +func (o *PulpExport) SetTaskNil() { + o.Task.Set(nil) +} + +// UnsetTask ensures that no value is present for Task, not even an explicit nil +func (o *PulpExport) UnsetTask() { + o.Task.Unset() +} + +// GetFull returns the Full field value if set, zero value otherwise. +func (o *PulpExport) GetFull() bool { + if o == nil || IsNil(o.Full) { + var ret bool + return ret + } + return *o.Full +} + +// GetFullOk returns a tuple with the Full field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpExport) GetFullOk() (*bool, bool) { + if o == nil || IsNil(o.Full) { + return nil, false + } + return o.Full, true +} + +// HasFull returns a boolean if a field has been set. +func (o *PulpExport) HasFull() bool { + if o != nil && !IsNil(o.Full) { + return true + } + + return false +} + +// SetFull gets a reference to the given bool and assigns it to the Full field. +func (o *PulpExport) SetFull(v bool) { + o.Full = &v +} + +// GetDryRun returns the DryRun field value if set, zero value otherwise. +func (o *PulpExport) GetDryRun() bool { + if o == nil || IsNil(o.DryRun) { + var ret bool + return ret + } + return *o.DryRun +} + +// GetDryRunOk returns a tuple with the DryRun field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpExport) GetDryRunOk() (*bool, bool) { + if o == nil || IsNil(o.DryRun) { + return nil, false + } + return o.DryRun, true +} + +// HasDryRun returns a boolean if a field has been set. +func (o *PulpExport) HasDryRun() bool { + if o != nil && !IsNil(o.DryRun) { + return true + } + + return false +} + +// SetDryRun gets a reference to the given bool and assigns it to the DryRun field. +func (o *PulpExport) SetDryRun(v bool) { + o.DryRun = &v +} + +// GetVersions returns the Versions field value if set, zero value otherwise. +func (o *PulpExport) GetVersions() []string { + if o == nil || IsNil(o.Versions) { + var ret []string + return ret + } + return o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpExport) GetVersionsOk() ([]string, bool) { + if o == nil || IsNil(o.Versions) { + return nil, false + } + return o.Versions, true +} + +// HasVersions returns a boolean if a field has been set. +func (o *PulpExport) HasVersions() bool { + if o != nil && !IsNil(o.Versions) { + return true + } + + return false +} + +// SetVersions gets a reference to the given []string and assigns it to the Versions field. +func (o *PulpExport) SetVersions(v []string) { + o.Versions = v +} + +// GetChunkSize returns the ChunkSize field value if set, zero value otherwise. +func (o *PulpExport) GetChunkSize() string { + if o == nil || IsNil(o.ChunkSize) { + var ret string + return ret + } + return *o.ChunkSize +} + +// GetChunkSizeOk returns a tuple with the ChunkSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpExport) GetChunkSizeOk() (*string, bool) { + if o == nil || IsNil(o.ChunkSize) { + return nil, false + } + return o.ChunkSize, true +} + +// HasChunkSize returns a boolean if a field has been set. +func (o *PulpExport) HasChunkSize() bool { + if o != nil && !IsNil(o.ChunkSize) { + return true + } + + return false +} + +// SetChunkSize gets a reference to the given string and assigns it to the ChunkSize field. +func (o *PulpExport) SetChunkSize(v string) { + o.ChunkSize = &v +} + +// GetStartVersions returns the StartVersions field value if set, zero value otherwise. +func (o *PulpExport) GetStartVersions() []string { + if o == nil || IsNil(o.StartVersions) { + var ret []string + return ret + } + return o.StartVersions +} + +// GetStartVersionsOk returns a tuple with the StartVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpExport) GetStartVersionsOk() ([]string, bool) { + if o == nil || IsNil(o.StartVersions) { + return nil, false + } + return o.StartVersions, true +} + +// HasStartVersions returns a boolean if a field has been set. +func (o *PulpExport) HasStartVersions() bool { + if o != nil && !IsNil(o.StartVersions) { + return true + } + + return false +} + +// SetStartVersions gets a reference to the given []string and assigns it to the StartVersions field. +func (o *PulpExport) SetStartVersions(v []string) { + o.StartVersions = v +} + +func (o PulpExport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PulpExport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Task.IsSet() { + toSerialize["task"] = o.Task.Get() + } + if !IsNil(o.Full) { + toSerialize["full"] = o.Full + } + if !IsNil(o.DryRun) { + toSerialize["dry_run"] = o.DryRun + } + if !IsNil(o.Versions) { + toSerialize["versions"] = o.Versions + } + if !IsNil(o.ChunkSize) { + toSerialize["chunk_size"] = o.ChunkSize + } + if !IsNil(o.StartVersions) { + toSerialize["start_versions"] = o.StartVersions + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PulpExport) UnmarshalJSON(bytes []byte) (err error) { + varPulpExport := _PulpExport{} + + if err = json.Unmarshal(bytes, &varPulpExport); err == nil { + *o = PulpExport(varPulpExport) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "task") + delete(additionalProperties, "full") + delete(additionalProperties, "dry_run") + delete(additionalProperties, "versions") + delete(additionalProperties, "chunk_size") + delete(additionalProperties, "start_versions") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePulpExport struct { + value *PulpExport + isSet bool +} + +func (v NullablePulpExport) Get() *PulpExport { + return v.value +} + +func (v *NullablePulpExport) Set(val *PulpExport) { + v.value = val + v.isSet = true +} + +func (v NullablePulpExport) IsSet() bool { + return v.isSet +} + +func (v *NullablePulpExport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePulpExport(val *PulpExport) *NullablePulpExport { + return &NullablePulpExport{value: val, isSet: true} +} + +func (v NullablePulpExport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePulpExport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_export_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_export_response.go new file mode 100644 index 0000000000..f2b6856870 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_export_response.go @@ -0,0 +1,391 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the PulpExportResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PulpExportResponse{} + +// PulpExportResponse Serializer for PulpExports. +type PulpExportResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A URI of the task that ran the Export. + Task NullableString `json:"task,omitempty"` + // Resources that were exported. + ExportedResources []string `json:"exported_resources,omitempty"` + // Any additional parameters that were used to create the export. + Params map[string]interface{} `json:"params,omitempty"` + // Dictionary of filename: sha256hash entries for export-output-file(s) + OutputFileInfo map[string]interface{} `json:"output_file_info,omitempty"` + // Filename and sha256-checksum of table-of-contents for this export + TocInfo map[string]interface{} `json:"toc_info,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PulpExportResponse PulpExportResponse + +// NewPulpExportResponse instantiates a new PulpExportResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPulpExportResponse() *PulpExportResponse { + this := PulpExportResponse{} + return &this +} + +// NewPulpExportResponseWithDefaults instantiates a new PulpExportResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPulpExportResponseWithDefaults() *PulpExportResponse { + this := PulpExportResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *PulpExportResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpExportResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *PulpExportResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *PulpExportResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *PulpExportResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpExportResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *PulpExportResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *PulpExportResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetTask returns the Task field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PulpExportResponse) GetTask() string { + if o == nil || IsNil(o.Task.Get()) { + var ret string + return ret + } + return *o.Task.Get() +} + +// GetTaskOk returns a tuple with the Task field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PulpExportResponse) GetTaskOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Task.Get(), o.Task.IsSet() +} + +// HasTask returns a boolean if a field has been set. +func (o *PulpExportResponse) HasTask() bool { + if o != nil && o.Task.IsSet() { + return true + } + + return false +} + +// SetTask gets a reference to the given NullableString and assigns it to the Task field. +func (o *PulpExportResponse) SetTask(v string) { + o.Task.Set(&v) +} +// SetTaskNil sets the value for Task to be an explicit nil +func (o *PulpExportResponse) SetTaskNil() { + o.Task.Set(nil) +} + +// UnsetTask ensures that no value is present for Task, not even an explicit nil +func (o *PulpExportResponse) UnsetTask() { + o.Task.Unset() +} + +// GetExportedResources returns the ExportedResources field value if set, zero value otherwise. +func (o *PulpExportResponse) GetExportedResources() []string { + if o == nil || IsNil(o.ExportedResources) { + var ret []string + return ret + } + return o.ExportedResources +} + +// GetExportedResourcesOk returns a tuple with the ExportedResources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpExportResponse) GetExportedResourcesOk() ([]string, bool) { + if o == nil || IsNil(o.ExportedResources) { + return nil, false + } + return o.ExportedResources, true +} + +// HasExportedResources returns a boolean if a field has been set. +func (o *PulpExportResponse) HasExportedResources() bool { + if o != nil && !IsNil(o.ExportedResources) { + return true + } + + return false +} + +// SetExportedResources gets a reference to the given []string and assigns it to the ExportedResources field. +func (o *PulpExportResponse) SetExportedResources(v []string) { + o.ExportedResources = v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *PulpExportResponse) GetParams() map[string]interface{} { + if o == nil || IsNil(o.Params) { + var ret map[string]interface{} + return ret + } + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpExportResponse) GetParamsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Params) { + return map[string]interface{}{}, false + } + return o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *PulpExportResponse) HasParams() bool { + if o != nil && !IsNil(o.Params) { + return true + } + + return false +} + +// SetParams gets a reference to the given map[string]interface{} and assigns it to the Params field. +func (o *PulpExportResponse) SetParams(v map[string]interface{}) { + o.Params = v +} + +// GetOutputFileInfo returns the OutputFileInfo field value if set, zero value otherwise. +func (o *PulpExportResponse) GetOutputFileInfo() map[string]interface{} { + if o == nil || IsNil(o.OutputFileInfo) { + var ret map[string]interface{} + return ret + } + return o.OutputFileInfo +} + +// GetOutputFileInfoOk returns a tuple with the OutputFileInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpExportResponse) GetOutputFileInfoOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.OutputFileInfo) { + return map[string]interface{}{}, false + } + return o.OutputFileInfo, true +} + +// HasOutputFileInfo returns a boolean if a field has been set. +func (o *PulpExportResponse) HasOutputFileInfo() bool { + if o != nil && !IsNil(o.OutputFileInfo) { + return true + } + + return false +} + +// SetOutputFileInfo gets a reference to the given map[string]interface{} and assigns it to the OutputFileInfo field. +func (o *PulpExportResponse) SetOutputFileInfo(v map[string]interface{}) { + o.OutputFileInfo = v +} + +// GetTocInfo returns the TocInfo field value if set, zero value otherwise. +func (o *PulpExportResponse) GetTocInfo() map[string]interface{} { + if o == nil || IsNil(o.TocInfo) { + var ret map[string]interface{} + return ret + } + return o.TocInfo +} + +// GetTocInfoOk returns a tuple with the TocInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpExportResponse) GetTocInfoOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.TocInfo) { + return map[string]interface{}{}, false + } + return o.TocInfo, true +} + +// HasTocInfo returns a boolean if a field has been set. +func (o *PulpExportResponse) HasTocInfo() bool { + if o != nil && !IsNil(o.TocInfo) { + return true + } + + return false +} + +// SetTocInfo gets a reference to the given map[string]interface{} and assigns it to the TocInfo field. +func (o *PulpExportResponse) SetTocInfo(v map[string]interface{}) { + o.TocInfo = v +} + +func (o PulpExportResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PulpExportResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if o.Task.IsSet() { + toSerialize["task"] = o.Task.Get() + } + if !IsNil(o.ExportedResources) { + toSerialize["exported_resources"] = o.ExportedResources + } + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + if !IsNil(o.OutputFileInfo) { + toSerialize["output_file_info"] = o.OutputFileInfo + } + if !IsNil(o.TocInfo) { + toSerialize["toc_info"] = o.TocInfo + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PulpExportResponse) UnmarshalJSON(bytes []byte) (err error) { + varPulpExportResponse := _PulpExportResponse{} + + if err = json.Unmarshal(bytes, &varPulpExportResponse); err == nil { + *o = PulpExportResponse(varPulpExportResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "task") + delete(additionalProperties, "exported_resources") + delete(additionalProperties, "params") + delete(additionalProperties, "output_file_info") + delete(additionalProperties, "toc_info") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePulpExportResponse struct { + value *PulpExportResponse + isSet bool +} + +func (v NullablePulpExportResponse) Get() *PulpExportResponse { + return v.value +} + +func (v *NullablePulpExportResponse) Set(val *PulpExportResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePulpExportResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePulpExportResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePulpExportResponse(val *PulpExportResponse) *NullablePulpExportResponse { + return &NullablePulpExportResponse{value: val, isSet: true} +} + +func (v NullablePulpExportResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePulpExportResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_exporter.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_exporter.go new file mode 100644 index 0000000000..2273039073 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_exporter.go @@ -0,0 +1,249 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PulpExporter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PulpExporter{} + +// PulpExporter Serializer for pulp exporters. +type PulpExporter struct { + // Unique name of the file system exporter. + Name string `json:"name"` + // File system directory to store exported tar.gzs. + Path string `json:"path"` + Repositories []string `json:"repositories"` + // Last attempted export for this PulpExporter + LastExport NullableString `json:"last_export,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PulpExporter PulpExporter + +// NewPulpExporter instantiates a new PulpExporter object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPulpExporter(name string, path string, repositories []string) *PulpExporter { + this := PulpExporter{} + this.Name = name + this.Path = path + this.Repositories = repositories + return &this +} + +// NewPulpExporterWithDefaults instantiates a new PulpExporter object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPulpExporterWithDefaults() *PulpExporter { + this := PulpExporter{} + return &this +} + +// GetName returns the Name field value +func (o *PulpExporter) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PulpExporter) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PulpExporter) SetName(v string) { + o.Name = v +} + +// GetPath returns the Path field value +func (o *PulpExporter) GetPath() string { + if o == nil { + var ret string + return ret + } + + return o.Path +} + +// GetPathOk returns a tuple with the Path field value +// and a boolean to check if the value has been set. +func (o *PulpExporter) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Path, true +} + +// SetPath sets field value +func (o *PulpExporter) SetPath(v string) { + o.Path = v +} + +// GetRepositories returns the Repositories field value +func (o *PulpExporter) GetRepositories() []string { + if o == nil { + var ret []string + return ret + } + + return o.Repositories +} + +// GetRepositoriesOk returns a tuple with the Repositories field value +// and a boolean to check if the value has been set. +func (o *PulpExporter) GetRepositoriesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Repositories, true +} + +// SetRepositories sets field value +func (o *PulpExporter) SetRepositories(v []string) { + o.Repositories = v +} + +// GetLastExport returns the LastExport field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PulpExporter) GetLastExport() string { + if o == nil || IsNil(o.LastExport.Get()) { + var ret string + return ret + } + return *o.LastExport.Get() +} + +// GetLastExportOk returns a tuple with the LastExport field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PulpExporter) GetLastExportOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LastExport.Get(), o.LastExport.IsSet() +} + +// HasLastExport returns a boolean if a field has been set. +func (o *PulpExporter) HasLastExport() bool { + if o != nil && o.LastExport.IsSet() { + return true + } + + return false +} + +// SetLastExport gets a reference to the given NullableString and assigns it to the LastExport field. +func (o *PulpExporter) SetLastExport(v string) { + o.LastExport.Set(&v) +} +// SetLastExportNil sets the value for LastExport to be an explicit nil +func (o *PulpExporter) SetLastExportNil() { + o.LastExport.Set(nil) +} + +// UnsetLastExport ensures that no value is present for LastExport, not even an explicit nil +func (o *PulpExporter) UnsetLastExport() { + o.LastExport.Unset() +} + +func (o PulpExporter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PulpExporter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["path"] = o.Path + toSerialize["repositories"] = o.Repositories + if o.LastExport.IsSet() { + toSerialize["last_export"] = o.LastExport.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PulpExporter) UnmarshalJSON(bytes []byte) (err error) { + varPulpExporter := _PulpExporter{} + + if err = json.Unmarshal(bytes, &varPulpExporter); err == nil { + *o = PulpExporter(varPulpExporter) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "path") + delete(additionalProperties, "repositories") + delete(additionalProperties, "last_export") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePulpExporter struct { + value *PulpExporter + isSet bool +} + +func (v NullablePulpExporter) Get() *PulpExporter { + return v.value +} + +func (v *NullablePulpExporter) Set(val *PulpExporter) { + v.value = val + v.isSet = true +} + +func (v NullablePulpExporter) IsSet() bool { + return v.isSet +} + +func (v *NullablePulpExporter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePulpExporter(val *PulpExporter) *NullablePulpExporter { + return &NullablePulpExporter{value: val, isSet: true} +} + +func (v NullablePulpExporter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePulpExporter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_exporter_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_exporter_response.go new file mode 100644 index 0000000000..2af6c499fb --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_exporter_response.go @@ -0,0 +1,325 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the PulpExporterResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PulpExporterResponse{} + +// PulpExporterResponse Serializer for pulp exporters. +type PulpExporterResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Unique name of the file system exporter. + Name string `json:"name"` + // File system directory to store exported tar.gzs. + Path string `json:"path"` + Repositories []string `json:"repositories"` + // Last attempted export for this PulpExporter + LastExport NullableString `json:"last_export,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PulpExporterResponse PulpExporterResponse + +// NewPulpExporterResponse instantiates a new PulpExporterResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPulpExporterResponse(name string, path string, repositories []string) *PulpExporterResponse { + this := PulpExporterResponse{} + this.Name = name + this.Path = path + this.Repositories = repositories + return &this +} + +// NewPulpExporterResponseWithDefaults instantiates a new PulpExporterResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPulpExporterResponseWithDefaults() *PulpExporterResponse { + this := PulpExporterResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *PulpExporterResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpExporterResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *PulpExporterResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *PulpExporterResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *PulpExporterResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpExporterResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *PulpExporterResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *PulpExporterResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *PulpExporterResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PulpExporterResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PulpExporterResponse) SetName(v string) { + o.Name = v +} + +// GetPath returns the Path field value +func (o *PulpExporterResponse) GetPath() string { + if o == nil { + var ret string + return ret + } + + return o.Path +} + +// GetPathOk returns a tuple with the Path field value +// and a boolean to check if the value has been set. +func (o *PulpExporterResponse) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Path, true +} + +// SetPath sets field value +func (o *PulpExporterResponse) SetPath(v string) { + o.Path = v +} + +// GetRepositories returns the Repositories field value +func (o *PulpExporterResponse) GetRepositories() []string { + if o == nil { + var ret []string + return ret + } + + return o.Repositories +} + +// GetRepositoriesOk returns a tuple with the Repositories field value +// and a boolean to check if the value has been set. +func (o *PulpExporterResponse) GetRepositoriesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Repositories, true +} + +// SetRepositories sets field value +func (o *PulpExporterResponse) SetRepositories(v []string) { + o.Repositories = v +} + +// GetLastExport returns the LastExport field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PulpExporterResponse) GetLastExport() string { + if o == nil || IsNil(o.LastExport.Get()) { + var ret string + return ret + } + return *o.LastExport.Get() +} + +// GetLastExportOk returns a tuple with the LastExport field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PulpExporterResponse) GetLastExportOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LastExport.Get(), o.LastExport.IsSet() +} + +// HasLastExport returns a boolean if a field has been set. +func (o *PulpExporterResponse) HasLastExport() bool { + if o != nil && o.LastExport.IsSet() { + return true + } + + return false +} + +// SetLastExport gets a reference to the given NullableString and assigns it to the LastExport field. +func (o *PulpExporterResponse) SetLastExport(v string) { + o.LastExport.Set(&v) +} +// SetLastExportNil sets the value for LastExport to be an explicit nil +func (o *PulpExporterResponse) SetLastExportNil() { + o.LastExport.Set(nil) +} + +// UnsetLastExport ensures that no value is present for LastExport, not even an explicit nil +func (o *PulpExporterResponse) UnsetLastExport() { + o.LastExport.Unset() +} + +func (o PulpExporterResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PulpExporterResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["path"] = o.Path + toSerialize["repositories"] = o.Repositories + if o.LastExport.IsSet() { + toSerialize["last_export"] = o.LastExport.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PulpExporterResponse) UnmarshalJSON(bytes []byte) (err error) { + varPulpExporterResponse := _PulpExporterResponse{} + + if err = json.Unmarshal(bytes, &varPulpExporterResponse); err == nil { + *o = PulpExporterResponse(varPulpExporterResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "path") + delete(additionalProperties, "repositories") + delete(additionalProperties, "last_export") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePulpExporterResponse struct { + value *PulpExporterResponse + isSet bool +} + +func (v NullablePulpExporterResponse) Get() *PulpExporterResponse { + return v.value +} + +func (v *NullablePulpExporterResponse) Set(val *PulpExporterResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePulpExporterResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePulpExporterResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePulpExporterResponse(val *PulpExporterResponse) *NullablePulpExporterResponse { + return &NullablePulpExporterResponse{value: val, isSet: true} +} + +func (v NullablePulpExporterResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePulpExporterResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_import.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_import.go new file mode 100644 index 0000000000..7fa9715781 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_import.go @@ -0,0 +1,233 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PulpImport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PulpImport{} + +// PulpImport Serializer for call to import into Pulp. +type PulpImport struct { + // Path to export that will be imported. + Path *string `json:"path,omitempty"` + // Path to a table-of-contents file describing chunks to be validated, reassembled, and imported. + Toc *string `json:"toc,omitempty"` + // If True, missing repositories will be automatically created during the import. + CreateRepositories *bool `json:"create_repositories,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PulpImport PulpImport + +// NewPulpImport instantiates a new PulpImport object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPulpImport() *PulpImport { + this := PulpImport{} + var createRepositories bool = false + this.CreateRepositories = &createRepositories + return &this +} + +// NewPulpImportWithDefaults instantiates a new PulpImport object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPulpImportWithDefaults() *PulpImport { + this := PulpImport{} + var createRepositories bool = false + this.CreateRepositories = &createRepositories + return &this +} + +// GetPath returns the Path field value if set, zero value otherwise. +func (o *PulpImport) GetPath() string { + if o == nil || IsNil(o.Path) { + var ret string + return ret + } + return *o.Path +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpImport) GetPathOk() (*string, bool) { + if o == nil || IsNil(o.Path) { + return nil, false + } + return o.Path, true +} + +// HasPath returns a boolean if a field has been set. +func (o *PulpImport) HasPath() bool { + if o != nil && !IsNil(o.Path) { + return true + } + + return false +} + +// SetPath gets a reference to the given string and assigns it to the Path field. +func (o *PulpImport) SetPath(v string) { + o.Path = &v +} + +// GetToc returns the Toc field value if set, zero value otherwise. +func (o *PulpImport) GetToc() string { + if o == nil || IsNil(o.Toc) { + var ret string + return ret + } + return *o.Toc +} + +// GetTocOk returns a tuple with the Toc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpImport) GetTocOk() (*string, bool) { + if o == nil || IsNil(o.Toc) { + return nil, false + } + return o.Toc, true +} + +// HasToc returns a boolean if a field has been set. +func (o *PulpImport) HasToc() bool { + if o != nil && !IsNil(o.Toc) { + return true + } + + return false +} + +// SetToc gets a reference to the given string and assigns it to the Toc field. +func (o *PulpImport) SetToc(v string) { + o.Toc = &v +} + +// GetCreateRepositories returns the CreateRepositories field value if set, zero value otherwise. +func (o *PulpImport) GetCreateRepositories() bool { + if o == nil || IsNil(o.CreateRepositories) { + var ret bool + return ret + } + return *o.CreateRepositories +} + +// GetCreateRepositoriesOk returns a tuple with the CreateRepositories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpImport) GetCreateRepositoriesOk() (*bool, bool) { + if o == nil || IsNil(o.CreateRepositories) { + return nil, false + } + return o.CreateRepositories, true +} + +// HasCreateRepositories returns a boolean if a field has been set. +func (o *PulpImport) HasCreateRepositories() bool { + if o != nil && !IsNil(o.CreateRepositories) { + return true + } + + return false +} + +// SetCreateRepositories gets a reference to the given bool and assigns it to the CreateRepositories field. +func (o *PulpImport) SetCreateRepositories(v bool) { + o.CreateRepositories = &v +} + +func (o PulpImport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PulpImport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Path) { + toSerialize["path"] = o.Path + } + if !IsNil(o.Toc) { + toSerialize["toc"] = o.Toc + } + if !IsNil(o.CreateRepositories) { + toSerialize["create_repositories"] = o.CreateRepositories + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PulpImport) UnmarshalJSON(bytes []byte) (err error) { + varPulpImport := _PulpImport{} + + if err = json.Unmarshal(bytes, &varPulpImport); err == nil { + *o = PulpImport(varPulpImport) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "path") + delete(additionalProperties, "toc") + delete(additionalProperties, "create_repositories") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePulpImport struct { + value *PulpImport + isSet bool +} + +func (v NullablePulpImport) Get() *PulpImport { + return v.value +} + +func (v *NullablePulpImport) Set(val *PulpImport) { + v.value = val + v.isSet = true +} + +func (v NullablePulpImport) IsSet() bool { + return v.isSet +} + +func (v *NullablePulpImport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePulpImport(val *PulpImport) *NullablePulpImport { + return &NullablePulpImport{value: val, isSet: true} +} + +func (v NullablePulpImport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePulpImport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_import_check.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_import_check.go new file mode 100644 index 0000000000..00644122d2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_import_check.go @@ -0,0 +1,229 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PulpImportCheck type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PulpImportCheck{} + +// PulpImportCheck Check validity of provided import-options. Provides the ability to check that an import is 'sane' without having to actually create an importer. +type PulpImportCheck struct { + // Path to export-tar-gz that will be imported. + Path *string `json:"path,omitempty"` + // Path to a table-of-contents file describing chunks to be validated, reassembled, and imported. + Toc *string `json:"toc,omitempty"` + // Mapping of repo names in an export file to the repo names in Pulp. For example, if the export has a repo named 'foo' and the repo to import content into was 'bar', the mapping would be \"{'foo': 'bar'}\". + RepoMapping *string `json:"repo_mapping,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PulpImportCheck PulpImportCheck + +// NewPulpImportCheck instantiates a new PulpImportCheck object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPulpImportCheck() *PulpImportCheck { + this := PulpImportCheck{} + return &this +} + +// NewPulpImportCheckWithDefaults instantiates a new PulpImportCheck object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPulpImportCheckWithDefaults() *PulpImportCheck { + this := PulpImportCheck{} + return &this +} + +// GetPath returns the Path field value if set, zero value otherwise. +func (o *PulpImportCheck) GetPath() string { + if o == nil || IsNil(o.Path) { + var ret string + return ret + } + return *o.Path +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpImportCheck) GetPathOk() (*string, bool) { + if o == nil || IsNil(o.Path) { + return nil, false + } + return o.Path, true +} + +// HasPath returns a boolean if a field has been set. +func (o *PulpImportCheck) HasPath() bool { + if o != nil && !IsNil(o.Path) { + return true + } + + return false +} + +// SetPath gets a reference to the given string and assigns it to the Path field. +func (o *PulpImportCheck) SetPath(v string) { + o.Path = &v +} + +// GetToc returns the Toc field value if set, zero value otherwise. +func (o *PulpImportCheck) GetToc() string { + if o == nil || IsNil(o.Toc) { + var ret string + return ret + } + return *o.Toc +} + +// GetTocOk returns a tuple with the Toc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpImportCheck) GetTocOk() (*string, bool) { + if o == nil || IsNil(o.Toc) { + return nil, false + } + return o.Toc, true +} + +// HasToc returns a boolean if a field has been set. +func (o *PulpImportCheck) HasToc() bool { + if o != nil && !IsNil(o.Toc) { + return true + } + + return false +} + +// SetToc gets a reference to the given string and assigns it to the Toc field. +func (o *PulpImportCheck) SetToc(v string) { + o.Toc = &v +} + +// GetRepoMapping returns the RepoMapping field value if set, zero value otherwise. +func (o *PulpImportCheck) GetRepoMapping() string { + if o == nil || IsNil(o.RepoMapping) { + var ret string + return ret + } + return *o.RepoMapping +} + +// GetRepoMappingOk returns a tuple with the RepoMapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpImportCheck) GetRepoMappingOk() (*string, bool) { + if o == nil || IsNil(o.RepoMapping) { + return nil, false + } + return o.RepoMapping, true +} + +// HasRepoMapping returns a boolean if a field has been set. +func (o *PulpImportCheck) HasRepoMapping() bool { + if o != nil && !IsNil(o.RepoMapping) { + return true + } + + return false +} + +// SetRepoMapping gets a reference to the given string and assigns it to the RepoMapping field. +func (o *PulpImportCheck) SetRepoMapping(v string) { + o.RepoMapping = &v +} + +func (o PulpImportCheck) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PulpImportCheck) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Path) { + toSerialize["path"] = o.Path + } + if !IsNil(o.Toc) { + toSerialize["toc"] = o.Toc + } + if !IsNil(o.RepoMapping) { + toSerialize["repo_mapping"] = o.RepoMapping + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PulpImportCheck) UnmarshalJSON(bytes []byte) (err error) { + varPulpImportCheck := _PulpImportCheck{} + + if err = json.Unmarshal(bytes, &varPulpImportCheck); err == nil { + *o = PulpImportCheck(varPulpImportCheck) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "path") + delete(additionalProperties, "toc") + delete(additionalProperties, "repo_mapping") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePulpImportCheck struct { + value *PulpImportCheck + isSet bool +} + +func (v NullablePulpImportCheck) Get() *PulpImportCheck { + return v.value +} + +func (v *NullablePulpImportCheck) Set(val *PulpImportCheck) { + v.value = val + v.isSet = true +} + +func (v NullablePulpImportCheck) IsSet() bool { + return v.isSet +} + +func (v *NullablePulpImportCheck) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePulpImportCheck(val *PulpImportCheck) *NullablePulpImportCheck { + return &NullablePulpImportCheck{value: val, isSet: true} +} + +func (v NullablePulpImportCheck) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePulpImportCheck) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_import_check_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_import_check_response.go new file mode 100644 index 0000000000..58dd149cd8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_import_check_response.go @@ -0,0 +1,226 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PulpImportCheckResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PulpImportCheckResponse{} + +// PulpImportCheckResponse Return the response to a PulpImport import-check call. +type PulpImportCheckResponse struct { + Toc *EvaluationResponse `json:"toc,omitempty"` + Path *EvaluationResponse `json:"path,omitempty"` + RepoMapping *EvaluationResponse `json:"repo_mapping,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PulpImportCheckResponse PulpImportCheckResponse + +// NewPulpImportCheckResponse instantiates a new PulpImportCheckResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPulpImportCheckResponse() *PulpImportCheckResponse { + this := PulpImportCheckResponse{} + return &this +} + +// NewPulpImportCheckResponseWithDefaults instantiates a new PulpImportCheckResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPulpImportCheckResponseWithDefaults() *PulpImportCheckResponse { + this := PulpImportCheckResponse{} + return &this +} + +// GetToc returns the Toc field value if set, zero value otherwise. +func (o *PulpImportCheckResponse) GetToc() EvaluationResponse { + if o == nil || IsNil(o.Toc) { + var ret EvaluationResponse + return ret + } + return *o.Toc +} + +// GetTocOk returns a tuple with the Toc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpImportCheckResponse) GetTocOk() (*EvaluationResponse, bool) { + if o == nil || IsNil(o.Toc) { + return nil, false + } + return o.Toc, true +} + +// HasToc returns a boolean if a field has been set. +func (o *PulpImportCheckResponse) HasToc() bool { + if o != nil && !IsNil(o.Toc) { + return true + } + + return false +} + +// SetToc gets a reference to the given EvaluationResponse and assigns it to the Toc field. +func (o *PulpImportCheckResponse) SetToc(v EvaluationResponse) { + o.Toc = &v +} + +// GetPath returns the Path field value if set, zero value otherwise. +func (o *PulpImportCheckResponse) GetPath() EvaluationResponse { + if o == nil || IsNil(o.Path) { + var ret EvaluationResponse + return ret + } + return *o.Path +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpImportCheckResponse) GetPathOk() (*EvaluationResponse, bool) { + if o == nil || IsNil(o.Path) { + return nil, false + } + return o.Path, true +} + +// HasPath returns a boolean if a field has been set. +func (o *PulpImportCheckResponse) HasPath() bool { + if o != nil && !IsNil(o.Path) { + return true + } + + return false +} + +// SetPath gets a reference to the given EvaluationResponse and assigns it to the Path field. +func (o *PulpImportCheckResponse) SetPath(v EvaluationResponse) { + o.Path = &v +} + +// GetRepoMapping returns the RepoMapping field value if set, zero value otherwise. +func (o *PulpImportCheckResponse) GetRepoMapping() EvaluationResponse { + if o == nil || IsNil(o.RepoMapping) { + var ret EvaluationResponse + return ret + } + return *o.RepoMapping +} + +// GetRepoMappingOk returns a tuple with the RepoMapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpImportCheckResponse) GetRepoMappingOk() (*EvaluationResponse, bool) { + if o == nil || IsNil(o.RepoMapping) { + return nil, false + } + return o.RepoMapping, true +} + +// HasRepoMapping returns a boolean if a field has been set. +func (o *PulpImportCheckResponse) HasRepoMapping() bool { + if o != nil && !IsNil(o.RepoMapping) { + return true + } + + return false +} + +// SetRepoMapping gets a reference to the given EvaluationResponse and assigns it to the RepoMapping field. +func (o *PulpImportCheckResponse) SetRepoMapping(v EvaluationResponse) { + o.RepoMapping = &v +} + +func (o PulpImportCheckResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PulpImportCheckResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Toc) { + toSerialize["toc"] = o.Toc + } + if !IsNil(o.Path) { + toSerialize["path"] = o.Path + } + if !IsNil(o.RepoMapping) { + toSerialize["repo_mapping"] = o.RepoMapping + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PulpImportCheckResponse) UnmarshalJSON(bytes []byte) (err error) { + varPulpImportCheckResponse := _PulpImportCheckResponse{} + + if err = json.Unmarshal(bytes, &varPulpImportCheckResponse); err == nil { + *o = PulpImportCheckResponse(varPulpImportCheckResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "toc") + delete(additionalProperties, "path") + delete(additionalProperties, "repo_mapping") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePulpImportCheckResponse struct { + value *PulpImportCheckResponse + isSet bool +} + +func (v NullablePulpImportCheckResponse) Get() *PulpImportCheckResponse { + return v.value +} + +func (v *NullablePulpImportCheckResponse) Set(val *PulpImportCheckResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePulpImportCheckResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePulpImportCheckResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePulpImportCheckResponse(val *PulpImportCheckResponse) *NullablePulpImportCheckResponse { + return &NullablePulpImportCheckResponse{value: val, isSet: true} +} + +func (v NullablePulpImportCheckResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePulpImportCheckResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_importer.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_importer.go new file mode 100644 index 0000000000..b2aeca4965 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_importer.go @@ -0,0 +1,182 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PulpImporter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PulpImporter{} + +// PulpImporter Serializer for PulpImporters. +type PulpImporter struct { + // Unique name of the Importer. + Name string `json:"name"` + // Mapping of repo names in an export file to the repo names in Pulp. For example, if the export has a repo named 'foo' and the repo to import content into was 'bar', the mapping would be \"{'foo': 'bar'}\". + RepoMapping *map[string]string `json:"repo_mapping,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PulpImporter PulpImporter + +// NewPulpImporter instantiates a new PulpImporter object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPulpImporter(name string) *PulpImporter { + this := PulpImporter{} + this.Name = name + return &this +} + +// NewPulpImporterWithDefaults instantiates a new PulpImporter object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPulpImporterWithDefaults() *PulpImporter { + this := PulpImporter{} + return &this +} + +// GetName returns the Name field value +func (o *PulpImporter) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PulpImporter) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PulpImporter) SetName(v string) { + o.Name = v +} + +// GetRepoMapping returns the RepoMapping field value if set, zero value otherwise. +func (o *PulpImporter) GetRepoMapping() map[string]string { + if o == nil || IsNil(o.RepoMapping) { + var ret map[string]string + return ret + } + return *o.RepoMapping +} + +// GetRepoMappingOk returns a tuple with the RepoMapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpImporter) GetRepoMappingOk() (*map[string]string, bool) { + if o == nil || IsNil(o.RepoMapping) { + return nil, false + } + return o.RepoMapping, true +} + +// HasRepoMapping returns a boolean if a field has been set. +func (o *PulpImporter) HasRepoMapping() bool { + if o != nil && !IsNil(o.RepoMapping) { + return true + } + + return false +} + +// SetRepoMapping gets a reference to the given map[string]string and assigns it to the RepoMapping field. +func (o *PulpImporter) SetRepoMapping(v map[string]string) { + o.RepoMapping = &v +} + +func (o PulpImporter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PulpImporter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.RepoMapping) { + toSerialize["repo_mapping"] = o.RepoMapping + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PulpImporter) UnmarshalJSON(bytes []byte) (err error) { + varPulpImporter := _PulpImporter{} + + if err = json.Unmarshal(bytes, &varPulpImporter); err == nil { + *o = PulpImporter(varPulpImporter) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "repo_mapping") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePulpImporter struct { + value *PulpImporter + isSet bool +} + +func (v NullablePulpImporter) Get() *PulpImporter { + return v.value +} + +func (v *NullablePulpImporter) Set(val *PulpImporter) { + v.value = val + v.isSet = true +} + +func (v NullablePulpImporter) IsSet() bool { + return v.isSet +} + +func (v *NullablePulpImporter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePulpImporter(val *PulpImporter) *NullablePulpImporter { + return &NullablePulpImporter{value: val, isSet: true} +} + +func (v NullablePulpImporter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePulpImporter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_importer_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_importer_response.go new file mode 100644 index 0000000000..30947bdc7e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_pulp_importer_response.go @@ -0,0 +1,258 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the PulpImporterResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PulpImporterResponse{} + +// PulpImporterResponse Serializer for PulpImporters. +type PulpImporterResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Unique name of the Importer. + Name string `json:"name"` + // Mapping of repo names in an export file to the repo names in Pulp. For example, if the export has a repo named 'foo' and the repo to import content into was 'bar', the mapping would be \"{'foo': 'bar'}\". + RepoMapping *map[string]string `json:"repo_mapping,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PulpImporterResponse PulpImporterResponse + +// NewPulpImporterResponse instantiates a new PulpImporterResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPulpImporterResponse(name string) *PulpImporterResponse { + this := PulpImporterResponse{} + this.Name = name + return &this +} + +// NewPulpImporterResponseWithDefaults instantiates a new PulpImporterResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPulpImporterResponseWithDefaults() *PulpImporterResponse { + this := PulpImporterResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *PulpImporterResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpImporterResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *PulpImporterResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *PulpImporterResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *PulpImporterResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpImporterResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *PulpImporterResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *PulpImporterResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *PulpImporterResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PulpImporterResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PulpImporterResponse) SetName(v string) { + o.Name = v +} + +// GetRepoMapping returns the RepoMapping field value if set, zero value otherwise. +func (o *PulpImporterResponse) GetRepoMapping() map[string]string { + if o == nil || IsNil(o.RepoMapping) { + var ret map[string]string + return ret + } + return *o.RepoMapping +} + +// GetRepoMappingOk returns a tuple with the RepoMapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PulpImporterResponse) GetRepoMappingOk() (*map[string]string, bool) { + if o == nil || IsNil(o.RepoMapping) { + return nil, false + } + return o.RepoMapping, true +} + +// HasRepoMapping returns a boolean if a field has been set. +func (o *PulpImporterResponse) HasRepoMapping() bool { + if o != nil && !IsNil(o.RepoMapping) { + return true + } + + return false +} + +// SetRepoMapping gets a reference to the given map[string]string and assigns it to the RepoMapping field. +func (o *PulpImporterResponse) SetRepoMapping(v map[string]string) { + o.RepoMapping = &v +} + +func (o PulpImporterResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PulpImporterResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + if !IsNil(o.RepoMapping) { + toSerialize["repo_mapping"] = o.RepoMapping + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PulpImporterResponse) UnmarshalJSON(bytes []byte) (err error) { + varPulpImporterResponse := _PulpImporterResponse{} + + if err = json.Unmarshal(bytes, &varPulpImporterResponse); err == nil { + *o = PulpImporterResponse(varPulpImporterResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "repo_mapping") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePulpImporterResponse struct { + value *PulpImporterResponse + isSet bool +} + +func (v NullablePulpImporterResponse) Get() *PulpImporterResponse { + return v.value +} + +func (v *NullablePulpImporterResponse) Set(val *PulpImporterResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePulpImporterResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePulpImporterResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePulpImporterResponse(val *PulpImporterResponse) *NullablePulpImporterResponse { + return &NullablePulpImporterResponse{value: val, isSet: true} +} + +func (v NullablePulpImporterResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePulpImporterResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_purge.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_purge.go new file mode 100644 index 0000000000..64efb6ddd5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_purge.go @@ -0,0 +1,192 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the Purge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Purge{} + +// Purge struct for Purge +type Purge struct { + // Purge tasks completed earlier than this timestamp. Format '%Y-%m-%d[T%H:%M:%S]' + FinishedBefore *time.Time `json:"finished_before,omitempty"` + // List of task-states to be purged. Only 'final' states are allowed. + States []StatesEnum `json:"states,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Purge Purge + +// NewPurge instantiates a new Purge object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPurge() *Purge { + this := Purge{} + return &this +} + +// NewPurgeWithDefaults instantiates a new Purge object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPurgeWithDefaults() *Purge { + this := Purge{} + return &this +} + +// GetFinishedBefore returns the FinishedBefore field value if set, zero value otherwise. +func (o *Purge) GetFinishedBefore() time.Time { + if o == nil || IsNil(o.FinishedBefore) { + var ret time.Time + return ret + } + return *o.FinishedBefore +} + +// GetFinishedBeforeOk returns a tuple with the FinishedBefore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Purge) GetFinishedBeforeOk() (*time.Time, bool) { + if o == nil || IsNil(o.FinishedBefore) { + return nil, false + } + return o.FinishedBefore, true +} + +// HasFinishedBefore returns a boolean if a field has been set. +func (o *Purge) HasFinishedBefore() bool { + if o != nil && !IsNil(o.FinishedBefore) { + return true + } + + return false +} + +// SetFinishedBefore gets a reference to the given time.Time and assigns it to the FinishedBefore field. +func (o *Purge) SetFinishedBefore(v time.Time) { + o.FinishedBefore = &v +} + +// GetStates returns the States field value if set, zero value otherwise. +func (o *Purge) GetStates() []StatesEnum { + if o == nil || IsNil(o.States) { + var ret []StatesEnum + return ret + } + return o.States +} + +// GetStatesOk returns a tuple with the States field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Purge) GetStatesOk() ([]StatesEnum, bool) { + if o == nil || IsNil(o.States) { + return nil, false + } + return o.States, true +} + +// HasStates returns a boolean if a field has been set. +func (o *Purge) HasStates() bool { + if o != nil && !IsNil(o.States) { + return true + } + + return false +} + +// SetStates gets a reference to the given []StatesEnum and assigns it to the States field. +func (o *Purge) SetStates(v []StatesEnum) { + o.States = v +} + +func (o Purge) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Purge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FinishedBefore) { + toSerialize["finished_before"] = o.FinishedBefore + } + if !IsNil(o.States) { + toSerialize["states"] = o.States + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Purge) UnmarshalJSON(bytes []byte) (err error) { + varPurge := _Purge{} + + if err = json.Unmarshal(bytes, &varPurge); err == nil { + *o = Purge(varPurge) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "finished_before") + delete(additionalProperties, "states") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePurge struct { + value *Purge + isSet bool +} + +func (v NullablePurge) Get() *Purge { + return v.value +} + +func (v *NullablePurge) Set(val *Purge) { + v.value = val + v.isSet = true +} + +func (v NullablePurge) IsSet() bool { + return v.isSet +} + +func (v *NullablePurge) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePurge(val *Purge) *NullablePurge { + return &NullablePurge{value: val, isSet: true} +} + +func (v NullablePurge) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePurge) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_bander_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_bander_remote.go new file mode 100644 index 0000000000..9bf57741e1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_bander_remote.go @@ -0,0 +1,215 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the PythonBanderRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PythonBanderRemote{} + +// PythonBanderRemote A Serializer for the initial step of creating a Python Remote from a Bandersnatch config file +type PythonBanderRemote struct { + // A Bandersnatch config that may be used to construct a Python Remote. + Config *os.File `json:"config"` + // A unique name for this remote + Name string `json:"name"` + Policy *Policy762Enum `json:"policy,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PythonBanderRemote PythonBanderRemote + +// NewPythonBanderRemote instantiates a new PythonBanderRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPythonBanderRemote(config *os.File, name string) *PythonBanderRemote { + this := PythonBanderRemote{} + this.Config = config + this.Name = name + var policy Policy762Enum = POLICY762ENUM_ON_DEMAND + this.Policy = &policy + return &this +} + +// NewPythonBanderRemoteWithDefaults instantiates a new PythonBanderRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPythonBanderRemoteWithDefaults() *PythonBanderRemote { + this := PythonBanderRemote{} + var policy Policy762Enum = POLICY762ENUM_ON_DEMAND + this.Policy = &policy + return &this +} + +// GetConfig returns the Config field value +func (o *PythonBanderRemote) GetConfig() *os.File { + if o == nil { + var ret *os.File + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *PythonBanderRemote) GetConfigOk() (**os.File, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *PythonBanderRemote) SetConfig(v *os.File) { + o.Config = v +} + +// GetName returns the Name field value +func (o *PythonBanderRemote) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PythonBanderRemote) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PythonBanderRemote) SetName(v string) { + o.Name = v +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PythonBanderRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonBanderRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PythonBanderRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *PythonBanderRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +func (o PythonBanderRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PythonBanderRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["name"] = o.Name + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PythonBanderRemote) UnmarshalJSON(bytes []byte) (err error) { + varPythonBanderRemote := _PythonBanderRemote{} + + if err = json.Unmarshal(bytes, &varPythonBanderRemote); err == nil { + *o = PythonBanderRemote(varPythonBanderRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "config") + delete(additionalProperties, "name") + delete(additionalProperties, "policy") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePythonBanderRemote struct { + value *PythonBanderRemote + isSet bool +} + +func (v NullablePythonBanderRemote) Get() *PythonBanderRemote { + return v.value +} + +func (v *NullablePythonBanderRemote) Set(val *PythonBanderRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePythonBanderRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePythonBanderRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePythonBanderRemote(val *PythonBanderRemote) *NullablePythonBanderRemote { + return &NullablePythonBanderRemote{value: val, isSet: true} +} + +func (v NullablePythonBanderRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePythonBanderRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_distribution.go new file mode 100644 index 0000000000..6040db6aec --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_distribution.go @@ -0,0 +1,486 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PythonPythonDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PythonPythonDistribution{} + +// PythonPythonDistribution Serializer for Pulp distributions for the Python type. +type PythonPythonDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + // Allow packages to be uploaded to this index. + AllowUploads *bool `json:"allow_uploads,omitempty"` + // Remote that can be used to fetch content when using pull-through caching. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PythonPythonDistribution PythonPythonDistribution + +// NewPythonPythonDistribution instantiates a new PythonPythonDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPythonPythonDistribution(basePath string, name string) *PythonPythonDistribution { + this := PythonPythonDistribution{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + var allowUploads bool = true + this.AllowUploads = &allowUploads + return &this +} + +// NewPythonPythonDistributionWithDefaults instantiates a new PythonPythonDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPythonPythonDistributionWithDefaults() *PythonPythonDistribution { + this := PythonPythonDistribution{} + var hidden bool = false + this.Hidden = &hidden + var allowUploads bool = true + this.AllowUploads = &allowUploads + return &this +} + +// GetBasePath returns the BasePath field value +func (o *PythonPythonDistribution) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *PythonPythonDistribution) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *PythonPythonDistribution) SetBasePath(v string) { + o.BasePath = v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *PythonPythonDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *PythonPythonDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *PythonPythonDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *PythonPythonDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *PythonPythonDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *PythonPythonDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *PythonPythonDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PythonPythonDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PythonPythonDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PythonPythonDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *PythonPythonDistribution) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PythonPythonDistribution) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PythonPythonDistribution) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *PythonPythonDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *PythonPythonDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *PythonPythonDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *PythonPythonDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonDistribution) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonDistribution) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *PythonPythonDistribution) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *PythonPythonDistribution) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *PythonPythonDistribution) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *PythonPythonDistribution) UnsetPublication() { + o.Publication.Unset() +} + +// GetAllowUploads returns the AllowUploads field value if set, zero value otherwise. +func (o *PythonPythonDistribution) GetAllowUploads() bool { + if o == nil || IsNil(o.AllowUploads) { + var ret bool + return ret + } + return *o.AllowUploads +} + +// GetAllowUploadsOk returns a tuple with the AllowUploads field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonDistribution) GetAllowUploadsOk() (*bool, bool) { + if o == nil || IsNil(o.AllowUploads) { + return nil, false + } + return o.AllowUploads, true +} + +// HasAllowUploads returns a boolean if a field has been set. +func (o *PythonPythonDistribution) HasAllowUploads() bool { + if o != nil && !IsNil(o.AllowUploads) { + return true + } + + return false +} + +// SetAllowUploads gets a reference to the given bool and assigns it to the AllowUploads field. +func (o *PythonPythonDistribution) SetAllowUploads(v bool) { + o.AllowUploads = &v +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonDistribution) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonDistribution) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PythonPythonDistribution) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PythonPythonDistribution) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PythonPythonDistribution) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PythonPythonDistribution) UnsetRemote() { + o.Remote.Unset() +} + +func (o PythonPythonDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PythonPythonDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["base_path"] = o.BasePath + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + if !IsNil(o.AllowUploads) { + toSerialize["allow_uploads"] = o.AllowUploads + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PythonPythonDistribution) UnmarshalJSON(bytes []byte) (err error) { + varPythonPythonDistribution := _PythonPythonDistribution{} + + if err = json.Unmarshal(bytes, &varPythonPythonDistribution); err == nil { + *o = PythonPythonDistribution(varPythonPythonDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + delete(additionalProperties, "allow_uploads") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePythonPythonDistribution struct { + value *PythonPythonDistribution + isSet bool +} + +func (v NullablePythonPythonDistribution) Get() *PythonPythonDistribution { + return v.value +} + +func (v *NullablePythonPythonDistribution) Set(val *PythonPythonDistribution) { + v.value = val + v.isSet = true +} + +func (v NullablePythonPythonDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullablePythonPythonDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePythonPythonDistribution(val *PythonPythonDistribution) *NullablePythonPythonDistribution { + return &NullablePythonPythonDistribution{value: val, isSet: true} +} + +func (v NullablePythonPythonDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePythonPythonDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_distribution_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_distribution_response.go new file mode 100644 index 0000000000..7ef7b1c866 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_distribution_response.go @@ -0,0 +1,599 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the PythonPythonDistributionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PythonPythonDistributionResponse{} + +// PythonPythonDistributionResponse Serializer for Pulp distributions for the Python type. +type PythonPythonDistributionResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + BaseUrl *string `json:"base_url,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + // Allow packages to be uploaded to this index. + AllowUploads *bool `json:"allow_uploads,omitempty"` + // Remote that can be used to fetch content when using pull-through caching. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PythonPythonDistributionResponse PythonPythonDistributionResponse + +// NewPythonPythonDistributionResponse instantiates a new PythonPythonDistributionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPythonPythonDistributionResponse(basePath string, name string) *PythonPythonDistributionResponse { + this := PythonPythonDistributionResponse{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + var allowUploads bool = true + this.AllowUploads = &allowUploads + return &this +} + +// NewPythonPythonDistributionResponseWithDefaults instantiates a new PythonPythonDistributionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPythonPythonDistributionResponseWithDefaults() *PythonPythonDistributionResponse { + this := PythonPythonDistributionResponse{} + var hidden bool = false + this.Hidden = &hidden + var allowUploads bool = true + this.AllowUploads = &allowUploads + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *PythonPythonDistributionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonDistributionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *PythonPythonDistributionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *PythonPythonDistributionResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *PythonPythonDistributionResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonDistributionResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *PythonPythonDistributionResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *PythonPythonDistributionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetBasePath returns the BasePath field value +func (o *PythonPythonDistributionResponse) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *PythonPythonDistributionResponse) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *PythonPythonDistributionResponse) SetBasePath(v string) { + o.BasePath = v +} + +// GetBaseUrl returns the BaseUrl field value if set, zero value otherwise. +func (o *PythonPythonDistributionResponse) GetBaseUrl() string { + if o == nil || IsNil(o.BaseUrl) { + var ret string + return ret + } + return *o.BaseUrl +} + +// GetBaseUrlOk returns a tuple with the BaseUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonDistributionResponse) GetBaseUrlOk() (*string, bool) { + if o == nil || IsNil(o.BaseUrl) { + return nil, false + } + return o.BaseUrl, true +} + +// HasBaseUrl returns a boolean if a field has been set. +func (o *PythonPythonDistributionResponse) HasBaseUrl() bool { + if o != nil && !IsNil(o.BaseUrl) { + return true + } + + return false +} + +// SetBaseUrl gets a reference to the given string and assigns it to the BaseUrl field. +func (o *PythonPythonDistributionResponse) SetBaseUrl(v string) { + o.BaseUrl = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonDistributionResponse) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonDistributionResponse) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *PythonPythonDistributionResponse) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *PythonPythonDistributionResponse) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *PythonPythonDistributionResponse) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *PythonPythonDistributionResponse) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *PythonPythonDistributionResponse) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonDistributionResponse) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *PythonPythonDistributionResponse) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *PythonPythonDistributionResponse) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PythonPythonDistributionResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PythonPythonDistributionResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PythonPythonDistributionResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *PythonPythonDistributionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PythonPythonDistributionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PythonPythonDistributionResponse) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonDistributionResponse) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonDistributionResponse) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *PythonPythonDistributionResponse) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *PythonPythonDistributionResponse) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *PythonPythonDistributionResponse) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *PythonPythonDistributionResponse) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonDistributionResponse) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonDistributionResponse) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *PythonPythonDistributionResponse) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *PythonPythonDistributionResponse) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *PythonPythonDistributionResponse) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *PythonPythonDistributionResponse) UnsetPublication() { + o.Publication.Unset() +} + +// GetAllowUploads returns the AllowUploads field value if set, zero value otherwise. +func (o *PythonPythonDistributionResponse) GetAllowUploads() bool { + if o == nil || IsNil(o.AllowUploads) { + var ret bool + return ret + } + return *o.AllowUploads +} + +// GetAllowUploadsOk returns a tuple with the AllowUploads field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonDistributionResponse) GetAllowUploadsOk() (*bool, bool) { + if o == nil || IsNil(o.AllowUploads) { + return nil, false + } + return o.AllowUploads, true +} + +// HasAllowUploads returns a boolean if a field has been set. +func (o *PythonPythonDistributionResponse) HasAllowUploads() bool { + if o != nil && !IsNil(o.AllowUploads) { + return true + } + + return false +} + +// SetAllowUploads gets a reference to the given bool and assigns it to the AllowUploads field. +func (o *PythonPythonDistributionResponse) SetAllowUploads(v bool) { + o.AllowUploads = &v +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonDistributionResponse) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonDistributionResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PythonPythonDistributionResponse) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PythonPythonDistributionResponse) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PythonPythonDistributionResponse) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PythonPythonDistributionResponse) UnsetRemote() { + o.Remote.Unset() +} + +func (o PythonPythonDistributionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PythonPythonDistributionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["base_path"] = o.BasePath + if !IsNil(o.BaseUrl) { + toSerialize["base_url"] = o.BaseUrl + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + if !IsNil(o.AllowUploads) { + toSerialize["allow_uploads"] = o.AllowUploads + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PythonPythonDistributionResponse) UnmarshalJSON(bytes []byte) (err error) { + varPythonPythonDistributionResponse := _PythonPythonDistributionResponse{} + + if err = json.Unmarshal(bytes, &varPythonPythonDistributionResponse); err == nil { + *o = PythonPythonDistributionResponse(varPythonPythonDistributionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "base_path") + delete(additionalProperties, "base_url") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + delete(additionalProperties, "allow_uploads") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePythonPythonDistributionResponse struct { + value *PythonPythonDistributionResponse + isSet bool +} + +func (v NullablePythonPythonDistributionResponse) Get() *PythonPythonDistributionResponse { + return v.value +} + +func (v *NullablePythonPythonDistributionResponse) Set(val *PythonPythonDistributionResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePythonPythonDistributionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePythonPythonDistributionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePythonPythonDistributionResponse(val *PythonPythonDistributionResponse) *NullablePythonPythonDistributionResponse { + return &NullablePythonPythonDistributionResponse{value: val, isSet: true} +} + +func (v NullablePythonPythonDistributionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePythonPythonDistributionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_package_content.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_package_content.go new file mode 100644 index 0000000000..8af1f4847f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_package_content.go @@ -0,0 +1,1137 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the PythonPythonPackageContent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PythonPythonPackageContent{} + +// PythonPythonPackageContent A Serializer for PythonPackageContent. +type PythonPythonPackageContent struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // Path where the artifact is located relative to distributions base_path + RelativePath string `json:"relative_path"` + // An uploaded file that may be turned into the artifact of the content unit. + File **os.File `json:"file,omitempty"` + // An uncommitted upload that may be turned into the artifact of the content unit. + Upload *string `json:"upload,omitempty"` + // The SHA256 digest of this package. + Sha256 *string `json:"sha256,omitempty"` + // A one-line summary of what the package does. + Summary *string `json:"summary,omitempty"` + // A longer description of the package that can run to several paragraphs. + Description *string `json:"description,omitempty"` + // A string stating the markup syntax (if any) used in the distributionโ€™s description, so that tools can intelligently render the description. + DescriptionContentType *string `json:"description_content_type,omitempty"` + // Additional keywords to be used to assist searching for the package in a larger catalog. + Keywords *string `json:"keywords,omitempty"` + // The URL for the package's home page. + HomePage *string `json:"home_page,omitempty"` + // Legacy field denoting the URL from which this package can be downloaded. + DownloadUrl *string `json:"download_url,omitempty"` + // Text containing the author's name. Contact information can also be added, separated with newlines. + Author *string `json:"author,omitempty"` + // The author's e-mail address. + AuthorEmail *string `json:"author_email,omitempty"` + // The maintainer's name at a minimum; additional contact information may be provided. + Maintainer *string `json:"maintainer,omitempty"` + // The maintainer's e-mail address. + MaintainerEmail *string `json:"maintainer_email,omitempty"` + // Text indicating the license covering the distribution + License *string `json:"license,omitempty"` + // The Python version(s) that the distribution is guaranteed to be compatible with. + RequiresPython *string `json:"requires_python,omitempty"` + // A browsable URL for the project and a label for it, separated by a comma. + ProjectUrl *string `json:"project_url,omitempty"` + // A dictionary of labels and URLs for the project. + ProjectUrls map[string]interface{} `json:"project_urls,omitempty"` + // A comma-separated list of platform specifications, summarizing the operating systems supported by the package. + Platform *string `json:"platform,omitempty"` + // Field to specify the OS and CPU for which the binary package was compiled. + SupportedPlatform *string `json:"supported_platform,omitempty"` + // A JSON list containing names of some other distutils project required by this distribution. + RequiresDist map[string]interface{} `json:"requires_dist,omitempty"` + // A JSON list containing names of a Distutils project which is contained within this distribution. + ProvidesDist map[string]interface{} `json:"provides_dist,omitempty"` + // A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time. + ObsoletesDist map[string]interface{} `json:"obsoletes_dist,omitempty"` + // A JSON list containing some dependency in the system that the distribution is to be used. + RequiresExternal map[string]interface{} `json:"requires_external,omitempty"` + // A JSON list containing classification values for a Python package. + Classifiers map[string]interface{} `json:"classifiers,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PythonPythonPackageContent PythonPythonPackageContent + +// NewPythonPythonPackageContent instantiates a new PythonPythonPackageContent object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPythonPythonPackageContent(relativePath string) *PythonPythonPackageContent { + this := PythonPythonPackageContent{} + this.RelativePath = relativePath + var sha256 string = "" + this.Sha256 = &sha256 + return &this +} + +// NewPythonPythonPackageContentWithDefaults instantiates a new PythonPythonPackageContent object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPythonPythonPackageContentWithDefaults() *PythonPythonPackageContent { + this := PythonPythonPackageContent{} + var sha256 string = "" + this.Sha256 = &sha256 + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *PythonPythonPackageContent) SetRepository(v string) { + o.Repository = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *PythonPythonPackageContent) SetArtifact(v string) { + o.Artifact = &v +} + +// GetRelativePath returns the RelativePath field value +func (o *PythonPythonPackageContent) GetRelativePath() string { + if o == nil { + var ret string + return ret + } + + return o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetRelativePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RelativePath, true +} + +// SetRelativePath sets field value +func (o *PythonPythonPackageContent) SetRelativePath(v string) { + o.RelativePath = v +} + +// GetFile returns the File field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetFile() *os.File { + if o == nil || IsNil(o.File) { + var ret *os.File + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetFileOk() (**os.File, bool) { + if o == nil || IsNil(o.File) { + return nil, false + } + return o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasFile() bool { + if o != nil && !IsNil(o.File) { + return true + } + + return false +} + +// SetFile gets a reference to the given *os.File and assigns it to the File field. +func (o *PythonPythonPackageContent) SetFile(v *os.File) { + o.File = &v +} + +// GetUpload returns the Upload field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetUpload() string { + if o == nil || IsNil(o.Upload) { + var ret string + return ret + } + return *o.Upload +} + +// GetUploadOk returns a tuple with the Upload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetUploadOk() (*string, bool) { + if o == nil || IsNil(o.Upload) { + return nil, false + } + return o.Upload, true +} + +// HasUpload returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasUpload() bool { + if o != nil && !IsNil(o.Upload) { + return true + } + + return false +} + +// SetUpload gets a reference to the given string and assigns it to the Upload field. +func (o *PythonPythonPackageContent) SetUpload(v string) { + o.Upload = &v +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetSha256() string { + if o == nil || IsNil(o.Sha256) { + var ret string + return ret + } + return *o.Sha256 +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetSha256Ok() (*string, bool) { + if o == nil || IsNil(o.Sha256) { + return nil, false + } + return o.Sha256, true +} + +// HasSha256 returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasSha256() bool { + if o != nil && !IsNil(o.Sha256) { + return true + } + + return false +} + +// SetSha256 gets a reference to the given string and assigns it to the Sha256 field. +func (o *PythonPythonPackageContent) SetSha256(v string) { + o.Sha256 = &v +} + +// GetSummary returns the Summary field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetSummary() string { + if o == nil || IsNil(o.Summary) { + var ret string + return ret + } + return *o.Summary +} + +// GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetSummaryOk() (*string, bool) { + if o == nil || IsNil(o.Summary) { + return nil, false + } + return o.Summary, true +} + +// HasSummary returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasSummary() bool { + if o != nil && !IsNil(o.Summary) { + return true + } + + return false +} + +// SetSummary gets a reference to the given string and assigns it to the Summary field. +func (o *PythonPythonPackageContent) SetSummary(v string) { + o.Summary = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PythonPythonPackageContent) SetDescription(v string) { + o.Description = &v +} + +// GetDescriptionContentType returns the DescriptionContentType field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetDescriptionContentType() string { + if o == nil || IsNil(o.DescriptionContentType) { + var ret string + return ret + } + return *o.DescriptionContentType +} + +// GetDescriptionContentTypeOk returns a tuple with the DescriptionContentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetDescriptionContentTypeOk() (*string, bool) { + if o == nil || IsNil(o.DescriptionContentType) { + return nil, false + } + return o.DescriptionContentType, true +} + +// HasDescriptionContentType returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasDescriptionContentType() bool { + if o != nil && !IsNil(o.DescriptionContentType) { + return true + } + + return false +} + +// SetDescriptionContentType gets a reference to the given string and assigns it to the DescriptionContentType field. +func (o *PythonPythonPackageContent) SetDescriptionContentType(v string) { + o.DescriptionContentType = &v +} + +// GetKeywords returns the Keywords field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetKeywords() string { + if o == nil || IsNil(o.Keywords) { + var ret string + return ret + } + return *o.Keywords +} + +// GetKeywordsOk returns a tuple with the Keywords field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetKeywordsOk() (*string, bool) { + if o == nil || IsNil(o.Keywords) { + return nil, false + } + return o.Keywords, true +} + +// HasKeywords returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasKeywords() bool { + if o != nil && !IsNil(o.Keywords) { + return true + } + + return false +} + +// SetKeywords gets a reference to the given string and assigns it to the Keywords field. +func (o *PythonPythonPackageContent) SetKeywords(v string) { + o.Keywords = &v +} + +// GetHomePage returns the HomePage field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetHomePage() string { + if o == nil || IsNil(o.HomePage) { + var ret string + return ret + } + return *o.HomePage +} + +// GetHomePageOk returns a tuple with the HomePage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetHomePageOk() (*string, bool) { + if o == nil || IsNil(o.HomePage) { + return nil, false + } + return o.HomePage, true +} + +// HasHomePage returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasHomePage() bool { + if o != nil && !IsNil(o.HomePage) { + return true + } + + return false +} + +// SetHomePage gets a reference to the given string and assigns it to the HomePage field. +func (o *PythonPythonPackageContent) SetHomePage(v string) { + o.HomePage = &v +} + +// GetDownloadUrl returns the DownloadUrl field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetDownloadUrl() string { + if o == nil || IsNil(o.DownloadUrl) { + var ret string + return ret + } + return *o.DownloadUrl +} + +// GetDownloadUrlOk returns a tuple with the DownloadUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetDownloadUrlOk() (*string, bool) { + if o == nil || IsNil(o.DownloadUrl) { + return nil, false + } + return o.DownloadUrl, true +} + +// HasDownloadUrl returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasDownloadUrl() bool { + if o != nil && !IsNil(o.DownloadUrl) { + return true + } + + return false +} + +// SetDownloadUrl gets a reference to the given string and assigns it to the DownloadUrl field. +func (o *PythonPythonPackageContent) SetDownloadUrl(v string) { + o.DownloadUrl = &v +} + +// GetAuthor returns the Author field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetAuthor() string { + if o == nil || IsNil(o.Author) { + var ret string + return ret + } + return *o.Author +} + +// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetAuthorOk() (*string, bool) { + if o == nil || IsNil(o.Author) { + return nil, false + } + return o.Author, true +} + +// HasAuthor returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasAuthor() bool { + if o != nil && !IsNil(o.Author) { + return true + } + + return false +} + +// SetAuthor gets a reference to the given string and assigns it to the Author field. +func (o *PythonPythonPackageContent) SetAuthor(v string) { + o.Author = &v +} + +// GetAuthorEmail returns the AuthorEmail field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetAuthorEmail() string { + if o == nil || IsNil(o.AuthorEmail) { + var ret string + return ret + } + return *o.AuthorEmail +} + +// GetAuthorEmailOk returns a tuple with the AuthorEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetAuthorEmailOk() (*string, bool) { + if o == nil || IsNil(o.AuthorEmail) { + return nil, false + } + return o.AuthorEmail, true +} + +// HasAuthorEmail returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasAuthorEmail() bool { + if o != nil && !IsNil(o.AuthorEmail) { + return true + } + + return false +} + +// SetAuthorEmail gets a reference to the given string and assigns it to the AuthorEmail field. +func (o *PythonPythonPackageContent) SetAuthorEmail(v string) { + o.AuthorEmail = &v +} + +// GetMaintainer returns the Maintainer field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetMaintainer() string { + if o == nil || IsNil(o.Maintainer) { + var ret string + return ret + } + return *o.Maintainer +} + +// GetMaintainerOk returns a tuple with the Maintainer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetMaintainerOk() (*string, bool) { + if o == nil || IsNil(o.Maintainer) { + return nil, false + } + return o.Maintainer, true +} + +// HasMaintainer returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasMaintainer() bool { + if o != nil && !IsNil(o.Maintainer) { + return true + } + + return false +} + +// SetMaintainer gets a reference to the given string and assigns it to the Maintainer field. +func (o *PythonPythonPackageContent) SetMaintainer(v string) { + o.Maintainer = &v +} + +// GetMaintainerEmail returns the MaintainerEmail field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetMaintainerEmail() string { + if o == nil || IsNil(o.MaintainerEmail) { + var ret string + return ret + } + return *o.MaintainerEmail +} + +// GetMaintainerEmailOk returns a tuple with the MaintainerEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetMaintainerEmailOk() (*string, bool) { + if o == nil || IsNil(o.MaintainerEmail) { + return nil, false + } + return o.MaintainerEmail, true +} + +// HasMaintainerEmail returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasMaintainerEmail() bool { + if o != nil && !IsNil(o.MaintainerEmail) { + return true + } + + return false +} + +// SetMaintainerEmail gets a reference to the given string and assigns it to the MaintainerEmail field. +func (o *PythonPythonPackageContent) SetMaintainerEmail(v string) { + o.MaintainerEmail = &v +} + +// GetLicense returns the License field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetLicense() string { + if o == nil || IsNil(o.License) { + var ret string + return ret + } + return *o.License +} + +// GetLicenseOk returns a tuple with the License field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetLicenseOk() (*string, bool) { + if o == nil || IsNil(o.License) { + return nil, false + } + return o.License, true +} + +// HasLicense returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasLicense() bool { + if o != nil && !IsNil(o.License) { + return true + } + + return false +} + +// SetLicense gets a reference to the given string and assigns it to the License field. +func (o *PythonPythonPackageContent) SetLicense(v string) { + o.License = &v +} + +// GetRequiresPython returns the RequiresPython field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetRequiresPython() string { + if o == nil || IsNil(o.RequiresPython) { + var ret string + return ret + } + return *o.RequiresPython +} + +// GetRequiresPythonOk returns a tuple with the RequiresPython field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetRequiresPythonOk() (*string, bool) { + if o == nil || IsNil(o.RequiresPython) { + return nil, false + } + return o.RequiresPython, true +} + +// HasRequiresPython returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasRequiresPython() bool { + if o != nil && !IsNil(o.RequiresPython) { + return true + } + + return false +} + +// SetRequiresPython gets a reference to the given string and assigns it to the RequiresPython field. +func (o *PythonPythonPackageContent) SetRequiresPython(v string) { + o.RequiresPython = &v +} + +// GetProjectUrl returns the ProjectUrl field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetProjectUrl() string { + if o == nil || IsNil(o.ProjectUrl) { + var ret string + return ret + } + return *o.ProjectUrl +} + +// GetProjectUrlOk returns a tuple with the ProjectUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetProjectUrlOk() (*string, bool) { + if o == nil || IsNil(o.ProjectUrl) { + return nil, false + } + return o.ProjectUrl, true +} + +// HasProjectUrl returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasProjectUrl() bool { + if o != nil && !IsNil(o.ProjectUrl) { + return true + } + + return false +} + +// SetProjectUrl gets a reference to the given string and assigns it to the ProjectUrl field. +func (o *PythonPythonPackageContent) SetProjectUrl(v string) { + o.ProjectUrl = &v +} + +// GetProjectUrls returns the ProjectUrls field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetProjectUrls() map[string]interface{} { + if o == nil || IsNil(o.ProjectUrls) { + var ret map[string]interface{} + return ret + } + return o.ProjectUrls +} + +// GetProjectUrlsOk returns a tuple with the ProjectUrls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetProjectUrlsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ProjectUrls) { + return map[string]interface{}{}, false + } + return o.ProjectUrls, true +} + +// HasProjectUrls returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasProjectUrls() bool { + if o != nil && !IsNil(o.ProjectUrls) { + return true + } + + return false +} + +// SetProjectUrls gets a reference to the given map[string]interface{} and assigns it to the ProjectUrls field. +func (o *PythonPythonPackageContent) SetProjectUrls(v map[string]interface{}) { + o.ProjectUrls = v +} + +// GetPlatform returns the Platform field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetPlatform() string { + if o == nil || IsNil(o.Platform) { + var ret string + return ret + } + return *o.Platform +} + +// GetPlatformOk returns a tuple with the Platform field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetPlatformOk() (*string, bool) { + if o == nil || IsNil(o.Platform) { + return nil, false + } + return o.Platform, true +} + +// HasPlatform returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasPlatform() bool { + if o != nil && !IsNil(o.Platform) { + return true + } + + return false +} + +// SetPlatform gets a reference to the given string and assigns it to the Platform field. +func (o *PythonPythonPackageContent) SetPlatform(v string) { + o.Platform = &v +} + +// GetSupportedPlatform returns the SupportedPlatform field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetSupportedPlatform() string { + if o == nil || IsNil(o.SupportedPlatform) { + var ret string + return ret + } + return *o.SupportedPlatform +} + +// GetSupportedPlatformOk returns a tuple with the SupportedPlatform field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetSupportedPlatformOk() (*string, bool) { + if o == nil || IsNil(o.SupportedPlatform) { + return nil, false + } + return o.SupportedPlatform, true +} + +// HasSupportedPlatform returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasSupportedPlatform() bool { + if o != nil && !IsNil(o.SupportedPlatform) { + return true + } + + return false +} + +// SetSupportedPlatform gets a reference to the given string and assigns it to the SupportedPlatform field. +func (o *PythonPythonPackageContent) SetSupportedPlatform(v string) { + o.SupportedPlatform = &v +} + +// GetRequiresDist returns the RequiresDist field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetRequiresDist() map[string]interface{} { + if o == nil || IsNil(o.RequiresDist) { + var ret map[string]interface{} + return ret + } + return o.RequiresDist +} + +// GetRequiresDistOk returns a tuple with the RequiresDist field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetRequiresDistOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.RequiresDist) { + return map[string]interface{}{}, false + } + return o.RequiresDist, true +} + +// HasRequiresDist returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasRequiresDist() bool { + if o != nil && !IsNil(o.RequiresDist) { + return true + } + + return false +} + +// SetRequiresDist gets a reference to the given map[string]interface{} and assigns it to the RequiresDist field. +func (o *PythonPythonPackageContent) SetRequiresDist(v map[string]interface{}) { + o.RequiresDist = v +} + +// GetProvidesDist returns the ProvidesDist field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetProvidesDist() map[string]interface{} { + if o == nil || IsNil(o.ProvidesDist) { + var ret map[string]interface{} + return ret + } + return o.ProvidesDist +} + +// GetProvidesDistOk returns a tuple with the ProvidesDist field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetProvidesDistOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ProvidesDist) { + return map[string]interface{}{}, false + } + return o.ProvidesDist, true +} + +// HasProvidesDist returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasProvidesDist() bool { + if o != nil && !IsNil(o.ProvidesDist) { + return true + } + + return false +} + +// SetProvidesDist gets a reference to the given map[string]interface{} and assigns it to the ProvidesDist field. +func (o *PythonPythonPackageContent) SetProvidesDist(v map[string]interface{}) { + o.ProvidesDist = v +} + +// GetObsoletesDist returns the ObsoletesDist field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetObsoletesDist() map[string]interface{} { + if o == nil || IsNil(o.ObsoletesDist) { + var ret map[string]interface{} + return ret + } + return o.ObsoletesDist +} + +// GetObsoletesDistOk returns a tuple with the ObsoletesDist field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetObsoletesDistOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ObsoletesDist) { + return map[string]interface{}{}, false + } + return o.ObsoletesDist, true +} + +// HasObsoletesDist returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasObsoletesDist() bool { + if o != nil && !IsNil(o.ObsoletesDist) { + return true + } + + return false +} + +// SetObsoletesDist gets a reference to the given map[string]interface{} and assigns it to the ObsoletesDist field. +func (o *PythonPythonPackageContent) SetObsoletesDist(v map[string]interface{}) { + o.ObsoletesDist = v +} + +// GetRequiresExternal returns the RequiresExternal field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetRequiresExternal() map[string]interface{} { + if o == nil || IsNil(o.RequiresExternal) { + var ret map[string]interface{} + return ret + } + return o.RequiresExternal +} + +// GetRequiresExternalOk returns a tuple with the RequiresExternal field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetRequiresExternalOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.RequiresExternal) { + return map[string]interface{}{}, false + } + return o.RequiresExternal, true +} + +// HasRequiresExternal returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasRequiresExternal() bool { + if o != nil && !IsNil(o.RequiresExternal) { + return true + } + + return false +} + +// SetRequiresExternal gets a reference to the given map[string]interface{} and assigns it to the RequiresExternal field. +func (o *PythonPythonPackageContent) SetRequiresExternal(v map[string]interface{}) { + o.RequiresExternal = v +} + +// GetClassifiers returns the Classifiers field value if set, zero value otherwise. +func (o *PythonPythonPackageContent) GetClassifiers() map[string]interface{} { + if o == nil || IsNil(o.Classifiers) { + var ret map[string]interface{} + return ret + } + return o.Classifiers +} + +// GetClassifiersOk returns a tuple with the Classifiers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContent) GetClassifiersOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Classifiers) { + return map[string]interface{}{}, false + } + return o.Classifiers, true +} + +// HasClassifiers returns a boolean if a field has been set. +func (o *PythonPythonPackageContent) HasClassifiers() bool { + if o != nil && !IsNil(o.Classifiers) { + return true + } + + return false +} + +// SetClassifiers gets a reference to the given map[string]interface{} and assigns it to the Classifiers field. +func (o *PythonPythonPackageContent) SetClassifiers(v map[string]interface{}) { + o.Classifiers = v +} + +func (o PythonPythonPackageContent) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PythonPythonPackageContent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + toSerialize["relative_path"] = o.RelativePath + if !IsNil(o.File) { + toSerialize["file"] = o.File + } + if !IsNil(o.Upload) { + toSerialize["upload"] = o.Upload + } + if !IsNil(o.Sha256) { + toSerialize["sha256"] = o.Sha256 + } + if !IsNil(o.Summary) { + toSerialize["summary"] = o.Summary + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.DescriptionContentType) { + toSerialize["description_content_type"] = o.DescriptionContentType + } + if !IsNil(o.Keywords) { + toSerialize["keywords"] = o.Keywords + } + if !IsNil(o.HomePage) { + toSerialize["home_page"] = o.HomePage + } + if !IsNil(o.DownloadUrl) { + toSerialize["download_url"] = o.DownloadUrl + } + if !IsNil(o.Author) { + toSerialize["author"] = o.Author + } + if !IsNil(o.AuthorEmail) { + toSerialize["author_email"] = o.AuthorEmail + } + if !IsNil(o.Maintainer) { + toSerialize["maintainer"] = o.Maintainer + } + if !IsNil(o.MaintainerEmail) { + toSerialize["maintainer_email"] = o.MaintainerEmail + } + if !IsNil(o.License) { + toSerialize["license"] = o.License + } + if !IsNil(o.RequiresPython) { + toSerialize["requires_python"] = o.RequiresPython + } + if !IsNil(o.ProjectUrl) { + toSerialize["project_url"] = o.ProjectUrl + } + if !IsNil(o.ProjectUrls) { + toSerialize["project_urls"] = o.ProjectUrls + } + if !IsNil(o.Platform) { + toSerialize["platform"] = o.Platform + } + if !IsNil(o.SupportedPlatform) { + toSerialize["supported_platform"] = o.SupportedPlatform + } + if !IsNil(o.RequiresDist) { + toSerialize["requires_dist"] = o.RequiresDist + } + if !IsNil(o.ProvidesDist) { + toSerialize["provides_dist"] = o.ProvidesDist + } + if !IsNil(o.ObsoletesDist) { + toSerialize["obsoletes_dist"] = o.ObsoletesDist + } + if !IsNil(o.RequiresExternal) { + toSerialize["requires_external"] = o.RequiresExternal + } + if !IsNil(o.Classifiers) { + toSerialize["classifiers"] = o.Classifiers + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PythonPythonPackageContent) UnmarshalJSON(bytes []byte) (err error) { + varPythonPythonPackageContent := _PythonPythonPackageContent{} + + if err = json.Unmarshal(bytes, &varPythonPythonPackageContent); err == nil { + *o = PythonPythonPackageContent(varPythonPythonPackageContent) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "file") + delete(additionalProperties, "upload") + delete(additionalProperties, "sha256") + delete(additionalProperties, "summary") + delete(additionalProperties, "description") + delete(additionalProperties, "description_content_type") + delete(additionalProperties, "keywords") + delete(additionalProperties, "home_page") + delete(additionalProperties, "download_url") + delete(additionalProperties, "author") + delete(additionalProperties, "author_email") + delete(additionalProperties, "maintainer") + delete(additionalProperties, "maintainer_email") + delete(additionalProperties, "license") + delete(additionalProperties, "requires_python") + delete(additionalProperties, "project_url") + delete(additionalProperties, "project_urls") + delete(additionalProperties, "platform") + delete(additionalProperties, "supported_platform") + delete(additionalProperties, "requires_dist") + delete(additionalProperties, "provides_dist") + delete(additionalProperties, "obsoletes_dist") + delete(additionalProperties, "requires_external") + delete(additionalProperties, "classifiers") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePythonPythonPackageContent struct { + value *PythonPythonPackageContent + isSet bool +} + +func (v NullablePythonPythonPackageContent) Get() *PythonPythonPackageContent { + return v.value +} + +func (v *NullablePythonPythonPackageContent) Set(val *PythonPythonPackageContent) { + v.value = val + v.isSet = true +} + +func (v NullablePythonPythonPackageContent) IsSet() bool { + return v.isSet +} + +func (v *NullablePythonPythonPackageContent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePythonPythonPackageContent(val *PythonPythonPackageContent) *NullablePythonPythonPackageContent { + return &NullablePythonPythonPackageContent{value: val, isSet: true} +} + +func (v NullablePythonPythonPackageContent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePythonPythonPackageContent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_package_content_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_package_content_response.go new file mode 100644 index 0000000000..21a84268d5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_package_content_response.go @@ -0,0 +1,1259 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the PythonPythonPackageContentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PythonPythonPackageContentResponse{} + +// PythonPythonPackageContentResponse A Serializer for PythonPackageContent. +type PythonPythonPackageContentResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // The name of the distribution package, usually of the format: {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.{packagetype} + Filename *string `json:"filename,omitempty"` + // The type of the distribution package (e.g. sdist, bdist_wheel, bdist_egg, etc) + Packagetype *string `json:"packagetype,omitempty"` + // The name of the python project. + Name *string `json:"name,omitempty"` + // The packages version number. + Version *string `json:"version,omitempty"` + // The SHA256 digest of this package. + Sha256 *string `json:"sha256,omitempty"` + // Version of the file format + MetadataVersion *string `json:"metadata_version,omitempty"` + // A one-line summary of what the package does. + Summary *string `json:"summary,omitempty"` + // A longer description of the package that can run to several paragraphs. + Description *string `json:"description,omitempty"` + // A string stating the markup syntax (if any) used in the distributionโ€™s description, so that tools can intelligently render the description. + DescriptionContentType *string `json:"description_content_type,omitempty"` + // Additional keywords to be used to assist searching for the package in a larger catalog. + Keywords *string `json:"keywords,omitempty"` + // The URL for the package's home page. + HomePage *string `json:"home_page,omitempty"` + // Legacy field denoting the URL from which this package can be downloaded. + DownloadUrl *string `json:"download_url,omitempty"` + // Text containing the author's name. Contact information can also be added, separated with newlines. + Author *string `json:"author,omitempty"` + // The author's e-mail address. + AuthorEmail *string `json:"author_email,omitempty"` + // The maintainer's name at a minimum; additional contact information may be provided. + Maintainer *string `json:"maintainer,omitempty"` + // The maintainer's e-mail address. + MaintainerEmail *string `json:"maintainer_email,omitempty"` + // Text indicating the license covering the distribution + License *string `json:"license,omitempty"` + // The Python version(s) that the distribution is guaranteed to be compatible with. + RequiresPython *string `json:"requires_python,omitempty"` + // A browsable URL for the project and a label for it, separated by a comma. + ProjectUrl *string `json:"project_url,omitempty"` + // A dictionary of labels and URLs for the project. + ProjectUrls map[string]interface{} `json:"project_urls,omitempty"` + // A comma-separated list of platform specifications, summarizing the operating systems supported by the package. + Platform *string `json:"platform,omitempty"` + // Field to specify the OS and CPU for which the binary package was compiled. + SupportedPlatform *string `json:"supported_platform,omitempty"` + // A JSON list containing names of some other distutils project required by this distribution. + RequiresDist map[string]interface{} `json:"requires_dist,omitempty"` + // A JSON list containing names of a Distutils project which is contained within this distribution. + ProvidesDist map[string]interface{} `json:"provides_dist,omitempty"` + // A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time. + ObsoletesDist map[string]interface{} `json:"obsoletes_dist,omitempty"` + // A JSON list containing some dependency in the system that the distribution is to be used. + RequiresExternal map[string]interface{} `json:"requires_external,omitempty"` + // A JSON list containing classification values for a Python package. + Classifiers map[string]interface{} `json:"classifiers,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PythonPythonPackageContentResponse PythonPythonPackageContentResponse + +// NewPythonPythonPackageContentResponse instantiates a new PythonPythonPackageContentResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPythonPythonPackageContentResponse() *PythonPythonPackageContentResponse { + this := PythonPythonPackageContentResponse{} + var sha256 string = "" + this.Sha256 = &sha256 + return &this +} + +// NewPythonPythonPackageContentResponseWithDefaults instantiates a new PythonPythonPackageContentResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPythonPythonPackageContentResponseWithDefaults() *PythonPythonPackageContentResponse { + this := PythonPythonPackageContentResponse{} + var sha256 string = "" + this.Sha256 = &sha256 + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *PythonPythonPackageContentResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *PythonPythonPackageContentResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *PythonPythonPackageContentResponse) SetArtifact(v string) { + o.Artifact = &v +} + +// GetFilename returns the Filename field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetFilename() string { + if o == nil || IsNil(o.Filename) { + var ret string + return ret + } + return *o.Filename +} + +// GetFilenameOk returns a tuple with the Filename field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetFilenameOk() (*string, bool) { + if o == nil || IsNil(o.Filename) { + return nil, false + } + return o.Filename, true +} + +// HasFilename returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasFilename() bool { + if o != nil && !IsNil(o.Filename) { + return true + } + + return false +} + +// SetFilename gets a reference to the given string and assigns it to the Filename field. +func (o *PythonPythonPackageContentResponse) SetFilename(v string) { + o.Filename = &v +} + +// GetPackagetype returns the Packagetype field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetPackagetype() string { + if o == nil || IsNil(o.Packagetype) { + var ret string + return ret + } + return *o.Packagetype +} + +// GetPackagetypeOk returns a tuple with the Packagetype field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetPackagetypeOk() (*string, bool) { + if o == nil || IsNil(o.Packagetype) { + return nil, false + } + return o.Packagetype, true +} + +// HasPackagetype returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasPackagetype() bool { + if o != nil && !IsNil(o.Packagetype) { + return true + } + + return false +} + +// SetPackagetype gets a reference to the given string and assigns it to the Packagetype field. +func (o *PythonPythonPackageContentResponse) SetPackagetype(v string) { + o.Packagetype = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PythonPythonPackageContentResponse) SetName(v string) { + o.Name = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *PythonPythonPackageContentResponse) SetVersion(v string) { + o.Version = &v +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetSha256() string { + if o == nil || IsNil(o.Sha256) { + var ret string + return ret + } + return *o.Sha256 +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetSha256Ok() (*string, bool) { + if o == nil || IsNil(o.Sha256) { + return nil, false + } + return o.Sha256, true +} + +// HasSha256 returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasSha256() bool { + if o != nil && !IsNil(o.Sha256) { + return true + } + + return false +} + +// SetSha256 gets a reference to the given string and assigns it to the Sha256 field. +func (o *PythonPythonPackageContentResponse) SetSha256(v string) { + o.Sha256 = &v +} + +// GetMetadataVersion returns the MetadataVersion field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetMetadataVersion() string { + if o == nil || IsNil(o.MetadataVersion) { + var ret string + return ret + } + return *o.MetadataVersion +} + +// GetMetadataVersionOk returns a tuple with the MetadataVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetMetadataVersionOk() (*string, bool) { + if o == nil || IsNil(o.MetadataVersion) { + return nil, false + } + return o.MetadataVersion, true +} + +// HasMetadataVersion returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasMetadataVersion() bool { + if o != nil && !IsNil(o.MetadataVersion) { + return true + } + + return false +} + +// SetMetadataVersion gets a reference to the given string and assigns it to the MetadataVersion field. +func (o *PythonPythonPackageContentResponse) SetMetadataVersion(v string) { + o.MetadataVersion = &v +} + +// GetSummary returns the Summary field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetSummary() string { + if o == nil || IsNil(o.Summary) { + var ret string + return ret + } + return *o.Summary +} + +// GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetSummaryOk() (*string, bool) { + if o == nil || IsNil(o.Summary) { + return nil, false + } + return o.Summary, true +} + +// HasSummary returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasSummary() bool { + if o != nil && !IsNil(o.Summary) { + return true + } + + return false +} + +// SetSummary gets a reference to the given string and assigns it to the Summary field. +func (o *PythonPythonPackageContentResponse) SetSummary(v string) { + o.Summary = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PythonPythonPackageContentResponse) SetDescription(v string) { + o.Description = &v +} + +// GetDescriptionContentType returns the DescriptionContentType field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetDescriptionContentType() string { + if o == nil || IsNil(o.DescriptionContentType) { + var ret string + return ret + } + return *o.DescriptionContentType +} + +// GetDescriptionContentTypeOk returns a tuple with the DescriptionContentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetDescriptionContentTypeOk() (*string, bool) { + if o == nil || IsNil(o.DescriptionContentType) { + return nil, false + } + return o.DescriptionContentType, true +} + +// HasDescriptionContentType returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasDescriptionContentType() bool { + if o != nil && !IsNil(o.DescriptionContentType) { + return true + } + + return false +} + +// SetDescriptionContentType gets a reference to the given string and assigns it to the DescriptionContentType field. +func (o *PythonPythonPackageContentResponse) SetDescriptionContentType(v string) { + o.DescriptionContentType = &v +} + +// GetKeywords returns the Keywords field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetKeywords() string { + if o == nil || IsNil(o.Keywords) { + var ret string + return ret + } + return *o.Keywords +} + +// GetKeywordsOk returns a tuple with the Keywords field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetKeywordsOk() (*string, bool) { + if o == nil || IsNil(o.Keywords) { + return nil, false + } + return o.Keywords, true +} + +// HasKeywords returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasKeywords() bool { + if o != nil && !IsNil(o.Keywords) { + return true + } + + return false +} + +// SetKeywords gets a reference to the given string and assigns it to the Keywords field. +func (o *PythonPythonPackageContentResponse) SetKeywords(v string) { + o.Keywords = &v +} + +// GetHomePage returns the HomePage field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetHomePage() string { + if o == nil || IsNil(o.HomePage) { + var ret string + return ret + } + return *o.HomePage +} + +// GetHomePageOk returns a tuple with the HomePage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetHomePageOk() (*string, bool) { + if o == nil || IsNil(o.HomePage) { + return nil, false + } + return o.HomePage, true +} + +// HasHomePage returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasHomePage() bool { + if o != nil && !IsNil(o.HomePage) { + return true + } + + return false +} + +// SetHomePage gets a reference to the given string and assigns it to the HomePage field. +func (o *PythonPythonPackageContentResponse) SetHomePage(v string) { + o.HomePage = &v +} + +// GetDownloadUrl returns the DownloadUrl field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetDownloadUrl() string { + if o == nil || IsNil(o.DownloadUrl) { + var ret string + return ret + } + return *o.DownloadUrl +} + +// GetDownloadUrlOk returns a tuple with the DownloadUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetDownloadUrlOk() (*string, bool) { + if o == nil || IsNil(o.DownloadUrl) { + return nil, false + } + return o.DownloadUrl, true +} + +// HasDownloadUrl returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasDownloadUrl() bool { + if o != nil && !IsNil(o.DownloadUrl) { + return true + } + + return false +} + +// SetDownloadUrl gets a reference to the given string and assigns it to the DownloadUrl field. +func (o *PythonPythonPackageContentResponse) SetDownloadUrl(v string) { + o.DownloadUrl = &v +} + +// GetAuthor returns the Author field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetAuthor() string { + if o == nil || IsNil(o.Author) { + var ret string + return ret + } + return *o.Author +} + +// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetAuthorOk() (*string, bool) { + if o == nil || IsNil(o.Author) { + return nil, false + } + return o.Author, true +} + +// HasAuthor returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasAuthor() bool { + if o != nil && !IsNil(o.Author) { + return true + } + + return false +} + +// SetAuthor gets a reference to the given string and assigns it to the Author field. +func (o *PythonPythonPackageContentResponse) SetAuthor(v string) { + o.Author = &v +} + +// GetAuthorEmail returns the AuthorEmail field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetAuthorEmail() string { + if o == nil || IsNil(o.AuthorEmail) { + var ret string + return ret + } + return *o.AuthorEmail +} + +// GetAuthorEmailOk returns a tuple with the AuthorEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetAuthorEmailOk() (*string, bool) { + if o == nil || IsNil(o.AuthorEmail) { + return nil, false + } + return o.AuthorEmail, true +} + +// HasAuthorEmail returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasAuthorEmail() bool { + if o != nil && !IsNil(o.AuthorEmail) { + return true + } + + return false +} + +// SetAuthorEmail gets a reference to the given string and assigns it to the AuthorEmail field. +func (o *PythonPythonPackageContentResponse) SetAuthorEmail(v string) { + o.AuthorEmail = &v +} + +// GetMaintainer returns the Maintainer field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetMaintainer() string { + if o == nil || IsNil(o.Maintainer) { + var ret string + return ret + } + return *o.Maintainer +} + +// GetMaintainerOk returns a tuple with the Maintainer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetMaintainerOk() (*string, bool) { + if o == nil || IsNil(o.Maintainer) { + return nil, false + } + return o.Maintainer, true +} + +// HasMaintainer returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasMaintainer() bool { + if o != nil && !IsNil(o.Maintainer) { + return true + } + + return false +} + +// SetMaintainer gets a reference to the given string and assigns it to the Maintainer field. +func (o *PythonPythonPackageContentResponse) SetMaintainer(v string) { + o.Maintainer = &v +} + +// GetMaintainerEmail returns the MaintainerEmail field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetMaintainerEmail() string { + if o == nil || IsNil(o.MaintainerEmail) { + var ret string + return ret + } + return *o.MaintainerEmail +} + +// GetMaintainerEmailOk returns a tuple with the MaintainerEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetMaintainerEmailOk() (*string, bool) { + if o == nil || IsNil(o.MaintainerEmail) { + return nil, false + } + return o.MaintainerEmail, true +} + +// HasMaintainerEmail returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasMaintainerEmail() bool { + if o != nil && !IsNil(o.MaintainerEmail) { + return true + } + + return false +} + +// SetMaintainerEmail gets a reference to the given string and assigns it to the MaintainerEmail field. +func (o *PythonPythonPackageContentResponse) SetMaintainerEmail(v string) { + o.MaintainerEmail = &v +} + +// GetLicense returns the License field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetLicense() string { + if o == nil || IsNil(o.License) { + var ret string + return ret + } + return *o.License +} + +// GetLicenseOk returns a tuple with the License field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetLicenseOk() (*string, bool) { + if o == nil || IsNil(o.License) { + return nil, false + } + return o.License, true +} + +// HasLicense returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasLicense() bool { + if o != nil && !IsNil(o.License) { + return true + } + + return false +} + +// SetLicense gets a reference to the given string and assigns it to the License field. +func (o *PythonPythonPackageContentResponse) SetLicense(v string) { + o.License = &v +} + +// GetRequiresPython returns the RequiresPython field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetRequiresPython() string { + if o == nil || IsNil(o.RequiresPython) { + var ret string + return ret + } + return *o.RequiresPython +} + +// GetRequiresPythonOk returns a tuple with the RequiresPython field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetRequiresPythonOk() (*string, bool) { + if o == nil || IsNil(o.RequiresPython) { + return nil, false + } + return o.RequiresPython, true +} + +// HasRequiresPython returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasRequiresPython() bool { + if o != nil && !IsNil(o.RequiresPython) { + return true + } + + return false +} + +// SetRequiresPython gets a reference to the given string and assigns it to the RequiresPython field. +func (o *PythonPythonPackageContentResponse) SetRequiresPython(v string) { + o.RequiresPython = &v +} + +// GetProjectUrl returns the ProjectUrl field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetProjectUrl() string { + if o == nil || IsNil(o.ProjectUrl) { + var ret string + return ret + } + return *o.ProjectUrl +} + +// GetProjectUrlOk returns a tuple with the ProjectUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetProjectUrlOk() (*string, bool) { + if o == nil || IsNil(o.ProjectUrl) { + return nil, false + } + return o.ProjectUrl, true +} + +// HasProjectUrl returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasProjectUrl() bool { + if o != nil && !IsNil(o.ProjectUrl) { + return true + } + + return false +} + +// SetProjectUrl gets a reference to the given string and assigns it to the ProjectUrl field. +func (o *PythonPythonPackageContentResponse) SetProjectUrl(v string) { + o.ProjectUrl = &v +} + +// GetProjectUrls returns the ProjectUrls field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetProjectUrls() map[string]interface{} { + if o == nil || IsNil(o.ProjectUrls) { + var ret map[string]interface{} + return ret + } + return o.ProjectUrls +} + +// GetProjectUrlsOk returns a tuple with the ProjectUrls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetProjectUrlsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ProjectUrls) { + return map[string]interface{}{}, false + } + return o.ProjectUrls, true +} + +// HasProjectUrls returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasProjectUrls() bool { + if o != nil && !IsNil(o.ProjectUrls) { + return true + } + + return false +} + +// SetProjectUrls gets a reference to the given map[string]interface{} and assigns it to the ProjectUrls field. +func (o *PythonPythonPackageContentResponse) SetProjectUrls(v map[string]interface{}) { + o.ProjectUrls = v +} + +// GetPlatform returns the Platform field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetPlatform() string { + if o == nil || IsNil(o.Platform) { + var ret string + return ret + } + return *o.Platform +} + +// GetPlatformOk returns a tuple with the Platform field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetPlatformOk() (*string, bool) { + if o == nil || IsNil(o.Platform) { + return nil, false + } + return o.Platform, true +} + +// HasPlatform returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasPlatform() bool { + if o != nil && !IsNil(o.Platform) { + return true + } + + return false +} + +// SetPlatform gets a reference to the given string and assigns it to the Platform field. +func (o *PythonPythonPackageContentResponse) SetPlatform(v string) { + o.Platform = &v +} + +// GetSupportedPlatform returns the SupportedPlatform field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetSupportedPlatform() string { + if o == nil || IsNil(o.SupportedPlatform) { + var ret string + return ret + } + return *o.SupportedPlatform +} + +// GetSupportedPlatformOk returns a tuple with the SupportedPlatform field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetSupportedPlatformOk() (*string, bool) { + if o == nil || IsNil(o.SupportedPlatform) { + return nil, false + } + return o.SupportedPlatform, true +} + +// HasSupportedPlatform returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasSupportedPlatform() bool { + if o != nil && !IsNil(o.SupportedPlatform) { + return true + } + + return false +} + +// SetSupportedPlatform gets a reference to the given string and assigns it to the SupportedPlatform field. +func (o *PythonPythonPackageContentResponse) SetSupportedPlatform(v string) { + o.SupportedPlatform = &v +} + +// GetRequiresDist returns the RequiresDist field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetRequiresDist() map[string]interface{} { + if o == nil || IsNil(o.RequiresDist) { + var ret map[string]interface{} + return ret + } + return o.RequiresDist +} + +// GetRequiresDistOk returns a tuple with the RequiresDist field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetRequiresDistOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.RequiresDist) { + return map[string]interface{}{}, false + } + return o.RequiresDist, true +} + +// HasRequiresDist returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasRequiresDist() bool { + if o != nil && !IsNil(o.RequiresDist) { + return true + } + + return false +} + +// SetRequiresDist gets a reference to the given map[string]interface{} and assigns it to the RequiresDist field. +func (o *PythonPythonPackageContentResponse) SetRequiresDist(v map[string]interface{}) { + o.RequiresDist = v +} + +// GetProvidesDist returns the ProvidesDist field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetProvidesDist() map[string]interface{} { + if o == nil || IsNil(o.ProvidesDist) { + var ret map[string]interface{} + return ret + } + return o.ProvidesDist +} + +// GetProvidesDistOk returns a tuple with the ProvidesDist field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetProvidesDistOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ProvidesDist) { + return map[string]interface{}{}, false + } + return o.ProvidesDist, true +} + +// HasProvidesDist returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasProvidesDist() bool { + if o != nil && !IsNil(o.ProvidesDist) { + return true + } + + return false +} + +// SetProvidesDist gets a reference to the given map[string]interface{} and assigns it to the ProvidesDist field. +func (o *PythonPythonPackageContentResponse) SetProvidesDist(v map[string]interface{}) { + o.ProvidesDist = v +} + +// GetObsoletesDist returns the ObsoletesDist field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetObsoletesDist() map[string]interface{} { + if o == nil || IsNil(o.ObsoletesDist) { + var ret map[string]interface{} + return ret + } + return o.ObsoletesDist +} + +// GetObsoletesDistOk returns a tuple with the ObsoletesDist field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetObsoletesDistOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ObsoletesDist) { + return map[string]interface{}{}, false + } + return o.ObsoletesDist, true +} + +// HasObsoletesDist returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasObsoletesDist() bool { + if o != nil && !IsNil(o.ObsoletesDist) { + return true + } + + return false +} + +// SetObsoletesDist gets a reference to the given map[string]interface{} and assigns it to the ObsoletesDist field. +func (o *PythonPythonPackageContentResponse) SetObsoletesDist(v map[string]interface{}) { + o.ObsoletesDist = v +} + +// GetRequiresExternal returns the RequiresExternal field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetRequiresExternal() map[string]interface{} { + if o == nil || IsNil(o.RequiresExternal) { + var ret map[string]interface{} + return ret + } + return o.RequiresExternal +} + +// GetRequiresExternalOk returns a tuple with the RequiresExternal field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetRequiresExternalOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.RequiresExternal) { + return map[string]interface{}{}, false + } + return o.RequiresExternal, true +} + +// HasRequiresExternal returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasRequiresExternal() bool { + if o != nil && !IsNil(o.RequiresExternal) { + return true + } + + return false +} + +// SetRequiresExternal gets a reference to the given map[string]interface{} and assigns it to the RequiresExternal field. +func (o *PythonPythonPackageContentResponse) SetRequiresExternal(v map[string]interface{}) { + o.RequiresExternal = v +} + +// GetClassifiers returns the Classifiers field value if set, zero value otherwise. +func (o *PythonPythonPackageContentResponse) GetClassifiers() map[string]interface{} { + if o == nil || IsNil(o.Classifiers) { + var ret map[string]interface{} + return ret + } + return o.Classifiers +} + +// GetClassifiersOk returns a tuple with the Classifiers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPackageContentResponse) GetClassifiersOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Classifiers) { + return map[string]interface{}{}, false + } + return o.Classifiers, true +} + +// HasClassifiers returns a boolean if a field has been set. +func (o *PythonPythonPackageContentResponse) HasClassifiers() bool { + if o != nil && !IsNil(o.Classifiers) { + return true + } + + return false +} + +// SetClassifiers gets a reference to the given map[string]interface{} and assigns it to the Classifiers field. +func (o *PythonPythonPackageContentResponse) SetClassifiers(v map[string]interface{}) { + o.Classifiers = v +} + +func (o PythonPythonPackageContentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PythonPythonPackageContentResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + if !IsNil(o.Filename) { + toSerialize["filename"] = o.Filename + } + if !IsNil(o.Packagetype) { + toSerialize["packagetype"] = o.Packagetype + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.Sha256) { + toSerialize["sha256"] = o.Sha256 + } + if !IsNil(o.MetadataVersion) { + toSerialize["metadata_version"] = o.MetadataVersion + } + if !IsNil(o.Summary) { + toSerialize["summary"] = o.Summary + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.DescriptionContentType) { + toSerialize["description_content_type"] = o.DescriptionContentType + } + if !IsNil(o.Keywords) { + toSerialize["keywords"] = o.Keywords + } + if !IsNil(o.HomePage) { + toSerialize["home_page"] = o.HomePage + } + if !IsNil(o.DownloadUrl) { + toSerialize["download_url"] = o.DownloadUrl + } + if !IsNil(o.Author) { + toSerialize["author"] = o.Author + } + if !IsNil(o.AuthorEmail) { + toSerialize["author_email"] = o.AuthorEmail + } + if !IsNil(o.Maintainer) { + toSerialize["maintainer"] = o.Maintainer + } + if !IsNil(o.MaintainerEmail) { + toSerialize["maintainer_email"] = o.MaintainerEmail + } + if !IsNil(o.License) { + toSerialize["license"] = o.License + } + if !IsNil(o.RequiresPython) { + toSerialize["requires_python"] = o.RequiresPython + } + if !IsNil(o.ProjectUrl) { + toSerialize["project_url"] = o.ProjectUrl + } + if !IsNil(o.ProjectUrls) { + toSerialize["project_urls"] = o.ProjectUrls + } + if !IsNil(o.Platform) { + toSerialize["platform"] = o.Platform + } + if !IsNil(o.SupportedPlatform) { + toSerialize["supported_platform"] = o.SupportedPlatform + } + if !IsNil(o.RequiresDist) { + toSerialize["requires_dist"] = o.RequiresDist + } + if !IsNil(o.ProvidesDist) { + toSerialize["provides_dist"] = o.ProvidesDist + } + if !IsNil(o.ObsoletesDist) { + toSerialize["obsoletes_dist"] = o.ObsoletesDist + } + if !IsNil(o.RequiresExternal) { + toSerialize["requires_external"] = o.RequiresExternal + } + if !IsNil(o.Classifiers) { + toSerialize["classifiers"] = o.Classifiers + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PythonPythonPackageContentResponse) UnmarshalJSON(bytes []byte) (err error) { + varPythonPythonPackageContentResponse := _PythonPythonPackageContentResponse{} + + if err = json.Unmarshal(bytes, &varPythonPythonPackageContentResponse); err == nil { + *o = PythonPythonPackageContentResponse(varPythonPythonPackageContentResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "artifact") + delete(additionalProperties, "filename") + delete(additionalProperties, "packagetype") + delete(additionalProperties, "name") + delete(additionalProperties, "version") + delete(additionalProperties, "sha256") + delete(additionalProperties, "metadata_version") + delete(additionalProperties, "summary") + delete(additionalProperties, "description") + delete(additionalProperties, "description_content_type") + delete(additionalProperties, "keywords") + delete(additionalProperties, "home_page") + delete(additionalProperties, "download_url") + delete(additionalProperties, "author") + delete(additionalProperties, "author_email") + delete(additionalProperties, "maintainer") + delete(additionalProperties, "maintainer_email") + delete(additionalProperties, "license") + delete(additionalProperties, "requires_python") + delete(additionalProperties, "project_url") + delete(additionalProperties, "project_urls") + delete(additionalProperties, "platform") + delete(additionalProperties, "supported_platform") + delete(additionalProperties, "requires_dist") + delete(additionalProperties, "provides_dist") + delete(additionalProperties, "obsoletes_dist") + delete(additionalProperties, "requires_external") + delete(additionalProperties, "classifiers") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePythonPythonPackageContentResponse struct { + value *PythonPythonPackageContentResponse + isSet bool +} + +func (v NullablePythonPythonPackageContentResponse) Get() *PythonPythonPackageContentResponse { + return v.value +} + +func (v *NullablePythonPythonPackageContentResponse) Set(val *PythonPythonPackageContentResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePythonPythonPackageContentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePythonPythonPackageContentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePythonPythonPackageContentResponse(val *PythonPythonPackageContentResponse) *NullablePythonPythonPackageContentResponse { + return &NullablePythonPythonPackageContentResponse{value: val, isSet: true} +} + +func (v NullablePythonPythonPackageContentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePythonPythonPackageContentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_publication.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_publication.go new file mode 100644 index 0000000000..dc495bcb19 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_publication.go @@ -0,0 +1,190 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PythonPythonPublication type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PythonPythonPublication{} + +// PythonPythonPublication A Serializer for PythonPublication. +type PythonPythonPublication struct { + RepositoryVersion *string `json:"repository_version,omitempty"` + // A URI of the repository to be published. + Repository *string `json:"repository,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PythonPythonPublication PythonPythonPublication + +// NewPythonPythonPublication instantiates a new PythonPythonPublication object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPythonPythonPublication() *PythonPythonPublication { + this := PythonPythonPublication{} + return &this +} + +// NewPythonPythonPublicationWithDefaults instantiates a new PythonPythonPublication object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPythonPythonPublicationWithDefaults() *PythonPythonPublication { + this := PythonPythonPublication{} + return &this +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *PythonPythonPublication) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPublication) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *PythonPythonPublication) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *PythonPythonPublication) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *PythonPythonPublication) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPublication) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *PythonPythonPublication) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *PythonPythonPublication) SetRepository(v string) { + o.Repository = &v +} + +func (o PythonPythonPublication) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PythonPythonPublication) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PythonPythonPublication) UnmarshalJSON(bytes []byte) (err error) { + varPythonPythonPublication := _PythonPythonPublication{} + + if err = json.Unmarshal(bytes, &varPythonPythonPublication); err == nil { + *o = PythonPythonPublication(varPythonPythonPublication) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository_version") + delete(additionalProperties, "repository") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePythonPythonPublication struct { + value *PythonPythonPublication + isSet bool +} + +func (v NullablePythonPythonPublication) Get() *PythonPythonPublication { + return v.value +} + +func (v *NullablePythonPythonPublication) Set(val *PythonPythonPublication) { + v.value = val + v.isSet = true +} + +func (v NullablePythonPythonPublication) IsSet() bool { + return v.isSet +} + +func (v *NullablePythonPythonPublication) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePythonPythonPublication(val *PythonPythonPublication) *NullablePythonPythonPublication { + return &NullablePythonPythonPublication{value: val, isSet: true} +} + +func (v NullablePythonPythonPublication) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePythonPythonPublication) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_publication_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_publication_response.go new file mode 100644 index 0000000000..67eeec6eb3 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_publication_response.go @@ -0,0 +1,304 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the PythonPythonPublicationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PythonPythonPublicationResponse{} + +// PythonPythonPublicationResponse A Serializer for PythonPublication. +type PythonPythonPublicationResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + RepositoryVersion *string `json:"repository_version,omitempty"` + // A URI of the repository to be published. + Repository *string `json:"repository,omitempty"` + // This publication is currently being hosted as configured by these distributions. + Distributions []string `json:"distributions,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PythonPythonPublicationResponse PythonPythonPublicationResponse + +// NewPythonPythonPublicationResponse instantiates a new PythonPythonPublicationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPythonPythonPublicationResponse() *PythonPythonPublicationResponse { + this := PythonPythonPublicationResponse{} + return &this +} + +// NewPythonPythonPublicationResponseWithDefaults instantiates a new PythonPythonPublicationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPythonPythonPublicationResponseWithDefaults() *PythonPythonPublicationResponse { + this := PythonPythonPublicationResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *PythonPythonPublicationResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPublicationResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *PythonPythonPublicationResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *PythonPythonPublicationResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *PythonPythonPublicationResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPublicationResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *PythonPythonPublicationResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *PythonPythonPublicationResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *PythonPythonPublicationResponse) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPublicationResponse) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *PythonPythonPublicationResponse) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *PythonPythonPublicationResponse) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *PythonPythonPublicationResponse) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPublicationResponse) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *PythonPythonPublicationResponse) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *PythonPythonPublicationResponse) SetRepository(v string) { + o.Repository = &v +} + +// GetDistributions returns the Distributions field value if set, zero value otherwise. +func (o *PythonPythonPublicationResponse) GetDistributions() []string { + if o == nil || IsNil(o.Distributions) { + var ret []string + return ret + } + return o.Distributions +} + +// GetDistributionsOk returns a tuple with the Distributions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonPublicationResponse) GetDistributionsOk() ([]string, bool) { + if o == nil || IsNil(o.Distributions) { + return nil, false + } + return o.Distributions, true +} + +// HasDistributions returns a boolean if a field has been set. +func (o *PythonPythonPublicationResponse) HasDistributions() bool { + if o != nil && !IsNil(o.Distributions) { + return true + } + + return false +} + +// SetDistributions gets a reference to the given []string and assigns it to the Distributions field. +func (o *PythonPythonPublicationResponse) SetDistributions(v []string) { + o.Distributions = v +} + +func (o PythonPythonPublicationResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PythonPythonPublicationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.Distributions) { + toSerialize["distributions"] = o.Distributions + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PythonPythonPublicationResponse) UnmarshalJSON(bytes []byte) (err error) { + varPythonPythonPublicationResponse := _PythonPythonPublicationResponse{} + + if err = json.Unmarshal(bytes, &varPythonPythonPublicationResponse); err == nil { + *o = PythonPythonPublicationResponse(varPythonPythonPublicationResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "repository") + delete(additionalProperties, "distributions") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePythonPythonPublicationResponse struct { + value *PythonPythonPublicationResponse + isSet bool +} + +func (v NullablePythonPythonPublicationResponse) Get() *PythonPythonPublicationResponse { + return v.value +} + +func (v *NullablePythonPythonPublicationResponse) Set(val *PythonPythonPublicationResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePythonPythonPublicationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePythonPythonPublicationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePythonPythonPublicationResponse(val *PythonPythonPublicationResponse) *NullablePythonPythonPublicationResponse { + return &NullablePythonPythonPublicationResponse{value: val, isSet: true} +} + +func (v NullablePythonPythonPublicationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePythonPythonPublicationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_remote.go new file mode 100644 index 0000000000..c1407e4e3e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_remote.go @@ -0,0 +1,1279 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PythonPythonRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PythonPythonRemote{} + +// PythonPythonRemote A Serializer for PythonRemote. +type PythonPythonRemote struct { + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // A list containing project specifiers for Python packages to include. + Includes []string `json:"includes,omitempty"` + // A list containing project specifiers for Python packages to exclude. + Excludes []string `json:"excludes,omitempty"` + // Whether or not to include pre-release packages in the sync. + Prereleases *bool `json:"prereleases,omitempty"` + // The package types to sync for Python content. Leave blank to get everypackage type. + PackageTypes []PackageTypesEnum `json:"package_types,omitempty"` + // The amount of latest versions of a package to keep on sync, includespre-releases if synced. Default 0 keeps all versions. + KeepLatestPackages *int64 `json:"keep_latest_packages,omitempty"` + // List of platforms to exclude syncing Python packages for. Possible valuesinclude: windows, macos, freebsd, and linux. + ExcludePlatforms []ExcludePlatformsEnum `json:"exclude_platforms,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PythonPythonRemote PythonPythonRemote + +// NewPythonPythonRemote instantiates a new PythonPythonRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPythonPythonRemote(name string, url string) *PythonPythonRemote { + this := PythonPythonRemote{} + this.Name = name + this.Url = url + var policy Policy762Enum = POLICY762ENUM_ON_DEMAND + this.Policy = &policy + var keepLatestPackages int64 = 0 + this.KeepLatestPackages = &keepLatestPackages + return &this +} + +// NewPythonPythonRemoteWithDefaults instantiates a new PythonPythonRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPythonPythonRemoteWithDefaults() *PythonPythonRemote { + this := PythonPythonRemote{} + var policy Policy762Enum = POLICY762ENUM_ON_DEMAND + this.Policy = &policy + var keepLatestPackages int64 = 0 + this.KeepLatestPackages = &keepLatestPackages + return &this +} + +// GetName returns the Name field value +func (o *PythonPythonRemote) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PythonPythonRemote) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PythonPythonRemote) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *PythonPythonRemote) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *PythonPythonRemote) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *PythonPythonRemote) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PythonPythonRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PythonPythonRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PythonPythonRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PythonPythonRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PythonPythonRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PythonPythonRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *PythonPythonRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *PythonPythonRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *PythonPythonRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PythonPythonRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PythonPythonRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PythonPythonRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PythonPythonRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PythonPythonRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *PythonPythonRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *PythonPythonRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *PythonPythonRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *PythonPythonRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *PythonPythonRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *PythonPythonRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *PythonPythonRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *PythonPythonRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *PythonPythonRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *PythonPythonRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *PythonPythonRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *PythonPythonRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PythonPythonRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PythonPythonRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PythonPythonRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PythonPythonRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PythonPythonRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PythonPythonRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PythonPythonRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PythonPythonRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PythonPythonRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *PythonPythonRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PythonPythonRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PythonPythonRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PythonPythonRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PythonPythonRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PythonPythonRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PythonPythonRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PythonPythonRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PythonPythonRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PythonPythonRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PythonPythonRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PythonPythonRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PythonPythonRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PythonPythonRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PythonPythonRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PythonPythonRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PythonPythonRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PythonPythonRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetIncludes returns the Includes field value if set, zero value otherwise. +func (o *PythonPythonRemote) GetIncludes() []string { + if o == nil || IsNil(o.Includes) { + var ret []string + return ret + } + return o.Includes +} + +// GetIncludesOk returns a tuple with the Includes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemote) GetIncludesOk() ([]string, bool) { + if o == nil || IsNil(o.Includes) { + return nil, false + } + return o.Includes, true +} + +// HasIncludes returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasIncludes() bool { + if o != nil && !IsNil(o.Includes) { + return true + } + + return false +} + +// SetIncludes gets a reference to the given []string and assigns it to the Includes field. +func (o *PythonPythonRemote) SetIncludes(v []string) { + o.Includes = v +} + +// GetExcludes returns the Excludes field value if set, zero value otherwise. +func (o *PythonPythonRemote) GetExcludes() []string { + if o == nil || IsNil(o.Excludes) { + var ret []string + return ret + } + return o.Excludes +} + +// GetExcludesOk returns a tuple with the Excludes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemote) GetExcludesOk() ([]string, bool) { + if o == nil || IsNil(o.Excludes) { + return nil, false + } + return o.Excludes, true +} + +// HasExcludes returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasExcludes() bool { + if o != nil && !IsNil(o.Excludes) { + return true + } + + return false +} + +// SetExcludes gets a reference to the given []string and assigns it to the Excludes field. +func (o *PythonPythonRemote) SetExcludes(v []string) { + o.Excludes = v +} + +// GetPrereleases returns the Prereleases field value if set, zero value otherwise. +func (o *PythonPythonRemote) GetPrereleases() bool { + if o == nil || IsNil(o.Prereleases) { + var ret bool + return ret + } + return *o.Prereleases +} + +// GetPrereleasesOk returns a tuple with the Prereleases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemote) GetPrereleasesOk() (*bool, bool) { + if o == nil || IsNil(o.Prereleases) { + return nil, false + } + return o.Prereleases, true +} + +// HasPrereleases returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasPrereleases() bool { + if o != nil && !IsNil(o.Prereleases) { + return true + } + + return false +} + +// SetPrereleases gets a reference to the given bool and assigns it to the Prereleases field. +func (o *PythonPythonRemote) SetPrereleases(v bool) { + o.Prereleases = &v +} + +// GetPackageTypes returns the PackageTypes field value if set, zero value otherwise. +func (o *PythonPythonRemote) GetPackageTypes() []PackageTypesEnum { + if o == nil || IsNil(o.PackageTypes) { + var ret []PackageTypesEnum + return ret + } + return o.PackageTypes +} + +// GetPackageTypesOk returns a tuple with the PackageTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemote) GetPackageTypesOk() ([]PackageTypesEnum, bool) { + if o == nil || IsNil(o.PackageTypes) { + return nil, false + } + return o.PackageTypes, true +} + +// HasPackageTypes returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasPackageTypes() bool { + if o != nil && !IsNil(o.PackageTypes) { + return true + } + + return false +} + +// SetPackageTypes gets a reference to the given []PackageTypesEnum and assigns it to the PackageTypes field. +func (o *PythonPythonRemote) SetPackageTypes(v []PackageTypesEnum) { + o.PackageTypes = v +} + +// GetKeepLatestPackages returns the KeepLatestPackages field value if set, zero value otherwise. +func (o *PythonPythonRemote) GetKeepLatestPackages() int64 { + if o == nil || IsNil(o.KeepLatestPackages) { + var ret int64 + return ret + } + return *o.KeepLatestPackages +} + +// GetKeepLatestPackagesOk returns a tuple with the KeepLatestPackages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemote) GetKeepLatestPackagesOk() (*int64, bool) { + if o == nil || IsNil(o.KeepLatestPackages) { + return nil, false + } + return o.KeepLatestPackages, true +} + +// HasKeepLatestPackages returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasKeepLatestPackages() bool { + if o != nil && !IsNil(o.KeepLatestPackages) { + return true + } + + return false +} + +// SetKeepLatestPackages gets a reference to the given int64 and assigns it to the KeepLatestPackages field. +func (o *PythonPythonRemote) SetKeepLatestPackages(v int64) { + o.KeepLatestPackages = &v +} + +// GetExcludePlatforms returns the ExcludePlatforms field value if set, zero value otherwise. +func (o *PythonPythonRemote) GetExcludePlatforms() []ExcludePlatformsEnum { + if o == nil || IsNil(o.ExcludePlatforms) { + var ret []ExcludePlatformsEnum + return ret + } + return o.ExcludePlatforms +} + +// GetExcludePlatformsOk returns a tuple with the ExcludePlatforms field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemote) GetExcludePlatformsOk() ([]ExcludePlatformsEnum, bool) { + if o == nil || IsNil(o.ExcludePlatforms) { + return nil, false + } + return o.ExcludePlatforms, true +} + +// HasExcludePlatforms returns a boolean if a field has been set. +func (o *PythonPythonRemote) HasExcludePlatforms() bool { + if o != nil && !IsNil(o.ExcludePlatforms) { + return true + } + + return false +} + +// SetExcludePlatforms gets a reference to the given []ExcludePlatformsEnum and assigns it to the ExcludePlatforms field. +func (o *PythonPythonRemote) SetExcludePlatforms(v []ExcludePlatformsEnum) { + o.ExcludePlatforms = v +} + +func (o PythonPythonRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PythonPythonRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.Includes) { + toSerialize["includes"] = o.Includes + } + if !IsNil(o.Excludes) { + toSerialize["excludes"] = o.Excludes + } + if !IsNil(o.Prereleases) { + toSerialize["prereleases"] = o.Prereleases + } + if !IsNil(o.PackageTypes) { + toSerialize["package_types"] = o.PackageTypes + } + if !IsNil(o.KeepLatestPackages) { + toSerialize["keep_latest_packages"] = o.KeepLatestPackages + } + if !IsNil(o.ExcludePlatforms) { + toSerialize["exclude_platforms"] = o.ExcludePlatforms + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PythonPythonRemote) UnmarshalJSON(bytes []byte) (err error) { + varPythonPythonRemote := _PythonPythonRemote{} + + if err = json.Unmarshal(bytes, &varPythonPythonRemote); err == nil { + *o = PythonPythonRemote(varPythonPythonRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "includes") + delete(additionalProperties, "excludes") + delete(additionalProperties, "prereleases") + delete(additionalProperties, "package_types") + delete(additionalProperties, "keep_latest_packages") + delete(additionalProperties, "exclude_platforms") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePythonPythonRemote struct { + value *PythonPythonRemote + isSet bool +} + +func (v NullablePythonPythonRemote) Get() *PythonPythonRemote { + return v.value +} + +func (v *NullablePythonPythonRemote) Set(val *PythonPythonRemote) { + v.value = val + v.isSet = true +} + +func (v NullablePythonPythonRemote) IsSet() bool { + return v.isSet +} + +func (v *NullablePythonPythonRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePythonPythonRemote(val *PythonPythonRemote) *NullablePythonPythonRemote { + return &NullablePythonPythonRemote{value: val, isSet: true} +} + +func (v NullablePythonPythonRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePythonPythonRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_remote_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_remote_response.go new file mode 100644 index 0000000000..e1a4b1f2b1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_remote_response.go @@ -0,0 +1,1191 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the PythonPythonRemoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PythonPythonRemoteResponse{} + +// PythonPythonRemoteResponse A Serializer for PythonRemote. +type PythonPythonRemoteResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + // A list containing project specifiers for Python packages to include. + Includes []string `json:"includes,omitempty"` + // A list containing project specifiers for Python packages to exclude. + Excludes []string `json:"excludes,omitempty"` + // Whether or not to include pre-release packages in the sync. + Prereleases *bool `json:"prereleases,omitempty"` + // The package types to sync for Python content. Leave blank to get everypackage type. + PackageTypes []PackageTypesEnum `json:"package_types,omitempty"` + // The amount of latest versions of a package to keep on sync, includespre-releases if synced. Default 0 keeps all versions. + KeepLatestPackages *int64 `json:"keep_latest_packages,omitempty"` + // List of platforms to exclude syncing Python packages for. Possible valuesinclude: windows, macos, freebsd, and linux. + ExcludePlatforms []ExcludePlatformsEnum `json:"exclude_platforms,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PythonPythonRemoteResponse PythonPythonRemoteResponse + +// NewPythonPythonRemoteResponse instantiates a new PythonPythonRemoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPythonPythonRemoteResponse(name string, url string) *PythonPythonRemoteResponse { + this := PythonPythonRemoteResponse{} + this.Name = name + this.Url = url + var policy Policy762Enum = POLICY762ENUM_ON_DEMAND + this.Policy = &policy + var keepLatestPackages int64 = 0 + this.KeepLatestPackages = &keepLatestPackages + return &this +} + +// NewPythonPythonRemoteResponseWithDefaults instantiates a new PythonPythonRemoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPythonPythonRemoteResponseWithDefaults() *PythonPythonRemoteResponse { + this := PythonPythonRemoteResponse{} + var policy Policy762Enum = POLICY762ENUM_ON_DEMAND + this.Policy = &policy + var keepLatestPackages int64 = 0 + this.KeepLatestPackages = &keepLatestPackages + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *PythonPythonRemoteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *PythonPythonRemoteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *PythonPythonRemoteResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PythonPythonRemoteResponse) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *PythonPythonRemoteResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *PythonPythonRemoteResponse) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemoteResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemoteResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *PythonPythonRemoteResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *PythonPythonRemoteResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *PythonPythonRemoteResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemoteResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemoteResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *PythonPythonRemoteResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *PythonPythonRemoteResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *PythonPythonRemoteResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *PythonPythonRemoteResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemoteResponse) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemoteResponse) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *PythonPythonRemoteResponse) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *PythonPythonRemoteResponse) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *PythonPythonRemoteResponse) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PythonPythonRemoteResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *PythonPythonRemoteResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemoteResponse) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemoteResponse) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *PythonPythonRemoteResponse) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *PythonPythonRemoteResponse) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *PythonPythonRemoteResponse) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemoteResponse) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemoteResponse) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *PythonPythonRemoteResponse) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *PythonPythonRemoteResponse) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *PythonPythonRemoteResponse) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *PythonPythonRemoteResponse) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemoteResponse) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemoteResponse) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *PythonPythonRemoteResponse) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *PythonPythonRemoteResponse) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *PythonPythonRemoteResponse) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemoteResponse) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemoteResponse) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *PythonPythonRemoteResponse) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *PythonPythonRemoteResponse) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *PythonPythonRemoteResponse) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemoteResponse) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemoteResponse) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *PythonPythonRemoteResponse) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *PythonPythonRemoteResponse) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *PythonPythonRemoteResponse) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemoteResponse) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemoteResponse) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *PythonPythonRemoteResponse) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *PythonPythonRemoteResponse) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *PythonPythonRemoteResponse) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *PythonPythonRemoteResponse) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRemoteResponse) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRemoteResponse) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *PythonPythonRemoteResponse) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *PythonPythonRemoteResponse) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *PythonPythonRemoteResponse) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *PythonPythonRemoteResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +// GetIncludes returns the Includes field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetIncludes() []string { + if o == nil || IsNil(o.Includes) { + var ret []string + return ret + } + return o.Includes +} + +// GetIncludesOk returns a tuple with the Includes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetIncludesOk() ([]string, bool) { + if o == nil || IsNil(o.Includes) { + return nil, false + } + return o.Includes, true +} + +// HasIncludes returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasIncludes() bool { + if o != nil && !IsNil(o.Includes) { + return true + } + + return false +} + +// SetIncludes gets a reference to the given []string and assigns it to the Includes field. +func (o *PythonPythonRemoteResponse) SetIncludes(v []string) { + o.Includes = v +} + +// GetExcludes returns the Excludes field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetExcludes() []string { + if o == nil || IsNil(o.Excludes) { + var ret []string + return ret + } + return o.Excludes +} + +// GetExcludesOk returns a tuple with the Excludes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetExcludesOk() ([]string, bool) { + if o == nil || IsNil(o.Excludes) { + return nil, false + } + return o.Excludes, true +} + +// HasExcludes returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasExcludes() bool { + if o != nil && !IsNil(o.Excludes) { + return true + } + + return false +} + +// SetExcludes gets a reference to the given []string and assigns it to the Excludes field. +func (o *PythonPythonRemoteResponse) SetExcludes(v []string) { + o.Excludes = v +} + +// GetPrereleases returns the Prereleases field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetPrereleases() bool { + if o == nil || IsNil(o.Prereleases) { + var ret bool + return ret + } + return *o.Prereleases +} + +// GetPrereleasesOk returns a tuple with the Prereleases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetPrereleasesOk() (*bool, bool) { + if o == nil || IsNil(o.Prereleases) { + return nil, false + } + return o.Prereleases, true +} + +// HasPrereleases returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasPrereleases() bool { + if o != nil && !IsNil(o.Prereleases) { + return true + } + + return false +} + +// SetPrereleases gets a reference to the given bool and assigns it to the Prereleases field. +func (o *PythonPythonRemoteResponse) SetPrereleases(v bool) { + o.Prereleases = &v +} + +// GetPackageTypes returns the PackageTypes field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetPackageTypes() []PackageTypesEnum { + if o == nil || IsNil(o.PackageTypes) { + var ret []PackageTypesEnum + return ret + } + return o.PackageTypes +} + +// GetPackageTypesOk returns a tuple with the PackageTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetPackageTypesOk() ([]PackageTypesEnum, bool) { + if o == nil || IsNil(o.PackageTypes) { + return nil, false + } + return o.PackageTypes, true +} + +// HasPackageTypes returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasPackageTypes() bool { + if o != nil && !IsNil(o.PackageTypes) { + return true + } + + return false +} + +// SetPackageTypes gets a reference to the given []PackageTypesEnum and assigns it to the PackageTypes field. +func (o *PythonPythonRemoteResponse) SetPackageTypes(v []PackageTypesEnum) { + o.PackageTypes = v +} + +// GetKeepLatestPackages returns the KeepLatestPackages field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetKeepLatestPackages() int64 { + if o == nil || IsNil(o.KeepLatestPackages) { + var ret int64 + return ret + } + return *o.KeepLatestPackages +} + +// GetKeepLatestPackagesOk returns a tuple with the KeepLatestPackages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetKeepLatestPackagesOk() (*int64, bool) { + if o == nil || IsNil(o.KeepLatestPackages) { + return nil, false + } + return o.KeepLatestPackages, true +} + +// HasKeepLatestPackages returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasKeepLatestPackages() bool { + if o != nil && !IsNil(o.KeepLatestPackages) { + return true + } + + return false +} + +// SetKeepLatestPackages gets a reference to the given int64 and assigns it to the KeepLatestPackages field. +func (o *PythonPythonRemoteResponse) SetKeepLatestPackages(v int64) { + o.KeepLatestPackages = &v +} + +// GetExcludePlatforms returns the ExcludePlatforms field value if set, zero value otherwise. +func (o *PythonPythonRemoteResponse) GetExcludePlatforms() []ExcludePlatformsEnum { + if o == nil || IsNil(o.ExcludePlatforms) { + var ret []ExcludePlatformsEnum + return ret + } + return o.ExcludePlatforms +} + +// GetExcludePlatformsOk returns a tuple with the ExcludePlatforms field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRemoteResponse) GetExcludePlatformsOk() ([]ExcludePlatformsEnum, bool) { + if o == nil || IsNil(o.ExcludePlatforms) { + return nil, false + } + return o.ExcludePlatforms, true +} + +// HasExcludePlatforms returns a boolean if a field has been set. +func (o *PythonPythonRemoteResponse) HasExcludePlatforms() bool { + if o != nil && !IsNil(o.ExcludePlatforms) { + return true + } + + return false +} + +// SetExcludePlatforms gets a reference to the given []ExcludePlatformsEnum and assigns it to the ExcludePlatforms field. +func (o *PythonPythonRemoteResponse) SetExcludePlatforms(v []ExcludePlatformsEnum) { + o.ExcludePlatforms = v +} + +func (o PythonPythonRemoteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PythonPythonRemoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + if !IsNil(o.Includes) { + toSerialize["includes"] = o.Includes + } + if !IsNil(o.Excludes) { + toSerialize["excludes"] = o.Excludes + } + if !IsNil(o.Prereleases) { + toSerialize["prereleases"] = o.Prereleases + } + if !IsNil(o.PackageTypes) { + toSerialize["package_types"] = o.PackageTypes + } + if !IsNil(o.KeepLatestPackages) { + toSerialize["keep_latest_packages"] = o.KeepLatestPackages + } + if !IsNil(o.ExcludePlatforms) { + toSerialize["exclude_platforms"] = o.ExcludePlatforms + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PythonPythonRemoteResponse) UnmarshalJSON(bytes []byte) (err error) { + varPythonPythonRemoteResponse := _PythonPythonRemoteResponse{} + + if err = json.Unmarshal(bytes, &varPythonPythonRemoteResponse); err == nil { + *o = PythonPythonRemoteResponse(varPythonPythonRemoteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "hidden_fields") + delete(additionalProperties, "includes") + delete(additionalProperties, "excludes") + delete(additionalProperties, "prereleases") + delete(additionalProperties, "package_types") + delete(additionalProperties, "keep_latest_packages") + delete(additionalProperties, "exclude_platforms") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePythonPythonRemoteResponse struct { + value *PythonPythonRemoteResponse + isSet bool +} + +func (v NullablePythonPythonRemoteResponse) Get() *PythonPythonRemoteResponse { + return v.value +} + +func (v *NullablePythonPythonRemoteResponse) Set(val *PythonPythonRemoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePythonPythonRemoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePythonPythonRemoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePythonPythonRemoteResponse(val *PythonPythonRemoteResponse) *NullablePythonPythonRemoteResponse { + return &NullablePythonPythonRemoteResponse{value: val, isSet: true} +} + +func (v NullablePythonPythonRemoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePythonPythonRemoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_repository.go new file mode 100644 index 0000000000..4239b9ae27 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_repository.go @@ -0,0 +1,367 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the PythonPythonRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PythonPythonRepository{} + +// PythonPythonRepository Serializer for Python Repositories. +type PythonPythonRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. + Autopublish *bool `json:"autopublish,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PythonPythonRepository PythonPythonRepository + +// NewPythonPythonRepository instantiates a new PythonPythonRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPythonPythonRepository(name string) *PythonPythonRepository { + this := PythonPythonRepository{} + this.Name = name + var autopublish bool = false + this.Autopublish = &autopublish + return &this +} + +// NewPythonPythonRepositoryWithDefaults instantiates a new PythonPythonRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPythonPythonRepositoryWithDefaults() *PythonPythonRepository { + this := PythonPythonRepository{} + var autopublish bool = false + this.Autopublish = &autopublish + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PythonPythonRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PythonPythonRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PythonPythonRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *PythonPythonRepository) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PythonPythonRepository) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PythonPythonRepository) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PythonPythonRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PythonPythonRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PythonPythonRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PythonPythonRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *PythonPythonRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *PythonPythonRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *PythonPythonRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *PythonPythonRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PythonPythonRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PythonPythonRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PythonPythonRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PythonPythonRepository) UnsetRemote() { + o.Remote.Unset() +} + +// GetAutopublish returns the Autopublish field value if set, zero value otherwise. +func (o *PythonPythonRepository) GetAutopublish() bool { + if o == nil || IsNil(o.Autopublish) { + var ret bool + return ret + } + return *o.Autopublish +} + +// GetAutopublishOk returns a tuple with the Autopublish field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRepository) GetAutopublishOk() (*bool, bool) { + if o == nil || IsNil(o.Autopublish) { + return nil, false + } + return o.Autopublish, true +} + +// HasAutopublish returns a boolean if a field has been set. +func (o *PythonPythonRepository) HasAutopublish() bool { + if o != nil && !IsNil(o.Autopublish) { + return true + } + + return false +} + +// SetAutopublish gets a reference to the given bool and assigns it to the Autopublish field. +func (o *PythonPythonRepository) SetAutopublish(v bool) { + o.Autopublish = &v +} + +func (o PythonPythonRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PythonPythonRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if !IsNil(o.Autopublish) { + toSerialize["autopublish"] = o.Autopublish + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PythonPythonRepository) UnmarshalJSON(bytes []byte) (err error) { + varPythonPythonRepository := _PythonPythonRepository{} + + if err = json.Unmarshal(bytes, &varPythonPythonRepository); err == nil { + *o = PythonPythonRepository(varPythonPythonRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "autopublish") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePythonPythonRepository struct { + value *PythonPythonRepository + isSet bool +} + +func (v NullablePythonPythonRepository) Get() *PythonPythonRepository { + return v.value +} + +func (v *NullablePythonPythonRepository) Set(val *PythonPythonRepository) { + v.value = val + v.isSet = true +} + +func (v NullablePythonPythonRepository) IsSet() bool { + return v.isSet +} + +func (v *NullablePythonPythonRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePythonPythonRepository(val *PythonPythonRepository) *NullablePythonPythonRepository { + return &NullablePythonPythonRepository{value: val, isSet: true} +} + +func (v NullablePythonPythonRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePythonPythonRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_repository_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_repository_response.go new file mode 100644 index 0000000000..948ad11252 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_python_python_repository_response.go @@ -0,0 +1,517 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the PythonPythonRepositoryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PythonPythonRepositoryResponse{} + +// PythonPythonRepositoryResponse Serializer for Python Repositories. +type PythonPythonRepositoryResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + VersionsHref *string `json:"versions_href,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + LatestVersionHref *string `json:"latest_version_href,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. + Autopublish *bool `json:"autopublish,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PythonPythonRepositoryResponse PythonPythonRepositoryResponse + +// NewPythonPythonRepositoryResponse instantiates a new PythonPythonRepositoryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPythonPythonRepositoryResponse(name string) *PythonPythonRepositoryResponse { + this := PythonPythonRepositoryResponse{} + this.Name = name + var autopublish bool = false + this.Autopublish = &autopublish + return &this +} + +// NewPythonPythonRepositoryResponseWithDefaults instantiates a new PythonPythonRepositoryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPythonPythonRepositoryResponseWithDefaults() *PythonPythonRepositoryResponse { + this := PythonPythonRepositoryResponse{} + var autopublish bool = false + this.Autopublish = &autopublish + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *PythonPythonRepositoryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRepositoryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *PythonPythonRepositoryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *PythonPythonRepositoryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *PythonPythonRepositoryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRepositoryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *PythonPythonRepositoryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *PythonPythonRepositoryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetVersionsHref returns the VersionsHref field value if set, zero value otherwise. +func (o *PythonPythonRepositoryResponse) GetVersionsHref() string { + if o == nil || IsNil(o.VersionsHref) { + var ret string + return ret + } + return *o.VersionsHref +} + +// GetVersionsHrefOk returns a tuple with the VersionsHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRepositoryResponse) GetVersionsHrefOk() (*string, bool) { + if o == nil || IsNil(o.VersionsHref) { + return nil, false + } + return o.VersionsHref, true +} + +// HasVersionsHref returns a boolean if a field has been set. +func (o *PythonPythonRepositoryResponse) HasVersionsHref() bool { + if o != nil && !IsNil(o.VersionsHref) { + return true + } + + return false +} + +// SetVersionsHref gets a reference to the given string and assigns it to the VersionsHref field. +func (o *PythonPythonRepositoryResponse) SetVersionsHref(v string) { + o.VersionsHref = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *PythonPythonRepositoryResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRepositoryResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *PythonPythonRepositoryResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *PythonPythonRepositoryResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetLatestVersionHref returns the LatestVersionHref field value if set, zero value otherwise. +func (o *PythonPythonRepositoryResponse) GetLatestVersionHref() string { + if o == nil || IsNil(o.LatestVersionHref) { + var ret string + return ret + } + return *o.LatestVersionHref +} + +// GetLatestVersionHrefOk returns a tuple with the LatestVersionHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRepositoryResponse) GetLatestVersionHrefOk() (*string, bool) { + if o == nil || IsNil(o.LatestVersionHref) { + return nil, false + } + return o.LatestVersionHref, true +} + +// HasLatestVersionHref returns a boolean if a field has been set. +func (o *PythonPythonRepositoryResponse) HasLatestVersionHref() bool { + if o != nil && !IsNil(o.LatestVersionHref) { + return true + } + + return false +} + +// SetLatestVersionHref gets a reference to the given string and assigns it to the LatestVersionHref field. +func (o *PythonPythonRepositoryResponse) SetLatestVersionHref(v string) { + o.LatestVersionHref = &v +} + +// GetName returns the Name field value +func (o *PythonPythonRepositoryResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PythonPythonRepositoryResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PythonPythonRepositoryResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRepositoryResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRepositoryResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *PythonPythonRepositoryResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *PythonPythonRepositoryResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *PythonPythonRepositoryResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *PythonPythonRepositoryResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRepositoryResponse) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRepositoryResponse) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *PythonPythonRepositoryResponse) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *PythonPythonRepositoryResponse) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *PythonPythonRepositoryResponse) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *PythonPythonRepositoryResponse) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PythonPythonRepositoryResponse) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PythonPythonRepositoryResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *PythonPythonRepositoryResponse) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *PythonPythonRepositoryResponse) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *PythonPythonRepositoryResponse) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *PythonPythonRepositoryResponse) UnsetRemote() { + o.Remote.Unset() +} + +// GetAutopublish returns the Autopublish field value if set, zero value otherwise. +func (o *PythonPythonRepositoryResponse) GetAutopublish() bool { + if o == nil || IsNil(o.Autopublish) { + var ret bool + return ret + } + return *o.Autopublish +} + +// GetAutopublishOk returns a tuple with the Autopublish field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PythonPythonRepositoryResponse) GetAutopublishOk() (*bool, bool) { + if o == nil || IsNil(o.Autopublish) { + return nil, false + } + return o.Autopublish, true +} + +// HasAutopublish returns a boolean if a field has been set. +func (o *PythonPythonRepositoryResponse) HasAutopublish() bool { + if o != nil && !IsNil(o.Autopublish) { + return true + } + + return false +} + +// SetAutopublish gets a reference to the given bool and assigns it to the Autopublish field. +func (o *PythonPythonRepositoryResponse) SetAutopublish(v bool) { + o.Autopublish = &v +} + +func (o PythonPythonRepositoryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PythonPythonRepositoryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.VersionsHref) { + toSerialize["versions_href"] = o.VersionsHref + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.LatestVersionHref) { + toSerialize["latest_version_href"] = o.LatestVersionHref + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if !IsNil(o.Autopublish) { + toSerialize["autopublish"] = o.Autopublish + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PythonPythonRepositoryResponse) UnmarshalJSON(bytes []byte) (err error) { + varPythonPythonRepositoryResponse := _PythonPythonRepositoryResponse{} + + if err = json.Unmarshal(bytes, &varPythonPythonRepositoryResponse); err == nil { + *o = PythonPythonRepositoryResponse(varPythonPythonRepositoryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "versions_href") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "latest_version_href") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "autopublish") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePythonPythonRepositoryResponse struct { + value *PythonPythonRepositoryResponse + isSet bool +} + +func (v NullablePythonPythonRepositoryResponse) Get() *PythonPythonRepositoryResponse { + return v.value +} + +func (v *NullablePythonPythonRepositoryResponse) Set(val *PythonPythonRepositoryResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePythonPythonRepositoryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePythonPythonRepositoryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePythonPythonRepositoryResponse(val *PythonPythonRepositoryResponse) *NullablePythonPythonRepositoryResponse { + return &NullablePythonPythonRepositoryResponse{value: val, isSet: true} +} + +func (v NullablePythonPythonRepositoryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePythonPythonRepositoryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rbac_content_guard.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rbac_content_guard.go new file mode 100644 index 0000000000..816607f590 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rbac_content_guard.go @@ -0,0 +1,192 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RBACContentGuard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RBACContentGuard{} + +// RBACContentGuard Base serializer for use with :class:`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. +type RBACContentGuard struct { + // The unique name. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RBACContentGuard RBACContentGuard + +// NewRBACContentGuard instantiates a new RBACContentGuard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRBACContentGuard(name string) *RBACContentGuard { + this := RBACContentGuard{} + this.Name = name + return &this +} + +// NewRBACContentGuardWithDefaults instantiates a new RBACContentGuard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRBACContentGuardWithDefaults() *RBACContentGuard { + this := RBACContentGuard{} + return &this +} + +// GetName returns the Name field value +func (o *RBACContentGuard) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RBACContentGuard) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RBACContentGuard) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RBACContentGuard) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RBACContentGuard) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *RBACContentGuard) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *RBACContentGuard) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *RBACContentGuard) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *RBACContentGuard) UnsetDescription() { + o.Description.Unset() +} + +func (o RBACContentGuard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RBACContentGuard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RBACContentGuard) UnmarshalJSON(bytes []byte) (err error) { + varRBACContentGuard := _RBACContentGuard{} + + if err = json.Unmarshal(bytes, &varRBACContentGuard); err == nil { + *o = RBACContentGuard(varRBACContentGuard) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRBACContentGuard struct { + value *RBACContentGuard + isSet bool +} + +func (v NullableRBACContentGuard) Get() *RBACContentGuard { + return v.value +} + +func (v *NullableRBACContentGuard) Set(val *RBACContentGuard) { + v.value = val + v.isSet = true +} + +func (v NullableRBACContentGuard) IsSet() bool { + return v.isSet +} + +func (v *NullableRBACContentGuard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRBACContentGuard(val *RBACContentGuard) *NullableRBACContentGuard { + return &NullableRBACContentGuard{value: val, isSet: true} +} + +func (v NullableRBACContentGuard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRBACContentGuard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rbac_content_guard_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rbac_content_guard_response.go new file mode 100644 index 0000000000..fb9b7f4bb8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rbac_content_guard_response.go @@ -0,0 +1,342 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RBACContentGuardResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RBACContentGuardResponse{} + +// RBACContentGuardResponse Base serializer for use with :class:`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. +type RBACContentGuardResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The unique name. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + Users []GroupUserResponse `json:"users,omitempty"` + Groups []GroupResponse `json:"groups,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RBACContentGuardResponse RBACContentGuardResponse + +// NewRBACContentGuardResponse instantiates a new RBACContentGuardResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRBACContentGuardResponse(name string) *RBACContentGuardResponse { + this := RBACContentGuardResponse{} + this.Name = name + return &this +} + +// NewRBACContentGuardResponseWithDefaults instantiates a new RBACContentGuardResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRBACContentGuardResponseWithDefaults() *RBACContentGuardResponse { + this := RBACContentGuardResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RBACContentGuardResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RBACContentGuardResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RBACContentGuardResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RBACContentGuardResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RBACContentGuardResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RBACContentGuardResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RBACContentGuardResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RBACContentGuardResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *RBACContentGuardResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RBACContentGuardResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RBACContentGuardResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RBACContentGuardResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RBACContentGuardResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *RBACContentGuardResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *RBACContentGuardResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *RBACContentGuardResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *RBACContentGuardResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetUsers returns the Users field value if set, zero value otherwise. +func (o *RBACContentGuardResponse) GetUsers() []GroupUserResponse { + if o == nil || IsNil(o.Users) { + var ret []GroupUserResponse + return ret + } + return o.Users +} + +// GetUsersOk returns a tuple with the Users field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RBACContentGuardResponse) GetUsersOk() ([]GroupUserResponse, bool) { + if o == nil || IsNil(o.Users) { + return nil, false + } + return o.Users, true +} + +// HasUsers returns a boolean if a field has been set. +func (o *RBACContentGuardResponse) HasUsers() bool { + if o != nil && !IsNil(o.Users) { + return true + } + + return false +} + +// SetUsers gets a reference to the given []GroupUserResponse and assigns it to the Users field. +func (o *RBACContentGuardResponse) SetUsers(v []GroupUserResponse) { + o.Users = v +} + +// GetGroups returns the Groups field value if set, zero value otherwise. +func (o *RBACContentGuardResponse) GetGroups() []GroupResponse { + if o == nil || IsNil(o.Groups) { + var ret []GroupResponse + return ret + } + return o.Groups +} + +// GetGroupsOk returns a tuple with the Groups field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RBACContentGuardResponse) GetGroupsOk() ([]GroupResponse, bool) { + if o == nil || IsNil(o.Groups) { + return nil, false + } + return o.Groups, true +} + +// HasGroups returns a boolean if a field has been set. +func (o *RBACContentGuardResponse) HasGroups() bool { + if o != nil && !IsNil(o.Groups) { + return true + } + + return false +} + +// SetGroups gets a reference to the given []GroupResponse and assigns it to the Groups field. +func (o *RBACContentGuardResponse) SetGroups(v []GroupResponse) { + o.Groups = v +} + +func (o RBACContentGuardResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RBACContentGuardResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Users) { + toSerialize["users"] = o.Users + } + if !IsNil(o.Groups) { + toSerialize["groups"] = o.Groups + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RBACContentGuardResponse) UnmarshalJSON(bytes []byte) (err error) { + varRBACContentGuardResponse := _RBACContentGuardResponse{} + + if err = json.Unmarshal(bytes, &varRBACContentGuardResponse); err == nil { + *o = RBACContentGuardResponse(varRBACContentGuardResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "users") + delete(additionalProperties, "groups") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRBACContentGuardResponse struct { + value *RBACContentGuardResponse + isSet bool +} + +func (v NullableRBACContentGuardResponse) Get() *RBACContentGuardResponse { + return v.value +} + +func (v *NullableRBACContentGuardResponse) Set(val *RBACContentGuardResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRBACContentGuardResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRBACContentGuardResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRBACContentGuardResponse(val *RBACContentGuardResponse) *NullableRBACContentGuardResponse { + return &NullableRBACContentGuardResponse{value: val, isSet: true} +} + +func (v NullableRBACContentGuardResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRBACContentGuardResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_reclaim_space.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_reclaim_space.go new file mode 100644 index 0000000000..e301a78aaf --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_reclaim_space.go @@ -0,0 +1,182 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the ReclaimSpace type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReclaimSpace{} + +// ReclaimSpace Serializer for reclaim disk space operation. +type ReclaimSpace struct { + // Will reclaim space for the specified list of repos. Use ['*'] to specify all repos. + RepoHrefs []interface{} `json:"repo_hrefs"` + // Will exclude repo versions from space reclaim. + RepoVersionsKeeplist []string `json:"repo_versions_keeplist,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ReclaimSpace ReclaimSpace + +// NewReclaimSpace instantiates a new ReclaimSpace object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReclaimSpace(repoHrefs []interface{}) *ReclaimSpace { + this := ReclaimSpace{} + this.RepoHrefs = repoHrefs + return &this +} + +// NewReclaimSpaceWithDefaults instantiates a new ReclaimSpace object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReclaimSpaceWithDefaults() *ReclaimSpace { + this := ReclaimSpace{} + return &this +} + +// GetRepoHrefs returns the RepoHrefs field value +func (o *ReclaimSpace) GetRepoHrefs() []interface{} { + if o == nil { + var ret []interface{} + return ret + } + + return o.RepoHrefs +} + +// GetRepoHrefsOk returns a tuple with the RepoHrefs field value +// and a boolean to check if the value has been set. +func (o *ReclaimSpace) GetRepoHrefsOk() ([]interface{}, bool) { + if o == nil { + return nil, false + } + return o.RepoHrefs, true +} + +// SetRepoHrefs sets field value +func (o *ReclaimSpace) SetRepoHrefs(v []interface{}) { + o.RepoHrefs = v +} + +// GetRepoVersionsKeeplist returns the RepoVersionsKeeplist field value if set, zero value otherwise. +func (o *ReclaimSpace) GetRepoVersionsKeeplist() []string { + if o == nil || IsNil(o.RepoVersionsKeeplist) { + var ret []string + return ret + } + return o.RepoVersionsKeeplist +} + +// GetRepoVersionsKeeplistOk returns a tuple with the RepoVersionsKeeplist field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReclaimSpace) GetRepoVersionsKeeplistOk() ([]string, bool) { + if o == nil || IsNil(o.RepoVersionsKeeplist) { + return nil, false + } + return o.RepoVersionsKeeplist, true +} + +// HasRepoVersionsKeeplist returns a boolean if a field has been set. +func (o *ReclaimSpace) HasRepoVersionsKeeplist() bool { + if o != nil && !IsNil(o.RepoVersionsKeeplist) { + return true + } + + return false +} + +// SetRepoVersionsKeeplist gets a reference to the given []string and assigns it to the RepoVersionsKeeplist field. +func (o *ReclaimSpace) SetRepoVersionsKeeplist(v []string) { + o.RepoVersionsKeeplist = v +} + +func (o ReclaimSpace) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReclaimSpace) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["repo_hrefs"] = o.RepoHrefs + if !IsNil(o.RepoVersionsKeeplist) { + toSerialize["repo_versions_keeplist"] = o.RepoVersionsKeeplist + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ReclaimSpace) UnmarshalJSON(bytes []byte) (err error) { + varReclaimSpace := _ReclaimSpace{} + + if err = json.Unmarshal(bytes, &varReclaimSpace); err == nil { + *o = ReclaimSpace(varReclaimSpace) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repo_hrefs") + delete(additionalProperties, "repo_versions_keeplist") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableReclaimSpace struct { + value *ReclaimSpace + isSet bool +} + +func (v NullableReclaimSpace) Get() *ReclaimSpace { + return v.value +} + +func (v *NullableReclaimSpace) Set(val *ReclaimSpace) { + v.value = val + v.isSet = true +} + +func (v NullableReclaimSpace) IsSet() bool { + return v.isSet +} + +func (v *NullableReclaimSpace) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReclaimSpace(val *ReclaimSpace) *NullableReclaimSpace { + return &NullableReclaimSpace{value: val, isSet: true} +} + +func (v NullableReclaimSpace) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReclaimSpace) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_recursive_manage.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_recursive_manage.go new file mode 100644 index 0000000000..22279254bf --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_recursive_manage.go @@ -0,0 +1,153 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RecursiveManage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RecursiveManage{} + +// RecursiveManage Serializer for adding and removing content to/from a Container repository. +type RecursiveManage struct { + // A list of content units to operate on. + ContentUnits []interface{} `json:"content_units,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RecursiveManage RecursiveManage + +// NewRecursiveManage instantiates a new RecursiveManage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRecursiveManage() *RecursiveManage { + this := RecursiveManage{} + return &this +} + +// NewRecursiveManageWithDefaults instantiates a new RecursiveManage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRecursiveManageWithDefaults() *RecursiveManage { + this := RecursiveManage{} + return &this +} + +// GetContentUnits returns the ContentUnits field value if set, zero value otherwise. +func (o *RecursiveManage) GetContentUnits() []interface{} { + if o == nil || IsNil(o.ContentUnits) { + var ret []interface{} + return ret + } + return o.ContentUnits +} + +// GetContentUnitsOk returns a tuple with the ContentUnits field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecursiveManage) GetContentUnitsOk() ([]interface{}, bool) { + if o == nil || IsNil(o.ContentUnits) { + return nil, false + } + return o.ContentUnits, true +} + +// HasContentUnits returns a boolean if a field has been set. +func (o *RecursiveManage) HasContentUnits() bool { + if o != nil && !IsNil(o.ContentUnits) { + return true + } + + return false +} + +// SetContentUnits gets a reference to the given []interface{} and assigns it to the ContentUnits field. +func (o *RecursiveManage) SetContentUnits(v []interface{}) { + o.ContentUnits = v +} + +func (o RecursiveManage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RecursiveManage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ContentUnits) { + toSerialize["content_units"] = o.ContentUnits + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RecursiveManage) UnmarshalJSON(bytes []byte) (err error) { + varRecursiveManage := _RecursiveManage{} + + if err = json.Unmarshal(bytes, &varRecursiveManage); err == nil { + *o = RecursiveManage(varRecursiveManage) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "content_units") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRecursiveManage struct { + value *RecursiveManage + isSet bool +} + +func (v NullableRecursiveManage) Get() *RecursiveManage { + return v.value +} + +func (v *NullableRecursiveManage) Set(val *RecursiveManage) { + v.value = val + v.isSet = true +} + +func (v NullableRecursiveManage) IsSet() bool { + return v.isSet +} + +func (v *NullableRecursiveManage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRecursiveManage(val *RecursiveManage) *NullableRecursiveManage { + return &NullableRecursiveManage{value: val, isSet: true} +} + +func (v NullableRecursiveManage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRecursiveManage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_redis_connection_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_redis_connection_response.go new file mode 100644 index 0000000000..e092c033da --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_redis_connection_response.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RedisConnectionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RedisConnectionResponse{} + +// RedisConnectionResponse Serializer for information about the Redis connection +type RedisConnectionResponse struct { + // Info about whether the app can connect to Redis + Connected bool `json:"connected"` + AdditionalProperties map[string]interface{} +} + +type _RedisConnectionResponse RedisConnectionResponse + +// NewRedisConnectionResponse instantiates a new RedisConnectionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRedisConnectionResponse(connected bool) *RedisConnectionResponse { + this := RedisConnectionResponse{} + this.Connected = connected + return &this +} + +// NewRedisConnectionResponseWithDefaults instantiates a new RedisConnectionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRedisConnectionResponseWithDefaults() *RedisConnectionResponse { + this := RedisConnectionResponse{} + return &this +} + +// GetConnected returns the Connected field value +func (o *RedisConnectionResponse) GetConnected() bool { + if o == nil { + var ret bool + return ret + } + + return o.Connected +} + +// GetConnectedOk returns a tuple with the Connected field value +// and a boolean to check if the value has been set. +func (o *RedisConnectionResponse) GetConnectedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Connected, true +} + +// SetConnected sets field value +func (o *RedisConnectionResponse) SetConnected(v bool) { + o.Connected = v +} + +func (o RedisConnectionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RedisConnectionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["connected"] = o.Connected + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RedisConnectionResponse) UnmarshalJSON(bytes []byte) (err error) { + varRedisConnectionResponse := _RedisConnectionResponse{} + + if err = json.Unmarshal(bytes, &varRedisConnectionResponse); err == nil { + *o = RedisConnectionResponse(varRedisConnectionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "connected") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRedisConnectionResponse struct { + value *RedisConnectionResponse + isSet bool +} + +func (v NullableRedisConnectionResponse) Get() *RedisConnectionResponse { + return v.value +} + +func (v *NullableRedisConnectionResponse) Set(val *RedisConnectionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRedisConnectionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRedisConnectionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRedisConnectionResponse(val *RedisConnectionResponse) *NullableRedisConnectionResponse { + return &NullableRedisConnectionResponse{value: val, isSet: true} +} + +func (v NullableRedisConnectionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRedisConnectionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_remote_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_remote_response.go new file mode 100644 index 0000000000..147b176d99 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_remote_response.go @@ -0,0 +1,959 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RemoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RemoteResponse{} + +// RemoteResponse Every remote defined by a plugin should have a Remote serializer that inherits from this class. Please import from `pulpcore.plugin.serializers` rather than from this module directly. +type RemoteResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *PolicyDb6Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RemoteResponse RemoteResponse + +// NewRemoteResponse instantiates a new RemoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRemoteResponse(name string, url string) *RemoteResponse { + this := RemoteResponse{} + this.Name = name + this.Url = url + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewRemoteResponseWithDefaults instantiates a new RemoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRemoteResponseWithDefaults() *RemoteResponse { + this := RemoteResponse{} + var policy PolicyDb6Enum = POLICYDB6ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RemoteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RemoteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RemoteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RemoteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RemoteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RemoteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *RemoteResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RemoteResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RemoteResponse) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *RemoteResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *RemoteResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *RemoteResponse) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RemoteResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RemoteResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *RemoteResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *RemoteResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *RemoteResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *RemoteResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RemoteResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RemoteResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *RemoteResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *RemoteResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *RemoteResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *RemoteResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *RemoteResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoteResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *RemoteResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *RemoteResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RemoteResponse) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RemoteResponse) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *RemoteResponse) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *RemoteResponse) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *RemoteResponse) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *RemoteResponse) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *RemoteResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoteResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *RemoteResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *RemoteResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *RemoteResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoteResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *RemoteResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *RemoteResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RemoteResponse) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RemoteResponse) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *RemoteResponse) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *RemoteResponse) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *RemoteResponse) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *RemoteResponse) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RemoteResponse) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RemoteResponse) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *RemoteResponse) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *RemoteResponse) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *RemoteResponse) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *RemoteResponse) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *RemoteResponse) GetPolicy() PolicyDb6Enum { + if o == nil || IsNil(o.Policy) { + var ret PolicyDb6Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoteResponse) GetPolicyOk() (*PolicyDb6Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *RemoteResponse) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given PolicyDb6Enum and assigns it to the Policy field. +func (o *RemoteResponse) SetPolicy(v PolicyDb6Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RemoteResponse) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RemoteResponse) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *RemoteResponse) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *RemoteResponse) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *RemoteResponse) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *RemoteResponse) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RemoteResponse) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RemoteResponse) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *RemoteResponse) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *RemoteResponse) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *RemoteResponse) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *RemoteResponse) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RemoteResponse) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RemoteResponse) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *RemoteResponse) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *RemoteResponse) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *RemoteResponse) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *RemoteResponse) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RemoteResponse) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RemoteResponse) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *RemoteResponse) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *RemoteResponse) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *RemoteResponse) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *RemoteResponse) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *RemoteResponse) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoteResponse) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *RemoteResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *RemoteResponse) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RemoteResponse) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RemoteResponse) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *RemoteResponse) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *RemoteResponse) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *RemoteResponse) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *RemoteResponse) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *RemoteResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoteResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *RemoteResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *RemoteResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +func (o RemoteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RemoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RemoteResponse) UnmarshalJSON(bytes []byte) (err error) { + varRemoteResponse := _RemoteResponse{} + + if err = json.Unmarshal(bytes, &varRemoteResponse); err == nil { + *o = RemoteResponse(varRemoteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "hidden_fields") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRemoteResponse struct { + value *RemoteResponse + isSet bool +} + +func (v NullableRemoteResponse) Get() *RemoteResponse { + return v.value +} + +func (v *NullableRemoteResponse) Set(val *RemoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRemoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRemoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRemoteResponse(val *RemoteResponse) *NullableRemoteResponse { + return &NullableRemoteResponse{value: val, isSet: true} +} + +func (v NullableRemoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRemoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_remote_response_hidden_fields_inner.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_remote_response_hidden_fields_inner.go new file mode 100644 index 0000000000..8586061ba8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_remote_response_hidden_fields_inner.go @@ -0,0 +1,189 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RemoteResponseHiddenFieldsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RemoteResponseHiddenFieldsInner{} + +// RemoteResponseHiddenFieldsInner struct for RemoteResponseHiddenFieldsInner +type RemoteResponseHiddenFieldsInner struct { + Name *string `json:"name,omitempty"` + IsSet *bool `json:"is_set,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RemoteResponseHiddenFieldsInner RemoteResponseHiddenFieldsInner + +// NewRemoteResponseHiddenFieldsInner instantiates a new RemoteResponseHiddenFieldsInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRemoteResponseHiddenFieldsInner() *RemoteResponseHiddenFieldsInner { + this := RemoteResponseHiddenFieldsInner{} + return &this +} + +// NewRemoteResponseHiddenFieldsInnerWithDefaults instantiates a new RemoteResponseHiddenFieldsInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRemoteResponseHiddenFieldsInnerWithDefaults() *RemoteResponseHiddenFieldsInner { + this := RemoteResponseHiddenFieldsInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *RemoteResponseHiddenFieldsInner) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoteResponseHiddenFieldsInner) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *RemoteResponseHiddenFieldsInner) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *RemoteResponseHiddenFieldsInner) SetName(v string) { + o.Name = &v +} + +// GetIsSet returns the IsSet field value if set, zero value otherwise. +func (o *RemoteResponseHiddenFieldsInner) GetIsSet() bool { + if o == nil || IsNil(o.IsSet) { + var ret bool + return ret + } + return *o.IsSet +} + +// GetIsSetOk returns a tuple with the IsSet field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoteResponseHiddenFieldsInner) GetIsSetOk() (*bool, bool) { + if o == nil || IsNil(o.IsSet) { + return nil, false + } + return o.IsSet, true +} + +// HasIsSet returns a boolean if a field has been set. +func (o *RemoteResponseHiddenFieldsInner) HasIsSet() bool { + if o != nil && !IsNil(o.IsSet) { + return true + } + + return false +} + +// SetIsSet gets a reference to the given bool and assigns it to the IsSet field. +func (o *RemoteResponseHiddenFieldsInner) SetIsSet(v bool) { + o.IsSet = &v +} + +func (o RemoteResponseHiddenFieldsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RemoteResponseHiddenFieldsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.IsSet) { + toSerialize["is_set"] = o.IsSet + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RemoteResponseHiddenFieldsInner) UnmarshalJSON(bytes []byte) (err error) { + varRemoteResponseHiddenFieldsInner := _RemoteResponseHiddenFieldsInner{} + + if err = json.Unmarshal(bytes, &varRemoteResponseHiddenFieldsInner); err == nil { + *o = RemoteResponseHiddenFieldsInner(varRemoteResponseHiddenFieldsInner) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "is_set") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRemoteResponseHiddenFieldsInner struct { + value *RemoteResponseHiddenFieldsInner + isSet bool +} + +func (v NullableRemoteResponseHiddenFieldsInner) Get() *RemoteResponseHiddenFieldsInner { + return v.value +} + +func (v *NullableRemoteResponseHiddenFieldsInner) Set(val *RemoteResponseHiddenFieldsInner) { + v.value = val + v.isSet = true +} + +func (v NullableRemoteResponseHiddenFieldsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableRemoteResponseHiddenFieldsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRemoteResponseHiddenFieldsInner(val *RemoteResponseHiddenFieldsInner) *NullableRemoteResponseHiddenFieldsInner { + return &NullableRemoteResponseHiddenFieldsInner{value: val, isSet: true} +} + +func (v NullableRemoteResponseHiddenFieldsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRemoteResponseHiddenFieldsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_remove_image.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_remove_image.go new file mode 100644 index 0000000000..08f0748266 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_remove_image.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RemoveImage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RemoveImage{} + +// RemoveImage A serializer for parsing and validating data associated with the image removal. +type RemoveImage struct { + // sha256 of the Manifest file + Digest string `json:"digest"` + AdditionalProperties map[string]interface{} +} + +type _RemoveImage RemoveImage + +// NewRemoveImage instantiates a new RemoveImage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRemoveImage(digest string) *RemoveImage { + this := RemoveImage{} + this.Digest = digest + return &this +} + +// NewRemoveImageWithDefaults instantiates a new RemoveImage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRemoveImageWithDefaults() *RemoveImage { + this := RemoveImage{} + return &this +} + +// GetDigest returns the Digest field value +func (o *RemoveImage) GetDigest() string { + if o == nil { + var ret string + return ret + } + + return o.Digest +} + +// GetDigestOk returns a tuple with the Digest field value +// and a boolean to check if the value has been set. +func (o *RemoveImage) GetDigestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Digest, true +} + +// SetDigest sets field value +func (o *RemoveImage) SetDigest(v string) { + o.Digest = v +} + +func (o RemoveImage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RemoveImage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["digest"] = o.Digest + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RemoveImage) UnmarshalJSON(bytes []byte) (err error) { + varRemoveImage := _RemoveImage{} + + if err = json.Unmarshal(bytes, &varRemoveImage); err == nil { + *o = RemoveImage(varRemoveImage) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "digest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRemoveImage struct { + value *RemoveImage + isSet bool +} + +func (v NullableRemoveImage) Get() *RemoveImage { + return v.value +} + +func (v *NullableRemoveImage) Set(val *RemoveImage) { + v.value = val + v.isSet = true +} + +func (v NullableRemoveImage) IsSet() bool { + return v.isSet +} + +func (v *NullableRemoveImage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRemoveImage(val *RemoveImage) *NullableRemoveImage { + return &NullableRemoveImage{value: val, isSet: true} +} + +func (v NullableRemoveImage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRemoveImage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_remove_signatures.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_remove_signatures.go new file mode 100644 index 0000000000..89a7edd5c8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_remove_signatures.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RemoveSignatures type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RemoveSignatures{} + +// RemoveSignatures A serializer for parsing and validating data associated with the signatures removal. +type RemoveSignatures struct { + // key_id of the key the signatures were produced with + SignedWithKeyId string `json:"signed_with_key_id"` + AdditionalProperties map[string]interface{} +} + +type _RemoveSignatures RemoveSignatures + +// NewRemoveSignatures instantiates a new RemoveSignatures object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRemoveSignatures(signedWithKeyId string) *RemoveSignatures { + this := RemoveSignatures{} + this.SignedWithKeyId = signedWithKeyId + return &this +} + +// NewRemoveSignaturesWithDefaults instantiates a new RemoveSignatures object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRemoveSignaturesWithDefaults() *RemoveSignatures { + this := RemoveSignatures{} + return &this +} + +// GetSignedWithKeyId returns the SignedWithKeyId field value +func (o *RemoveSignatures) GetSignedWithKeyId() string { + if o == nil { + var ret string + return ret + } + + return o.SignedWithKeyId +} + +// GetSignedWithKeyIdOk returns a tuple with the SignedWithKeyId field value +// and a boolean to check if the value has been set. +func (o *RemoveSignatures) GetSignedWithKeyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SignedWithKeyId, true +} + +// SetSignedWithKeyId sets field value +func (o *RemoveSignatures) SetSignedWithKeyId(v string) { + o.SignedWithKeyId = v +} + +func (o RemoveSignatures) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RemoveSignatures) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["signed_with_key_id"] = o.SignedWithKeyId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RemoveSignatures) UnmarshalJSON(bytes []byte) (err error) { + varRemoveSignatures := _RemoveSignatures{} + + if err = json.Unmarshal(bytes, &varRemoveSignatures); err == nil { + *o = RemoveSignatures(varRemoveSignatures) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "signed_with_key_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRemoveSignatures struct { + value *RemoveSignatures + isSet bool +} + +func (v NullableRemoveSignatures) Get() *RemoveSignatures { + return v.value +} + +func (v *NullableRemoveSignatures) Set(val *RemoveSignatures) { + v.value = val + v.isSet = true +} + +func (v NullableRemoveSignatures) IsSet() bool { + return v.isSet +} + +func (v *NullableRemoveSignatures) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRemoveSignatures(val *RemoveSignatures) *NullableRemoveSignatures { + return &NullableRemoveSignatures{value: val, isSet: true} +} + +func (v NullableRemoveSignatures) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRemoveSignatures) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_remove_signatures_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_remove_signatures_response.go new file mode 100644 index 0000000000..be3aae149c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_remove_signatures_response.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RemoveSignaturesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RemoveSignaturesResponse{} + +// RemoveSignaturesResponse A serializer for parsing and validating data associated with the signatures removal. +type RemoveSignaturesResponse struct { + // key_id of the key the signatures were produced with + SignedWithKeyId string `json:"signed_with_key_id"` + AdditionalProperties map[string]interface{} +} + +type _RemoveSignaturesResponse RemoveSignaturesResponse + +// NewRemoveSignaturesResponse instantiates a new RemoveSignaturesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRemoveSignaturesResponse(signedWithKeyId string) *RemoveSignaturesResponse { + this := RemoveSignaturesResponse{} + this.SignedWithKeyId = signedWithKeyId + return &this +} + +// NewRemoveSignaturesResponseWithDefaults instantiates a new RemoveSignaturesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRemoveSignaturesResponseWithDefaults() *RemoveSignaturesResponse { + this := RemoveSignaturesResponse{} + return &this +} + +// GetSignedWithKeyId returns the SignedWithKeyId field value +func (o *RemoveSignaturesResponse) GetSignedWithKeyId() string { + if o == nil { + var ret string + return ret + } + + return o.SignedWithKeyId +} + +// GetSignedWithKeyIdOk returns a tuple with the SignedWithKeyId field value +// and a boolean to check if the value has been set. +func (o *RemoveSignaturesResponse) GetSignedWithKeyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SignedWithKeyId, true +} + +// SetSignedWithKeyId sets field value +func (o *RemoveSignaturesResponse) SetSignedWithKeyId(v string) { + o.SignedWithKeyId = v +} + +func (o RemoveSignaturesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RemoveSignaturesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["signed_with_key_id"] = o.SignedWithKeyId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RemoveSignaturesResponse) UnmarshalJSON(bytes []byte) (err error) { + varRemoveSignaturesResponse := _RemoveSignaturesResponse{} + + if err = json.Unmarshal(bytes, &varRemoveSignaturesResponse); err == nil { + *o = RemoveSignaturesResponse(varRemoveSignaturesResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "signed_with_key_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRemoveSignaturesResponse struct { + value *RemoveSignaturesResponse + isSet bool +} + +func (v NullableRemoveSignaturesResponse) Get() *RemoveSignaturesResponse { + return v.value +} + +func (v *NullableRemoveSignaturesResponse) Set(val *RemoveSignaturesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRemoveSignaturesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRemoveSignaturesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRemoveSignaturesResponse(val *RemoveSignaturesResponse) *NullableRemoveSignaturesResponse { + return &NullableRemoveSignaturesResponse{value: val, isSet: true} +} + +func (v NullableRemoveSignaturesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRemoveSignaturesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_repair.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repair.go new file mode 100644 index 0000000000..2736373d54 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repair.go @@ -0,0 +1,157 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the Repair type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Repair{} + +// Repair struct for Repair +type Repair struct { + // Will verify that the checksum of all stored files matches what saved in the database. Otherwise only the existence of the files will be checked. Enabled by default + VerifyChecksums *bool `json:"verify_checksums,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Repair Repair + +// NewRepair instantiates a new Repair object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepair() *Repair { + this := Repair{} + var verifyChecksums bool = true + this.VerifyChecksums = &verifyChecksums + return &this +} + +// NewRepairWithDefaults instantiates a new Repair object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepairWithDefaults() *Repair { + this := Repair{} + var verifyChecksums bool = true + this.VerifyChecksums = &verifyChecksums + return &this +} + +// GetVerifyChecksums returns the VerifyChecksums field value if set, zero value otherwise. +func (o *Repair) GetVerifyChecksums() bool { + if o == nil || IsNil(o.VerifyChecksums) { + var ret bool + return ret + } + return *o.VerifyChecksums +} + +// GetVerifyChecksumsOk returns a tuple with the VerifyChecksums field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Repair) GetVerifyChecksumsOk() (*bool, bool) { + if o == nil || IsNil(o.VerifyChecksums) { + return nil, false + } + return o.VerifyChecksums, true +} + +// HasVerifyChecksums returns a boolean if a field has been set. +func (o *Repair) HasVerifyChecksums() bool { + if o != nil && !IsNil(o.VerifyChecksums) { + return true + } + + return false +} + +// SetVerifyChecksums gets a reference to the given bool and assigns it to the VerifyChecksums field. +func (o *Repair) SetVerifyChecksums(v bool) { + o.VerifyChecksums = &v +} + +func (o Repair) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Repair) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.VerifyChecksums) { + toSerialize["verify_checksums"] = o.VerifyChecksums + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Repair) UnmarshalJSON(bytes []byte) (err error) { + varRepair := _Repair{} + + if err = json.Unmarshal(bytes, &varRepair); err == nil { + *o = Repair(varRepair) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "verify_checksums") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepair struct { + value *Repair + isSet bool +} + +func (v NullableRepair) Get() *Repair { + return v.value +} + +func (v *NullableRepair) Set(val *Repair) { + v.value = val + v.isSet = true +} + +func (v NullableRepair) IsSet() bool { + return v.isSet +} + +func (v *NullableRepair) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepair(val *Repair) *NullableRepair { + return &NullableRepair{value: val, isSet: true} +} + +func (v NullableRepair) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepair) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_repo_metadata_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repo_metadata_response.go new file mode 100644 index 0000000000..e1e54b40b8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repo_metadata_response.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RepoMetadataResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepoMetadataResponse{} + +// RepoMetadataResponse A serializer to display RepositoryVersion metadata. +type RepoMetadataResponse struct { + Published time.Time `json:"published"` + AdditionalProperties map[string]interface{} +} + +type _RepoMetadataResponse RepoMetadataResponse + +// NewRepoMetadataResponse instantiates a new RepoMetadataResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepoMetadataResponse(published time.Time) *RepoMetadataResponse { + this := RepoMetadataResponse{} + this.Published = published + return &this +} + +// NewRepoMetadataResponseWithDefaults instantiates a new RepoMetadataResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepoMetadataResponseWithDefaults() *RepoMetadataResponse { + this := RepoMetadataResponse{} + return &this +} + +// GetPublished returns the Published field value +func (o *RepoMetadataResponse) GetPublished() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Published +} + +// GetPublishedOk returns a tuple with the Published field value +// and a boolean to check if the value has been set. +func (o *RepoMetadataResponse) GetPublishedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Published, true +} + +// SetPublished sets field value +func (o *RepoMetadataResponse) SetPublished(v time.Time) { + o.Published = v +} + +func (o RepoMetadataResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepoMetadataResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["published"] = o.Published + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepoMetadataResponse) UnmarshalJSON(bytes []byte) (err error) { + varRepoMetadataResponse := _RepoMetadataResponse{} + + if err = json.Unmarshal(bytes, &varRepoMetadataResponse); err == nil { + *o = RepoMetadataResponse(varRepoMetadataResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "published") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepoMetadataResponse struct { + value *RepoMetadataResponse + isSet bool +} + +func (v NullableRepoMetadataResponse) Get() *RepoMetadataResponse { + return v.value +} + +func (v *NullableRepoMetadataResponse) Set(val *RepoMetadataResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRepoMetadataResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRepoMetadataResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepoMetadataResponse(val *RepoMetadataResponse) *NullableRepoMetadataResponse { + return &NullableRepoMetadataResponse{value: val, isSet: true} +} + +func (v NullableRepoMetadataResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepoMetadataResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository.go new file mode 100644 index 0000000000..11b23a726e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository.go @@ -0,0 +1,325 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the Repository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Repository{} + +// Repository Base serializer for use with :class:`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. +type Repository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Repository Repository + +// NewRepository instantiates a new Repository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepository(name string) *Repository { + this := Repository{} + this.Name = name + return &this +} + +// NewRepositoryWithDefaults instantiates a new Repository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryWithDefaults() *Repository { + this := Repository{} + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *Repository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Repository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *Repository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *Repository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *Repository) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Repository) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Repository) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Repository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Repository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *Repository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *Repository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *Repository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *Repository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Repository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Repository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *Repository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *Repository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *Repository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *Repository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Repository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Repository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *Repository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *Repository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *Repository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *Repository) UnsetRemote() { + o.Remote.Unset() +} + +func (o Repository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Repository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Repository) UnmarshalJSON(bytes []byte) (err error) { + varRepository := _Repository{} + + if err = json.Unmarshal(bytes, &varRepository); err == nil { + *o = Repository(varRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepository struct { + value *Repository + isSet bool +} + +func (v NullableRepository) Get() *Repository { + return v.value +} + +func (v *NullableRepository) Set(val *Repository) { + v.value = val + v.isSet = true +} + +func (v NullableRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepository(val *Repository) *NullableRepository { + return &NullableRepository{value: val, isSet: true} +} + +func (v NullableRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_add_cached_content.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_add_cached_content.go new file mode 100644 index 0000000000..d1572526bc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_add_cached_content.go @@ -0,0 +1,153 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RepositoryAddCachedContent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryAddCachedContent{} + +// RepositoryAddCachedContent A mixin for validating unknown serializers' fields. +type RepositoryAddCachedContent struct { + // A remote to use to identify content that was cached. This will override a remote set on repository. + Remote *string `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryAddCachedContent RepositoryAddCachedContent + +// NewRepositoryAddCachedContent instantiates a new RepositoryAddCachedContent object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryAddCachedContent() *RepositoryAddCachedContent { + this := RepositoryAddCachedContent{} + return &this +} + +// NewRepositoryAddCachedContentWithDefaults instantiates a new RepositoryAddCachedContent object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryAddCachedContentWithDefaults() *RepositoryAddCachedContent { + this := RepositoryAddCachedContent{} + return &this +} + +// GetRemote returns the Remote field value if set, zero value otherwise. +func (o *RepositoryAddCachedContent) GetRemote() string { + if o == nil || IsNil(o.Remote) { + var ret string + return ret + } + return *o.Remote +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryAddCachedContent) GetRemoteOk() (*string, bool) { + if o == nil || IsNil(o.Remote) { + return nil, false + } + return o.Remote, true +} + +// HasRemote returns a boolean if a field has been set. +func (o *RepositoryAddCachedContent) HasRemote() bool { + if o != nil && !IsNil(o.Remote) { + return true + } + + return false +} + +// SetRemote gets a reference to the given string and assigns it to the Remote field. +func (o *RepositoryAddCachedContent) SetRemote(v string) { + o.Remote = &v +} + +func (o RepositoryAddCachedContent) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryAddCachedContent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Remote) { + toSerialize["remote"] = o.Remote + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryAddCachedContent) UnmarshalJSON(bytes []byte) (err error) { + varRepositoryAddCachedContent := _RepositoryAddCachedContent{} + + if err = json.Unmarshal(bytes, &varRepositoryAddCachedContent); err == nil { + *o = RepositoryAddCachedContent(varRepositoryAddCachedContent) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryAddCachedContent struct { + value *RepositoryAddCachedContent + isSet bool +} + +func (v NullableRepositoryAddCachedContent) Get() *RepositoryAddCachedContent { + return v.value +} + +func (v *NullableRepositoryAddCachedContent) Set(val *RepositoryAddCachedContent) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryAddCachedContent) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryAddCachedContent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryAddCachedContent(val *RepositoryAddCachedContent) *NullableRepositoryAddCachedContent { + return &NullableRepositoryAddCachedContent{value: val, isSet: true} +} + +func (v NullableRepositoryAddCachedContent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryAddCachedContent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_add_remove_content.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_add_remove_content.go new file mode 100644 index 0000000000..6cd0898833 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_add_remove_content.go @@ -0,0 +1,229 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RepositoryAddRemoveContent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryAddRemoveContent{} + +// RepositoryAddRemoveContent Base serializer for use with :class:`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. +type RepositoryAddRemoveContent struct { + // A list of content units to add to a new repository version. This content is added after remove_content_units are removed. + AddContentUnits []string `json:"add_content_units,omitempty"` + // A list of content units to remove from the latest repository version. You may also specify '*' as an entry to remove all content. This content is removed before add_content_units are added. + RemoveContentUnits []string `json:"remove_content_units,omitempty"` + // A repository version whose content will be used as the initial set of content for the new repository version + BaseVersion *string `json:"base_version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryAddRemoveContent RepositoryAddRemoveContent + +// NewRepositoryAddRemoveContent instantiates a new RepositoryAddRemoveContent object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryAddRemoveContent() *RepositoryAddRemoveContent { + this := RepositoryAddRemoveContent{} + return &this +} + +// NewRepositoryAddRemoveContentWithDefaults instantiates a new RepositoryAddRemoveContent object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryAddRemoveContentWithDefaults() *RepositoryAddRemoveContent { + this := RepositoryAddRemoveContent{} + return &this +} + +// GetAddContentUnits returns the AddContentUnits field value if set, zero value otherwise. +func (o *RepositoryAddRemoveContent) GetAddContentUnits() []string { + if o == nil || IsNil(o.AddContentUnits) { + var ret []string + return ret + } + return o.AddContentUnits +} + +// GetAddContentUnitsOk returns a tuple with the AddContentUnits field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryAddRemoveContent) GetAddContentUnitsOk() ([]string, bool) { + if o == nil || IsNil(o.AddContentUnits) { + return nil, false + } + return o.AddContentUnits, true +} + +// HasAddContentUnits returns a boolean if a field has been set. +func (o *RepositoryAddRemoveContent) HasAddContentUnits() bool { + if o != nil && !IsNil(o.AddContentUnits) { + return true + } + + return false +} + +// SetAddContentUnits gets a reference to the given []string and assigns it to the AddContentUnits field. +func (o *RepositoryAddRemoveContent) SetAddContentUnits(v []string) { + o.AddContentUnits = v +} + +// GetRemoveContentUnits returns the RemoveContentUnits field value if set, zero value otherwise. +func (o *RepositoryAddRemoveContent) GetRemoveContentUnits() []string { + if o == nil || IsNil(o.RemoveContentUnits) { + var ret []string + return ret + } + return o.RemoveContentUnits +} + +// GetRemoveContentUnitsOk returns a tuple with the RemoveContentUnits field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryAddRemoveContent) GetRemoveContentUnitsOk() ([]string, bool) { + if o == nil || IsNil(o.RemoveContentUnits) { + return nil, false + } + return o.RemoveContentUnits, true +} + +// HasRemoveContentUnits returns a boolean if a field has been set. +func (o *RepositoryAddRemoveContent) HasRemoveContentUnits() bool { + if o != nil && !IsNil(o.RemoveContentUnits) { + return true + } + + return false +} + +// SetRemoveContentUnits gets a reference to the given []string and assigns it to the RemoveContentUnits field. +func (o *RepositoryAddRemoveContent) SetRemoveContentUnits(v []string) { + o.RemoveContentUnits = v +} + +// GetBaseVersion returns the BaseVersion field value if set, zero value otherwise. +func (o *RepositoryAddRemoveContent) GetBaseVersion() string { + if o == nil || IsNil(o.BaseVersion) { + var ret string + return ret + } + return *o.BaseVersion +} + +// GetBaseVersionOk returns a tuple with the BaseVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryAddRemoveContent) GetBaseVersionOk() (*string, bool) { + if o == nil || IsNil(o.BaseVersion) { + return nil, false + } + return o.BaseVersion, true +} + +// HasBaseVersion returns a boolean if a field has been set. +func (o *RepositoryAddRemoveContent) HasBaseVersion() bool { + if o != nil && !IsNil(o.BaseVersion) { + return true + } + + return false +} + +// SetBaseVersion gets a reference to the given string and assigns it to the BaseVersion field. +func (o *RepositoryAddRemoveContent) SetBaseVersion(v string) { + o.BaseVersion = &v +} + +func (o RepositoryAddRemoveContent) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryAddRemoveContent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AddContentUnits) { + toSerialize["add_content_units"] = o.AddContentUnits + } + if !IsNil(o.RemoveContentUnits) { + toSerialize["remove_content_units"] = o.RemoveContentUnits + } + if !IsNil(o.BaseVersion) { + toSerialize["base_version"] = o.BaseVersion + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryAddRemoveContent) UnmarshalJSON(bytes []byte) (err error) { + varRepositoryAddRemoveContent := _RepositoryAddRemoveContent{} + + if err = json.Unmarshal(bytes, &varRepositoryAddRemoveContent); err == nil { + *o = RepositoryAddRemoveContent(varRepositoryAddRemoveContent) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "add_content_units") + delete(additionalProperties, "remove_content_units") + delete(additionalProperties, "base_version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryAddRemoveContent struct { + value *RepositoryAddRemoveContent + isSet bool +} + +func (v NullableRepositoryAddRemoveContent) Get() *RepositoryAddRemoveContent { + return v.value +} + +func (v *NullableRepositoryAddRemoveContent) Set(val *RepositoryAddRemoveContent) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryAddRemoveContent) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryAddRemoveContent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryAddRemoveContent(val *RepositoryAddRemoveContent) *NullableRepositoryAddRemoveContent { + return &NullableRepositoryAddRemoveContent{value: val, isSet: true} +} + +func (v NullableRepositoryAddRemoveContent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryAddRemoveContent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_response.go new file mode 100644 index 0000000000..9432ceef66 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_response.go @@ -0,0 +1,475 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RepositoryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryResponse{} + +// RepositoryResponse Base serializer for use with :class:`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. +type RepositoryResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + VersionsHref *string `json:"versions_href,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + LatestVersionHref *string `json:"latest_version_href,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryResponse RepositoryResponse + +// NewRepositoryResponse instantiates a new RepositoryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryResponse(name string) *RepositoryResponse { + this := RepositoryResponse{} + this.Name = name + return &this +} + +// NewRepositoryResponseWithDefaults instantiates a new RepositoryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryResponseWithDefaults() *RepositoryResponse { + this := RepositoryResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RepositoryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RepositoryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RepositoryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RepositoryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RepositoryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RepositoryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetVersionsHref returns the VersionsHref field value if set, zero value otherwise. +func (o *RepositoryResponse) GetVersionsHref() string { + if o == nil || IsNil(o.VersionsHref) { + var ret string + return ret + } + return *o.VersionsHref +} + +// GetVersionsHrefOk returns a tuple with the VersionsHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryResponse) GetVersionsHrefOk() (*string, bool) { + if o == nil || IsNil(o.VersionsHref) { + return nil, false + } + return o.VersionsHref, true +} + +// HasVersionsHref returns a boolean if a field has been set. +func (o *RepositoryResponse) HasVersionsHref() bool { + if o != nil && !IsNil(o.VersionsHref) { + return true + } + + return false +} + +// SetVersionsHref gets a reference to the given string and assigns it to the VersionsHref field. +func (o *RepositoryResponse) SetVersionsHref(v string) { + o.VersionsHref = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *RepositoryResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *RepositoryResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *RepositoryResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetLatestVersionHref returns the LatestVersionHref field value if set, zero value otherwise. +func (o *RepositoryResponse) GetLatestVersionHref() string { + if o == nil || IsNil(o.LatestVersionHref) { + var ret string + return ret + } + return *o.LatestVersionHref +} + +// GetLatestVersionHrefOk returns a tuple with the LatestVersionHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryResponse) GetLatestVersionHrefOk() (*string, bool) { + if o == nil || IsNil(o.LatestVersionHref) { + return nil, false + } + return o.LatestVersionHref, true +} + +// HasLatestVersionHref returns a boolean if a field has been set. +func (o *RepositoryResponse) HasLatestVersionHref() bool { + if o != nil && !IsNil(o.LatestVersionHref) { + return true + } + + return false +} + +// SetLatestVersionHref gets a reference to the given string and assigns it to the LatestVersionHref field. +func (o *RepositoryResponse) SetLatestVersionHref(v string) { + o.LatestVersionHref = &v +} + +// GetName returns the Name field value +func (o *RepositoryResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RepositoryResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RepositoryResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RepositoryResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RepositoryResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *RepositoryResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *RepositoryResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *RepositoryResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *RepositoryResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RepositoryResponse) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RepositoryResponse) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *RepositoryResponse) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *RepositoryResponse) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *RepositoryResponse) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *RepositoryResponse) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RepositoryResponse) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RepositoryResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *RepositoryResponse) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *RepositoryResponse) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *RepositoryResponse) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *RepositoryResponse) UnsetRemote() { + o.Remote.Unset() +} + +func (o RepositoryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.VersionsHref) { + toSerialize["versions_href"] = o.VersionsHref + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.LatestVersionHref) { + toSerialize["latest_version_href"] = o.LatestVersionHref + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryResponse) UnmarshalJSON(bytes []byte) (err error) { + varRepositoryResponse := _RepositoryResponse{} + + if err = json.Unmarshal(bytes, &varRepositoryResponse); err == nil { + *o = RepositoryResponse(varRepositoryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "versions_href") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "latest_version_href") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryResponse struct { + value *RepositoryResponse + isSet bool +} + +func (v NullableRepositoryResponse) Get() *RepositoryResponse { + return v.value +} + +func (v *NullableRepositoryResponse) Set(val *RepositoryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryResponse(val *RepositoryResponse) *NullableRepositoryResponse { + return &NullableRepositoryResponse{value: val, isSet: true} +} + +func (v NullableRepositoryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_sign.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_sign.go new file mode 100644 index 0000000000..b119115a50 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_sign.go @@ -0,0 +1,239 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RepositorySign type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositorySign{} + +// RepositorySign Serializer for container images signing. +type RepositorySign struct { + // A signing service to sign with. This will override a signing service set on the repo. + ManifestSigningService NullableString `json:"manifest_signing_service,omitempty"` + // Future base path content will be distributed at for sync repos + FutureBasePath *string `json:"future_base_path,omitempty"` + // A list of tags to sign. + TagsList []interface{} `json:"tags_list,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositorySign RepositorySign + +// NewRepositorySign instantiates a new RepositorySign object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositorySign() *RepositorySign { + this := RepositorySign{} + return &this +} + +// NewRepositorySignWithDefaults instantiates a new RepositorySign object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositorySignWithDefaults() *RepositorySign { + this := RepositorySign{} + return &this +} + +// GetManifestSigningService returns the ManifestSigningService field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RepositorySign) GetManifestSigningService() string { + if o == nil || IsNil(o.ManifestSigningService.Get()) { + var ret string + return ret + } + return *o.ManifestSigningService.Get() +} + +// GetManifestSigningServiceOk returns a tuple with the ManifestSigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RepositorySign) GetManifestSigningServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ManifestSigningService.Get(), o.ManifestSigningService.IsSet() +} + +// HasManifestSigningService returns a boolean if a field has been set. +func (o *RepositorySign) HasManifestSigningService() bool { + if o != nil && o.ManifestSigningService.IsSet() { + return true + } + + return false +} + +// SetManifestSigningService gets a reference to the given NullableString and assigns it to the ManifestSigningService field. +func (o *RepositorySign) SetManifestSigningService(v string) { + o.ManifestSigningService.Set(&v) +} +// SetManifestSigningServiceNil sets the value for ManifestSigningService to be an explicit nil +func (o *RepositorySign) SetManifestSigningServiceNil() { + o.ManifestSigningService.Set(nil) +} + +// UnsetManifestSigningService ensures that no value is present for ManifestSigningService, not even an explicit nil +func (o *RepositorySign) UnsetManifestSigningService() { + o.ManifestSigningService.Unset() +} + +// GetFutureBasePath returns the FutureBasePath field value if set, zero value otherwise. +func (o *RepositorySign) GetFutureBasePath() string { + if o == nil || IsNil(o.FutureBasePath) { + var ret string + return ret + } + return *o.FutureBasePath +} + +// GetFutureBasePathOk returns a tuple with the FutureBasePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositorySign) GetFutureBasePathOk() (*string, bool) { + if o == nil || IsNil(o.FutureBasePath) { + return nil, false + } + return o.FutureBasePath, true +} + +// HasFutureBasePath returns a boolean if a field has been set. +func (o *RepositorySign) HasFutureBasePath() bool { + if o != nil && !IsNil(o.FutureBasePath) { + return true + } + + return false +} + +// SetFutureBasePath gets a reference to the given string and assigns it to the FutureBasePath field. +func (o *RepositorySign) SetFutureBasePath(v string) { + o.FutureBasePath = &v +} + +// GetTagsList returns the TagsList field value if set, zero value otherwise. +func (o *RepositorySign) GetTagsList() []interface{} { + if o == nil || IsNil(o.TagsList) { + var ret []interface{} + return ret + } + return o.TagsList +} + +// GetTagsListOk returns a tuple with the TagsList field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositorySign) GetTagsListOk() ([]interface{}, bool) { + if o == nil || IsNil(o.TagsList) { + return nil, false + } + return o.TagsList, true +} + +// HasTagsList returns a boolean if a field has been set. +func (o *RepositorySign) HasTagsList() bool { + if o != nil && !IsNil(o.TagsList) { + return true + } + + return false +} + +// SetTagsList gets a reference to the given []interface{} and assigns it to the TagsList field. +func (o *RepositorySign) SetTagsList(v []interface{}) { + o.TagsList = v +} + +func (o RepositorySign) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositorySign) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ManifestSigningService.IsSet() { + toSerialize["manifest_signing_service"] = o.ManifestSigningService.Get() + } + if !IsNil(o.FutureBasePath) { + toSerialize["future_base_path"] = o.FutureBasePath + } + if !IsNil(o.TagsList) { + toSerialize["tags_list"] = o.TagsList + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositorySign) UnmarshalJSON(bytes []byte) (err error) { + varRepositorySign := _RepositorySign{} + + if err = json.Unmarshal(bytes, &varRepositorySign); err == nil { + *o = RepositorySign(varRepositorySign) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "manifest_signing_service") + delete(additionalProperties, "future_base_path") + delete(additionalProperties, "tags_list") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositorySign struct { + value *RepositorySign + isSet bool +} + +func (v NullableRepositorySign) Get() *RepositorySign { + return v.value +} + +func (v *NullableRepositorySign) Set(val *RepositorySign) { + v.value = val + v.isSet = true +} + +func (v NullableRepositorySign) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositorySign) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositorySign(val *RepositorySign) *NullableRepositorySign { + return &NullableRepositorySign{value: val, isSet: true} +} + +func (v NullableRepositorySign) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositorySign) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_sync_url.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_sync_url.go new file mode 100644 index 0000000000..15a90ac228 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_sync_url.go @@ -0,0 +1,195 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RepositorySyncURL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositorySyncURL{} + +// RepositorySyncURL A mixin for validating unknown serializers' fields. +type RepositorySyncURL struct { + // A remote to sync from. This will override a remote set on repository. + Remote *string `json:"remote,omitempty"` + // If ``True``, synchronization will remove all content that is not present in the remote repository. If ``False``, sync will be additive only. + Mirror *bool `json:"mirror,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositorySyncURL RepositorySyncURL + +// NewRepositorySyncURL instantiates a new RepositorySyncURL object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositorySyncURL() *RepositorySyncURL { + this := RepositorySyncURL{} + var mirror bool = false + this.Mirror = &mirror + return &this +} + +// NewRepositorySyncURLWithDefaults instantiates a new RepositorySyncURL object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositorySyncURLWithDefaults() *RepositorySyncURL { + this := RepositorySyncURL{} + var mirror bool = false + this.Mirror = &mirror + return &this +} + +// GetRemote returns the Remote field value if set, zero value otherwise. +func (o *RepositorySyncURL) GetRemote() string { + if o == nil || IsNil(o.Remote) { + var ret string + return ret + } + return *o.Remote +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositorySyncURL) GetRemoteOk() (*string, bool) { + if o == nil || IsNil(o.Remote) { + return nil, false + } + return o.Remote, true +} + +// HasRemote returns a boolean if a field has been set. +func (o *RepositorySyncURL) HasRemote() bool { + if o != nil && !IsNil(o.Remote) { + return true + } + + return false +} + +// SetRemote gets a reference to the given string and assigns it to the Remote field. +func (o *RepositorySyncURL) SetRemote(v string) { + o.Remote = &v +} + +// GetMirror returns the Mirror field value if set, zero value otherwise. +func (o *RepositorySyncURL) GetMirror() bool { + if o == nil || IsNil(o.Mirror) { + var ret bool + return ret + } + return *o.Mirror +} + +// GetMirrorOk returns a tuple with the Mirror field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositorySyncURL) GetMirrorOk() (*bool, bool) { + if o == nil || IsNil(o.Mirror) { + return nil, false + } + return o.Mirror, true +} + +// HasMirror returns a boolean if a field has been set. +func (o *RepositorySyncURL) HasMirror() bool { + if o != nil && !IsNil(o.Mirror) { + return true + } + + return false +} + +// SetMirror gets a reference to the given bool and assigns it to the Mirror field. +func (o *RepositorySyncURL) SetMirror(v bool) { + o.Mirror = &v +} + +func (o RepositorySyncURL) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositorySyncURL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Remote) { + toSerialize["remote"] = o.Remote + } + if !IsNil(o.Mirror) { + toSerialize["mirror"] = o.Mirror + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositorySyncURL) UnmarshalJSON(bytes []byte) (err error) { + varRepositorySyncURL := _RepositorySyncURL{} + + if err = json.Unmarshal(bytes, &varRepositorySyncURL); err == nil { + *o = RepositorySyncURL(varRepositorySyncURL) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "remote") + delete(additionalProperties, "mirror") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositorySyncURL struct { + value *RepositorySyncURL + isSet bool +} + +func (v NullableRepositorySyncURL) Get() *RepositorySyncURL { + return v.value +} + +func (v *NullableRepositorySyncURL) Set(val *RepositorySyncURL) { + v.value = val + v.isSet = true +} + +func (v NullableRepositorySyncURL) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositorySyncURL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositorySyncURL(val *RepositorySyncURL) *NullableRepositorySyncURL { + return &NullableRepositorySyncURL{value: val, isSet: true} +} + +func (v NullableRepositorySyncURL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositorySyncURL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_version_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_version_response.go new file mode 100644 index 0000000000..6241bced7d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_version_response.go @@ -0,0 +1,340 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RepositoryVersionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryVersionResponse{} + +// RepositoryVersionResponse Base serializer for use with :class:`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. +type RepositoryVersionResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + Number *int64 `json:"number,omitempty"` + Repository *string `json:"repository,omitempty"` + // A repository version whose content was used as the initial set of content for this repository version + BaseVersion *string `json:"base_version,omitempty"` + ContentSummary *RepositoryVersionResponseContentSummary `json:"content_summary,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryVersionResponse RepositoryVersionResponse + +// NewRepositoryVersionResponse instantiates a new RepositoryVersionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryVersionResponse() *RepositoryVersionResponse { + this := RepositoryVersionResponse{} + return &this +} + +// NewRepositoryVersionResponseWithDefaults instantiates a new RepositoryVersionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryVersionResponseWithDefaults() *RepositoryVersionResponse { + this := RepositoryVersionResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RepositoryVersionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryVersionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RepositoryVersionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RepositoryVersionResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RepositoryVersionResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryVersionResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RepositoryVersionResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RepositoryVersionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetNumber returns the Number field value if set, zero value otherwise. +func (o *RepositoryVersionResponse) GetNumber() int64 { + if o == nil || IsNil(o.Number) { + var ret int64 + return ret + } + return *o.Number +} + +// GetNumberOk returns a tuple with the Number field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryVersionResponse) GetNumberOk() (*int64, bool) { + if o == nil || IsNil(o.Number) { + return nil, false + } + return o.Number, true +} + +// HasNumber returns a boolean if a field has been set. +func (o *RepositoryVersionResponse) HasNumber() bool { + if o != nil && !IsNil(o.Number) { + return true + } + + return false +} + +// SetNumber gets a reference to the given int64 and assigns it to the Number field. +func (o *RepositoryVersionResponse) SetNumber(v int64) { + o.Number = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *RepositoryVersionResponse) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryVersionResponse) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *RepositoryVersionResponse) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *RepositoryVersionResponse) SetRepository(v string) { + o.Repository = &v +} + +// GetBaseVersion returns the BaseVersion field value if set, zero value otherwise. +func (o *RepositoryVersionResponse) GetBaseVersion() string { + if o == nil || IsNil(o.BaseVersion) { + var ret string + return ret + } + return *o.BaseVersion +} + +// GetBaseVersionOk returns a tuple with the BaseVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryVersionResponse) GetBaseVersionOk() (*string, bool) { + if o == nil || IsNil(o.BaseVersion) { + return nil, false + } + return o.BaseVersion, true +} + +// HasBaseVersion returns a boolean if a field has been set. +func (o *RepositoryVersionResponse) HasBaseVersion() bool { + if o != nil && !IsNil(o.BaseVersion) { + return true + } + + return false +} + +// SetBaseVersion gets a reference to the given string and assigns it to the BaseVersion field. +func (o *RepositoryVersionResponse) SetBaseVersion(v string) { + o.BaseVersion = &v +} + +// GetContentSummary returns the ContentSummary field value if set, zero value otherwise. +func (o *RepositoryVersionResponse) GetContentSummary() RepositoryVersionResponseContentSummary { + if o == nil || IsNil(o.ContentSummary) { + var ret RepositoryVersionResponseContentSummary + return ret + } + return *o.ContentSummary +} + +// GetContentSummaryOk returns a tuple with the ContentSummary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryVersionResponse) GetContentSummaryOk() (*RepositoryVersionResponseContentSummary, bool) { + if o == nil || IsNil(o.ContentSummary) { + return nil, false + } + return o.ContentSummary, true +} + +// HasContentSummary returns a boolean if a field has been set. +func (o *RepositoryVersionResponse) HasContentSummary() bool { + if o != nil && !IsNil(o.ContentSummary) { + return true + } + + return false +} + +// SetContentSummary gets a reference to the given RepositoryVersionResponseContentSummary and assigns it to the ContentSummary field. +func (o *RepositoryVersionResponse) SetContentSummary(v RepositoryVersionResponseContentSummary) { + o.ContentSummary = &v +} + +func (o RepositoryVersionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryVersionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.Number) { + toSerialize["number"] = o.Number + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.BaseVersion) { + toSerialize["base_version"] = o.BaseVersion + } + if !IsNil(o.ContentSummary) { + toSerialize["content_summary"] = o.ContentSummary + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryVersionResponse) UnmarshalJSON(bytes []byte) (err error) { + varRepositoryVersionResponse := _RepositoryVersionResponse{} + + if err = json.Unmarshal(bytes, &varRepositoryVersionResponse); err == nil { + *o = RepositoryVersionResponse(varRepositoryVersionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "number") + delete(additionalProperties, "repository") + delete(additionalProperties, "base_version") + delete(additionalProperties, "content_summary") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryVersionResponse struct { + value *RepositoryVersionResponse + isSet bool +} + +func (v NullableRepositoryVersionResponse) Get() *RepositoryVersionResponse { + return v.value +} + +func (v *NullableRepositoryVersionResponse) Set(val *RepositoryVersionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryVersionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryVersionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryVersionResponse(val *RepositoryVersionResponse) *NullableRepositoryVersionResponse { + return &NullableRepositoryVersionResponse{value: val, isSet: true} +} + +func (v NullableRepositoryVersionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryVersionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_version_response_content_summary.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_version_response_content_summary.go new file mode 100644 index 0000000000..3b659530d1 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_repository_version_response_content_summary.go @@ -0,0 +1,199 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RepositoryVersionResponseContentSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryVersionResponseContentSummary{} + +// RepositoryVersionResponseContentSummary Various count summaries of the content in the version and the HREF to view them. +type RepositoryVersionResponseContentSummary struct { + Added map[string]map[string]interface{} `json:"added"` + Removed map[string]map[string]interface{} `json:"removed"` + Present map[string]map[string]interface{} `json:"present"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryVersionResponseContentSummary RepositoryVersionResponseContentSummary + +// NewRepositoryVersionResponseContentSummary instantiates a new RepositoryVersionResponseContentSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryVersionResponseContentSummary(added map[string]map[string]interface{}, removed map[string]map[string]interface{}, present map[string]map[string]interface{}) *RepositoryVersionResponseContentSummary { + this := RepositoryVersionResponseContentSummary{} + this.Added = added + this.Removed = removed + this.Present = present + return &this +} + +// NewRepositoryVersionResponseContentSummaryWithDefaults instantiates a new RepositoryVersionResponseContentSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryVersionResponseContentSummaryWithDefaults() *RepositoryVersionResponseContentSummary { + this := RepositoryVersionResponseContentSummary{} + return &this +} + +// GetAdded returns the Added field value +func (o *RepositoryVersionResponseContentSummary) GetAdded() map[string]map[string]interface{} { + if o == nil { + var ret map[string]map[string]interface{} + return ret + } + + return o.Added +} + +// GetAddedOk returns a tuple with the Added field value +// and a boolean to check if the value has been set. +func (o *RepositoryVersionResponseContentSummary) GetAddedOk() (map[string]map[string]interface{}, bool) { + if o == nil { + return map[string]map[string]interface{}{}, false + } + return o.Added, true +} + +// SetAdded sets field value +func (o *RepositoryVersionResponseContentSummary) SetAdded(v map[string]map[string]interface{}) { + o.Added = v +} + +// GetRemoved returns the Removed field value +func (o *RepositoryVersionResponseContentSummary) GetRemoved() map[string]map[string]interface{} { + if o == nil { + var ret map[string]map[string]interface{} + return ret + } + + return o.Removed +} + +// GetRemovedOk returns a tuple with the Removed field value +// and a boolean to check if the value has been set. +func (o *RepositoryVersionResponseContentSummary) GetRemovedOk() (map[string]map[string]interface{}, bool) { + if o == nil { + return map[string]map[string]interface{}{}, false + } + return o.Removed, true +} + +// SetRemoved sets field value +func (o *RepositoryVersionResponseContentSummary) SetRemoved(v map[string]map[string]interface{}) { + o.Removed = v +} + +// GetPresent returns the Present field value +func (o *RepositoryVersionResponseContentSummary) GetPresent() map[string]map[string]interface{} { + if o == nil { + var ret map[string]map[string]interface{} + return ret + } + + return o.Present +} + +// GetPresentOk returns a tuple with the Present field value +// and a boolean to check if the value has been set. +func (o *RepositoryVersionResponseContentSummary) GetPresentOk() (map[string]map[string]interface{}, bool) { + if o == nil { + return map[string]map[string]interface{}{}, false + } + return o.Present, true +} + +// SetPresent sets field value +func (o *RepositoryVersionResponseContentSummary) SetPresent(v map[string]map[string]interface{}) { + o.Present = v +} + +func (o RepositoryVersionResponseContentSummary) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryVersionResponseContentSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["added"] = o.Added + toSerialize["removed"] = o.Removed + toSerialize["present"] = o.Present + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryVersionResponseContentSummary) UnmarshalJSON(bytes []byte) (err error) { + varRepositoryVersionResponseContentSummary := _RepositoryVersionResponseContentSummary{} + + if err = json.Unmarshal(bytes, &varRepositoryVersionResponseContentSummary); err == nil { + *o = RepositoryVersionResponseContentSummary(varRepositoryVersionResponseContentSummary) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "added") + delete(additionalProperties, "removed") + delete(additionalProperties, "present") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryVersionResponseContentSummary struct { + value *RepositoryVersionResponseContentSummary + isSet bool +} + +func (v NullableRepositoryVersionResponseContentSummary) Get() *RepositoryVersionResponseContentSummary { + return v.value +} + +func (v *NullableRepositoryVersionResponseContentSummary) Set(val *RepositoryVersionResponseContentSummary) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryVersionResponseContentSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryVersionResponseContentSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryVersionResponseContentSummary(val *RepositoryVersionResponseContentSummary) *NullableRepositoryVersionResponseContentSummary { + return &NullableRepositoryVersionResponseContentSummary{value: val, isSet: true} +} + +func (v NullableRepositoryVersionResponseContentSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryVersionResponseContentSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_role.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_role.go new file mode 100644 index 0000000000..8665ed44cd --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_role.go @@ -0,0 +1,221 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the Role type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Role{} + +// Role Serializer for Role. +type Role struct { + // The name of this role. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // List of permissions defining the role. + Permissions []string `json:"permissions"` + AdditionalProperties map[string]interface{} +} + +type _Role Role + +// NewRole instantiates a new Role object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRole(name string, permissions []string) *Role { + this := Role{} + this.Name = name + this.Permissions = permissions + return &this +} + +// NewRoleWithDefaults instantiates a new Role object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRoleWithDefaults() *Role { + this := Role{} + return &this +} + +// GetName returns the Name field value +func (o *Role) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Role) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Role) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Role) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Role) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *Role) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *Role) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *Role) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *Role) UnsetDescription() { + o.Description.Unset() +} + +// GetPermissions returns the Permissions field value +func (o *Role) GetPermissions() []string { + if o == nil { + var ret []string + return ret + } + + return o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value +// and a boolean to check if the value has been set. +func (o *Role) GetPermissionsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Permissions, true +} + +// SetPermissions sets field value +func (o *Role) SetPermissions(v []string) { + o.Permissions = v +} + +func (o Role) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Role) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["permissions"] = o.Permissions + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Role) UnmarshalJSON(bytes []byte) (err error) { + varRole := _Role{} + + if err = json.Unmarshal(bytes, &varRole); err == nil { + *o = Role(varRole) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "permissions") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRole struct { + value *Role + isSet bool +} + +func (v NullableRole) Get() *Role { + return v.value +} + +func (v *NullableRole) Set(val *Role) { + v.value = val + v.isSet = true +} + +func (v NullableRole) IsSet() bool { + return v.isSet +} + +func (v *NullableRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRole(val *Role) *NullableRole { + return &NullableRole{value: val, isSet: true} +} + +func (v NullableRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_role_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_role_response.go new file mode 100644 index 0000000000..358bf3139d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_role_response.go @@ -0,0 +1,335 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RoleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RoleResponse{} + +// RoleResponse Serializer for Role. +type RoleResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The name of this role. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // List of permissions defining the role. + Permissions []string `json:"permissions"` + // True if the role is system managed. + Locked *bool `json:"locked,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RoleResponse RoleResponse + +// NewRoleResponse instantiates a new RoleResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRoleResponse(name string, permissions []string) *RoleResponse { + this := RoleResponse{} + this.Name = name + this.Permissions = permissions + return &this +} + +// NewRoleResponseWithDefaults instantiates a new RoleResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRoleResponseWithDefaults() *RoleResponse { + this := RoleResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RoleResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoleResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RoleResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RoleResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RoleResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoleResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RoleResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RoleResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *RoleResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RoleResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RoleResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RoleResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RoleResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *RoleResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *RoleResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *RoleResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *RoleResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetPermissions returns the Permissions field value +func (o *RoleResponse) GetPermissions() []string { + if o == nil { + var ret []string + return ret + } + + return o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value +// and a boolean to check if the value has been set. +func (o *RoleResponse) GetPermissionsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Permissions, true +} + +// SetPermissions sets field value +func (o *RoleResponse) SetPermissions(v []string) { + o.Permissions = v +} + +// GetLocked returns the Locked field value if set, zero value otherwise. +func (o *RoleResponse) GetLocked() bool { + if o == nil || IsNil(o.Locked) { + var ret bool + return ret + } + return *o.Locked +} + +// GetLockedOk returns a tuple with the Locked field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RoleResponse) GetLockedOk() (*bool, bool) { + if o == nil || IsNil(o.Locked) { + return nil, false + } + return o.Locked, true +} + +// HasLocked returns a boolean if a field has been set. +func (o *RoleResponse) HasLocked() bool { + if o != nil && !IsNil(o.Locked) { + return true + } + + return false +} + +// SetLocked gets a reference to the given bool and assigns it to the Locked field. +func (o *RoleResponse) SetLocked(v bool) { + o.Locked = &v +} + +func (o RoleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RoleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + toSerialize["permissions"] = o.Permissions + if !IsNil(o.Locked) { + toSerialize["locked"] = o.Locked + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RoleResponse) UnmarshalJSON(bytes []byte) (err error) { + varRoleResponse := _RoleResponse{} + + if err = json.Unmarshal(bytes, &varRoleResponse); err == nil { + *o = RoleResponse(varRoleResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "permissions") + delete(additionalProperties, "locked") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRoleResponse struct { + value *RoleResponse + isSet bool +} + +func (v NullableRoleResponse) Get() *RoleResponse { + return v.value +} + +func (v *NullableRoleResponse) Set(val *RoleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRoleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRoleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRoleResponse(val *RoleResponse) *NullableRoleResponse { + return &NullableRoleResponse{value: val, isSet: true} +} + +func (v NullableRoleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRoleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_distribution_tree_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_distribution_tree_response.go new file mode 100644 index 0000000000..82d5c981fe --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_distribution_tree_response.go @@ -0,0 +1,684 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RpmDistributionTreeResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmDistributionTreeResponse{} + +// RpmDistributionTreeResponse DistributionTree serializer. +type RpmDistributionTreeResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Header Version. + HeaderVersion string `json:"header_version"` + // Release name. + ReleaseName string `json:"release_name"` + // Release short name. + ReleaseShort string `json:"release_short"` + // Release version. + ReleaseVersion string `json:"release_version"` + // Typically False for an operating system, True otherwise. + ReleaseIsLayered bool `json:"release_is_layered"` + // Base Product name. + BaseProductName NullableString `json:"base_product_name"` + // Base Product short name. + BaseProductShort NullableString `json:"base_product_short"` + // Base Product version. + BaseProductVersion NullableString `json:"base_product_version"` + // Tree architecturerch. + Arch string `json:"arch"` + // Tree build time timestamp. + BuildTimestamp float64 `json:"build_timestamp"` + // Relative path to Anaconda instimage. + Instimage NullableString `json:"instimage"` + // Relative path to Anaconda stage2 image. + Mainimage NullableString `json:"mainimage"` + // Disc number. + Discnum NullableInt64 `json:"discnum"` + // Number of discs in media set. + Totaldiscs NullableInt64 `json:"totaldiscs"` + Addons []AddonResponse `json:"addons"` + Checksums []ChecksumResponse `json:"checksums"` + Images []ImageResponse `json:"images"` + Variants []VariantResponse `json:"variants"` + AdditionalProperties map[string]interface{} +} + +type _RpmDistributionTreeResponse RpmDistributionTreeResponse + +// NewRpmDistributionTreeResponse instantiates a new RpmDistributionTreeResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmDistributionTreeResponse(headerVersion string, releaseName string, releaseShort string, releaseVersion string, releaseIsLayered bool, baseProductName NullableString, baseProductShort NullableString, baseProductVersion NullableString, arch string, buildTimestamp float64, instimage NullableString, mainimage NullableString, discnum NullableInt64, totaldiscs NullableInt64, addons []AddonResponse, checksums []ChecksumResponse, images []ImageResponse, variants []VariantResponse) *RpmDistributionTreeResponse { + this := RpmDistributionTreeResponse{} + this.HeaderVersion = headerVersion + this.ReleaseName = releaseName + this.ReleaseShort = releaseShort + this.ReleaseVersion = releaseVersion + this.ReleaseIsLayered = releaseIsLayered + this.BaseProductName = baseProductName + this.BaseProductShort = baseProductShort + this.BaseProductVersion = baseProductVersion + this.Arch = arch + this.BuildTimestamp = buildTimestamp + this.Instimage = instimage + this.Mainimage = mainimage + this.Discnum = discnum + this.Totaldiscs = totaldiscs + this.Addons = addons + this.Checksums = checksums + this.Images = images + this.Variants = variants + return &this +} + +// NewRpmDistributionTreeResponseWithDefaults instantiates a new RpmDistributionTreeResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmDistributionTreeResponseWithDefaults() *RpmDistributionTreeResponse { + this := RpmDistributionTreeResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmDistributionTreeResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmDistributionTreeResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmDistributionTreeResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmDistributionTreeResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetHeaderVersion returns the HeaderVersion field value +func (o *RpmDistributionTreeResponse) GetHeaderVersion() string { + if o == nil { + var ret string + return ret + } + + return o.HeaderVersion +} + +// GetHeaderVersionOk returns a tuple with the HeaderVersion field value +// and a boolean to check if the value has been set. +func (o *RpmDistributionTreeResponse) GetHeaderVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HeaderVersion, true +} + +// SetHeaderVersion sets field value +func (o *RpmDistributionTreeResponse) SetHeaderVersion(v string) { + o.HeaderVersion = v +} + +// GetReleaseName returns the ReleaseName field value +func (o *RpmDistributionTreeResponse) GetReleaseName() string { + if o == nil { + var ret string + return ret + } + + return o.ReleaseName +} + +// GetReleaseNameOk returns a tuple with the ReleaseName field value +// and a boolean to check if the value has been set. +func (o *RpmDistributionTreeResponse) GetReleaseNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ReleaseName, true +} + +// SetReleaseName sets field value +func (o *RpmDistributionTreeResponse) SetReleaseName(v string) { + o.ReleaseName = v +} + +// GetReleaseShort returns the ReleaseShort field value +func (o *RpmDistributionTreeResponse) GetReleaseShort() string { + if o == nil { + var ret string + return ret + } + + return o.ReleaseShort +} + +// GetReleaseShortOk returns a tuple with the ReleaseShort field value +// and a boolean to check if the value has been set. +func (o *RpmDistributionTreeResponse) GetReleaseShortOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ReleaseShort, true +} + +// SetReleaseShort sets field value +func (o *RpmDistributionTreeResponse) SetReleaseShort(v string) { + o.ReleaseShort = v +} + +// GetReleaseVersion returns the ReleaseVersion field value +func (o *RpmDistributionTreeResponse) GetReleaseVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ReleaseVersion +} + +// GetReleaseVersionOk returns a tuple with the ReleaseVersion field value +// and a boolean to check if the value has been set. +func (o *RpmDistributionTreeResponse) GetReleaseVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ReleaseVersion, true +} + +// SetReleaseVersion sets field value +func (o *RpmDistributionTreeResponse) SetReleaseVersion(v string) { + o.ReleaseVersion = v +} + +// GetReleaseIsLayered returns the ReleaseIsLayered field value +func (o *RpmDistributionTreeResponse) GetReleaseIsLayered() bool { + if o == nil { + var ret bool + return ret + } + + return o.ReleaseIsLayered +} + +// GetReleaseIsLayeredOk returns a tuple with the ReleaseIsLayered field value +// and a boolean to check if the value has been set. +func (o *RpmDistributionTreeResponse) GetReleaseIsLayeredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.ReleaseIsLayered, true +} + +// SetReleaseIsLayered sets field value +func (o *RpmDistributionTreeResponse) SetReleaseIsLayered(v bool) { + o.ReleaseIsLayered = v +} + +// GetBaseProductName returns the BaseProductName field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmDistributionTreeResponse) GetBaseProductName() string { + if o == nil || o.BaseProductName.Get() == nil { + var ret string + return ret + } + + return *o.BaseProductName.Get() +} + +// GetBaseProductNameOk returns a tuple with the BaseProductName field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmDistributionTreeResponse) GetBaseProductNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.BaseProductName.Get(), o.BaseProductName.IsSet() +} + +// SetBaseProductName sets field value +func (o *RpmDistributionTreeResponse) SetBaseProductName(v string) { + o.BaseProductName.Set(&v) +} + +// GetBaseProductShort returns the BaseProductShort field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmDistributionTreeResponse) GetBaseProductShort() string { + if o == nil || o.BaseProductShort.Get() == nil { + var ret string + return ret + } + + return *o.BaseProductShort.Get() +} + +// GetBaseProductShortOk returns a tuple with the BaseProductShort field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmDistributionTreeResponse) GetBaseProductShortOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.BaseProductShort.Get(), o.BaseProductShort.IsSet() +} + +// SetBaseProductShort sets field value +func (o *RpmDistributionTreeResponse) SetBaseProductShort(v string) { + o.BaseProductShort.Set(&v) +} + +// GetBaseProductVersion returns the BaseProductVersion field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmDistributionTreeResponse) GetBaseProductVersion() string { + if o == nil || o.BaseProductVersion.Get() == nil { + var ret string + return ret + } + + return *o.BaseProductVersion.Get() +} + +// GetBaseProductVersionOk returns a tuple with the BaseProductVersion field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmDistributionTreeResponse) GetBaseProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.BaseProductVersion.Get(), o.BaseProductVersion.IsSet() +} + +// SetBaseProductVersion sets field value +func (o *RpmDistributionTreeResponse) SetBaseProductVersion(v string) { + o.BaseProductVersion.Set(&v) +} + +// GetArch returns the Arch field value +func (o *RpmDistributionTreeResponse) GetArch() string { + if o == nil { + var ret string + return ret + } + + return o.Arch +} + +// GetArchOk returns a tuple with the Arch field value +// and a boolean to check if the value has been set. +func (o *RpmDistributionTreeResponse) GetArchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Arch, true +} + +// SetArch sets field value +func (o *RpmDistributionTreeResponse) SetArch(v string) { + o.Arch = v +} + +// GetBuildTimestamp returns the BuildTimestamp field value +func (o *RpmDistributionTreeResponse) GetBuildTimestamp() float64 { + if o == nil { + var ret float64 + return ret + } + + return o.BuildTimestamp +} + +// GetBuildTimestampOk returns a tuple with the BuildTimestamp field value +// and a boolean to check if the value has been set. +func (o *RpmDistributionTreeResponse) GetBuildTimestampOk() (*float64, bool) { + if o == nil { + return nil, false + } + return &o.BuildTimestamp, true +} + +// SetBuildTimestamp sets field value +func (o *RpmDistributionTreeResponse) SetBuildTimestamp(v float64) { + o.BuildTimestamp = v +} + +// GetInstimage returns the Instimage field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmDistributionTreeResponse) GetInstimage() string { + if o == nil || o.Instimage.Get() == nil { + var ret string + return ret + } + + return *o.Instimage.Get() +} + +// GetInstimageOk returns a tuple with the Instimage field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmDistributionTreeResponse) GetInstimageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Instimage.Get(), o.Instimage.IsSet() +} + +// SetInstimage sets field value +func (o *RpmDistributionTreeResponse) SetInstimage(v string) { + o.Instimage.Set(&v) +} + +// GetMainimage returns the Mainimage field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmDistributionTreeResponse) GetMainimage() string { + if o == nil || o.Mainimage.Get() == nil { + var ret string + return ret + } + + return *o.Mainimage.Get() +} + +// GetMainimageOk returns a tuple with the Mainimage field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmDistributionTreeResponse) GetMainimageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Mainimage.Get(), o.Mainimage.IsSet() +} + +// SetMainimage sets field value +func (o *RpmDistributionTreeResponse) SetMainimage(v string) { + o.Mainimage.Set(&v) +} + +// GetDiscnum returns the Discnum field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *RpmDistributionTreeResponse) GetDiscnum() int64 { + if o == nil || o.Discnum.Get() == nil { + var ret int64 + return ret + } + + return *o.Discnum.Get() +} + +// GetDiscnumOk returns a tuple with the Discnum field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmDistributionTreeResponse) GetDiscnumOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Discnum.Get(), o.Discnum.IsSet() +} + +// SetDiscnum sets field value +func (o *RpmDistributionTreeResponse) SetDiscnum(v int64) { + o.Discnum.Set(&v) +} + +// GetTotaldiscs returns the Totaldiscs field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *RpmDistributionTreeResponse) GetTotaldiscs() int64 { + if o == nil || o.Totaldiscs.Get() == nil { + var ret int64 + return ret + } + + return *o.Totaldiscs.Get() +} + +// GetTotaldiscsOk returns a tuple with the Totaldiscs field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmDistributionTreeResponse) GetTotaldiscsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Totaldiscs.Get(), o.Totaldiscs.IsSet() +} + +// SetTotaldiscs sets field value +func (o *RpmDistributionTreeResponse) SetTotaldiscs(v int64) { + o.Totaldiscs.Set(&v) +} + +// GetAddons returns the Addons field value +func (o *RpmDistributionTreeResponse) GetAddons() []AddonResponse { + if o == nil { + var ret []AddonResponse + return ret + } + + return o.Addons +} + +// GetAddonsOk returns a tuple with the Addons field value +// and a boolean to check if the value has been set. +func (o *RpmDistributionTreeResponse) GetAddonsOk() ([]AddonResponse, bool) { + if o == nil { + return nil, false + } + return o.Addons, true +} + +// SetAddons sets field value +func (o *RpmDistributionTreeResponse) SetAddons(v []AddonResponse) { + o.Addons = v +} + +// GetChecksums returns the Checksums field value +func (o *RpmDistributionTreeResponse) GetChecksums() []ChecksumResponse { + if o == nil { + var ret []ChecksumResponse + return ret + } + + return o.Checksums +} + +// GetChecksumsOk returns a tuple with the Checksums field value +// and a boolean to check if the value has been set. +func (o *RpmDistributionTreeResponse) GetChecksumsOk() ([]ChecksumResponse, bool) { + if o == nil { + return nil, false + } + return o.Checksums, true +} + +// SetChecksums sets field value +func (o *RpmDistributionTreeResponse) SetChecksums(v []ChecksumResponse) { + o.Checksums = v +} + +// GetImages returns the Images field value +func (o *RpmDistributionTreeResponse) GetImages() []ImageResponse { + if o == nil { + var ret []ImageResponse + return ret + } + + return o.Images +} + +// GetImagesOk returns a tuple with the Images field value +// and a boolean to check if the value has been set. +func (o *RpmDistributionTreeResponse) GetImagesOk() ([]ImageResponse, bool) { + if o == nil { + return nil, false + } + return o.Images, true +} + +// SetImages sets field value +func (o *RpmDistributionTreeResponse) SetImages(v []ImageResponse) { + o.Images = v +} + +// GetVariants returns the Variants field value +func (o *RpmDistributionTreeResponse) GetVariants() []VariantResponse { + if o == nil { + var ret []VariantResponse + return ret + } + + return o.Variants +} + +// GetVariantsOk returns a tuple with the Variants field value +// and a boolean to check if the value has been set. +func (o *RpmDistributionTreeResponse) GetVariantsOk() ([]VariantResponse, bool) { + if o == nil { + return nil, false + } + return o.Variants, true +} + +// SetVariants sets field value +func (o *RpmDistributionTreeResponse) SetVariants(v []VariantResponse) { + o.Variants = v +} + +func (o RpmDistributionTreeResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmDistributionTreeResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + toSerialize["header_version"] = o.HeaderVersion + toSerialize["release_name"] = o.ReleaseName + toSerialize["release_short"] = o.ReleaseShort + toSerialize["release_version"] = o.ReleaseVersion + toSerialize["release_is_layered"] = o.ReleaseIsLayered + toSerialize["base_product_name"] = o.BaseProductName.Get() + toSerialize["base_product_short"] = o.BaseProductShort.Get() + toSerialize["base_product_version"] = o.BaseProductVersion.Get() + toSerialize["arch"] = o.Arch + toSerialize["build_timestamp"] = o.BuildTimestamp + toSerialize["instimage"] = o.Instimage.Get() + toSerialize["mainimage"] = o.Mainimage.Get() + toSerialize["discnum"] = o.Discnum.Get() + toSerialize["totaldiscs"] = o.Totaldiscs.Get() + toSerialize["addons"] = o.Addons + toSerialize["checksums"] = o.Checksums + toSerialize["images"] = o.Images + toSerialize["variants"] = o.Variants + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmDistributionTreeResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmDistributionTreeResponse := _RpmDistributionTreeResponse{} + + if err = json.Unmarshal(bytes, &varRpmDistributionTreeResponse); err == nil { + *o = RpmDistributionTreeResponse(varRpmDistributionTreeResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "header_version") + delete(additionalProperties, "release_name") + delete(additionalProperties, "release_short") + delete(additionalProperties, "release_version") + delete(additionalProperties, "release_is_layered") + delete(additionalProperties, "base_product_name") + delete(additionalProperties, "base_product_short") + delete(additionalProperties, "base_product_version") + delete(additionalProperties, "arch") + delete(additionalProperties, "build_timestamp") + delete(additionalProperties, "instimage") + delete(additionalProperties, "mainimage") + delete(additionalProperties, "discnum") + delete(additionalProperties, "totaldiscs") + delete(additionalProperties, "addons") + delete(additionalProperties, "checksums") + delete(additionalProperties, "images") + delete(additionalProperties, "variants") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmDistributionTreeResponse struct { + value *RpmDistributionTreeResponse + isSet bool +} + +func (v NullableRpmDistributionTreeResponse) Get() *RpmDistributionTreeResponse { + return v.value +} + +func (v *NullableRpmDistributionTreeResponse) Set(val *RpmDistributionTreeResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmDistributionTreeResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmDistributionTreeResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmDistributionTreeResponse(val *RpmDistributionTreeResponse) *NullableRpmDistributionTreeResponse { + return &NullableRpmDistributionTreeResponse{value: val, isSet: true} +} + +func (v NullableRpmDistributionTreeResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmDistributionTreeResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd.go new file mode 100644 index 0000000000..dbf64695b3 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd.go @@ -0,0 +1,531 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RpmModulemd type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmModulemd{} + +// RpmModulemd Modulemd serializer. +type RpmModulemd struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Modulemd name. + Name string `json:"name"` + // Stream name. + Stream string `json:"stream"` + // Modulemd version. + Version string `json:"version"` + // Modulemd static-context flag. + StaticContext *bool `json:"static_context,omitempty"` + // Modulemd context. + Context string `json:"context"` + // Modulemd architecture. + Arch string `json:"arch"` + // Modulemd artifacts. + Artifacts map[string]interface{} `json:"artifacts"` + // Modulemd dependencies. + Dependencies map[string]interface{} `json:"dependencies"` + // Modulemd artifacts' packages. + Packages []*string `json:"packages,omitempty"` + // Modulemd snippet + Snippet string `json:"snippet"` + // Modulemd profiles. + Profiles map[string]interface{} `json:"profiles"` + // Description of module. + Description string `json:"description"` + AdditionalProperties map[string]interface{} +} + +type _RpmModulemd RpmModulemd + +// NewRpmModulemd instantiates a new RpmModulemd object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmModulemd(name string, stream string, version string, context string, arch string, artifacts map[string]interface{}, dependencies map[string]interface{}, snippet string, profiles map[string]interface{}, description string) *RpmModulemd { + this := RpmModulemd{} + this.Name = name + this.Stream = stream + this.Version = version + this.Context = context + this.Arch = arch + this.Artifacts = artifacts + this.Dependencies = dependencies + this.Snippet = snippet + this.Profiles = profiles + this.Description = description + return &this +} + +// NewRpmModulemdWithDefaults instantiates a new RpmModulemd object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmModulemdWithDefaults() *RpmModulemd { + this := RpmModulemd{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *RpmModulemd) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmModulemd) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *RpmModulemd) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *RpmModulemd) SetRepository(v string) { + o.Repository = &v +} + +// GetName returns the Name field value +func (o *RpmModulemd) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmModulemd) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmModulemd) SetName(v string) { + o.Name = v +} + +// GetStream returns the Stream field value +func (o *RpmModulemd) GetStream() string { + if o == nil { + var ret string + return ret + } + + return o.Stream +} + +// GetStreamOk returns a tuple with the Stream field value +// and a boolean to check if the value has been set. +func (o *RpmModulemd) GetStreamOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Stream, true +} + +// SetStream sets field value +func (o *RpmModulemd) SetStream(v string) { + o.Stream = v +} + +// GetVersion returns the Version field value +func (o *RpmModulemd) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *RpmModulemd) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *RpmModulemd) SetVersion(v string) { + o.Version = v +} + +// GetStaticContext returns the StaticContext field value if set, zero value otherwise. +func (o *RpmModulemd) GetStaticContext() bool { + if o == nil || IsNil(o.StaticContext) { + var ret bool + return ret + } + return *o.StaticContext +} + +// GetStaticContextOk returns a tuple with the StaticContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmModulemd) GetStaticContextOk() (*bool, bool) { + if o == nil || IsNil(o.StaticContext) { + return nil, false + } + return o.StaticContext, true +} + +// HasStaticContext returns a boolean if a field has been set. +func (o *RpmModulemd) HasStaticContext() bool { + if o != nil && !IsNil(o.StaticContext) { + return true + } + + return false +} + +// SetStaticContext gets a reference to the given bool and assigns it to the StaticContext field. +func (o *RpmModulemd) SetStaticContext(v bool) { + o.StaticContext = &v +} + +// GetContext returns the Context field value +func (o *RpmModulemd) GetContext() string { + if o == nil { + var ret string + return ret + } + + return o.Context +} + +// GetContextOk returns a tuple with the Context field value +// and a boolean to check if the value has been set. +func (o *RpmModulemd) GetContextOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Context, true +} + +// SetContext sets field value +func (o *RpmModulemd) SetContext(v string) { + o.Context = v +} + +// GetArch returns the Arch field value +func (o *RpmModulemd) GetArch() string { + if o == nil { + var ret string + return ret + } + + return o.Arch +} + +// GetArchOk returns a tuple with the Arch field value +// and a boolean to check if the value has been set. +func (o *RpmModulemd) GetArchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Arch, true +} + +// SetArch sets field value +func (o *RpmModulemd) SetArch(v string) { + o.Arch = v +} + +// GetArtifacts returns the Artifacts field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmModulemd) GetArtifacts() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Artifacts +} + +// GetArtifactsOk returns a tuple with the Artifacts field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemd) GetArtifactsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Artifacts) { + return map[string]interface{}{}, false + } + return o.Artifacts, true +} + +// SetArtifacts sets field value +func (o *RpmModulemd) SetArtifacts(v map[string]interface{}) { + o.Artifacts = v +} + +// GetDependencies returns the Dependencies field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmModulemd) GetDependencies() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Dependencies +} + +// GetDependenciesOk returns a tuple with the Dependencies field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemd) GetDependenciesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Dependencies) { + return map[string]interface{}{}, false + } + return o.Dependencies, true +} + +// SetDependencies sets field value +func (o *RpmModulemd) SetDependencies(v map[string]interface{}) { + o.Dependencies = v +} + +// GetPackages returns the Packages field value if set, zero value otherwise. +func (o *RpmModulemd) GetPackages() []*string { + if o == nil || IsNil(o.Packages) { + var ret []*string + return ret + } + return o.Packages +} + +// GetPackagesOk returns a tuple with the Packages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmModulemd) GetPackagesOk() ([]*string, bool) { + if o == nil || IsNil(o.Packages) { + return nil, false + } + return o.Packages, true +} + +// HasPackages returns a boolean if a field has been set. +func (o *RpmModulemd) HasPackages() bool { + if o != nil && !IsNil(o.Packages) { + return true + } + + return false +} + +// SetPackages gets a reference to the given []*string and assigns it to the Packages field. +func (o *RpmModulemd) SetPackages(v []*string) { + o.Packages = v +} + +// GetSnippet returns the Snippet field value +func (o *RpmModulemd) GetSnippet() string { + if o == nil { + var ret string + return ret + } + + return o.Snippet +} + +// GetSnippetOk returns a tuple with the Snippet field value +// and a boolean to check if the value has been set. +func (o *RpmModulemd) GetSnippetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Snippet, true +} + +// SetSnippet sets field value +func (o *RpmModulemd) SetSnippet(v string) { + o.Snippet = v +} + +// GetProfiles returns the Profiles field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmModulemd) GetProfiles() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Profiles +} + +// GetProfilesOk returns a tuple with the Profiles field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemd) GetProfilesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Profiles) { + return map[string]interface{}{}, false + } + return o.Profiles, true +} + +// SetProfiles sets field value +func (o *RpmModulemd) SetProfiles(v map[string]interface{}) { + o.Profiles = v +} + +// GetDescription returns the Description field value +func (o *RpmModulemd) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *RpmModulemd) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *RpmModulemd) SetDescription(v string) { + o.Description = v +} + +func (o RpmModulemd) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmModulemd) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["name"] = o.Name + toSerialize["stream"] = o.Stream + toSerialize["version"] = o.Version + if !IsNil(o.StaticContext) { + toSerialize["static_context"] = o.StaticContext + } + toSerialize["context"] = o.Context + toSerialize["arch"] = o.Arch + if o.Artifacts != nil { + toSerialize["artifacts"] = o.Artifacts + } + if o.Dependencies != nil { + toSerialize["dependencies"] = o.Dependencies + } + if !IsNil(o.Packages) { + toSerialize["packages"] = o.Packages + } + toSerialize["snippet"] = o.Snippet + if o.Profiles != nil { + toSerialize["profiles"] = o.Profiles + } + toSerialize["description"] = o.Description + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmModulemd) UnmarshalJSON(bytes []byte) (err error) { + varRpmModulemd := _RpmModulemd{} + + if err = json.Unmarshal(bytes, &varRpmModulemd); err == nil { + *o = RpmModulemd(varRpmModulemd) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "name") + delete(additionalProperties, "stream") + delete(additionalProperties, "version") + delete(additionalProperties, "static_context") + delete(additionalProperties, "context") + delete(additionalProperties, "arch") + delete(additionalProperties, "artifacts") + delete(additionalProperties, "dependencies") + delete(additionalProperties, "packages") + delete(additionalProperties, "snippet") + delete(additionalProperties, "profiles") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmModulemd struct { + value *RpmModulemd + isSet bool +} + +func (v NullableRpmModulemd) Get() *RpmModulemd { + return v.value +} + +func (v *NullableRpmModulemd) Set(val *RpmModulemd) { + v.value = val + v.isSet = true +} + +func (v NullableRpmModulemd) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmModulemd) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmModulemd(val *RpmModulemd) *NullableRpmModulemd { + return &NullableRpmModulemd{value: val, isSet: true} +} + +func (v NullableRpmModulemd) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmModulemd) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_defaults.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_defaults.go new file mode 100644 index 0000000000..1442a821bd --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_defaults.go @@ -0,0 +1,269 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RpmModulemdDefaults type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmModulemdDefaults{} + +// RpmModulemdDefaults ModulemdDefaults serializer. +type RpmModulemdDefaults struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Modulemd name. + Module string `json:"module"` + // Modulemd default stream. + Stream string `json:"stream"` + // Default profiles for modulemd streams. + Profiles map[string]interface{} `json:"profiles"` + // Modulemd default snippet + Snippet string `json:"snippet"` + AdditionalProperties map[string]interface{} +} + +type _RpmModulemdDefaults RpmModulemdDefaults + +// NewRpmModulemdDefaults instantiates a new RpmModulemdDefaults object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmModulemdDefaults(module string, stream string, profiles map[string]interface{}, snippet string) *RpmModulemdDefaults { + this := RpmModulemdDefaults{} + this.Module = module + this.Stream = stream + this.Profiles = profiles + this.Snippet = snippet + return &this +} + +// NewRpmModulemdDefaultsWithDefaults instantiates a new RpmModulemdDefaults object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmModulemdDefaultsWithDefaults() *RpmModulemdDefaults { + this := RpmModulemdDefaults{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *RpmModulemdDefaults) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmModulemdDefaults) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *RpmModulemdDefaults) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *RpmModulemdDefaults) SetRepository(v string) { + o.Repository = &v +} + +// GetModule returns the Module field value +func (o *RpmModulemdDefaults) GetModule() string { + if o == nil { + var ret string + return ret + } + + return o.Module +} + +// GetModuleOk returns a tuple with the Module field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdDefaults) GetModuleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Module, true +} + +// SetModule sets field value +func (o *RpmModulemdDefaults) SetModule(v string) { + o.Module = v +} + +// GetStream returns the Stream field value +func (o *RpmModulemdDefaults) GetStream() string { + if o == nil { + var ret string + return ret + } + + return o.Stream +} + +// GetStreamOk returns a tuple with the Stream field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdDefaults) GetStreamOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Stream, true +} + +// SetStream sets field value +func (o *RpmModulemdDefaults) SetStream(v string) { + o.Stream = v +} + +// GetProfiles returns the Profiles field value +func (o *RpmModulemdDefaults) GetProfiles() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Profiles +} + +// GetProfilesOk returns a tuple with the Profiles field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdDefaults) GetProfilesOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Profiles, true +} + +// SetProfiles sets field value +func (o *RpmModulemdDefaults) SetProfiles(v map[string]interface{}) { + o.Profiles = v +} + +// GetSnippet returns the Snippet field value +func (o *RpmModulemdDefaults) GetSnippet() string { + if o == nil { + var ret string + return ret + } + + return o.Snippet +} + +// GetSnippetOk returns a tuple with the Snippet field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdDefaults) GetSnippetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Snippet, true +} + +// SetSnippet sets field value +func (o *RpmModulemdDefaults) SetSnippet(v string) { + o.Snippet = v +} + +func (o RpmModulemdDefaults) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmModulemdDefaults) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["module"] = o.Module + toSerialize["stream"] = o.Stream + toSerialize["profiles"] = o.Profiles + toSerialize["snippet"] = o.Snippet + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmModulemdDefaults) UnmarshalJSON(bytes []byte) (err error) { + varRpmModulemdDefaults := _RpmModulemdDefaults{} + + if err = json.Unmarshal(bytes, &varRpmModulemdDefaults); err == nil { + *o = RpmModulemdDefaults(varRpmModulemdDefaults) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "module") + delete(additionalProperties, "stream") + delete(additionalProperties, "profiles") + delete(additionalProperties, "snippet") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmModulemdDefaults struct { + value *RpmModulemdDefaults + isSet bool +} + +func (v NullableRpmModulemdDefaults) Get() *RpmModulemdDefaults { + return v.value +} + +func (v *NullableRpmModulemdDefaults) Set(val *RpmModulemdDefaults) { + v.value = val + v.isSet = true +} + +func (v NullableRpmModulemdDefaults) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmModulemdDefaults) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmModulemdDefaults(val *RpmModulemdDefaults) *NullableRpmModulemdDefaults { + return &NullableRpmModulemdDefaults{value: val, isSet: true} +} + +func (v NullableRpmModulemdDefaults) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmModulemdDefaults) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_defaults_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_defaults_response.go new file mode 100644 index 0000000000..ab4cdc13fc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_defaults_response.go @@ -0,0 +1,278 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmModulemdDefaultsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmModulemdDefaultsResponse{} + +// RpmModulemdDefaultsResponse ModulemdDefaults serializer. +type RpmModulemdDefaultsResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Modulemd name. + Module string `json:"module"` + // Modulemd default stream. + Stream string `json:"stream"` + // Default profiles for modulemd streams. + Profiles map[string]interface{} `json:"profiles"` + AdditionalProperties map[string]interface{} +} + +type _RpmModulemdDefaultsResponse RpmModulemdDefaultsResponse + +// NewRpmModulemdDefaultsResponse instantiates a new RpmModulemdDefaultsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmModulemdDefaultsResponse(module string, stream string, profiles map[string]interface{}) *RpmModulemdDefaultsResponse { + this := RpmModulemdDefaultsResponse{} + this.Module = module + this.Stream = stream + this.Profiles = profiles + return &this +} + +// NewRpmModulemdDefaultsResponseWithDefaults instantiates a new RpmModulemdDefaultsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmModulemdDefaultsResponseWithDefaults() *RpmModulemdDefaultsResponse { + this := RpmModulemdDefaultsResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmModulemdDefaultsResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmModulemdDefaultsResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmModulemdDefaultsResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmModulemdDefaultsResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmModulemdDefaultsResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmModulemdDefaultsResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmModulemdDefaultsResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmModulemdDefaultsResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetModule returns the Module field value +func (o *RpmModulemdDefaultsResponse) GetModule() string { + if o == nil { + var ret string + return ret + } + + return o.Module +} + +// GetModuleOk returns a tuple with the Module field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdDefaultsResponse) GetModuleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Module, true +} + +// SetModule sets field value +func (o *RpmModulemdDefaultsResponse) SetModule(v string) { + o.Module = v +} + +// GetStream returns the Stream field value +func (o *RpmModulemdDefaultsResponse) GetStream() string { + if o == nil { + var ret string + return ret + } + + return o.Stream +} + +// GetStreamOk returns a tuple with the Stream field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdDefaultsResponse) GetStreamOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Stream, true +} + +// SetStream sets field value +func (o *RpmModulemdDefaultsResponse) SetStream(v string) { + o.Stream = v +} + +// GetProfiles returns the Profiles field value +func (o *RpmModulemdDefaultsResponse) GetProfiles() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Profiles +} + +// GetProfilesOk returns a tuple with the Profiles field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdDefaultsResponse) GetProfilesOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Profiles, true +} + +// SetProfiles sets field value +func (o *RpmModulemdDefaultsResponse) SetProfiles(v map[string]interface{}) { + o.Profiles = v +} + +func (o RpmModulemdDefaultsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmModulemdDefaultsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["module"] = o.Module + toSerialize["stream"] = o.Stream + toSerialize["profiles"] = o.Profiles + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmModulemdDefaultsResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmModulemdDefaultsResponse := _RpmModulemdDefaultsResponse{} + + if err = json.Unmarshal(bytes, &varRpmModulemdDefaultsResponse); err == nil { + *o = RpmModulemdDefaultsResponse(varRpmModulemdDefaultsResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "module") + delete(additionalProperties, "stream") + delete(additionalProperties, "profiles") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmModulemdDefaultsResponse struct { + value *RpmModulemdDefaultsResponse + isSet bool +} + +func (v NullableRpmModulemdDefaultsResponse) Get() *RpmModulemdDefaultsResponse { + return v.value +} + +func (v *NullableRpmModulemdDefaultsResponse) Set(val *RpmModulemdDefaultsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmModulemdDefaultsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmModulemdDefaultsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmModulemdDefaultsResponse(val *RpmModulemdDefaultsResponse) *NullableRpmModulemdDefaultsResponse { + return &NullableRpmModulemdDefaultsResponse{value: val, isSet: true} +} + +func (v NullableRpmModulemdDefaultsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmModulemdDefaultsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_obsolete.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_obsolete.go new file mode 100644 index 0000000000..75ee47c303 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_obsolete.go @@ -0,0 +1,453 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RpmModulemdObsolete type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmModulemdObsolete{} + +// RpmModulemdObsolete ModulemdObsolete serializer. +type RpmModulemdObsolete struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Obsolete modified time. + Modified string `json:"modified"` + // Modulemd name. + ModuleName string `json:"module_name"` + // Modulemd's stream. + ModuleStream string `json:"module_stream"` + // Obsolete description. + Message string `json:"message"` + // Reset previous obsoletes. + OverridePrevious NullableString `json:"override_previous"` + // Modulemd's context. + ModuleContext NullableString `json:"module_context"` + // End of Life date. + EolDate NullableString `json:"eol_date"` + // Obsolete by module name. + ObsoletedByModuleName NullableString `json:"obsoleted_by_module_name"` + // Obsolete by module stream. + ObsoletedByModuleStream NullableString `json:"obsoleted_by_module_stream"` + // Module Obsolete snippet. + Snippet string `json:"snippet"` + AdditionalProperties map[string]interface{} +} + +type _RpmModulemdObsolete RpmModulemdObsolete + +// NewRpmModulemdObsolete instantiates a new RpmModulemdObsolete object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmModulemdObsolete(modified string, moduleName string, moduleStream string, message string, overridePrevious NullableString, moduleContext NullableString, eolDate NullableString, obsoletedByModuleName NullableString, obsoletedByModuleStream NullableString, snippet string) *RpmModulemdObsolete { + this := RpmModulemdObsolete{} + this.Modified = modified + this.ModuleName = moduleName + this.ModuleStream = moduleStream + this.Message = message + this.OverridePrevious = overridePrevious + this.ModuleContext = moduleContext + this.EolDate = eolDate + this.ObsoletedByModuleName = obsoletedByModuleName + this.ObsoletedByModuleStream = obsoletedByModuleStream + this.Snippet = snippet + return &this +} + +// NewRpmModulemdObsoleteWithDefaults instantiates a new RpmModulemdObsolete object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmModulemdObsoleteWithDefaults() *RpmModulemdObsolete { + this := RpmModulemdObsolete{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *RpmModulemdObsolete) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmModulemdObsolete) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *RpmModulemdObsolete) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *RpmModulemdObsolete) SetRepository(v string) { + o.Repository = &v +} + +// GetModified returns the Modified field value +func (o *RpmModulemdObsolete) GetModified() string { + if o == nil { + var ret string + return ret + } + + return o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdObsolete) GetModifiedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Modified, true +} + +// SetModified sets field value +func (o *RpmModulemdObsolete) SetModified(v string) { + o.Modified = v +} + +// GetModuleName returns the ModuleName field value +func (o *RpmModulemdObsolete) GetModuleName() string { + if o == nil { + var ret string + return ret + } + + return o.ModuleName +} + +// GetModuleNameOk returns a tuple with the ModuleName field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdObsolete) GetModuleNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ModuleName, true +} + +// SetModuleName sets field value +func (o *RpmModulemdObsolete) SetModuleName(v string) { + o.ModuleName = v +} + +// GetModuleStream returns the ModuleStream field value +func (o *RpmModulemdObsolete) GetModuleStream() string { + if o == nil { + var ret string + return ret + } + + return o.ModuleStream +} + +// GetModuleStreamOk returns a tuple with the ModuleStream field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdObsolete) GetModuleStreamOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ModuleStream, true +} + +// SetModuleStream sets field value +func (o *RpmModulemdObsolete) SetModuleStream(v string) { + o.ModuleStream = v +} + +// GetMessage returns the Message field value +func (o *RpmModulemdObsolete) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdObsolete) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *RpmModulemdObsolete) SetMessage(v string) { + o.Message = v +} + +// GetOverridePrevious returns the OverridePrevious field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmModulemdObsolete) GetOverridePrevious() string { + if o == nil || o.OverridePrevious.Get() == nil { + var ret string + return ret + } + + return *o.OverridePrevious.Get() +} + +// GetOverridePreviousOk returns a tuple with the OverridePrevious field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemdObsolete) GetOverridePreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OverridePrevious.Get(), o.OverridePrevious.IsSet() +} + +// SetOverridePrevious sets field value +func (o *RpmModulemdObsolete) SetOverridePrevious(v string) { + o.OverridePrevious.Set(&v) +} + +// GetModuleContext returns the ModuleContext field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmModulemdObsolete) GetModuleContext() string { + if o == nil || o.ModuleContext.Get() == nil { + var ret string + return ret + } + + return *o.ModuleContext.Get() +} + +// GetModuleContextOk returns a tuple with the ModuleContext field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemdObsolete) GetModuleContextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ModuleContext.Get(), o.ModuleContext.IsSet() +} + +// SetModuleContext sets field value +func (o *RpmModulemdObsolete) SetModuleContext(v string) { + o.ModuleContext.Set(&v) +} + +// GetEolDate returns the EolDate field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmModulemdObsolete) GetEolDate() string { + if o == nil || o.EolDate.Get() == nil { + var ret string + return ret + } + + return *o.EolDate.Get() +} + +// GetEolDateOk returns a tuple with the EolDate field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemdObsolete) GetEolDateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EolDate.Get(), o.EolDate.IsSet() +} + +// SetEolDate sets field value +func (o *RpmModulemdObsolete) SetEolDate(v string) { + o.EolDate.Set(&v) +} + +// GetObsoletedByModuleName returns the ObsoletedByModuleName field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmModulemdObsolete) GetObsoletedByModuleName() string { + if o == nil || o.ObsoletedByModuleName.Get() == nil { + var ret string + return ret + } + + return *o.ObsoletedByModuleName.Get() +} + +// GetObsoletedByModuleNameOk returns a tuple with the ObsoletedByModuleName field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemdObsolete) GetObsoletedByModuleNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ObsoletedByModuleName.Get(), o.ObsoletedByModuleName.IsSet() +} + +// SetObsoletedByModuleName sets field value +func (o *RpmModulemdObsolete) SetObsoletedByModuleName(v string) { + o.ObsoletedByModuleName.Set(&v) +} + +// GetObsoletedByModuleStream returns the ObsoletedByModuleStream field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmModulemdObsolete) GetObsoletedByModuleStream() string { + if o == nil || o.ObsoletedByModuleStream.Get() == nil { + var ret string + return ret + } + + return *o.ObsoletedByModuleStream.Get() +} + +// GetObsoletedByModuleStreamOk returns a tuple with the ObsoletedByModuleStream field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemdObsolete) GetObsoletedByModuleStreamOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ObsoletedByModuleStream.Get(), o.ObsoletedByModuleStream.IsSet() +} + +// SetObsoletedByModuleStream sets field value +func (o *RpmModulemdObsolete) SetObsoletedByModuleStream(v string) { + o.ObsoletedByModuleStream.Set(&v) +} + +// GetSnippet returns the Snippet field value +func (o *RpmModulemdObsolete) GetSnippet() string { + if o == nil { + var ret string + return ret + } + + return o.Snippet +} + +// GetSnippetOk returns a tuple with the Snippet field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdObsolete) GetSnippetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Snippet, true +} + +// SetSnippet sets field value +func (o *RpmModulemdObsolete) SetSnippet(v string) { + o.Snippet = v +} + +func (o RpmModulemdObsolete) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmModulemdObsolete) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + toSerialize["modified"] = o.Modified + toSerialize["module_name"] = o.ModuleName + toSerialize["module_stream"] = o.ModuleStream + toSerialize["message"] = o.Message + toSerialize["override_previous"] = o.OverridePrevious.Get() + toSerialize["module_context"] = o.ModuleContext.Get() + toSerialize["eol_date"] = o.EolDate.Get() + toSerialize["obsoleted_by_module_name"] = o.ObsoletedByModuleName.Get() + toSerialize["obsoleted_by_module_stream"] = o.ObsoletedByModuleStream.Get() + toSerialize["snippet"] = o.Snippet + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmModulemdObsolete) UnmarshalJSON(bytes []byte) (err error) { + varRpmModulemdObsolete := _RpmModulemdObsolete{} + + if err = json.Unmarshal(bytes, &varRpmModulemdObsolete); err == nil { + *o = RpmModulemdObsolete(varRpmModulemdObsolete) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "modified") + delete(additionalProperties, "module_name") + delete(additionalProperties, "module_stream") + delete(additionalProperties, "message") + delete(additionalProperties, "override_previous") + delete(additionalProperties, "module_context") + delete(additionalProperties, "eol_date") + delete(additionalProperties, "obsoleted_by_module_name") + delete(additionalProperties, "obsoleted_by_module_stream") + delete(additionalProperties, "snippet") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmModulemdObsolete struct { + value *RpmModulemdObsolete + isSet bool +} + +func (v NullableRpmModulemdObsolete) Get() *RpmModulemdObsolete { + return v.value +} + +func (v *NullableRpmModulemdObsolete) Set(val *RpmModulemdObsolete) { + v.value = val + v.isSet = true +} + +func (v NullableRpmModulemdObsolete) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmModulemdObsolete) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmModulemdObsolete(val *RpmModulemdObsolete) *NullableRpmModulemdObsolete { + return &NullableRpmModulemdObsolete{value: val, isSet: true} +} + +func (v NullableRpmModulemdObsolete) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmModulemdObsolete) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_obsolete_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_obsolete_response.go new file mode 100644 index 0000000000..76e5cd3ba5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_obsolete_response.go @@ -0,0 +1,462 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmModulemdObsoleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmModulemdObsoleteResponse{} + +// RpmModulemdObsoleteResponse ModulemdObsolete serializer. +type RpmModulemdObsoleteResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Obsolete modified time. + Modified string `json:"modified"` + // Modulemd name. + ModuleName string `json:"module_name"` + // Modulemd's stream. + ModuleStream string `json:"module_stream"` + // Obsolete description. + Message string `json:"message"` + // Reset previous obsoletes. + OverridePrevious NullableString `json:"override_previous"` + // Modulemd's context. + ModuleContext NullableString `json:"module_context"` + // End of Life date. + EolDate NullableString `json:"eol_date"` + // Obsolete by module name. + ObsoletedByModuleName NullableString `json:"obsoleted_by_module_name"` + // Obsolete by module stream. + ObsoletedByModuleStream NullableString `json:"obsoleted_by_module_stream"` + AdditionalProperties map[string]interface{} +} + +type _RpmModulemdObsoleteResponse RpmModulemdObsoleteResponse + +// NewRpmModulemdObsoleteResponse instantiates a new RpmModulemdObsoleteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmModulemdObsoleteResponse(modified string, moduleName string, moduleStream string, message string, overridePrevious NullableString, moduleContext NullableString, eolDate NullableString, obsoletedByModuleName NullableString, obsoletedByModuleStream NullableString) *RpmModulemdObsoleteResponse { + this := RpmModulemdObsoleteResponse{} + this.Modified = modified + this.ModuleName = moduleName + this.ModuleStream = moduleStream + this.Message = message + this.OverridePrevious = overridePrevious + this.ModuleContext = moduleContext + this.EolDate = eolDate + this.ObsoletedByModuleName = obsoletedByModuleName + this.ObsoletedByModuleStream = obsoletedByModuleStream + return &this +} + +// NewRpmModulemdObsoleteResponseWithDefaults instantiates a new RpmModulemdObsoleteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmModulemdObsoleteResponseWithDefaults() *RpmModulemdObsoleteResponse { + this := RpmModulemdObsoleteResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmModulemdObsoleteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmModulemdObsoleteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmModulemdObsoleteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmModulemdObsoleteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmModulemdObsoleteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmModulemdObsoleteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmModulemdObsoleteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmModulemdObsoleteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetModified returns the Modified field value +func (o *RpmModulemdObsoleteResponse) GetModified() string { + if o == nil { + var ret string + return ret + } + + return o.Modified +} + +// GetModifiedOk returns a tuple with the Modified field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdObsoleteResponse) GetModifiedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Modified, true +} + +// SetModified sets field value +func (o *RpmModulemdObsoleteResponse) SetModified(v string) { + o.Modified = v +} + +// GetModuleName returns the ModuleName field value +func (o *RpmModulemdObsoleteResponse) GetModuleName() string { + if o == nil { + var ret string + return ret + } + + return o.ModuleName +} + +// GetModuleNameOk returns a tuple with the ModuleName field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdObsoleteResponse) GetModuleNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ModuleName, true +} + +// SetModuleName sets field value +func (o *RpmModulemdObsoleteResponse) SetModuleName(v string) { + o.ModuleName = v +} + +// GetModuleStream returns the ModuleStream field value +func (o *RpmModulemdObsoleteResponse) GetModuleStream() string { + if o == nil { + var ret string + return ret + } + + return o.ModuleStream +} + +// GetModuleStreamOk returns a tuple with the ModuleStream field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdObsoleteResponse) GetModuleStreamOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ModuleStream, true +} + +// SetModuleStream sets field value +func (o *RpmModulemdObsoleteResponse) SetModuleStream(v string) { + o.ModuleStream = v +} + +// GetMessage returns the Message field value +func (o *RpmModulemdObsoleteResponse) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdObsoleteResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *RpmModulemdObsoleteResponse) SetMessage(v string) { + o.Message = v +} + +// GetOverridePrevious returns the OverridePrevious field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmModulemdObsoleteResponse) GetOverridePrevious() string { + if o == nil || o.OverridePrevious.Get() == nil { + var ret string + return ret + } + + return *o.OverridePrevious.Get() +} + +// GetOverridePreviousOk returns a tuple with the OverridePrevious field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemdObsoleteResponse) GetOverridePreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.OverridePrevious.Get(), o.OverridePrevious.IsSet() +} + +// SetOverridePrevious sets field value +func (o *RpmModulemdObsoleteResponse) SetOverridePrevious(v string) { + o.OverridePrevious.Set(&v) +} + +// GetModuleContext returns the ModuleContext field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmModulemdObsoleteResponse) GetModuleContext() string { + if o == nil || o.ModuleContext.Get() == nil { + var ret string + return ret + } + + return *o.ModuleContext.Get() +} + +// GetModuleContextOk returns a tuple with the ModuleContext field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemdObsoleteResponse) GetModuleContextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ModuleContext.Get(), o.ModuleContext.IsSet() +} + +// SetModuleContext sets field value +func (o *RpmModulemdObsoleteResponse) SetModuleContext(v string) { + o.ModuleContext.Set(&v) +} + +// GetEolDate returns the EolDate field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmModulemdObsoleteResponse) GetEolDate() string { + if o == nil || o.EolDate.Get() == nil { + var ret string + return ret + } + + return *o.EolDate.Get() +} + +// GetEolDateOk returns a tuple with the EolDate field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemdObsoleteResponse) GetEolDateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.EolDate.Get(), o.EolDate.IsSet() +} + +// SetEolDate sets field value +func (o *RpmModulemdObsoleteResponse) SetEolDate(v string) { + o.EolDate.Set(&v) +} + +// GetObsoletedByModuleName returns the ObsoletedByModuleName field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmModulemdObsoleteResponse) GetObsoletedByModuleName() string { + if o == nil || o.ObsoletedByModuleName.Get() == nil { + var ret string + return ret + } + + return *o.ObsoletedByModuleName.Get() +} + +// GetObsoletedByModuleNameOk returns a tuple with the ObsoletedByModuleName field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemdObsoleteResponse) GetObsoletedByModuleNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ObsoletedByModuleName.Get(), o.ObsoletedByModuleName.IsSet() +} + +// SetObsoletedByModuleName sets field value +func (o *RpmModulemdObsoleteResponse) SetObsoletedByModuleName(v string) { + o.ObsoletedByModuleName.Set(&v) +} + +// GetObsoletedByModuleStream returns the ObsoletedByModuleStream field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmModulemdObsoleteResponse) GetObsoletedByModuleStream() string { + if o == nil || o.ObsoletedByModuleStream.Get() == nil { + var ret string + return ret + } + + return *o.ObsoletedByModuleStream.Get() +} + +// GetObsoletedByModuleStreamOk returns a tuple with the ObsoletedByModuleStream field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemdObsoleteResponse) GetObsoletedByModuleStreamOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ObsoletedByModuleStream.Get(), o.ObsoletedByModuleStream.IsSet() +} + +// SetObsoletedByModuleStream sets field value +func (o *RpmModulemdObsoleteResponse) SetObsoletedByModuleStream(v string) { + o.ObsoletedByModuleStream.Set(&v) +} + +func (o RpmModulemdObsoleteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmModulemdObsoleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["modified"] = o.Modified + toSerialize["module_name"] = o.ModuleName + toSerialize["module_stream"] = o.ModuleStream + toSerialize["message"] = o.Message + toSerialize["override_previous"] = o.OverridePrevious.Get() + toSerialize["module_context"] = o.ModuleContext.Get() + toSerialize["eol_date"] = o.EolDate.Get() + toSerialize["obsoleted_by_module_name"] = o.ObsoletedByModuleName.Get() + toSerialize["obsoleted_by_module_stream"] = o.ObsoletedByModuleStream.Get() + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmModulemdObsoleteResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmModulemdObsoleteResponse := _RpmModulemdObsoleteResponse{} + + if err = json.Unmarshal(bytes, &varRpmModulemdObsoleteResponse); err == nil { + *o = RpmModulemdObsoleteResponse(varRpmModulemdObsoleteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "modified") + delete(additionalProperties, "module_name") + delete(additionalProperties, "module_stream") + delete(additionalProperties, "message") + delete(additionalProperties, "override_previous") + delete(additionalProperties, "module_context") + delete(additionalProperties, "eol_date") + delete(additionalProperties, "obsoleted_by_module_name") + delete(additionalProperties, "obsoleted_by_module_stream") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmModulemdObsoleteResponse struct { + value *RpmModulemdObsoleteResponse + isSet bool +} + +func (v NullableRpmModulemdObsoleteResponse) Get() *RpmModulemdObsoleteResponse { + return v.value +} + +func (v *NullableRpmModulemdObsoleteResponse) Set(val *RpmModulemdObsoleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmModulemdObsoleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmModulemdObsoleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmModulemdObsoleteResponse(val *RpmModulemdObsoleteResponse) *NullableRpmModulemdObsoleteResponse { + return &NullableRpmModulemdObsoleteResponse{value: val, isSet: true} +} + +func (v NullableRpmModulemdObsoleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmModulemdObsoleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_response.go new file mode 100644 index 0000000000..2132ad67d0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_modulemd_response.go @@ -0,0 +1,540 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmModulemdResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmModulemdResponse{} + +// RpmModulemdResponse Modulemd serializer. +type RpmModulemdResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Modulemd name. + Name string `json:"name"` + // Stream name. + Stream string `json:"stream"` + // Modulemd version. + Version string `json:"version"` + // Modulemd static-context flag. + StaticContext *bool `json:"static_context,omitempty"` + // Modulemd context. + Context string `json:"context"` + // Modulemd architecture. + Arch string `json:"arch"` + // Modulemd artifacts. + Artifacts map[string]interface{} `json:"artifacts"` + // Modulemd dependencies. + Dependencies map[string]interface{} `json:"dependencies"` + // Modulemd artifacts' packages. + Packages []*string `json:"packages,omitempty"` + // Modulemd profiles. + Profiles map[string]interface{} `json:"profiles"` + // Description of module. + Description string `json:"description"` + AdditionalProperties map[string]interface{} +} + +type _RpmModulemdResponse RpmModulemdResponse + +// NewRpmModulemdResponse instantiates a new RpmModulemdResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmModulemdResponse(name string, stream string, version string, context string, arch string, artifacts map[string]interface{}, dependencies map[string]interface{}, profiles map[string]interface{}, description string) *RpmModulemdResponse { + this := RpmModulemdResponse{} + this.Name = name + this.Stream = stream + this.Version = version + this.Context = context + this.Arch = arch + this.Artifacts = artifacts + this.Dependencies = dependencies + this.Profiles = profiles + this.Description = description + return &this +} + +// NewRpmModulemdResponseWithDefaults instantiates a new RpmModulemdResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmModulemdResponseWithDefaults() *RpmModulemdResponse { + this := RpmModulemdResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmModulemdResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmModulemdResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmModulemdResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmModulemdResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmModulemdResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmModulemdResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmModulemdResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmModulemdResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *RpmModulemdResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmModulemdResponse) SetName(v string) { + o.Name = v +} + +// GetStream returns the Stream field value +func (o *RpmModulemdResponse) GetStream() string { + if o == nil { + var ret string + return ret + } + + return o.Stream +} + +// GetStreamOk returns a tuple with the Stream field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdResponse) GetStreamOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Stream, true +} + +// SetStream sets field value +func (o *RpmModulemdResponse) SetStream(v string) { + o.Stream = v +} + +// GetVersion returns the Version field value +func (o *RpmModulemdResponse) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdResponse) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *RpmModulemdResponse) SetVersion(v string) { + o.Version = v +} + +// GetStaticContext returns the StaticContext field value if set, zero value otherwise. +func (o *RpmModulemdResponse) GetStaticContext() bool { + if o == nil || IsNil(o.StaticContext) { + var ret bool + return ret + } + return *o.StaticContext +} + +// GetStaticContextOk returns a tuple with the StaticContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmModulemdResponse) GetStaticContextOk() (*bool, bool) { + if o == nil || IsNil(o.StaticContext) { + return nil, false + } + return o.StaticContext, true +} + +// HasStaticContext returns a boolean if a field has been set. +func (o *RpmModulemdResponse) HasStaticContext() bool { + if o != nil && !IsNil(o.StaticContext) { + return true + } + + return false +} + +// SetStaticContext gets a reference to the given bool and assigns it to the StaticContext field. +func (o *RpmModulemdResponse) SetStaticContext(v bool) { + o.StaticContext = &v +} + +// GetContext returns the Context field value +func (o *RpmModulemdResponse) GetContext() string { + if o == nil { + var ret string + return ret + } + + return o.Context +} + +// GetContextOk returns a tuple with the Context field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdResponse) GetContextOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Context, true +} + +// SetContext sets field value +func (o *RpmModulemdResponse) SetContext(v string) { + o.Context = v +} + +// GetArch returns the Arch field value +func (o *RpmModulemdResponse) GetArch() string { + if o == nil { + var ret string + return ret + } + + return o.Arch +} + +// GetArchOk returns a tuple with the Arch field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdResponse) GetArchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Arch, true +} + +// SetArch sets field value +func (o *RpmModulemdResponse) SetArch(v string) { + o.Arch = v +} + +// GetArtifacts returns the Artifacts field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmModulemdResponse) GetArtifacts() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Artifacts +} + +// GetArtifactsOk returns a tuple with the Artifacts field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemdResponse) GetArtifactsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Artifacts) { + return map[string]interface{}{}, false + } + return o.Artifacts, true +} + +// SetArtifacts sets field value +func (o *RpmModulemdResponse) SetArtifacts(v map[string]interface{}) { + o.Artifacts = v +} + +// GetDependencies returns the Dependencies field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmModulemdResponse) GetDependencies() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Dependencies +} + +// GetDependenciesOk returns a tuple with the Dependencies field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemdResponse) GetDependenciesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Dependencies) { + return map[string]interface{}{}, false + } + return o.Dependencies, true +} + +// SetDependencies sets field value +func (o *RpmModulemdResponse) SetDependencies(v map[string]interface{}) { + o.Dependencies = v +} + +// GetPackages returns the Packages field value if set, zero value otherwise. +func (o *RpmModulemdResponse) GetPackages() []*string { + if o == nil || IsNil(o.Packages) { + var ret []*string + return ret + } + return o.Packages +} + +// GetPackagesOk returns a tuple with the Packages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmModulemdResponse) GetPackagesOk() ([]*string, bool) { + if o == nil || IsNil(o.Packages) { + return nil, false + } + return o.Packages, true +} + +// HasPackages returns a boolean if a field has been set. +func (o *RpmModulemdResponse) HasPackages() bool { + if o != nil && !IsNil(o.Packages) { + return true + } + + return false +} + +// SetPackages gets a reference to the given []*string and assigns it to the Packages field. +func (o *RpmModulemdResponse) SetPackages(v []*string) { + o.Packages = v +} + +// GetProfiles returns the Profiles field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmModulemdResponse) GetProfiles() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Profiles +} + +// GetProfilesOk returns a tuple with the Profiles field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmModulemdResponse) GetProfilesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Profiles) { + return map[string]interface{}{}, false + } + return o.Profiles, true +} + +// SetProfiles sets field value +func (o *RpmModulemdResponse) SetProfiles(v map[string]interface{}) { + o.Profiles = v +} + +// GetDescription returns the Description field value +func (o *RpmModulemdResponse) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *RpmModulemdResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *RpmModulemdResponse) SetDescription(v string) { + o.Description = v +} + +func (o RpmModulemdResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmModulemdResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["stream"] = o.Stream + toSerialize["version"] = o.Version + if !IsNil(o.StaticContext) { + toSerialize["static_context"] = o.StaticContext + } + toSerialize["context"] = o.Context + toSerialize["arch"] = o.Arch + if o.Artifacts != nil { + toSerialize["artifacts"] = o.Artifacts + } + if o.Dependencies != nil { + toSerialize["dependencies"] = o.Dependencies + } + if !IsNil(o.Packages) { + toSerialize["packages"] = o.Packages + } + if o.Profiles != nil { + toSerialize["profiles"] = o.Profiles + } + toSerialize["description"] = o.Description + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmModulemdResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmModulemdResponse := _RpmModulemdResponse{} + + if err = json.Unmarshal(bytes, &varRpmModulemdResponse); err == nil { + *o = RpmModulemdResponse(varRpmModulemdResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "stream") + delete(additionalProperties, "version") + delete(additionalProperties, "static_context") + delete(additionalProperties, "context") + delete(additionalProperties, "arch") + delete(additionalProperties, "artifacts") + delete(additionalProperties, "dependencies") + delete(additionalProperties, "packages") + delete(additionalProperties, "profiles") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmModulemdResponse struct { + value *RpmModulemdResponse + isSet bool +} + +func (v NullableRpmModulemdResponse) Get() *RpmModulemdResponse { + return v.value +} + +func (v *NullableRpmModulemdResponse) Set(val *RpmModulemdResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmModulemdResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmModulemdResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmModulemdResponse(val *RpmModulemdResponse) *NullableRpmModulemdResponse { + return &NullableRpmModulemdResponse{value: val, isSet: true} +} + +func (v NullableRpmModulemdResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmModulemdResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package.go new file mode 100644 index 0000000000..16de5105e6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package.go @@ -0,0 +1,306 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the RpmPackage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmPackage{} + +// RpmPackage A Serializer for Package. Add serializers for the new fields defined in Package and add those fields to the Meta class keeping fields from the parent class as well. Provide help_text. +type RpmPackage struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // Path where the artifact is located relative to distributions base_path + RelativePath *string `json:"relative_path,omitempty"` + // An uploaded file that may be turned into the artifact of the content unit. + File **os.File `json:"file,omitempty"` + // An uncommitted upload that may be turned into the artifact of the content unit. + Upload *string `json:"upload,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmPackage RpmPackage + +// NewRpmPackage instantiates a new RpmPackage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmPackage() *RpmPackage { + this := RpmPackage{} + return &this +} + +// NewRpmPackageWithDefaults instantiates a new RpmPackage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmPackageWithDefaults() *RpmPackage { + this := RpmPackage{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *RpmPackage) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackage) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *RpmPackage) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *RpmPackage) SetRepository(v string) { + o.Repository = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *RpmPackage) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackage) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *RpmPackage) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *RpmPackage) SetArtifact(v string) { + o.Artifact = &v +} + +// GetRelativePath returns the RelativePath field value if set, zero value otherwise. +func (o *RpmPackage) GetRelativePath() string { + if o == nil || IsNil(o.RelativePath) { + var ret string + return ret + } + return *o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackage) GetRelativePathOk() (*string, bool) { + if o == nil || IsNil(o.RelativePath) { + return nil, false + } + return o.RelativePath, true +} + +// HasRelativePath returns a boolean if a field has been set. +func (o *RpmPackage) HasRelativePath() bool { + if o != nil && !IsNil(o.RelativePath) { + return true + } + + return false +} + +// SetRelativePath gets a reference to the given string and assigns it to the RelativePath field. +func (o *RpmPackage) SetRelativePath(v string) { + o.RelativePath = &v +} + +// GetFile returns the File field value if set, zero value otherwise. +func (o *RpmPackage) GetFile() *os.File { + if o == nil || IsNil(o.File) { + var ret *os.File + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackage) GetFileOk() (**os.File, bool) { + if o == nil || IsNil(o.File) { + return nil, false + } + return o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *RpmPackage) HasFile() bool { + if o != nil && !IsNil(o.File) { + return true + } + + return false +} + +// SetFile gets a reference to the given *os.File and assigns it to the File field. +func (o *RpmPackage) SetFile(v *os.File) { + o.File = &v +} + +// GetUpload returns the Upload field value if set, zero value otherwise. +func (o *RpmPackage) GetUpload() string { + if o == nil || IsNil(o.Upload) { + var ret string + return ret + } + return *o.Upload +} + +// GetUploadOk returns a tuple with the Upload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackage) GetUploadOk() (*string, bool) { + if o == nil || IsNil(o.Upload) { + return nil, false + } + return o.Upload, true +} + +// HasUpload returns a boolean if a field has been set. +func (o *RpmPackage) HasUpload() bool { + if o != nil && !IsNil(o.Upload) { + return true + } + + return false +} + +// SetUpload gets a reference to the given string and assigns it to the Upload field. +func (o *RpmPackage) SetUpload(v string) { + o.Upload = &v +} + +func (o RpmPackage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmPackage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + if !IsNil(o.RelativePath) { + toSerialize["relative_path"] = o.RelativePath + } + if !IsNil(o.File) { + toSerialize["file"] = o.File + } + if !IsNil(o.Upload) { + toSerialize["upload"] = o.Upload + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmPackage) UnmarshalJSON(bytes []byte) (err error) { + varRpmPackage := _RpmPackage{} + + if err = json.Unmarshal(bytes, &varRpmPackage); err == nil { + *o = RpmPackage(varRpmPackage) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "file") + delete(additionalProperties, "upload") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmPackage struct { + value *RpmPackage + isSet bool +} + +func (v NullableRpmPackage) Get() *RpmPackage { + return v.value +} + +func (v *NullableRpmPackage) Set(val *RpmPackage) { + v.value = val + v.isSet = true +} + +func (v NullableRpmPackage) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmPackage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmPackage(val *RpmPackage) *NullableRpmPackage { + return &NullableRpmPackage{value: val, isSet: true} +} + +func (v NullableRpmPackage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmPackage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_category_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_category_response.go new file mode 100644 index 0000000000..7c9d7c7a44 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_category_response.go @@ -0,0 +1,437 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmPackageCategoryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmPackageCategoryResponse{} + +// RpmPackageCategoryResponse PackageCategory serializer. +type RpmPackageCategoryResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Category id. + Id string `json:"id"` + // Category name. + Name string `json:"name"` + // Category description. + Description string `json:"description"` + // Category display order. + DisplayOrder NullableInt64 `json:"display_order"` + // Category group list. + GroupIds map[string]interface{} `json:"group_ids"` + // Category description by language. + DescByLang map[string]interface{} `json:"desc_by_lang"` + // Category name by language. + NameByLang map[string]interface{} `json:"name_by_lang"` + // Category digest. + Digest string `json:"digest"` + AdditionalProperties map[string]interface{} +} + +type _RpmPackageCategoryResponse RpmPackageCategoryResponse + +// NewRpmPackageCategoryResponse instantiates a new RpmPackageCategoryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmPackageCategoryResponse(id string, name string, description string, displayOrder NullableInt64, groupIds map[string]interface{}, descByLang map[string]interface{}, nameByLang map[string]interface{}, digest string) *RpmPackageCategoryResponse { + this := RpmPackageCategoryResponse{} + this.Id = id + this.Name = name + this.Description = description + this.DisplayOrder = displayOrder + this.GroupIds = groupIds + this.DescByLang = descByLang + this.NameByLang = nameByLang + this.Digest = digest + return &this +} + +// NewRpmPackageCategoryResponseWithDefaults instantiates a new RpmPackageCategoryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmPackageCategoryResponseWithDefaults() *RpmPackageCategoryResponse { + this := RpmPackageCategoryResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmPackageCategoryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageCategoryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmPackageCategoryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmPackageCategoryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmPackageCategoryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageCategoryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmPackageCategoryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmPackageCategoryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetId returns the Id field value +func (o *RpmPackageCategoryResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RpmPackageCategoryResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RpmPackageCategoryResponse) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *RpmPackageCategoryResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmPackageCategoryResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmPackageCategoryResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +func (o *RpmPackageCategoryResponse) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *RpmPackageCategoryResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *RpmPackageCategoryResponse) SetDescription(v string) { + o.Description = v +} + +// GetDisplayOrder returns the DisplayOrder field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *RpmPackageCategoryResponse) GetDisplayOrder() int64 { + if o == nil || o.DisplayOrder.Get() == nil { + var ret int64 + return ret + } + + return *o.DisplayOrder.Get() +} + +// GetDisplayOrderOk returns a tuple with the DisplayOrder field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageCategoryResponse) GetDisplayOrderOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DisplayOrder.Get(), o.DisplayOrder.IsSet() +} + +// SetDisplayOrder sets field value +func (o *RpmPackageCategoryResponse) SetDisplayOrder(v int64) { + o.DisplayOrder.Set(&v) +} + +// GetGroupIds returns the GroupIds field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmPackageCategoryResponse) GetGroupIds() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.GroupIds +} + +// GetGroupIdsOk returns a tuple with the GroupIds field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageCategoryResponse) GetGroupIdsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.GroupIds) { + return map[string]interface{}{}, false + } + return o.GroupIds, true +} + +// SetGroupIds sets field value +func (o *RpmPackageCategoryResponse) SetGroupIds(v map[string]interface{}) { + o.GroupIds = v +} + +// GetDescByLang returns the DescByLang field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmPackageCategoryResponse) GetDescByLang() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.DescByLang +} + +// GetDescByLangOk returns a tuple with the DescByLang field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageCategoryResponse) GetDescByLangOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DescByLang) { + return map[string]interface{}{}, false + } + return o.DescByLang, true +} + +// SetDescByLang sets field value +func (o *RpmPackageCategoryResponse) SetDescByLang(v map[string]interface{}) { + o.DescByLang = v +} + +// GetNameByLang returns the NameByLang field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmPackageCategoryResponse) GetNameByLang() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.NameByLang +} + +// GetNameByLangOk returns a tuple with the NameByLang field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageCategoryResponse) GetNameByLangOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.NameByLang) { + return map[string]interface{}{}, false + } + return o.NameByLang, true +} + +// SetNameByLang sets field value +func (o *RpmPackageCategoryResponse) SetNameByLang(v map[string]interface{}) { + o.NameByLang = v +} + +// GetDigest returns the Digest field value +func (o *RpmPackageCategoryResponse) GetDigest() string { + if o == nil { + var ret string + return ret + } + + return o.Digest +} + +// GetDigestOk returns a tuple with the Digest field value +// and a boolean to check if the value has been set. +func (o *RpmPackageCategoryResponse) GetDigestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Digest, true +} + +// SetDigest sets field value +func (o *RpmPackageCategoryResponse) SetDigest(v string) { + o.Digest = v +} + +func (o RpmPackageCategoryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmPackageCategoryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["description"] = o.Description + toSerialize["display_order"] = o.DisplayOrder.Get() + if o.GroupIds != nil { + toSerialize["group_ids"] = o.GroupIds + } + if o.DescByLang != nil { + toSerialize["desc_by_lang"] = o.DescByLang + } + if o.NameByLang != nil { + toSerialize["name_by_lang"] = o.NameByLang + } + toSerialize["digest"] = o.Digest + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmPackageCategoryResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmPackageCategoryResponse := _RpmPackageCategoryResponse{} + + if err = json.Unmarshal(bytes, &varRpmPackageCategoryResponse); err == nil { + *o = RpmPackageCategoryResponse(varRpmPackageCategoryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "display_order") + delete(additionalProperties, "group_ids") + delete(additionalProperties, "desc_by_lang") + delete(additionalProperties, "name_by_lang") + delete(additionalProperties, "digest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmPackageCategoryResponse struct { + value *RpmPackageCategoryResponse + isSet bool +} + +func (v NullableRpmPackageCategoryResponse) Get() *RpmPackageCategoryResponse { + return v.value +} + +func (v *NullableRpmPackageCategoryResponse) Set(val *RpmPackageCategoryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmPackageCategoryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmPackageCategoryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmPackageCategoryResponse(val *RpmPackageCategoryResponse) *NullableRpmPackageCategoryResponse { + return &NullableRpmPackageCategoryResponse{value: val, isSet: true} +} + +func (v NullableRpmPackageCategoryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmPackageCategoryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_environment_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_environment_response.go new file mode 100644 index 0000000000..69c4c3c0fc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_environment_response.go @@ -0,0 +1,470 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmPackageEnvironmentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmPackageEnvironmentResponse{} + +// RpmPackageEnvironmentResponse PackageEnvironment serializer. +type RpmPackageEnvironmentResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Environment id. + Id string `json:"id"` + // Environment name. + Name string `json:"name"` + // Environment description. + Description string `json:"description"` + // Environment display order. + DisplayOrder NullableInt64 `json:"display_order"` + // Environment group list. + GroupIds map[string]interface{} `json:"group_ids"` + // Environment option ids + OptionIds map[string]interface{} `json:"option_ids"` + // Environment description by language. + DescByLang map[string]interface{} `json:"desc_by_lang"` + // Environment name by language. + NameByLang map[string]interface{} `json:"name_by_lang"` + // Environment digest. + Digest string `json:"digest"` + AdditionalProperties map[string]interface{} +} + +type _RpmPackageEnvironmentResponse RpmPackageEnvironmentResponse + +// NewRpmPackageEnvironmentResponse instantiates a new RpmPackageEnvironmentResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmPackageEnvironmentResponse(id string, name string, description string, displayOrder NullableInt64, groupIds map[string]interface{}, optionIds map[string]interface{}, descByLang map[string]interface{}, nameByLang map[string]interface{}, digest string) *RpmPackageEnvironmentResponse { + this := RpmPackageEnvironmentResponse{} + this.Id = id + this.Name = name + this.Description = description + this.DisplayOrder = displayOrder + this.GroupIds = groupIds + this.OptionIds = optionIds + this.DescByLang = descByLang + this.NameByLang = nameByLang + this.Digest = digest + return &this +} + +// NewRpmPackageEnvironmentResponseWithDefaults instantiates a new RpmPackageEnvironmentResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmPackageEnvironmentResponseWithDefaults() *RpmPackageEnvironmentResponse { + this := RpmPackageEnvironmentResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmPackageEnvironmentResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageEnvironmentResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmPackageEnvironmentResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmPackageEnvironmentResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmPackageEnvironmentResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageEnvironmentResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmPackageEnvironmentResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmPackageEnvironmentResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetId returns the Id field value +func (o *RpmPackageEnvironmentResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RpmPackageEnvironmentResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RpmPackageEnvironmentResponse) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *RpmPackageEnvironmentResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmPackageEnvironmentResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmPackageEnvironmentResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +func (o *RpmPackageEnvironmentResponse) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *RpmPackageEnvironmentResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *RpmPackageEnvironmentResponse) SetDescription(v string) { + o.Description = v +} + +// GetDisplayOrder returns the DisplayOrder field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *RpmPackageEnvironmentResponse) GetDisplayOrder() int64 { + if o == nil || o.DisplayOrder.Get() == nil { + var ret int64 + return ret + } + + return *o.DisplayOrder.Get() +} + +// GetDisplayOrderOk returns a tuple with the DisplayOrder field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageEnvironmentResponse) GetDisplayOrderOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DisplayOrder.Get(), o.DisplayOrder.IsSet() +} + +// SetDisplayOrder sets field value +func (o *RpmPackageEnvironmentResponse) SetDisplayOrder(v int64) { + o.DisplayOrder.Set(&v) +} + +// GetGroupIds returns the GroupIds field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmPackageEnvironmentResponse) GetGroupIds() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.GroupIds +} + +// GetGroupIdsOk returns a tuple with the GroupIds field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageEnvironmentResponse) GetGroupIdsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.GroupIds) { + return map[string]interface{}{}, false + } + return o.GroupIds, true +} + +// SetGroupIds sets field value +func (o *RpmPackageEnvironmentResponse) SetGroupIds(v map[string]interface{}) { + o.GroupIds = v +} + +// GetOptionIds returns the OptionIds field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmPackageEnvironmentResponse) GetOptionIds() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.OptionIds +} + +// GetOptionIdsOk returns a tuple with the OptionIds field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageEnvironmentResponse) GetOptionIdsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.OptionIds) { + return map[string]interface{}{}, false + } + return o.OptionIds, true +} + +// SetOptionIds sets field value +func (o *RpmPackageEnvironmentResponse) SetOptionIds(v map[string]interface{}) { + o.OptionIds = v +} + +// GetDescByLang returns the DescByLang field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmPackageEnvironmentResponse) GetDescByLang() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.DescByLang +} + +// GetDescByLangOk returns a tuple with the DescByLang field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageEnvironmentResponse) GetDescByLangOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DescByLang) { + return map[string]interface{}{}, false + } + return o.DescByLang, true +} + +// SetDescByLang sets field value +func (o *RpmPackageEnvironmentResponse) SetDescByLang(v map[string]interface{}) { + o.DescByLang = v +} + +// GetNameByLang returns the NameByLang field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmPackageEnvironmentResponse) GetNameByLang() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.NameByLang +} + +// GetNameByLangOk returns a tuple with the NameByLang field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageEnvironmentResponse) GetNameByLangOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.NameByLang) { + return map[string]interface{}{}, false + } + return o.NameByLang, true +} + +// SetNameByLang sets field value +func (o *RpmPackageEnvironmentResponse) SetNameByLang(v map[string]interface{}) { + o.NameByLang = v +} + +// GetDigest returns the Digest field value +func (o *RpmPackageEnvironmentResponse) GetDigest() string { + if o == nil { + var ret string + return ret + } + + return o.Digest +} + +// GetDigestOk returns a tuple with the Digest field value +// and a boolean to check if the value has been set. +func (o *RpmPackageEnvironmentResponse) GetDigestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Digest, true +} + +// SetDigest sets field value +func (o *RpmPackageEnvironmentResponse) SetDigest(v string) { + o.Digest = v +} + +func (o RpmPackageEnvironmentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmPackageEnvironmentResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["description"] = o.Description + toSerialize["display_order"] = o.DisplayOrder.Get() + if o.GroupIds != nil { + toSerialize["group_ids"] = o.GroupIds + } + if o.OptionIds != nil { + toSerialize["option_ids"] = o.OptionIds + } + if o.DescByLang != nil { + toSerialize["desc_by_lang"] = o.DescByLang + } + if o.NameByLang != nil { + toSerialize["name_by_lang"] = o.NameByLang + } + toSerialize["digest"] = o.Digest + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmPackageEnvironmentResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmPackageEnvironmentResponse := _RpmPackageEnvironmentResponse{} + + if err = json.Unmarshal(bytes, &varRpmPackageEnvironmentResponse); err == nil { + *o = RpmPackageEnvironmentResponse(varRpmPackageEnvironmentResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "display_order") + delete(additionalProperties, "group_ids") + delete(additionalProperties, "option_ids") + delete(additionalProperties, "desc_by_lang") + delete(additionalProperties, "name_by_lang") + delete(additionalProperties, "digest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmPackageEnvironmentResponse struct { + value *RpmPackageEnvironmentResponse + isSet bool +} + +func (v NullableRpmPackageEnvironmentResponse) Get() *RpmPackageEnvironmentResponse { + return v.value +} + +func (v *NullableRpmPackageEnvironmentResponse) Set(val *RpmPackageEnvironmentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmPackageEnvironmentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmPackageEnvironmentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmPackageEnvironmentResponse(val *RpmPackageEnvironmentResponse) *NullableRpmPackageEnvironmentResponse { + return &NullableRpmPackageEnvironmentResponse{value: val, isSet: true} +} + +func (v NullableRpmPackageEnvironmentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmPackageEnvironmentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_group_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_group_response.go new file mode 100644 index 0000000000..85afb8ed2b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_group_response.go @@ -0,0 +1,551 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmPackageGroupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmPackageGroupResponse{} + +// RpmPackageGroupResponse PackageGroup serializer. +type RpmPackageGroupResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // PackageGroup id. + Id string `json:"id"` + // PackageGroup default. + Default *bool `json:"default,omitempty"` + // PackageGroup user visibility. + UserVisible *bool `json:"user_visible,omitempty"` + // PackageGroup display order. + DisplayOrder NullableInt64 `json:"display_order"` + // PackageGroup name. + Name string `json:"name"` + // PackageGroup description. + Description string `json:"description"` + // PackageGroup package list. + Packages map[string]interface{} `json:"packages"` + // PackageGroup biarch only. + BiarchOnly *bool `json:"biarch_only,omitempty"` + // PackageGroup description by language. + DescByLang map[string]interface{} `json:"desc_by_lang"` + // PackageGroup name by language. + NameByLang map[string]interface{} `json:"name_by_lang"` + // PackageGroup digest. + Digest string `json:"digest"` + AdditionalProperties map[string]interface{} +} + +type _RpmPackageGroupResponse RpmPackageGroupResponse + +// NewRpmPackageGroupResponse instantiates a new RpmPackageGroupResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmPackageGroupResponse(id string, displayOrder NullableInt64, name string, description string, packages map[string]interface{}, descByLang map[string]interface{}, nameByLang map[string]interface{}, digest string) *RpmPackageGroupResponse { + this := RpmPackageGroupResponse{} + this.Id = id + this.DisplayOrder = displayOrder + this.Name = name + this.Description = description + this.Packages = packages + this.DescByLang = descByLang + this.NameByLang = nameByLang + this.Digest = digest + return &this +} + +// NewRpmPackageGroupResponseWithDefaults instantiates a new RpmPackageGroupResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmPackageGroupResponseWithDefaults() *RpmPackageGroupResponse { + this := RpmPackageGroupResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmPackageGroupResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageGroupResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmPackageGroupResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmPackageGroupResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmPackageGroupResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageGroupResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmPackageGroupResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmPackageGroupResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetId returns the Id field value +func (o *RpmPackageGroupResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RpmPackageGroupResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RpmPackageGroupResponse) SetId(v string) { + o.Id = v +} + +// GetDefault returns the Default field value if set, zero value otherwise. +func (o *RpmPackageGroupResponse) GetDefault() bool { + if o == nil || IsNil(o.Default) { + var ret bool + return ret + } + return *o.Default +} + +// GetDefaultOk returns a tuple with the Default field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageGroupResponse) GetDefaultOk() (*bool, bool) { + if o == nil || IsNil(o.Default) { + return nil, false + } + return o.Default, true +} + +// HasDefault returns a boolean if a field has been set. +func (o *RpmPackageGroupResponse) HasDefault() bool { + if o != nil && !IsNil(o.Default) { + return true + } + + return false +} + +// SetDefault gets a reference to the given bool and assigns it to the Default field. +func (o *RpmPackageGroupResponse) SetDefault(v bool) { + o.Default = &v +} + +// GetUserVisible returns the UserVisible field value if set, zero value otherwise. +func (o *RpmPackageGroupResponse) GetUserVisible() bool { + if o == nil || IsNil(o.UserVisible) { + var ret bool + return ret + } + return *o.UserVisible +} + +// GetUserVisibleOk returns a tuple with the UserVisible field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageGroupResponse) GetUserVisibleOk() (*bool, bool) { + if o == nil || IsNil(o.UserVisible) { + return nil, false + } + return o.UserVisible, true +} + +// HasUserVisible returns a boolean if a field has been set. +func (o *RpmPackageGroupResponse) HasUserVisible() bool { + if o != nil && !IsNil(o.UserVisible) { + return true + } + + return false +} + +// SetUserVisible gets a reference to the given bool and assigns it to the UserVisible field. +func (o *RpmPackageGroupResponse) SetUserVisible(v bool) { + o.UserVisible = &v +} + +// GetDisplayOrder returns the DisplayOrder field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *RpmPackageGroupResponse) GetDisplayOrder() int64 { + if o == nil || o.DisplayOrder.Get() == nil { + var ret int64 + return ret + } + + return *o.DisplayOrder.Get() +} + +// GetDisplayOrderOk returns a tuple with the DisplayOrder field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageGroupResponse) GetDisplayOrderOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DisplayOrder.Get(), o.DisplayOrder.IsSet() +} + +// SetDisplayOrder sets field value +func (o *RpmPackageGroupResponse) SetDisplayOrder(v int64) { + o.DisplayOrder.Set(&v) +} + +// GetName returns the Name field value +func (o *RpmPackageGroupResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmPackageGroupResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmPackageGroupResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +func (o *RpmPackageGroupResponse) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *RpmPackageGroupResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *RpmPackageGroupResponse) SetDescription(v string) { + o.Description = v +} + +// GetPackages returns the Packages field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmPackageGroupResponse) GetPackages() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Packages +} + +// GetPackagesOk returns a tuple with the Packages field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageGroupResponse) GetPackagesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Packages) { + return map[string]interface{}{}, false + } + return o.Packages, true +} + +// SetPackages sets field value +func (o *RpmPackageGroupResponse) SetPackages(v map[string]interface{}) { + o.Packages = v +} + +// GetBiarchOnly returns the BiarchOnly field value if set, zero value otherwise. +func (o *RpmPackageGroupResponse) GetBiarchOnly() bool { + if o == nil || IsNil(o.BiarchOnly) { + var ret bool + return ret + } + return *o.BiarchOnly +} + +// GetBiarchOnlyOk returns a tuple with the BiarchOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageGroupResponse) GetBiarchOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.BiarchOnly) { + return nil, false + } + return o.BiarchOnly, true +} + +// HasBiarchOnly returns a boolean if a field has been set. +func (o *RpmPackageGroupResponse) HasBiarchOnly() bool { + if o != nil && !IsNil(o.BiarchOnly) { + return true + } + + return false +} + +// SetBiarchOnly gets a reference to the given bool and assigns it to the BiarchOnly field. +func (o *RpmPackageGroupResponse) SetBiarchOnly(v bool) { + o.BiarchOnly = &v +} + +// GetDescByLang returns the DescByLang field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmPackageGroupResponse) GetDescByLang() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.DescByLang +} + +// GetDescByLangOk returns a tuple with the DescByLang field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageGroupResponse) GetDescByLangOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DescByLang) { + return map[string]interface{}{}, false + } + return o.DescByLang, true +} + +// SetDescByLang sets field value +func (o *RpmPackageGroupResponse) SetDescByLang(v map[string]interface{}) { + o.DescByLang = v +} + +// GetNameByLang returns the NameByLang field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmPackageGroupResponse) GetNameByLang() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.NameByLang +} + +// GetNameByLangOk returns a tuple with the NameByLang field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageGroupResponse) GetNameByLangOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.NameByLang) { + return map[string]interface{}{}, false + } + return o.NameByLang, true +} + +// SetNameByLang sets field value +func (o *RpmPackageGroupResponse) SetNameByLang(v map[string]interface{}) { + o.NameByLang = v +} + +// GetDigest returns the Digest field value +func (o *RpmPackageGroupResponse) GetDigest() string { + if o == nil { + var ret string + return ret + } + + return o.Digest +} + +// GetDigestOk returns a tuple with the Digest field value +// and a boolean to check if the value has been set. +func (o *RpmPackageGroupResponse) GetDigestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Digest, true +} + +// SetDigest sets field value +func (o *RpmPackageGroupResponse) SetDigest(v string) { + o.Digest = v +} + +func (o RpmPackageGroupResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmPackageGroupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["id"] = o.Id + if !IsNil(o.Default) { + toSerialize["default"] = o.Default + } + if !IsNil(o.UserVisible) { + toSerialize["user_visible"] = o.UserVisible + } + toSerialize["display_order"] = o.DisplayOrder.Get() + toSerialize["name"] = o.Name + toSerialize["description"] = o.Description + if o.Packages != nil { + toSerialize["packages"] = o.Packages + } + if !IsNil(o.BiarchOnly) { + toSerialize["biarch_only"] = o.BiarchOnly + } + if o.DescByLang != nil { + toSerialize["desc_by_lang"] = o.DescByLang + } + if o.NameByLang != nil { + toSerialize["name_by_lang"] = o.NameByLang + } + toSerialize["digest"] = o.Digest + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmPackageGroupResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmPackageGroupResponse := _RpmPackageGroupResponse{} + + if err = json.Unmarshal(bytes, &varRpmPackageGroupResponse); err == nil { + *o = RpmPackageGroupResponse(varRpmPackageGroupResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "id") + delete(additionalProperties, "default") + delete(additionalProperties, "user_visible") + delete(additionalProperties, "display_order") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "packages") + delete(additionalProperties, "biarch_only") + delete(additionalProperties, "desc_by_lang") + delete(additionalProperties, "name_by_lang") + delete(additionalProperties, "digest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmPackageGroupResponse struct { + value *RpmPackageGroupResponse + isSet bool +} + +func (v NullableRpmPackageGroupResponse) Get() *RpmPackageGroupResponse { + return v.value +} + +func (v *NullableRpmPackageGroupResponse) Set(val *RpmPackageGroupResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmPackageGroupResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmPackageGroupResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmPackageGroupResponse(val *RpmPackageGroupResponse) *NullableRpmPackageGroupResponse { + return &NullableRpmPackageGroupResponse{value: val, isSet: true} +} + +func (v NullableRpmPackageGroupResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmPackageGroupResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_langpacks_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_langpacks_response.go new file mode 100644 index 0000000000..dc80569252 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_langpacks_response.go @@ -0,0 +1,255 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmPackageLangpacksResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmPackageLangpacksResponse{} + +// RpmPackageLangpacksResponse PackageLangpacks serializer. +type RpmPackageLangpacksResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Langpacks matches. + Matches map[string]interface{} `json:"matches"` + // Langpacks digest. + Digest NullableString `json:"digest"` + AdditionalProperties map[string]interface{} +} + +type _RpmPackageLangpacksResponse RpmPackageLangpacksResponse + +// NewRpmPackageLangpacksResponse instantiates a new RpmPackageLangpacksResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmPackageLangpacksResponse(matches map[string]interface{}, digest NullableString) *RpmPackageLangpacksResponse { + this := RpmPackageLangpacksResponse{} + this.Matches = matches + this.Digest = digest + return &this +} + +// NewRpmPackageLangpacksResponseWithDefaults instantiates a new RpmPackageLangpacksResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmPackageLangpacksResponseWithDefaults() *RpmPackageLangpacksResponse { + this := RpmPackageLangpacksResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmPackageLangpacksResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageLangpacksResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmPackageLangpacksResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmPackageLangpacksResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmPackageLangpacksResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageLangpacksResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmPackageLangpacksResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmPackageLangpacksResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetMatches returns the Matches field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmPackageLangpacksResponse) GetMatches() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Matches +} + +// GetMatchesOk returns a tuple with the Matches field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageLangpacksResponse) GetMatchesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Matches) { + return map[string]interface{}{}, false + } + return o.Matches, true +} + +// SetMatches sets field value +func (o *RpmPackageLangpacksResponse) SetMatches(v map[string]interface{}) { + o.Matches = v +} + +// GetDigest returns the Digest field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmPackageLangpacksResponse) GetDigest() string { + if o == nil || o.Digest.Get() == nil { + var ret string + return ret + } + + return *o.Digest.Get() +} + +// GetDigestOk returns a tuple with the Digest field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmPackageLangpacksResponse) GetDigestOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Digest.Get(), o.Digest.IsSet() +} + +// SetDigest sets field value +func (o *RpmPackageLangpacksResponse) SetDigest(v string) { + o.Digest.Set(&v) +} + +func (o RpmPackageLangpacksResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmPackageLangpacksResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if o.Matches != nil { + toSerialize["matches"] = o.Matches + } + toSerialize["digest"] = o.Digest.Get() + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmPackageLangpacksResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmPackageLangpacksResponse := _RpmPackageLangpacksResponse{} + + if err = json.Unmarshal(bytes, &varRpmPackageLangpacksResponse); err == nil { + *o = RpmPackageLangpacksResponse(varRpmPackageLangpacksResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "matches") + delete(additionalProperties, "digest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmPackageLangpacksResponse struct { + value *RpmPackageLangpacksResponse + isSet bool +} + +func (v NullableRpmPackageLangpacksResponse) Get() *RpmPackageLangpacksResponse { + return v.value +} + +func (v *NullableRpmPackageLangpacksResponse) Set(val *RpmPackageLangpacksResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmPackageLangpacksResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmPackageLangpacksResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmPackageLangpacksResponse(val *RpmPackageLangpacksResponse) *NullableRpmPackageLangpacksResponse { + return &NullableRpmPackageLangpacksResponse{value: val, isSet: true} +} + +func (v NullableRpmPackageLangpacksResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmPackageLangpacksResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_response.go new file mode 100644 index 0000000000..0c3695212e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_package_response.go @@ -0,0 +1,1825 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmPackageResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmPackageResponse{} + +// RpmPackageResponse A Serializer for Package. Add serializers for the new fields defined in Package and add those fields to the Meta class keeping fields from the parent class as well. Provide help_text. +type RpmPackageResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The MD5 checksum if available. + Md5 *string `json:"md5,omitempty"` + // The SHA-1 checksum if available. + Sha1 *string `json:"sha1,omitempty"` + // The SHA-224 checksum if available. + Sha224 *string `json:"sha224,omitempty"` + // The SHA-256 checksum if available. + Sha256 *string `json:"sha256,omitempty"` + // The SHA-384 checksum if available. + Sha384 *string `json:"sha384,omitempty"` + // The SHA-512 checksum if available. + Sha512 *string `json:"sha512,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // Name of the package + Name *string `json:"name,omitempty"` + // The package's epoch + Epoch *string `json:"epoch,omitempty"` + // The version of the package. For example, '2.8.0' + Version *string `json:"version,omitempty"` + // The release of a particular version of the package. e.g. '1.el7' or '3.f24' + Release *string `json:"release,omitempty"` + // The target architecture for a package.For example, 'x86_64', 'i686', or 'noarch' + Arch *string `json:"arch,omitempty"` + // Checksum of the package file + PkgId *string `json:"pkgId,omitempty"` + // Type of checksum, e.g. 'sha256', 'md5' + ChecksumType *string `json:"checksum_type,omitempty"` + // Short description of the packaged software + Summary *string `json:"summary,omitempty"` + // In-depth description of the packaged software + Description *string `json:"description,omitempty"` + // URL with more information about the packaged software + Url *string `json:"url,omitempty"` + // Changelogs that package contains + Changelogs map[string]interface{} `json:"changelogs,omitempty"` + // Files that package contains + Files map[string]interface{} `json:"files,omitempty"` + // Capabilities the package requires + Requires map[string]interface{} `json:"requires,omitempty"` + // Capabilities the package provides + Provides map[string]interface{} `json:"provides,omitempty"` + // Capabilities the package conflicts + Conflicts map[string]interface{} `json:"conflicts,omitempty"` + // Capabilities the package obsoletes + Obsoletes map[string]interface{} `json:"obsoletes,omitempty"` + // Capabilities the package suggests + Suggests map[string]interface{} `json:"suggests,omitempty"` + // Capabilities the package enhances + Enhances map[string]interface{} `json:"enhances,omitempty"` + // Capabilities the package recommends + Recommends map[string]interface{} `json:"recommends,omitempty"` + // Capabilities the package supplements + Supplements map[string]interface{} `json:"supplements,omitempty"` + // Base location of this package + LocationBase *string `json:"location_base,omitempty"` + // Relative location of package to the repodata + LocationHref *string `json:"location_href,omitempty"` + // Hostname of the system that built the package + RpmBuildhost *string `json:"rpm_buildhost,omitempty"` + // RPM group (See: http://fedoraproject.org/wiki/RPMGroups) + RpmGroup *string `json:"rpm_group,omitempty"` + // License term applicable to the package software (GPLv2, etc.) + RpmLicense *string `json:"rpm_license,omitempty"` + // Person or persons responsible for creating the package + RpmPackager *string `json:"rpm_packager,omitempty"` + // Name of the source package (srpm) the package was built from + RpmSourcerpm *string `json:"rpm_sourcerpm,omitempty"` + // Name of the organization that produced the package + RpmVendor *string `json:"rpm_vendor,omitempty"` + // First byte of the header + RpmHeaderStart *int64 `json:"rpm_header_start,omitempty"` + // Last byte of the header + RpmHeaderEnd *int64 `json:"rpm_header_end,omitempty"` + // Flag to identify if the package is modular + IsModular *bool `json:"is_modular,omitempty"` + // Size, in bytes, of the archive portion of the original package file + SizeArchive *int64 `json:"size_archive,omitempty"` + // Total size, in bytes, of every file installed by this package + SizeInstalled *int64 `json:"size_installed,omitempty"` + // Size, in bytes, of the package + SizePackage *int64 `json:"size_package,omitempty"` + // Time the package was built in seconds since the epoch + TimeBuild *int64 `json:"time_build,omitempty"` + // The 'file' time attribute in the primary XML - file mtime in seconds since the epoch. + TimeFile *int64 `json:"time_file,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmPackageResponse RpmPackageResponse + +// NewRpmPackageResponse instantiates a new RpmPackageResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmPackageResponse() *RpmPackageResponse { + this := RpmPackageResponse{} + return &this +} + +// NewRpmPackageResponseWithDefaults instantiates a new RpmPackageResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmPackageResponseWithDefaults() *RpmPackageResponse { + this := RpmPackageResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmPackageResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmPackageResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetMd5 returns the Md5 field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetMd5() string { + if o == nil || IsNil(o.Md5) { + var ret string + return ret + } + return *o.Md5 +} + +// GetMd5Ok returns a tuple with the Md5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetMd5Ok() (*string, bool) { + if o == nil || IsNil(o.Md5) { + return nil, false + } + return o.Md5, true +} + +// HasMd5 returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasMd5() bool { + if o != nil && !IsNil(o.Md5) { + return true + } + + return false +} + +// SetMd5 gets a reference to the given string and assigns it to the Md5 field. +func (o *RpmPackageResponse) SetMd5(v string) { + o.Md5 = &v +} + +// GetSha1 returns the Sha1 field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetSha1() string { + if o == nil || IsNil(o.Sha1) { + var ret string + return ret + } + return *o.Sha1 +} + +// GetSha1Ok returns a tuple with the Sha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetSha1Ok() (*string, bool) { + if o == nil || IsNil(o.Sha1) { + return nil, false + } + return o.Sha1, true +} + +// HasSha1 returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasSha1() bool { + if o != nil && !IsNil(o.Sha1) { + return true + } + + return false +} + +// SetSha1 gets a reference to the given string and assigns it to the Sha1 field. +func (o *RpmPackageResponse) SetSha1(v string) { + o.Sha1 = &v +} + +// GetSha224 returns the Sha224 field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetSha224() string { + if o == nil || IsNil(o.Sha224) { + var ret string + return ret + } + return *o.Sha224 +} + +// GetSha224Ok returns a tuple with the Sha224 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetSha224Ok() (*string, bool) { + if o == nil || IsNil(o.Sha224) { + return nil, false + } + return o.Sha224, true +} + +// HasSha224 returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasSha224() bool { + if o != nil && !IsNil(o.Sha224) { + return true + } + + return false +} + +// SetSha224 gets a reference to the given string and assigns it to the Sha224 field. +func (o *RpmPackageResponse) SetSha224(v string) { + o.Sha224 = &v +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetSha256() string { + if o == nil || IsNil(o.Sha256) { + var ret string + return ret + } + return *o.Sha256 +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetSha256Ok() (*string, bool) { + if o == nil || IsNil(o.Sha256) { + return nil, false + } + return o.Sha256, true +} + +// HasSha256 returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasSha256() bool { + if o != nil && !IsNil(o.Sha256) { + return true + } + + return false +} + +// SetSha256 gets a reference to the given string and assigns it to the Sha256 field. +func (o *RpmPackageResponse) SetSha256(v string) { + o.Sha256 = &v +} + +// GetSha384 returns the Sha384 field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetSha384() string { + if o == nil || IsNil(o.Sha384) { + var ret string + return ret + } + return *o.Sha384 +} + +// GetSha384Ok returns a tuple with the Sha384 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetSha384Ok() (*string, bool) { + if o == nil || IsNil(o.Sha384) { + return nil, false + } + return o.Sha384, true +} + +// HasSha384 returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasSha384() bool { + if o != nil && !IsNil(o.Sha384) { + return true + } + + return false +} + +// SetSha384 gets a reference to the given string and assigns it to the Sha384 field. +func (o *RpmPackageResponse) SetSha384(v string) { + o.Sha384 = &v +} + +// GetSha512 returns the Sha512 field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetSha512() string { + if o == nil || IsNil(o.Sha512) { + var ret string + return ret + } + return *o.Sha512 +} + +// GetSha512Ok returns a tuple with the Sha512 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetSha512Ok() (*string, bool) { + if o == nil || IsNil(o.Sha512) { + return nil, false + } + return o.Sha512, true +} + +// HasSha512 returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasSha512() bool { + if o != nil && !IsNil(o.Sha512) { + return true + } + + return false +} + +// SetSha512 gets a reference to the given string and assigns it to the Sha512 field. +func (o *RpmPackageResponse) SetSha512(v string) { + o.Sha512 = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *RpmPackageResponse) SetArtifact(v string) { + o.Artifact = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *RpmPackageResponse) SetName(v string) { + o.Name = &v +} + +// GetEpoch returns the Epoch field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetEpoch() string { + if o == nil || IsNil(o.Epoch) { + var ret string + return ret + } + return *o.Epoch +} + +// GetEpochOk returns a tuple with the Epoch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetEpochOk() (*string, bool) { + if o == nil || IsNil(o.Epoch) { + return nil, false + } + return o.Epoch, true +} + +// HasEpoch returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasEpoch() bool { + if o != nil && !IsNil(o.Epoch) { + return true + } + + return false +} + +// SetEpoch gets a reference to the given string and assigns it to the Epoch field. +func (o *RpmPackageResponse) SetEpoch(v string) { + o.Epoch = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *RpmPackageResponse) SetVersion(v string) { + o.Version = &v +} + +// GetRelease returns the Release field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetRelease() string { + if o == nil || IsNil(o.Release) { + var ret string + return ret + } + return *o.Release +} + +// GetReleaseOk returns a tuple with the Release field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetReleaseOk() (*string, bool) { + if o == nil || IsNil(o.Release) { + return nil, false + } + return o.Release, true +} + +// HasRelease returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasRelease() bool { + if o != nil && !IsNil(o.Release) { + return true + } + + return false +} + +// SetRelease gets a reference to the given string and assigns it to the Release field. +func (o *RpmPackageResponse) SetRelease(v string) { + o.Release = &v +} + +// GetArch returns the Arch field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetArch() string { + if o == nil || IsNil(o.Arch) { + var ret string + return ret + } + return *o.Arch +} + +// GetArchOk returns a tuple with the Arch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetArchOk() (*string, bool) { + if o == nil || IsNil(o.Arch) { + return nil, false + } + return o.Arch, true +} + +// HasArch returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasArch() bool { + if o != nil && !IsNil(o.Arch) { + return true + } + + return false +} + +// SetArch gets a reference to the given string and assigns it to the Arch field. +func (o *RpmPackageResponse) SetArch(v string) { + o.Arch = &v +} + +// GetPkgId returns the PkgId field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetPkgId() string { + if o == nil || IsNil(o.PkgId) { + var ret string + return ret + } + return *o.PkgId +} + +// GetPkgIdOk returns a tuple with the PkgId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetPkgIdOk() (*string, bool) { + if o == nil || IsNil(o.PkgId) { + return nil, false + } + return o.PkgId, true +} + +// HasPkgId returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasPkgId() bool { + if o != nil && !IsNil(o.PkgId) { + return true + } + + return false +} + +// SetPkgId gets a reference to the given string and assigns it to the PkgId field. +func (o *RpmPackageResponse) SetPkgId(v string) { + o.PkgId = &v +} + +// GetChecksumType returns the ChecksumType field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetChecksumType() string { + if o == nil || IsNil(o.ChecksumType) { + var ret string + return ret + } + return *o.ChecksumType +} + +// GetChecksumTypeOk returns a tuple with the ChecksumType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetChecksumTypeOk() (*string, bool) { + if o == nil || IsNil(o.ChecksumType) { + return nil, false + } + return o.ChecksumType, true +} + +// HasChecksumType returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasChecksumType() bool { + if o != nil && !IsNil(o.ChecksumType) { + return true + } + + return false +} + +// SetChecksumType gets a reference to the given string and assigns it to the ChecksumType field. +func (o *RpmPackageResponse) SetChecksumType(v string) { + o.ChecksumType = &v +} + +// GetSummary returns the Summary field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetSummary() string { + if o == nil || IsNil(o.Summary) { + var ret string + return ret + } + return *o.Summary +} + +// GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetSummaryOk() (*string, bool) { + if o == nil || IsNil(o.Summary) { + return nil, false + } + return o.Summary, true +} + +// HasSummary returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasSummary() bool { + if o != nil && !IsNil(o.Summary) { + return true + } + + return false +} + +// SetSummary gets a reference to the given string and assigns it to the Summary field. +func (o *RpmPackageResponse) SetSummary(v string) { + o.Summary = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *RpmPackageResponse) SetDescription(v string) { + o.Description = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *RpmPackageResponse) SetUrl(v string) { + o.Url = &v +} + +// GetChangelogs returns the Changelogs field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetChangelogs() map[string]interface{} { + if o == nil || IsNil(o.Changelogs) { + var ret map[string]interface{} + return ret + } + return o.Changelogs +} + +// GetChangelogsOk returns a tuple with the Changelogs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetChangelogsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Changelogs) { + return map[string]interface{}{}, false + } + return o.Changelogs, true +} + +// HasChangelogs returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasChangelogs() bool { + if o != nil && !IsNil(o.Changelogs) { + return true + } + + return false +} + +// SetChangelogs gets a reference to the given map[string]interface{} and assigns it to the Changelogs field. +func (o *RpmPackageResponse) SetChangelogs(v map[string]interface{}) { + o.Changelogs = v +} + +// GetFiles returns the Files field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetFiles() map[string]interface{} { + if o == nil || IsNil(o.Files) { + var ret map[string]interface{} + return ret + } + return o.Files +} + +// GetFilesOk returns a tuple with the Files field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetFilesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Files) { + return map[string]interface{}{}, false + } + return o.Files, true +} + +// HasFiles returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasFiles() bool { + if o != nil && !IsNil(o.Files) { + return true + } + + return false +} + +// SetFiles gets a reference to the given map[string]interface{} and assigns it to the Files field. +func (o *RpmPackageResponse) SetFiles(v map[string]interface{}) { + o.Files = v +} + +// GetRequires returns the Requires field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetRequires() map[string]interface{} { + if o == nil || IsNil(o.Requires) { + var ret map[string]interface{} + return ret + } + return o.Requires +} + +// GetRequiresOk returns a tuple with the Requires field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetRequiresOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Requires) { + return map[string]interface{}{}, false + } + return o.Requires, true +} + +// HasRequires returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasRequires() bool { + if o != nil && !IsNil(o.Requires) { + return true + } + + return false +} + +// SetRequires gets a reference to the given map[string]interface{} and assigns it to the Requires field. +func (o *RpmPackageResponse) SetRequires(v map[string]interface{}) { + o.Requires = v +} + +// GetProvides returns the Provides field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetProvides() map[string]interface{} { + if o == nil || IsNil(o.Provides) { + var ret map[string]interface{} + return ret + } + return o.Provides +} + +// GetProvidesOk returns a tuple with the Provides field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetProvidesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Provides) { + return map[string]interface{}{}, false + } + return o.Provides, true +} + +// HasProvides returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasProvides() bool { + if o != nil && !IsNil(o.Provides) { + return true + } + + return false +} + +// SetProvides gets a reference to the given map[string]interface{} and assigns it to the Provides field. +func (o *RpmPackageResponse) SetProvides(v map[string]interface{}) { + o.Provides = v +} + +// GetConflicts returns the Conflicts field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetConflicts() map[string]interface{} { + if o == nil || IsNil(o.Conflicts) { + var ret map[string]interface{} + return ret + } + return o.Conflicts +} + +// GetConflictsOk returns a tuple with the Conflicts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetConflictsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Conflicts) { + return map[string]interface{}{}, false + } + return o.Conflicts, true +} + +// HasConflicts returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasConflicts() bool { + if o != nil && !IsNil(o.Conflicts) { + return true + } + + return false +} + +// SetConflicts gets a reference to the given map[string]interface{} and assigns it to the Conflicts field. +func (o *RpmPackageResponse) SetConflicts(v map[string]interface{}) { + o.Conflicts = v +} + +// GetObsoletes returns the Obsoletes field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetObsoletes() map[string]interface{} { + if o == nil || IsNil(o.Obsoletes) { + var ret map[string]interface{} + return ret + } + return o.Obsoletes +} + +// GetObsoletesOk returns a tuple with the Obsoletes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetObsoletesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Obsoletes) { + return map[string]interface{}{}, false + } + return o.Obsoletes, true +} + +// HasObsoletes returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasObsoletes() bool { + if o != nil && !IsNil(o.Obsoletes) { + return true + } + + return false +} + +// SetObsoletes gets a reference to the given map[string]interface{} and assigns it to the Obsoletes field. +func (o *RpmPackageResponse) SetObsoletes(v map[string]interface{}) { + o.Obsoletes = v +} + +// GetSuggests returns the Suggests field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetSuggests() map[string]interface{} { + if o == nil || IsNil(o.Suggests) { + var ret map[string]interface{} + return ret + } + return o.Suggests +} + +// GetSuggestsOk returns a tuple with the Suggests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetSuggestsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Suggests) { + return map[string]interface{}{}, false + } + return o.Suggests, true +} + +// HasSuggests returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasSuggests() bool { + if o != nil && !IsNil(o.Suggests) { + return true + } + + return false +} + +// SetSuggests gets a reference to the given map[string]interface{} and assigns it to the Suggests field. +func (o *RpmPackageResponse) SetSuggests(v map[string]interface{}) { + o.Suggests = v +} + +// GetEnhances returns the Enhances field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetEnhances() map[string]interface{} { + if o == nil || IsNil(o.Enhances) { + var ret map[string]interface{} + return ret + } + return o.Enhances +} + +// GetEnhancesOk returns a tuple with the Enhances field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetEnhancesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Enhances) { + return map[string]interface{}{}, false + } + return o.Enhances, true +} + +// HasEnhances returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasEnhances() bool { + if o != nil && !IsNil(o.Enhances) { + return true + } + + return false +} + +// SetEnhances gets a reference to the given map[string]interface{} and assigns it to the Enhances field. +func (o *RpmPackageResponse) SetEnhances(v map[string]interface{}) { + o.Enhances = v +} + +// GetRecommends returns the Recommends field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetRecommends() map[string]interface{} { + if o == nil || IsNil(o.Recommends) { + var ret map[string]interface{} + return ret + } + return o.Recommends +} + +// GetRecommendsOk returns a tuple with the Recommends field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetRecommendsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Recommends) { + return map[string]interface{}{}, false + } + return o.Recommends, true +} + +// HasRecommends returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasRecommends() bool { + if o != nil && !IsNil(o.Recommends) { + return true + } + + return false +} + +// SetRecommends gets a reference to the given map[string]interface{} and assigns it to the Recommends field. +func (o *RpmPackageResponse) SetRecommends(v map[string]interface{}) { + o.Recommends = v +} + +// GetSupplements returns the Supplements field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetSupplements() map[string]interface{} { + if o == nil || IsNil(o.Supplements) { + var ret map[string]interface{} + return ret + } + return o.Supplements +} + +// GetSupplementsOk returns a tuple with the Supplements field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetSupplementsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Supplements) { + return map[string]interface{}{}, false + } + return o.Supplements, true +} + +// HasSupplements returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasSupplements() bool { + if o != nil && !IsNil(o.Supplements) { + return true + } + + return false +} + +// SetSupplements gets a reference to the given map[string]interface{} and assigns it to the Supplements field. +func (o *RpmPackageResponse) SetSupplements(v map[string]interface{}) { + o.Supplements = v +} + +// GetLocationBase returns the LocationBase field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetLocationBase() string { + if o == nil || IsNil(o.LocationBase) { + var ret string + return ret + } + return *o.LocationBase +} + +// GetLocationBaseOk returns a tuple with the LocationBase field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetLocationBaseOk() (*string, bool) { + if o == nil || IsNil(o.LocationBase) { + return nil, false + } + return o.LocationBase, true +} + +// HasLocationBase returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasLocationBase() bool { + if o != nil && !IsNil(o.LocationBase) { + return true + } + + return false +} + +// SetLocationBase gets a reference to the given string and assigns it to the LocationBase field. +func (o *RpmPackageResponse) SetLocationBase(v string) { + o.LocationBase = &v +} + +// GetLocationHref returns the LocationHref field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetLocationHref() string { + if o == nil || IsNil(o.LocationHref) { + var ret string + return ret + } + return *o.LocationHref +} + +// GetLocationHrefOk returns a tuple with the LocationHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetLocationHrefOk() (*string, bool) { + if o == nil || IsNil(o.LocationHref) { + return nil, false + } + return o.LocationHref, true +} + +// HasLocationHref returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasLocationHref() bool { + if o != nil && !IsNil(o.LocationHref) { + return true + } + + return false +} + +// SetLocationHref gets a reference to the given string and assigns it to the LocationHref field. +func (o *RpmPackageResponse) SetLocationHref(v string) { + o.LocationHref = &v +} + +// GetRpmBuildhost returns the RpmBuildhost field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetRpmBuildhost() string { + if o == nil || IsNil(o.RpmBuildhost) { + var ret string + return ret + } + return *o.RpmBuildhost +} + +// GetRpmBuildhostOk returns a tuple with the RpmBuildhost field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetRpmBuildhostOk() (*string, bool) { + if o == nil || IsNil(o.RpmBuildhost) { + return nil, false + } + return o.RpmBuildhost, true +} + +// HasRpmBuildhost returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasRpmBuildhost() bool { + if o != nil && !IsNil(o.RpmBuildhost) { + return true + } + + return false +} + +// SetRpmBuildhost gets a reference to the given string and assigns it to the RpmBuildhost field. +func (o *RpmPackageResponse) SetRpmBuildhost(v string) { + o.RpmBuildhost = &v +} + +// GetRpmGroup returns the RpmGroup field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetRpmGroup() string { + if o == nil || IsNil(o.RpmGroup) { + var ret string + return ret + } + return *o.RpmGroup +} + +// GetRpmGroupOk returns a tuple with the RpmGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetRpmGroupOk() (*string, bool) { + if o == nil || IsNil(o.RpmGroup) { + return nil, false + } + return o.RpmGroup, true +} + +// HasRpmGroup returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasRpmGroup() bool { + if o != nil && !IsNil(o.RpmGroup) { + return true + } + + return false +} + +// SetRpmGroup gets a reference to the given string and assigns it to the RpmGroup field. +func (o *RpmPackageResponse) SetRpmGroup(v string) { + o.RpmGroup = &v +} + +// GetRpmLicense returns the RpmLicense field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetRpmLicense() string { + if o == nil || IsNil(o.RpmLicense) { + var ret string + return ret + } + return *o.RpmLicense +} + +// GetRpmLicenseOk returns a tuple with the RpmLicense field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetRpmLicenseOk() (*string, bool) { + if o == nil || IsNil(o.RpmLicense) { + return nil, false + } + return o.RpmLicense, true +} + +// HasRpmLicense returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasRpmLicense() bool { + if o != nil && !IsNil(o.RpmLicense) { + return true + } + + return false +} + +// SetRpmLicense gets a reference to the given string and assigns it to the RpmLicense field. +func (o *RpmPackageResponse) SetRpmLicense(v string) { + o.RpmLicense = &v +} + +// GetRpmPackager returns the RpmPackager field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetRpmPackager() string { + if o == nil || IsNil(o.RpmPackager) { + var ret string + return ret + } + return *o.RpmPackager +} + +// GetRpmPackagerOk returns a tuple with the RpmPackager field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetRpmPackagerOk() (*string, bool) { + if o == nil || IsNil(o.RpmPackager) { + return nil, false + } + return o.RpmPackager, true +} + +// HasRpmPackager returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasRpmPackager() bool { + if o != nil && !IsNil(o.RpmPackager) { + return true + } + + return false +} + +// SetRpmPackager gets a reference to the given string and assigns it to the RpmPackager field. +func (o *RpmPackageResponse) SetRpmPackager(v string) { + o.RpmPackager = &v +} + +// GetRpmSourcerpm returns the RpmSourcerpm field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetRpmSourcerpm() string { + if o == nil || IsNil(o.RpmSourcerpm) { + var ret string + return ret + } + return *o.RpmSourcerpm +} + +// GetRpmSourcerpmOk returns a tuple with the RpmSourcerpm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetRpmSourcerpmOk() (*string, bool) { + if o == nil || IsNil(o.RpmSourcerpm) { + return nil, false + } + return o.RpmSourcerpm, true +} + +// HasRpmSourcerpm returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasRpmSourcerpm() bool { + if o != nil && !IsNil(o.RpmSourcerpm) { + return true + } + + return false +} + +// SetRpmSourcerpm gets a reference to the given string and assigns it to the RpmSourcerpm field. +func (o *RpmPackageResponse) SetRpmSourcerpm(v string) { + o.RpmSourcerpm = &v +} + +// GetRpmVendor returns the RpmVendor field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetRpmVendor() string { + if o == nil || IsNil(o.RpmVendor) { + var ret string + return ret + } + return *o.RpmVendor +} + +// GetRpmVendorOk returns a tuple with the RpmVendor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetRpmVendorOk() (*string, bool) { + if o == nil || IsNil(o.RpmVendor) { + return nil, false + } + return o.RpmVendor, true +} + +// HasRpmVendor returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasRpmVendor() bool { + if o != nil && !IsNil(o.RpmVendor) { + return true + } + + return false +} + +// SetRpmVendor gets a reference to the given string and assigns it to the RpmVendor field. +func (o *RpmPackageResponse) SetRpmVendor(v string) { + o.RpmVendor = &v +} + +// GetRpmHeaderStart returns the RpmHeaderStart field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetRpmHeaderStart() int64 { + if o == nil || IsNil(o.RpmHeaderStart) { + var ret int64 + return ret + } + return *o.RpmHeaderStart +} + +// GetRpmHeaderStartOk returns a tuple with the RpmHeaderStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetRpmHeaderStartOk() (*int64, bool) { + if o == nil || IsNil(o.RpmHeaderStart) { + return nil, false + } + return o.RpmHeaderStart, true +} + +// HasRpmHeaderStart returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasRpmHeaderStart() bool { + if o != nil && !IsNil(o.RpmHeaderStart) { + return true + } + + return false +} + +// SetRpmHeaderStart gets a reference to the given int64 and assigns it to the RpmHeaderStart field. +func (o *RpmPackageResponse) SetRpmHeaderStart(v int64) { + o.RpmHeaderStart = &v +} + +// GetRpmHeaderEnd returns the RpmHeaderEnd field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetRpmHeaderEnd() int64 { + if o == nil || IsNil(o.RpmHeaderEnd) { + var ret int64 + return ret + } + return *o.RpmHeaderEnd +} + +// GetRpmHeaderEndOk returns a tuple with the RpmHeaderEnd field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetRpmHeaderEndOk() (*int64, bool) { + if o == nil || IsNil(o.RpmHeaderEnd) { + return nil, false + } + return o.RpmHeaderEnd, true +} + +// HasRpmHeaderEnd returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasRpmHeaderEnd() bool { + if o != nil && !IsNil(o.RpmHeaderEnd) { + return true + } + + return false +} + +// SetRpmHeaderEnd gets a reference to the given int64 and assigns it to the RpmHeaderEnd field. +func (o *RpmPackageResponse) SetRpmHeaderEnd(v int64) { + o.RpmHeaderEnd = &v +} + +// GetIsModular returns the IsModular field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetIsModular() bool { + if o == nil || IsNil(o.IsModular) { + var ret bool + return ret + } + return *o.IsModular +} + +// GetIsModularOk returns a tuple with the IsModular field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetIsModularOk() (*bool, bool) { + if o == nil || IsNil(o.IsModular) { + return nil, false + } + return o.IsModular, true +} + +// HasIsModular returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasIsModular() bool { + if o != nil && !IsNil(o.IsModular) { + return true + } + + return false +} + +// SetIsModular gets a reference to the given bool and assigns it to the IsModular field. +func (o *RpmPackageResponse) SetIsModular(v bool) { + o.IsModular = &v +} + +// GetSizeArchive returns the SizeArchive field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetSizeArchive() int64 { + if o == nil || IsNil(o.SizeArchive) { + var ret int64 + return ret + } + return *o.SizeArchive +} + +// GetSizeArchiveOk returns a tuple with the SizeArchive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetSizeArchiveOk() (*int64, bool) { + if o == nil || IsNil(o.SizeArchive) { + return nil, false + } + return o.SizeArchive, true +} + +// HasSizeArchive returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasSizeArchive() bool { + if o != nil && !IsNil(o.SizeArchive) { + return true + } + + return false +} + +// SetSizeArchive gets a reference to the given int64 and assigns it to the SizeArchive field. +func (o *RpmPackageResponse) SetSizeArchive(v int64) { + o.SizeArchive = &v +} + +// GetSizeInstalled returns the SizeInstalled field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetSizeInstalled() int64 { + if o == nil || IsNil(o.SizeInstalled) { + var ret int64 + return ret + } + return *o.SizeInstalled +} + +// GetSizeInstalledOk returns a tuple with the SizeInstalled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetSizeInstalledOk() (*int64, bool) { + if o == nil || IsNil(o.SizeInstalled) { + return nil, false + } + return o.SizeInstalled, true +} + +// HasSizeInstalled returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasSizeInstalled() bool { + if o != nil && !IsNil(o.SizeInstalled) { + return true + } + + return false +} + +// SetSizeInstalled gets a reference to the given int64 and assigns it to the SizeInstalled field. +func (o *RpmPackageResponse) SetSizeInstalled(v int64) { + o.SizeInstalled = &v +} + +// GetSizePackage returns the SizePackage field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetSizePackage() int64 { + if o == nil || IsNil(o.SizePackage) { + var ret int64 + return ret + } + return *o.SizePackage +} + +// GetSizePackageOk returns a tuple with the SizePackage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetSizePackageOk() (*int64, bool) { + if o == nil || IsNil(o.SizePackage) { + return nil, false + } + return o.SizePackage, true +} + +// HasSizePackage returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasSizePackage() bool { + if o != nil && !IsNil(o.SizePackage) { + return true + } + + return false +} + +// SetSizePackage gets a reference to the given int64 and assigns it to the SizePackage field. +func (o *RpmPackageResponse) SetSizePackage(v int64) { + o.SizePackage = &v +} + +// GetTimeBuild returns the TimeBuild field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetTimeBuild() int64 { + if o == nil || IsNil(o.TimeBuild) { + var ret int64 + return ret + } + return *o.TimeBuild +} + +// GetTimeBuildOk returns a tuple with the TimeBuild field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetTimeBuildOk() (*int64, bool) { + if o == nil || IsNil(o.TimeBuild) { + return nil, false + } + return o.TimeBuild, true +} + +// HasTimeBuild returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasTimeBuild() bool { + if o != nil && !IsNil(o.TimeBuild) { + return true + } + + return false +} + +// SetTimeBuild gets a reference to the given int64 and assigns it to the TimeBuild field. +func (o *RpmPackageResponse) SetTimeBuild(v int64) { + o.TimeBuild = &v +} + +// GetTimeFile returns the TimeFile field value if set, zero value otherwise. +func (o *RpmPackageResponse) GetTimeFile() int64 { + if o == nil || IsNil(o.TimeFile) { + var ret int64 + return ret + } + return *o.TimeFile +} + +// GetTimeFileOk returns a tuple with the TimeFile field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmPackageResponse) GetTimeFileOk() (*int64, bool) { + if o == nil || IsNil(o.TimeFile) { + return nil, false + } + return o.TimeFile, true +} + +// HasTimeFile returns a boolean if a field has been set. +func (o *RpmPackageResponse) HasTimeFile() bool { + if o != nil && !IsNil(o.TimeFile) { + return true + } + + return false +} + +// SetTimeFile gets a reference to the given int64 and assigns it to the TimeFile field. +func (o *RpmPackageResponse) SetTimeFile(v int64) { + o.TimeFile = &v +} + +func (o RpmPackageResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmPackageResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.Md5) { + toSerialize["md5"] = o.Md5 + } + if !IsNil(o.Sha1) { + toSerialize["sha1"] = o.Sha1 + } + if !IsNil(o.Sha224) { + toSerialize["sha224"] = o.Sha224 + } + if !IsNil(o.Sha256) { + toSerialize["sha256"] = o.Sha256 + } + if !IsNil(o.Sha384) { + toSerialize["sha384"] = o.Sha384 + } + if !IsNil(o.Sha512) { + toSerialize["sha512"] = o.Sha512 + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Epoch) { + toSerialize["epoch"] = o.Epoch + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.Release) { + toSerialize["release"] = o.Release + } + if !IsNil(o.Arch) { + toSerialize["arch"] = o.Arch + } + if !IsNil(o.PkgId) { + toSerialize["pkgId"] = o.PkgId + } + if !IsNil(o.ChecksumType) { + toSerialize["checksum_type"] = o.ChecksumType + } + if !IsNil(o.Summary) { + toSerialize["summary"] = o.Summary + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if !IsNil(o.Changelogs) { + toSerialize["changelogs"] = o.Changelogs + } + if !IsNil(o.Files) { + toSerialize["files"] = o.Files + } + if !IsNil(o.Requires) { + toSerialize["requires"] = o.Requires + } + if !IsNil(o.Provides) { + toSerialize["provides"] = o.Provides + } + if !IsNil(o.Conflicts) { + toSerialize["conflicts"] = o.Conflicts + } + if !IsNil(o.Obsoletes) { + toSerialize["obsoletes"] = o.Obsoletes + } + if !IsNil(o.Suggests) { + toSerialize["suggests"] = o.Suggests + } + if !IsNil(o.Enhances) { + toSerialize["enhances"] = o.Enhances + } + if !IsNil(o.Recommends) { + toSerialize["recommends"] = o.Recommends + } + if !IsNil(o.Supplements) { + toSerialize["supplements"] = o.Supplements + } + if !IsNil(o.LocationBase) { + toSerialize["location_base"] = o.LocationBase + } + if !IsNil(o.LocationHref) { + toSerialize["location_href"] = o.LocationHref + } + if !IsNil(o.RpmBuildhost) { + toSerialize["rpm_buildhost"] = o.RpmBuildhost + } + if !IsNil(o.RpmGroup) { + toSerialize["rpm_group"] = o.RpmGroup + } + if !IsNil(o.RpmLicense) { + toSerialize["rpm_license"] = o.RpmLicense + } + if !IsNil(o.RpmPackager) { + toSerialize["rpm_packager"] = o.RpmPackager + } + if !IsNil(o.RpmSourcerpm) { + toSerialize["rpm_sourcerpm"] = o.RpmSourcerpm + } + if !IsNil(o.RpmVendor) { + toSerialize["rpm_vendor"] = o.RpmVendor + } + if !IsNil(o.RpmHeaderStart) { + toSerialize["rpm_header_start"] = o.RpmHeaderStart + } + if !IsNil(o.RpmHeaderEnd) { + toSerialize["rpm_header_end"] = o.RpmHeaderEnd + } + if !IsNil(o.IsModular) { + toSerialize["is_modular"] = o.IsModular + } + if !IsNil(o.SizeArchive) { + toSerialize["size_archive"] = o.SizeArchive + } + if !IsNil(o.SizeInstalled) { + toSerialize["size_installed"] = o.SizeInstalled + } + if !IsNil(o.SizePackage) { + toSerialize["size_package"] = o.SizePackage + } + if !IsNil(o.TimeBuild) { + toSerialize["time_build"] = o.TimeBuild + } + if !IsNil(o.TimeFile) { + toSerialize["time_file"] = o.TimeFile + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmPackageResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmPackageResponse := _RpmPackageResponse{} + + if err = json.Unmarshal(bytes, &varRpmPackageResponse); err == nil { + *o = RpmPackageResponse(varRpmPackageResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "md5") + delete(additionalProperties, "sha1") + delete(additionalProperties, "sha224") + delete(additionalProperties, "sha256") + delete(additionalProperties, "sha384") + delete(additionalProperties, "sha512") + delete(additionalProperties, "artifact") + delete(additionalProperties, "name") + delete(additionalProperties, "epoch") + delete(additionalProperties, "version") + delete(additionalProperties, "release") + delete(additionalProperties, "arch") + delete(additionalProperties, "pkgId") + delete(additionalProperties, "checksum_type") + delete(additionalProperties, "summary") + delete(additionalProperties, "description") + delete(additionalProperties, "url") + delete(additionalProperties, "changelogs") + delete(additionalProperties, "files") + delete(additionalProperties, "requires") + delete(additionalProperties, "provides") + delete(additionalProperties, "conflicts") + delete(additionalProperties, "obsoletes") + delete(additionalProperties, "suggests") + delete(additionalProperties, "enhances") + delete(additionalProperties, "recommends") + delete(additionalProperties, "supplements") + delete(additionalProperties, "location_base") + delete(additionalProperties, "location_href") + delete(additionalProperties, "rpm_buildhost") + delete(additionalProperties, "rpm_group") + delete(additionalProperties, "rpm_license") + delete(additionalProperties, "rpm_packager") + delete(additionalProperties, "rpm_sourcerpm") + delete(additionalProperties, "rpm_vendor") + delete(additionalProperties, "rpm_header_start") + delete(additionalProperties, "rpm_header_end") + delete(additionalProperties, "is_modular") + delete(additionalProperties, "size_archive") + delete(additionalProperties, "size_installed") + delete(additionalProperties, "size_package") + delete(additionalProperties, "time_build") + delete(additionalProperties, "time_file") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmPackageResponse struct { + value *RpmPackageResponse + isSet bool +} + +func (v NullableRpmPackageResponse) Get() *RpmPackageResponse { + return v.value +} + +func (v *NullableRpmPackageResponse) Set(val *RpmPackageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmPackageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmPackageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmPackageResponse(val *RpmPackageResponse) *NullableRpmPackageResponse { + return &NullableRpmPackageResponse{value: val, isSet: true} +} + +func (v NullableRpmPackageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmPackageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_repo_metadata_file_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_repo_metadata_file_response.go new file mode 100644 index 0000000000..e647a8a4b8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_repo_metadata_file_response.go @@ -0,0 +1,573 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmRepoMetadataFileResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmRepoMetadataFileResponse{} + +// RpmRepoMetadataFileResponse RepoMetadataFile serializer. +type RpmRepoMetadataFileResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The MD5 checksum if available. + Md5 *string `json:"md5,omitempty"` + // The SHA-1 checksum if available. + Sha1 *string `json:"sha1,omitempty"` + // The SHA-224 checksum if available. + Sha224 *string `json:"sha224,omitempty"` + // The SHA-256 checksum if available. + Sha256 *string `json:"sha256,omitempty"` + // The SHA-384 checksum if available. + Sha384 *string `json:"sha384,omitempty"` + // The SHA-512 checksum if available. + Sha512 *string `json:"sha512,omitempty"` + // Artifact file representing the physical content + Artifact *string `json:"artifact,omitempty"` + // Relative path of the file. + RelativePath string `json:"relative_path"` + // Metadata type. + DataType string `json:"data_type"` + // Checksum type for the file. + ChecksumType string `json:"checksum_type"` + // Checksum for the file. + Checksum string `json:"checksum"` + AdditionalProperties map[string]interface{} +} + +type _RpmRepoMetadataFileResponse RpmRepoMetadataFileResponse + +// NewRpmRepoMetadataFileResponse instantiates a new RpmRepoMetadataFileResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmRepoMetadataFileResponse(relativePath string, dataType string, checksumType string, checksum string) *RpmRepoMetadataFileResponse { + this := RpmRepoMetadataFileResponse{} + this.RelativePath = relativePath + this.DataType = dataType + this.ChecksumType = checksumType + this.Checksum = checksum + return &this +} + +// NewRpmRepoMetadataFileResponseWithDefaults instantiates a new RpmRepoMetadataFileResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmRepoMetadataFileResponseWithDefaults() *RpmRepoMetadataFileResponse { + this := RpmRepoMetadataFileResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmRepoMetadataFileResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRepoMetadataFileResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmRepoMetadataFileResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmRepoMetadataFileResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmRepoMetadataFileResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRepoMetadataFileResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmRepoMetadataFileResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmRepoMetadataFileResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetMd5 returns the Md5 field value if set, zero value otherwise. +func (o *RpmRepoMetadataFileResponse) GetMd5() string { + if o == nil || IsNil(o.Md5) { + var ret string + return ret + } + return *o.Md5 +} + +// GetMd5Ok returns a tuple with the Md5 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRepoMetadataFileResponse) GetMd5Ok() (*string, bool) { + if o == nil || IsNil(o.Md5) { + return nil, false + } + return o.Md5, true +} + +// HasMd5 returns a boolean if a field has been set. +func (o *RpmRepoMetadataFileResponse) HasMd5() bool { + if o != nil && !IsNil(o.Md5) { + return true + } + + return false +} + +// SetMd5 gets a reference to the given string and assigns it to the Md5 field. +func (o *RpmRepoMetadataFileResponse) SetMd5(v string) { + o.Md5 = &v +} + +// GetSha1 returns the Sha1 field value if set, zero value otherwise. +func (o *RpmRepoMetadataFileResponse) GetSha1() string { + if o == nil || IsNil(o.Sha1) { + var ret string + return ret + } + return *o.Sha1 +} + +// GetSha1Ok returns a tuple with the Sha1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRepoMetadataFileResponse) GetSha1Ok() (*string, bool) { + if o == nil || IsNil(o.Sha1) { + return nil, false + } + return o.Sha1, true +} + +// HasSha1 returns a boolean if a field has been set. +func (o *RpmRepoMetadataFileResponse) HasSha1() bool { + if o != nil && !IsNil(o.Sha1) { + return true + } + + return false +} + +// SetSha1 gets a reference to the given string and assigns it to the Sha1 field. +func (o *RpmRepoMetadataFileResponse) SetSha1(v string) { + o.Sha1 = &v +} + +// GetSha224 returns the Sha224 field value if set, zero value otherwise. +func (o *RpmRepoMetadataFileResponse) GetSha224() string { + if o == nil || IsNil(o.Sha224) { + var ret string + return ret + } + return *o.Sha224 +} + +// GetSha224Ok returns a tuple with the Sha224 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRepoMetadataFileResponse) GetSha224Ok() (*string, bool) { + if o == nil || IsNil(o.Sha224) { + return nil, false + } + return o.Sha224, true +} + +// HasSha224 returns a boolean if a field has been set. +func (o *RpmRepoMetadataFileResponse) HasSha224() bool { + if o != nil && !IsNil(o.Sha224) { + return true + } + + return false +} + +// SetSha224 gets a reference to the given string and assigns it to the Sha224 field. +func (o *RpmRepoMetadataFileResponse) SetSha224(v string) { + o.Sha224 = &v +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise. +func (o *RpmRepoMetadataFileResponse) GetSha256() string { + if o == nil || IsNil(o.Sha256) { + var ret string + return ret + } + return *o.Sha256 +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRepoMetadataFileResponse) GetSha256Ok() (*string, bool) { + if o == nil || IsNil(o.Sha256) { + return nil, false + } + return o.Sha256, true +} + +// HasSha256 returns a boolean if a field has been set. +func (o *RpmRepoMetadataFileResponse) HasSha256() bool { + if o != nil && !IsNil(o.Sha256) { + return true + } + + return false +} + +// SetSha256 gets a reference to the given string and assigns it to the Sha256 field. +func (o *RpmRepoMetadataFileResponse) SetSha256(v string) { + o.Sha256 = &v +} + +// GetSha384 returns the Sha384 field value if set, zero value otherwise. +func (o *RpmRepoMetadataFileResponse) GetSha384() string { + if o == nil || IsNil(o.Sha384) { + var ret string + return ret + } + return *o.Sha384 +} + +// GetSha384Ok returns a tuple with the Sha384 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRepoMetadataFileResponse) GetSha384Ok() (*string, bool) { + if o == nil || IsNil(o.Sha384) { + return nil, false + } + return o.Sha384, true +} + +// HasSha384 returns a boolean if a field has been set. +func (o *RpmRepoMetadataFileResponse) HasSha384() bool { + if o != nil && !IsNil(o.Sha384) { + return true + } + + return false +} + +// SetSha384 gets a reference to the given string and assigns it to the Sha384 field. +func (o *RpmRepoMetadataFileResponse) SetSha384(v string) { + o.Sha384 = &v +} + +// GetSha512 returns the Sha512 field value if set, zero value otherwise. +func (o *RpmRepoMetadataFileResponse) GetSha512() string { + if o == nil || IsNil(o.Sha512) { + var ret string + return ret + } + return *o.Sha512 +} + +// GetSha512Ok returns a tuple with the Sha512 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRepoMetadataFileResponse) GetSha512Ok() (*string, bool) { + if o == nil || IsNil(o.Sha512) { + return nil, false + } + return o.Sha512, true +} + +// HasSha512 returns a boolean if a field has been set. +func (o *RpmRepoMetadataFileResponse) HasSha512() bool { + if o != nil && !IsNil(o.Sha512) { + return true + } + + return false +} + +// SetSha512 gets a reference to the given string and assigns it to the Sha512 field. +func (o *RpmRepoMetadataFileResponse) SetSha512(v string) { + o.Sha512 = &v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *RpmRepoMetadataFileResponse) GetArtifact() string { + if o == nil || IsNil(o.Artifact) { + var ret string + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRepoMetadataFileResponse) GetArtifactOk() (*string, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *RpmRepoMetadataFileResponse) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given string and assigns it to the Artifact field. +func (o *RpmRepoMetadataFileResponse) SetArtifact(v string) { + o.Artifact = &v +} + +// GetRelativePath returns the RelativePath field value +func (o *RpmRepoMetadataFileResponse) GetRelativePath() string { + if o == nil { + var ret string + return ret + } + + return o.RelativePath +} + +// GetRelativePathOk returns a tuple with the RelativePath field value +// and a boolean to check if the value has been set. +func (o *RpmRepoMetadataFileResponse) GetRelativePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RelativePath, true +} + +// SetRelativePath sets field value +func (o *RpmRepoMetadataFileResponse) SetRelativePath(v string) { + o.RelativePath = v +} + +// GetDataType returns the DataType field value +func (o *RpmRepoMetadataFileResponse) GetDataType() string { + if o == nil { + var ret string + return ret + } + + return o.DataType +} + +// GetDataTypeOk returns a tuple with the DataType field value +// and a boolean to check if the value has been set. +func (o *RpmRepoMetadataFileResponse) GetDataTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DataType, true +} + +// SetDataType sets field value +func (o *RpmRepoMetadataFileResponse) SetDataType(v string) { + o.DataType = v +} + +// GetChecksumType returns the ChecksumType field value +func (o *RpmRepoMetadataFileResponse) GetChecksumType() string { + if o == nil { + var ret string + return ret + } + + return o.ChecksumType +} + +// GetChecksumTypeOk returns a tuple with the ChecksumType field value +// and a boolean to check if the value has been set. +func (o *RpmRepoMetadataFileResponse) GetChecksumTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChecksumType, true +} + +// SetChecksumType sets field value +func (o *RpmRepoMetadataFileResponse) SetChecksumType(v string) { + o.ChecksumType = v +} + +// GetChecksum returns the Checksum field value +func (o *RpmRepoMetadataFileResponse) GetChecksum() string { + if o == nil { + var ret string + return ret + } + + return o.Checksum +} + +// GetChecksumOk returns a tuple with the Checksum field value +// and a boolean to check if the value has been set. +func (o *RpmRepoMetadataFileResponse) GetChecksumOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Checksum, true +} + +// SetChecksum sets field value +func (o *RpmRepoMetadataFileResponse) SetChecksum(v string) { + o.Checksum = v +} + +func (o RpmRepoMetadataFileResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmRepoMetadataFileResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.Md5) { + toSerialize["md5"] = o.Md5 + } + if !IsNil(o.Sha1) { + toSerialize["sha1"] = o.Sha1 + } + if !IsNil(o.Sha224) { + toSerialize["sha224"] = o.Sha224 + } + if !IsNil(o.Sha256) { + toSerialize["sha256"] = o.Sha256 + } + if !IsNil(o.Sha384) { + toSerialize["sha384"] = o.Sha384 + } + if !IsNil(o.Sha512) { + toSerialize["sha512"] = o.Sha512 + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + toSerialize["relative_path"] = o.RelativePath + toSerialize["data_type"] = o.DataType + toSerialize["checksum_type"] = o.ChecksumType + toSerialize["checksum"] = o.Checksum + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmRepoMetadataFileResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmRepoMetadataFileResponse := _RpmRepoMetadataFileResponse{} + + if err = json.Unmarshal(bytes, &varRpmRepoMetadataFileResponse); err == nil { + *o = RpmRepoMetadataFileResponse(varRpmRepoMetadataFileResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "md5") + delete(additionalProperties, "sha1") + delete(additionalProperties, "sha224") + delete(additionalProperties, "sha256") + delete(additionalProperties, "sha384") + delete(additionalProperties, "sha512") + delete(additionalProperties, "artifact") + delete(additionalProperties, "relative_path") + delete(additionalProperties, "data_type") + delete(additionalProperties, "checksum_type") + delete(additionalProperties, "checksum") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmRepoMetadataFileResponse struct { + value *RpmRepoMetadataFileResponse + isSet bool +} + +func (v NullableRpmRepoMetadataFileResponse) Get() *RpmRepoMetadataFileResponse { + return v.value +} + +func (v *NullableRpmRepoMetadataFileResponse) Set(val *RpmRepoMetadataFileResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmRepoMetadataFileResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmRepoMetadataFileResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmRepoMetadataFileResponse(val *RpmRepoMetadataFileResponse) *NullableRpmRepoMetadataFileResponse { + return &NullableRpmRepoMetadataFileResponse{value: val, isSet: true} +} + +func (v NullableRpmRepoMetadataFileResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmRepoMetadataFileResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_repository_sync_url.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_repository_sync_url.go new file mode 100644 index 0000000000..9e95d7dabd --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_repository_sync_url.go @@ -0,0 +1,328 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RpmRepositorySyncURL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmRepositorySyncURL{} + +// RpmRepositorySyncURL Serializer for RPM Sync. +type RpmRepositorySyncURL struct { + // A remote to sync from. This will override a remote set on repository. + Remote *string `json:"remote,omitempty"` + // DEPRECATED: If ``True``, ``sync_policy`` will default to 'mirror_complete' instead of 'additive'. + Mirror NullableBool `json:"mirror,omitempty"` + SyncPolicy NullableSyncPolicyEnum `json:"sync_policy,omitempty"` + // List of content types to skip during sync. + SkipTypes []SkipTypesEnum `json:"skip_types,omitempty"` + // Whether or not to optimize sync. + Optimize *bool `json:"optimize,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmRepositorySyncURL RpmRepositorySyncURL + +// NewRpmRepositorySyncURL instantiates a new RpmRepositorySyncURL object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmRepositorySyncURL() *RpmRepositorySyncURL { + this := RpmRepositorySyncURL{} + var optimize bool = true + this.Optimize = &optimize + return &this +} + +// NewRpmRepositorySyncURLWithDefaults instantiates a new RpmRepositorySyncURL object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmRepositorySyncURLWithDefaults() *RpmRepositorySyncURL { + this := RpmRepositorySyncURL{} + var optimize bool = true + this.Optimize = &optimize + return &this +} + +// GetRemote returns the Remote field value if set, zero value otherwise. +func (o *RpmRepositorySyncURL) GetRemote() string { + if o == nil || IsNil(o.Remote) { + var ret string + return ret + } + return *o.Remote +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRepositorySyncURL) GetRemoteOk() (*string, bool) { + if o == nil || IsNil(o.Remote) { + return nil, false + } + return o.Remote, true +} + +// HasRemote returns a boolean if a field has been set. +func (o *RpmRepositorySyncURL) HasRemote() bool { + if o != nil && !IsNil(o.Remote) { + return true + } + + return false +} + +// SetRemote gets a reference to the given string and assigns it to the Remote field. +func (o *RpmRepositorySyncURL) SetRemote(v string) { + o.Remote = &v +} + +// GetMirror returns the Mirror field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRepositorySyncURL) GetMirror() bool { + if o == nil || IsNil(o.Mirror.Get()) { + var ret bool + return ret + } + return *o.Mirror.Get() +} + +// GetMirrorOk returns a tuple with the Mirror field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRepositorySyncURL) GetMirrorOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Mirror.Get(), o.Mirror.IsSet() +} + +// HasMirror returns a boolean if a field has been set. +func (o *RpmRepositorySyncURL) HasMirror() bool { + if o != nil && o.Mirror.IsSet() { + return true + } + + return false +} + +// SetMirror gets a reference to the given NullableBool and assigns it to the Mirror field. +func (o *RpmRepositorySyncURL) SetMirror(v bool) { + o.Mirror.Set(&v) +} +// SetMirrorNil sets the value for Mirror to be an explicit nil +func (o *RpmRepositorySyncURL) SetMirrorNil() { + o.Mirror.Set(nil) +} + +// UnsetMirror ensures that no value is present for Mirror, not even an explicit nil +func (o *RpmRepositorySyncURL) UnsetMirror() { + o.Mirror.Unset() +} + +// GetSyncPolicy returns the SyncPolicy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRepositorySyncURL) GetSyncPolicy() SyncPolicyEnum { + if o == nil || IsNil(o.SyncPolicy.Get()) { + var ret SyncPolicyEnum + return ret + } + return *o.SyncPolicy.Get() +} + +// GetSyncPolicyOk returns a tuple with the SyncPolicy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRepositorySyncURL) GetSyncPolicyOk() (*SyncPolicyEnum, bool) { + if o == nil { + return nil, false + } + return o.SyncPolicy.Get(), o.SyncPolicy.IsSet() +} + +// HasSyncPolicy returns a boolean if a field has been set. +func (o *RpmRepositorySyncURL) HasSyncPolicy() bool { + if o != nil && o.SyncPolicy.IsSet() { + return true + } + + return false +} + +// SetSyncPolicy gets a reference to the given NullableSyncPolicyEnum and assigns it to the SyncPolicy field. +func (o *RpmRepositorySyncURL) SetSyncPolicy(v SyncPolicyEnum) { + o.SyncPolicy.Set(&v) +} +// SetSyncPolicyNil sets the value for SyncPolicy to be an explicit nil +func (o *RpmRepositorySyncURL) SetSyncPolicyNil() { + o.SyncPolicy.Set(nil) +} + +// UnsetSyncPolicy ensures that no value is present for SyncPolicy, not even an explicit nil +func (o *RpmRepositorySyncURL) UnsetSyncPolicy() { + o.SyncPolicy.Unset() +} + +// GetSkipTypes returns the SkipTypes field value if set, zero value otherwise. +func (o *RpmRepositorySyncURL) GetSkipTypes() []SkipTypesEnum { + if o == nil || IsNil(o.SkipTypes) { + var ret []SkipTypesEnum + return ret + } + return o.SkipTypes +} + +// GetSkipTypesOk returns a tuple with the SkipTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRepositorySyncURL) GetSkipTypesOk() ([]SkipTypesEnum, bool) { + if o == nil || IsNil(o.SkipTypes) { + return nil, false + } + return o.SkipTypes, true +} + +// HasSkipTypes returns a boolean if a field has been set. +func (o *RpmRepositorySyncURL) HasSkipTypes() bool { + if o != nil && !IsNil(o.SkipTypes) { + return true + } + + return false +} + +// SetSkipTypes gets a reference to the given []SkipTypesEnum and assigns it to the SkipTypes field. +func (o *RpmRepositorySyncURL) SetSkipTypes(v []SkipTypesEnum) { + o.SkipTypes = v +} + +// GetOptimize returns the Optimize field value if set, zero value otherwise. +func (o *RpmRepositorySyncURL) GetOptimize() bool { + if o == nil || IsNil(o.Optimize) { + var ret bool + return ret + } + return *o.Optimize +} + +// GetOptimizeOk returns a tuple with the Optimize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRepositorySyncURL) GetOptimizeOk() (*bool, bool) { + if o == nil || IsNil(o.Optimize) { + return nil, false + } + return o.Optimize, true +} + +// HasOptimize returns a boolean if a field has been set. +func (o *RpmRepositorySyncURL) HasOptimize() bool { + if o != nil && !IsNil(o.Optimize) { + return true + } + + return false +} + +// SetOptimize gets a reference to the given bool and assigns it to the Optimize field. +func (o *RpmRepositorySyncURL) SetOptimize(v bool) { + o.Optimize = &v +} + +func (o RpmRepositorySyncURL) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmRepositorySyncURL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Remote) { + toSerialize["remote"] = o.Remote + } + if o.Mirror.IsSet() { + toSerialize["mirror"] = o.Mirror.Get() + } + if o.SyncPolicy.IsSet() { + toSerialize["sync_policy"] = o.SyncPolicy.Get() + } + if !IsNil(o.SkipTypes) { + toSerialize["skip_types"] = o.SkipTypes + } + if !IsNil(o.Optimize) { + toSerialize["optimize"] = o.Optimize + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmRepositorySyncURL) UnmarshalJSON(bytes []byte) (err error) { + varRpmRepositorySyncURL := _RpmRepositorySyncURL{} + + if err = json.Unmarshal(bytes, &varRpmRepositorySyncURL); err == nil { + *o = RpmRepositorySyncURL(varRpmRepositorySyncURL) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "remote") + delete(additionalProperties, "mirror") + delete(additionalProperties, "sync_policy") + delete(additionalProperties, "skip_types") + delete(additionalProperties, "optimize") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmRepositorySyncURL struct { + value *RpmRepositorySyncURL + isSet bool +} + +func (v NullableRpmRepositorySyncURL) Get() *RpmRepositorySyncURL { + return v.value +} + +func (v *NullableRpmRepositorySyncURL) Set(val *RpmRepositorySyncURL) { + v.value = val + v.isSet = true +} + +func (v NullableRpmRepositorySyncURL) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmRepositorySyncURL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmRepositorySyncURL(val *RpmRepositorySyncURL) *NullableRpmRepositorySyncURL { + return &NullableRpmRepositorySyncURL{value: val, isSet: true} +} + +func (v NullableRpmRepositorySyncURL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmRepositorySyncURL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_alternate_content_source.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_alternate_content_source.go new file mode 100644 index 0000000000..bc16000ce7 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_alternate_content_source.go @@ -0,0 +1,260 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmRpmAlternateContentSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmRpmAlternateContentSource{} + +// RpmRpmAlternateContentSource Serializer for RPM alternate content source. +type RpmRpmAlternateContentSource struct { + // Name of Alternate Content Source. + Name string `json:"name"` + // Date of last refresh of AlternateContentSource. + LastRefreshed NullableTime `json:"last_refreshed,omitempty"` + // List of paths that will be appended to the Remote url when searching for content. + Paths []string `json:"paths,omitempty"` + // The remote to provide alternate content source. + Remote string `json:"remote"` + AdditionalProperties map[string]interface{} +} + +type _RpmRpmAlternateContentSource RpmRpmAlternateContentSource + +// NewRpmRpmAlternateContentSource instantiates a new RpmRpmAlternateContentSource object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmRpmAlternateContentSource(name string, remote string) *RpmRpmAlternateContentSource { + this := RpmRpmAlternateContentSource{} + this.Name = name + this.Remote = remote + return &this +} + +// NewRpmRpmAlternateContentSourceWithDefaults instantiates a new RpmRpmAlternateContentSource object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmRpmAlternateContentSourceWithDefaults() *RpmRpmAlternateContentSource { + this := RpmRpmAlternateContentSource{} + return &this +} + +// GetName returns the Name field value +func (o *RpmRpmAlternateContentSource) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmRpmAlternateContentSource) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmRpmAlternateContentSource) SetName(v string) { + o.Name = v +} + +// GetLastRefreshed returns the LastRefreshed field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmAlternateContentSource) GetLastRefreshed() time.Time { + if o == nil || IsNil(o.LastRefreshed.Get()) { + var ret time.Time + return ret + } + return *o.LastRefreshed.Get() +} + +// GetLastRefreshedOk returns a tuple with the LastRefreshed field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmAlternateContentSource) GetLastRefreshedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastRefreshed.Get(), o.LastRefreshed.IsSet() +} + +// HasLastRefreshed returns a boolean if a field has been set. +func (o *RpmRpmAlternateContentSource) HasLastRefreshed() bool { + if o != nil && o.LastRefreshed.IsSet() { + return true + } + + return false +} + +// SetLastRefreshed gets a reference to the given NullableTime and assigns it to the LastRefreshed field. +func (o *RpmRpmAlternateContentSource) SetLastRefreshed(v time.Time) { + o.LastRefreshed.Set(&v) +} +// SetLastRefreshedNil sets the value for LastRefreshed to be an explicit nil +func (o *RpmRpmAlternateContentSource) SetLastRefreshedNil() { + o.LastRefreshed.Set(nil) +} + +// UnsetLastRefreshed ensures that no value is present for LastRefreshed, not even an explicit nil +func (o *RpmRpmAlternateContentSource) UnsetLastRefreshed() { + o.LastRefreshed.Unset() +} + +// GetPaths returns the Paths field value if set, zero value otherwise. +func (o *RpmRpmAlternateContentSource) GetPaths() []string { + if o == nil || IsNil(o.Paths) { + var ret []string + return ret + } + return o.Paths +} + +// GetPathsOk returns a tuple with the Paths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmAlternateContentSource) GetPathsOk() ([]string, bool) { + if o == nil || IsNil(o.Paths) { + return nil, false + } + return o.Paths, true +} + +// HasPaths returns a boolean if a field has been set. +func (o *RpmRpmAlternateContentSource) HasPaths() bool { + if o != nil && !IsNil(o.Paths) { + return true + } + + return false +} + +// SetPaths gets a reference to the given []string and assigns it to the Paths field. +func (o *RpmRpmAlternateContentSource) SetPaths(v []string) { + o.Paths = v +} + +// GetRemote returns the Remote field value +func (o *RpmRpmAlternateContentSource) GetRemote() string { + if o == nil { + var ret string + return ret + } + + return o.Remote +} + +// GetRemoteOk returns a tuple with the Remote field value +// and a boolean to check if the value has been set. +func (o *RpmRpmAlternateContentSource) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Remote, true +} + +// SetRemote sets field value +func (o *RpmRpmAlternateContentSource) SetRemote(v string) { + o.Remote = v +} + +func (o RpmRpmAlternateContentSource) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmRpmAlternateContentSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.LastRefreshed.IsSet() { + toSerialize["last_refreshed"] = o.LastRefreshed.Get() + } + if !IsNil(o.Paths) { + toSerialize["paths"] = o.Paths + } + toSerialize["remote"] = o.Remote + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmRpmAlternateContentSource) UnmarshalJSON(bytes []byte) (err error) { + varRpmRpmAlternateContentSource := _RpmRpmAlternateContentSource{} + + if err = json.Unmarshal(bytes, &varRpmRpmAlternateContentSource); err == nil { + *o = RpmRpmAlternateContentSource(varRpmRpmAlternateContentSource) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "last_refreshed") + delete(additionalProperties, "paths") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmRpmAlternateContentSource struct { + value *RpmRpmAlternateContentSource + isSet bool +} + +func (v NullableRpmRpmAlternateContentSource) Get() *RpmRpmAlternateContentSource { + return v.value +} + +func (v *NullableRpmRpmAlternateContentSource) Set(val *RpmRpmAlternateContentSource) { + v.value = val + v.isSet = true +} + +func (v NullableRpmRpmAlternateContentSource) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmRpmAlternateContentSource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmRpmAlternateContentSource(val *RpmRpmAlternateContentSource) *NullableRpmRpmAlternateContentSource { + return &NullableRpmRpmAlternateContentSource{value: val, isSet: true} +} + +func (v NullableRpmRpmAlternateContentSource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmRpmAlternateContentSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_alternate_content_source_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_alternate_content_source_response.go new file mode 100644 index 0000000000..8e83a387ba --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_alternate_content_source_response.go @@ -0,0 +1,335 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmRpmAlternateContentSourceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmRpmAlternateContentSourceResponse{} + +// RpmRpmAlternateContentSourceResponse Serializer for RPM alternate content source. +type RpmRpmAlternateContentSourceResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Name of Alternate Content Source. + Name string `json:"name"` + // Date of last refresh of AlternateContentSource. + LastRefreshed NullableTime `json:"last_refreshed,omitempty"` + // List of paths that will be appended to the Remote url when searching for content. + Paths []string `json:"paths,omitempty"` + // The remote to provide alternate content source. + Remote string `json:"remote"` + AdditionalProperties map[string]interface{} +} + +type _RpmRpmAlternateContentSourceResponse RpmRpmAlternateContentSourceResponse + +// NewRpmRpmAlternateContentSourceResponse instantiates a new RpmRpmAlternateContentSourceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmRpmAlternateContentSourceResponse(name string, remote string) *RpmRpmAlternateContentSourceResponse { + this := RpmRpmAlternateContentSourceResponse{} + this.Name = name + this.Remote = remote + return &this +} + +// NewRpmRpmAlternateContentSourceResponseWithDefaults instantiates a new RpmRpmAlternateContentSourceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmRpmAlternateContentSourceResponseWithDefaults() *RpmRpmAlternateContentSourceResponse { + this := RpmRpmAlternateContentSourceResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmRpmAlternateContentSourceResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmAlternateContentSourceResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmRpmAlternateContentSourceResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmRpmAlternateContentSourceResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmRpmAlternateContentSourceResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmAlternateContentSourceResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmRpmAlternateContentSourceResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmRpmAlternateContentSourceResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *RpmRpmAlternateContentSourceResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmRpmAlternateContentSourceResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmRpmAlternateContentSourceResponse) SetName(v string) { + o.Name = v +} + +// GetLastRefreshed returns the LastRefreshed field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmAlternateContentSourceResponse) GetLastRefreshed() time.Time { + if o == nil || IsNil(o.LastRefreshed.Get()) { + var ret time.Time + return ret + } + return *o.LastRefreshed.Get() +} + +// GetLastRefreshedOk returns a tuple with the LastRefreshed field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmAlternateContentSourceResponse) GetLastRefreshedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastRefreshed.Get(), o.LastRefreshed.IsSet() +} + +// HasLastRefreshed returns a boolean if a field has been set. +func (o *RpmRpmAlternateContentSourceResponse) HasLastRefreshed() bool { + if o != nil && o.LastRefreshed.IsSet() { + return true + } + + return false +} + +// SetLastRefreshed gets a reference to the given NullableTime and assigns it to the LastRefreshed field. +func (o *RpmRpmAlternateContentSourceResponse) SetLastRefreshed(v time.Time) { + o.LastRefreshed.Set(&v) +} +// SetLastRefreshedNil sets the value for LastRefreshed to be an explicit nil +func (o *RpmRpmAlternateContentSourceResponse) SetLastRefreshedNil() { + o.LastRefreshed.Set(nil) +} + +// UnsetLastRefreshed ensures that no value is present for LastRefreshed, not even an explicit nil +func (o *RpmRpmAlternateContentSourceResponse) UnsetLastRefreshed() { + o.LastRefreshed.Unset() +} + +// GetPaths returns the Paths field value if set, zero value otherwise. +func (o *RpmRpmAlternateContentSourceResponse) GetPaths() []string { + if o == nil || IsNil(o.Paths) { + var ret []string + return ret + } + return o.Paths +} + +// GetPathsOk returns a tuple with the Paths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmAlternateContentSourceResponse) GetPathsOk() ([]string, bool) { + if o == nil || IsNil(o.Paths) { + return nil, false + } + return o.Paths, true +} + +// HasPaths returns a boolean if a field has been set. +func (o *RpmRpmAlternateContentSourceResponse) HasPaths() bool { + if o != nil && !IsNil(o.Paths) { + return true + } + + return false +} + +// SetPaths gets a reference to the given []string and assigns it to the Paths field. +func (o *RpmRpmAlternateContentSourceResponse) SetPaths(v []string) { + o.Paths = v +} + +// GetRemote returns the Remote field value +func (o *RpmRpmAlternateContentSourceResponse) GetRemote() string { + if o == nil { + var ret string + return ret + } + + return o.Remote +} + +// GetRemoteOk returns a tuple with the Remote field value +// and a boolean to check if the value has been set. +func (o *RpmRpmAlternateContentSourceResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Remote, true +} + +// SetRemote sets field value +func (o *RpmRpmAlternateContentSourceResponse) SetRemote(v string) { + o.Remote = v +} + +func (o RpmRpmAlternateContentSourceResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmRpmAlternateContentSourceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + if o.LastRefreshed.IsSet() { + toSerialize["last_refreshed"] = o.LastRefreshed.Get() + } + if !IsNil(o.Paths) { + toSerialize["paths"] = o.Paths + } + toSerialize["remote"] = o.Remote + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmRpmAlternateContentSourceResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmRpmAlternateContentSourceResponse := _RpmRpmAlternateContentSourceResponse{} + + if err = json.Unmarshal(bytes, &varRpmRpmAlternateContentSourceResponse); err == nil { + *o = RpmRpmAlternateContentSourceResponse(varRpmRpmAlternateContentSourceResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "last_refreshed") + delete(additionalProperties, "paths") + delete(additionalProperties, "remote") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmRpmAlternateContentSourceResponse struct { + value *RpmRpmAlternateContentSourceResponse + isSet bool +} + +func (v NullableRpmRpmAlternateContentSourceResponse) Get() *RpmRpmAlternateContentSourceResponse { + return v.value +} + +func (v *NullableRpmRpmAlternateContentSourceResponse) Set(val *RpmRpmAlternateContentSourceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmRpmAlternateContentSourceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmRpmAlternateContentSourceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmRpmAlternateContentSourceResponse(val *RpmRpmAlternateContentSourceResponse) *NullableRpmRpmAlternateContentSourceResponse { + return &NullableRpmRpmAlternateContentSourceResponse{value: val, isSet: true} +} + +func (v NullableRpmRpmAlternateContentSourceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmRpmAlternateContentSourceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_distribution.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_distribution.go new file mode 100644 index 0000000000..ed0e54cdde --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_distribution.go @@ -0,0 +1,396 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RpmRpmDistribution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmRpmDistribution{} + +// RpmRpmDistribution Serializer for RPM Distributions. +type RpmRpmDistribution struct { + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmRpmDistribution RpmRpmDistribution + +// NewRpmRpmDistribution instantiates a new RpmRpmDistribution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmRpmDistribution(basePath string, name string) *RpmRpmDistribution { + this := RpmRpmDistribution{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + return &this +} + +// NewRpmRpmDistributionWithDefaults instantiates a new RpmRpmDistribution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmRpmDistributionWithDefaults() *RpmRpmDistribution { + this := RpmRpmDistribution{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetBasePath returns the BasePath field value +func (o *RpmRpmDistribution) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *RpmRpmDistribution) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *RpmRpmDistribution) SetBasePath(v string) { + o.BasePath = v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmDistribution) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmDistribution) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *RpmRpmDistribution) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *RpmRpmDistribution) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *RpmRpmDistribution) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *RpmRpmDistribution) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *RpmRpmDistribution) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmDistribution) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *RpmRpmDistribution) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *RpmRpmDistribution) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *RpmRpmDistribution) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmDistribution) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *RpmRpmDistribution) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *RpmRpmDistribution) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *RpmRpmDistribution) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmRpmDistribution) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmRpmDistribution) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmDistribution) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmDistribution) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *RpmRpmDistribution) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *RpmRpmDistribution) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *RpmRpmDistribution) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *RpmRpmDistribution) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmDistribution) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmDistribution) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *RpmRpmDistribution) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *RpmRpmDistribution) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *RpmRpmDistribution) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *RpmRpmDistribution) UnsetPublication() { + o.Publication.Unset() +} + +func (o RpmRpmDistribution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmRpmDistribution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["base_path"] = o.BasePath + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmRpmDistribution) UnmarshalJSON(bytes []byte) (err error) { + varRpmRpmDistribution := _RpmRpmDistribution{} + + if err = json.Unmarshal(bytes, &varRpmRpmDistribution); err == nil { + *o = RpmRpmDistribution(varRpmRpmDistribution) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "base_path") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmRpmDistribution struct { + value *RpmRpmDistribution + isSet bool +} + +func (v NullableRpmRpmDistribution) Get() *RpmRpmDistribution { + return v.value +} + +func (v *NullableRpmRpmDistribution) Set(val *RpmRpmDistribution) { + v.value = val + v.isSet = true +} + +func (v NullableRpmRpmDistribution) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmRpmDistribution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmRpmDistribution(val *RpmRpmDistribution) *NullableRpmRpmDistribution { + return &NullableRpmRpmDistribution{value: val, isSet: true} +} + +func (v NullableRpmRpmDistribution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmRpmDistribution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_distribution_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_distribution_response.go new file mode 100644 index 0000000000..cbf92b2897 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_distribution_response.go @@ -0,0 +1,510 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmRpmDistributionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmRpmDistributionResponse{} + +// RpmRpmDistributionResponse Serializer for RPM Distributions. +type RpmRpmDistributionResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") + BasePath string `json:"base_path"` + // The URL for accessing the publication as defined by this distribution. + BaseUrl *string `json:"base_url,omitempty"` + // An optional content-guard. + ContentGuard NullableString `json:"content_guard,omitempty"` + // Whether this distribution should be shown in the content app. + Hidden *bool `json:"hidden,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name. Ex, `rawhide` and `stable`. + Name string `json:"name"` + // The latest RepositoryVersion for this Repository will be served. + Repository NullableString `json:"repository,omitempty"` + // Publication to be served + Publication NullableString `json:"publication,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmRpmDistributionResponse RpmRpmDistributionResponse + +// NewRpmRpmDistributionResponse instantiates a new RpmRpmDistributionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmRpmDistributionResponse(basePath string, name string) *RpmRpmDistributionResponse { + this := RpmRpmDistributionResponse{} + this.BasePath = basePath + var hidden bool = false + this.Hidden = &hidden + this.Name = name + return &this +} + +// NewRpmRpmDistributionResponseWithDefaults instantiates a new RpmRpmDistributionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmRpmDistributionResponseWithDefaults() *RpmRpmDistributionResponse { + this := RpmRpmDistributionResponse{} + var hidden bool = false + this.Hidden = &hidden + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmRpmDistributionResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmDistributionResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmRpmDistributionResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmRpmDistributionResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmRpmDistributionResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmDistributionResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmRpmDistributionResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmRpmDistributionResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetBasePath returns the BasePath field value +func (o *RpmRpmDistributionResponse) GetBasePath() string { + if o == nil { + var ret string + return ret + } + + return o.BasePath +} + +// GetBasePathOk returns a tuple with the BasePath field value +// and a boolean to check if the value has been set. +func (o *RpmRpmDistributionResponse) GetBasePathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BasePath, true +} + +// SetBasePath sets field value +func (o *RpmRpmDistributionResponse) SetBasePath(v string) { + o.BasePath = v +} + +// GetBaseUrl returns the BaseUrl field value if set, zero value otherwise. +func (o *RpmRpmDistributionResponse) GetBaseUrl() string { + if o == nil || IsNil(o.BaseUrl) { + var ret string + return ret + } + return *o.BaseUrl +} + +// GetBaseUrlOk returns a tuple with the BaseUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmDistributionResponse) GetBaseUrlOk() (*string, bool) { + if o == nil || IsNil(o.BaseUrl) { + return nil, false + } + return o.BaseUrl, true +} + +// HasBaseUrl returns a boolean if a field has been set. +func (o *RpmRpmDistributionResponse) HasBaseUrl() bool { + if o != nil && !IsNil(o.BaseUrl) { + return true + } + + return false +} + +// SetBaseUrl gets a reference to the given string and assigns it to the BaseUrl field. +func (o *RpmRpmDistributionResponse) SetBaseUrl(v string) { + o.BaseUrl = &v +} + +// GetContentGuard returns the ContentGuard field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmDistributionResponse) GetContentGuard() string { + if o == nil || IsNil(o.ContentGuard.Get()) { + var ret string + return ret + } + return *o.ContentGuard.Get() +} + +// GetContentGuardOk returns a tuple with the ContentGuard field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmDistributionResponse) GetContentGuardOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentGuard.Get(), o.ContentGuard.IsSet() +} + +// HasContentGuard returns a boolean if a field has been set. +func (o *RpmRpmDistributionResponse) HasContentGuard() bool { + if o != nil && o.ContentGuard.IsSet() { + return true + } + + return false +} + +// SetContentGuard gets a reference to the given NullableString and assigns it to the ContentGuard field. +func (o *RpmRpmDistributionResponse) SetContentGuard(v string) { + o.ContentGuard.Set(&v) +} +// SetContentGuardNil sets the value for ContentGuard to be an explicit nil +func (o *RpmRpmDistributionResponse) SetContentGuardNil() { + o.ContentGuard.Set(nil) +} + +// UnsetContentGuard ensures that no value is present for ContentGuard, not even an explicit nil +func (o *RpmRpmDistributionResponse) UnsetContentGuard() { + o.ContentGuard.Unset() +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *RpmRpmDistributionResponse) GetHidden() bool { + if o == nil || IsNil(o.Hidden) { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmDistributionResponse) GetHiddenOk() (*bool, bool) { + if o == nil || IsNil(o.Hidden) { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *RpmRpmDistributionResponse) HasHidden() bool { + if o != nil && !IsNil(o.Hidden) { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *RpmRpmDistributionResponse) SetHidden(v bool) { + o.Hidden = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *RpmRpmDistributionResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmDistributionResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *RpmRpmDistributionResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *RpmRpmDistributionResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *RpmRpmDistributionResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmRpmDistributionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmRpmDistributionResponse) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmDistributionResponse) GetRepository() string { + if o == nil || IsNil(o.Repository.Get()) { + var ret string + return ret + } + return *o.Repository.Get() +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmDistributionResponse) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Repository.Get(), o.Repository.IsSet() +} + +// HasRepository returns a boolean if a field has been set. +func (o *RpmRpmDistributionResponse) HasRepository() bool { + if o != nil && o.Repository.IsSet() { + return true + } + + return false +} + +// SetRepository gets a reference to the given NullableString and assigns it to the Repository field. +func (o *RpmRpmDistributionResponse) SetRepository(v string) { + o.Repository.Set(&v) +} +// SetRepositoryNil sets the value for Repository to be an explicit nil +func (o *RpmRpmDistributionResponse) SetRepositoryNil() { + o.Repository.Set(nil) +} + +// UnsetRepository ensures that no value is present for Repository, not even an explicit nil +func (o *RpmRpmDistributionResponse) UnsetRepository() { + o.Repository.Unset() +} + +// GetPublication returns the Publication field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmDistributionResponse) GetPublication() string { + if o == nil || IsNil(o.Publication.Get()) { + var ret string + return ret + } + return *o.Publication.Get() +} + +// GetPublicationOk returns a tuple with the Publication field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmDistributionResponse) GetPublicationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Publication.Get(), o.Publication.IsSet() +} + +// HasPublication returns a boolean if a field has been set. +func (o *RpmRpmDistributionResponse) HasPublication() bool { + if o != nil && o.Publication.IsSet() { + return true + } + + return false +} + +// SetPublication gets a reference to the given NullableString and assigns it to the Publication field. +func (o *RpmRpmDistributionResponse) SetPublication(v string) { + o.Publication.Set(&v) +} +// SetPublicationNil sets the value for Publication to be an explicit nil +func (o *RpmRpmDistributionResponse) SetPublicationNil() { + o.Publication.Set(nil) +} + +// UnsetPublication ensures that no value is present for Publication, not even an explicit nil +func (o *RpmRpmDistributionResponse) UnsetPublication() { + o.Publication.Unset() +} + +func (o RpmRpmDistributionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmRpmDistributionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["base_path"] = o.BasePath + if !IsNil(o.BaseUrl) { + toSerialize["base_url"] = o.BaseUrl + } + if o.ContentGuard.IsSet() { + toSerialize["content_guard"] = o.ContentGuard.Get() + } + if !IsNil(o.Hidden) { + toSerialize["hidden"] = o.Hidden + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Repository.IsSet() { + toSerialize["repository"] = o.Repository.Get() + } + if o.Publication.IsSet() { + toSerialize["publication"] = o.Publication.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmRpmDistributionResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmRpmDistributionResponse := _RpmRpmDistributionResponse{} + + if err = json.Unmarshal(bytes, &varRpmRpmDistributionResponse); err == nil { + *o = RpmRpmDistributionResponse(varRpmRpmDistributionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "base_path") + delete(additionalProperties, "base_url") + delete(additionalProperties, "content_guard") + delete(additionalProperties, "hidden") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "repository") + delete(additionalProperties, "publication") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmRpmDistributionResponse struct { + value *RpmRpmDistributionResponse + isSet bool +} + +func (v NullableRpmRpmDistributionResponse) Get() *RpmRpmDistributionResponse { + return v.value +} + +func (v *NullableRpmRpmDistributionResponse) Set(val *RpmRpmDistributionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmRpmDistributionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmRpmDistributionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmRpmDistributionResponse(val *RpmRpmDistributionResponse) *NullableRpmRpmDistributionResponse { + return &NullableRpmRpmDistributionResponse{value: val, isSet: true} +} + +func (v NullableRpmRpmDistributionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmRpmDistributionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_publication.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_publication.go new file mode 100644 index 0000000000..80e47f35ee --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_publication.go @@ -0,0 +1,382 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RpmRpmPublication type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmRpmPublication{} + +// RpmRpmPublication A Serializer for RpmPublication. +type RpmRpmPublication struct { + RepositoryVersion *string `json:"repository_version,omitempty"` + // A URI of the repository to be published. + Repository *string `json:"repository,omitempty"` + MetadataChecksumType *MetadataChecksumTypeEnum `json:"metadata_checksum_type,omitempty"` + PackageChecksumType *PackageChecksumTypeEnum `json:"package_checksum_type,omitempty"` + // An option specifying whether a client should perform a GPG signature check on packages. + Gpgcheck *int64 `json:"gpgcheck,omitempty"` + // An option specifying whether a client should perform a GPG signature check on the repodata. + RepoGpgcheck *int64 `json:"repo_gpgcheck,omitempty"` + // DEPRECATED: An option specifying whether Pulp should generate SQLite metadata. + SqliteMetadata *bool `json:"sqlite_metadata,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmRpmPublication RpmRpmPublication + +// NewRpmRpmPublication instantiates a new RpmRpmPublication object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmRpmPublication() *RpmRpmPublication { + this := RpmRpmPublication{} + var sqliteMetadata bool = false + this.SqliteMetadata = &sqliteMetadata + return &this +} + +// NewRpmRpmPublicationWithDefaults instantiates a new RpmRpmPublication object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmRpmPublicationWithDefaults() *RpmRpmPublication { + this := RpmRpmPublication{} + var sqliteMetadata bool = false + this.SqliteMetadata = &sqliteMetadata + return &this +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *RpmRpmPublication) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublication) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *RpmRpmPublication) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *RpmRpmPublication) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *RpmRpmPublication) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublication) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *RpmRpmPublication) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *RpmRpmPublication) SetRepository(v string) { + o.Repository = &v +} + +// GetMetadataChecksumType returns the MetadataChecksumType field value if set, zero value otherwise. +func (o *RpmRpmPublication) GetMetadataChecksumType() MetadataChecksumTypeEnum { + if o == nil || IsNil(o.MetadataChecksumType) { + var ret MetadataChecksumTypeEnum + return ret + } + return *o.MetadataChecksumType +} + +// GetMetadataChecksumTypeOk returns a tuple with the MetadataChecksumType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublication) GetMetadataChecksumTypeOk() (*MetadataChecksumTypeEnum, bool) { + if o == nil || IsNil(o.MetadataChecksumType) { + return nil, false + } + return o.MetadataChecksumType, true +} + +// HasMetadataChecksumType returns a boolean if a field has been set. +func (o *RpmRpmPublication) HasMetadataChecksumType() bool { + if o != nil && !IsNil(o.MetadataChecksumType) { + return true + } + + return false +} + +// SetMetadataChecksumType gets a reference to the given MetadataChecksumTypeEnum and assigns it to the MetadataChecksumType field. +func (o *RpmRpmPublication) SetMetadataChecksumType(v MetadataChecksumTypeEnum) { + o.MetadataChecksumType = &v +} + +// GetPackageChecksumType returns the PackageChecksumType field value if set, zero value otherwise. +func (o *RpmRpmPublication) GetPackageChecksumType() PackageChecksumTypeEnum { + if o == nil || IsNil(o.PackageChecksumType) { + var ret PackageChecksumTypeEnum + return ret + } + return *o.PackageChecksumType +} + +// GetPackageChecksumTypeOk returns a tuple with the PackageChecksumType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublication) GetPackageChecksumTypeOk() (*PackageChecksumTypeEnum, bool) { + if o == nil || IsNil(o.PackageChecksumType) { + return nil, false + } + return o.PackageChecksumType, true +} + +// HasPackageChecksumType returns a boolean if a field has been set. +func (o *RpmRpmPublication) HasPackageChecksumType() bool { + if o != nil && !IsNil(o.PackageChecksumType) { + return true + } + + return false +} + +// SetPackageChecksumType gets a reference to the given PackageChecksumTypeEnum and assigns it to the PackageChecksumType field. +func (o *RpmRpmPublication) SetPackageChecksumType(v PackageChecksumTypeEnum) { + o.PackageChecksumType = &v +} + +// GetGpgcheck returns the Gpgcheck field value if set, zero value otherwise. +func (o *RpmRpmPublication) GetGpgcheck() int64 { + if o == nil || IsNil(o.Gpgcheck) { + var ret int64 + return ret + } + return *o.Gpgcheck +} + +// GetGpgcheckOk returns a tuple with the Gpgcheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublication) GetGpgcheckOk() (*int64, bool) { + if o == nil || IsNil(o.Gpgcheck) { + return nil, false + } + return o.Gpgcheck, true +} + +// HasGpgcheck returns a boolean if a field has been set. +func (o *RpmRpmPublication) HasGpgcheck() bool { + if o != nil && !IsNil(o.Gpgcheck) { + return true + } + + return false +} + +// SetGpgcheck gets a reference to the given int64 and assigns it to the Gpgcheck field. +func (o *RpmRpmPublication) SetGpgcheck(v int64) { + o.Gpgcheck = &v +} + +// GetRepoGpgcheck returns the RepoGpgcheck field value if set, zero value otherwise. +func (o *RpmRpmPublication) GetRepoGpgcheck() int64 { + if o == nil || IsNil(o.RepoGpgcheck) { + var ret int64 + return ret + } + return *o.RepoGpgcheck +} + +// GetRepoGpgcheckOk returns a tuple with the RepoGpgcheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublication) GetRepoGpgcheckOk() (*int64, bool) { + if o == nil || IsNil(o.RepoGpgcheck) { + return nil, false + } + return o.RepoGpgcheck, true +} + +// HasRepoGpgcheck returns a boolean if a field has been set. +func (o *RpmRpmPublication) HasRepoGpgcheck() bool { + if o != nil && !IsNil(o.RepoGpgcheck) { + return true + } + + return false +} + +// SetRepoGpgcheck gets a reference to the given int64 and assigns it to the RepoGpgcheck field. +func (o *RpmRpmPublication) SetRepoGpgcheck(v int64) { + o.RepoGpgcheck = &v +} + +// GetSqliteMetadata returns the SqliteMetadata field value if set, zero value otherwise. +func (o *RpmRpmPublication) GetSqliteMetadata() bool { + if o == nil || IsNil(o.SqliteMetadata) { + var ret bool + return ret + } + return *o.SqliteMetadata +} + +// GetSqliteMetadataOk returns a tuple with the SqliteMetadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublication) GetSqliteMetadataOk() (*bool, bool) { + if o == nil || IsNil(o.SqliteMetadata) { + return nil, false + } + return o.SqliteMetadata, true +} + +// HasSqliteMetadata returns a boolean if a field has been set. +func (o *RpmRpmPublication) HasSqliteMetadata() bool { + if o != nil && !IsNil(o.SqliteMetadata) { + return true + } + + return false +} + +// SetSqliteMetadata gets a reference to the given bool and assigns it to the SqliteMetadata field. +func (o *RpmRpmPublication) SetSqliteMetadata(v bool) { + o.SqliteMetadata = &v +} + +func (o RpmRpmPublication) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmRpmPublication) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.MetadataChecksumType) { + toSerialize["metadata_checksum_type"] = o.MetadataChecksumType + } + if !IsNil(o.PackageChecksumType) { + toSerialize["package_checksum_type"] = o.PackageChecksumType + } + if !IsNil(o.Gpgcheck) { + toSerialize["gpgcheck"] = o.Gpgcheck + } + if !IsNil(o.RepoGpgcheck) { + toSerialize["repo_gpgcheck"] = o.RepoGpgcheck + } + if !IsNil(o.SqliteMetadata) { + toSerialize["sqlite_metadata"] = o.SqliteMetadata + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmRpmPublication) UnmarshalJSON(bytes []byte) (err error) { + varRpmRpmPublication := _RpmRpmPublication{} + + if err = json.Unmarshal(bytes, &varRpmRpmPublication); err == nil { + *o = RpmRpmPublication(varRpmRpmPublication) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository_version") + delete(additionalProperties, "repository") + delete(additionalProperties, "metadata_checksum_type") + delete(additionalProperties, "package_checksum_type") + delete(additionalProperties, "gpgcheck") + delete(additionalProperties, "repo_gpgcheck") + delete(additionalProperties, "sqlite_metadata") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmRpmPublication struct { + value *RpmRpmPublication + isSet bool +} + +func (v NullableRpmRpmPublication) Get() *RpmRpmPublication { + return v.value +} + +func (v *NullableRpmRpmPublication) Set(val *RpmRpmPublication) { + v.value = val + v.isSet = true +} + +func (v NullableRpmRpmPublication) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmRpmPublication) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmRpmPublication(val *RpmRpmPublication) *NullableRpmRpmPublication { + return &NullableRpmRpmPublication{value: val, isSet: true} +} + +func (v NullableRpmRpmPublication) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmRpmPublication) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_publication_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_publication_response.go new file mode 100644 index 0000000000..d11008b26e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_publication_response.go @@ -0,0 +1,458 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmRpmPublicationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmRpmPublicationResponse{} + +// RpmRpmPublicationResponse A Serializer for RpmPublication. +type RpmRpmPublicationResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + RepositoryVersion *string `json:"repository_version,omitempty"` + // A URI of the repository to be published. + Repository *string `json:"repository,omitempty"` + MetadataChecksumType *MetadataChecksumTypeEnum `json:"metadata_checksum_type,omitempty"` + PackageChecksumType *PackageChecksumTypeEnum `json:"package_checksum_type,omitempty"` + // An option specifying whether a client should perform a GPG signature check on packages. + Gpgcheck *int64 `json:"gpgcheck,omitempty"` + // An option specifying whether a client should perform a GPG signature check on the repodata. + RepoGpgcheck *int64 `json:"repo_gpgcheck,omitempty"` + // DEPRECATED: An option specifying whether Pulp should generate SQLite metadata. + SqliteMetadata *bool `json:"sqlite_metadata,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmRpmPublicationResponse RpmRpmPublicationResponse + +// NewRpmRpmPublicationResponse instantiates a new RpmRpmPublicationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmRpmPublicationResponse() *RpmRpmPublicationResponse { + this := RpmRpmPublicationResponse{} + var sqliteMetadata bool = false + this.SqliteMetadata = &sqliteMetadata + return &this +} + +// NewRpmRpmPublicationResponseWithDefaults instantiates a new RpmRpmPublicationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmRpmPublicationResponseWithDefaults() *RpmRpmPublicationResponse { + this := RpmRpmPublicationResponse{} + var sqliteMetadata bool = false + this.SqliteMetadata = &sqliteMetadata + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmRpmPublicationResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublicationResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmRpmPublicationResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmRpmPublicationResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmRpmPublicationResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublicationResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmRpmPublicationResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmRpmPublicationResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetRepositoryVersion returns the RepositoryVersion field value if set, zero value otherwise. +func (o *RpmRpmPublicationResponse) GetRepositoryVersion() string { + if o == nil || IsNil(o.RepositoryVersion) { + var ret string + return ret + } + return *o.RepositoryVersion +} + +// GetRepositoryVersionOk returns a tuple with the RepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublicationResponse) GetRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.RepositoryVersion) { + return nil, false + } + return o.RepositoryVersion, true +} + +// HasRepositoryVersion returns a boolean if a field has been set. +func (o *RpmRpmPublicationResponse) HasRepositoryVersion() bool { + if o != nil && !IsNil(o.RepositoryVersion) { + return true + } + + return false +} + +// SetRepositoryVersion gets a reference to the given string and assigns it to the RepositoryVersion field. +func (o *RpmRpmPublicationResponse) SetRepositoryVersion(v string) { + o.RepositoryVersion = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *RpmRpmPublicationResponse) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublicationResponse) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *RpmRpmPublicationResponse) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *RpmRpmPublicationResponse) SetRepository(v string) { + o.Repository = &v +} + +// GetMetadataChecksumType returns the MetadataChecksumType field value if set, zero value otherwise. +func (o *RpmRpmPublicationResponse) GetMetadataChecksumType() MetadataChecksumTypeEnum { + if o == nil || IsNil(o.MetadataChecksumType) { + var ret MetadataChecksumTypeEnum + return ret + } + return *o.MetadataChecksumType +} + +// GetMetadataChecksumTypeOk returns a tuple with the MetadataChecksumType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublicationResponse) GetMetadataChecksumTypeOk() (*MetadataChecksumTypeEnum, bool) { + if o == nil || IsNil(o.MetadataChecksumType) { + return nil, false + } + return o.MetadataChecksumType, true +} + +// HasMetadataChecksumType returns a boolean if a field has been set. +func (o *RpmRpmPublicationResponse) HasMetadataChecksumType() bool { + if o != nil && !IsNil(o.MetadataChecksumType) { + return true + } + + return false +} + +// SetMetadataChecksumType gets a reference to the given MetadataChecksumTypeEnum and assigns it to the MetadataChecksumType field. +func (o *RpmRpmPublicationResponse) SetMetadataChecksumType(v MetadataChecksumTypeEnum) { + o.MetadataChecksumType = &v +} + +// GetPackageChecksumType returns the PackageChecksumType field value if set, zero value otherwise. +func (o *RpmRpmPublicationResponse) GetPackageChecksumType() PackageChecksumTypeEnum { + if o == nil || IsNil(o.PackageChecksumType) { + var ret PackageChecksumTypeEnum + return ret + } + return *o.PackageChecksumType +} + +// GetPackageChecksumTypeOk returns a tuple with the PackageChecksumType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublicationResponse) GetPackageChecksumTypeOk() (*PackageChecksumTypeEnum, bool) { + if o == nil || IsNil(o.PackageChecksumType) { + return nil, false + } + return o.PackageChecksumType, true +} + +// HasPackageChecksumType returns a boolean if a field has been set. +func (o *RpmRpmPublicationResponse) HasPackageChecksumType() bool { + if o != nil && !IsNil(o.PackageChecksumType) { + return true + } + + return false +} + +// SetPackageChecksumType gets a reference to the given PackageChecksumTypeEnum and assigns it to the PackageChecksumType field. +func (o *RpmRpmPublicationResponse) SetPackageChecksumType(v PackageChecksumTypeEnum) { + o.PackageChecksumType = &v +} + +// GetGpgcheck returns the Gpgcheck field value if set, zero value otherwise. +func (o *RpmRpmPublicationResponse) GetGpgcheck() int64 { + if o == nil || IsNil(o.Gpgcheck) { + var ret int64 + return ret + } + return *o.Gpgcheck +} + +// GetGpgcheckOk returns a tuple with the Gpgcheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublicationResponse) GetGpgcheckOk() (*int64, bool) { + if o == nil || IsNil(o.Gpgcheck) { + return nil, false + } + return o.Gpgcheck, true +} + +// HasGpgcheck returns a boolean if a field has been set. +func (o *RpmRpmPublicationResponse) HasGpgcheck() bool { + if o != nil && !IsNil(o.Gpgcheck) { + return true + } + + return false +} + +// SetGpgcheck gets a reference to the given int64 and assigns it to the Gpgcheck field. +func (o *RpmRpmPublicationResponse) SetGpgcheck(v int64) { + o.Gpgcheck = &v +} + +// GetRepoGpgcheck returns the RepoGpgcheck field value if set, zero value otherwise. +func (o *RpmRpmPublicationResponse) GetRepoGpgcheck() int64 { + if o == nil || IsNil(o.RepoGpgcheck) { + var ret int64 + return ret + } + return *o.RepoGpgcheck +} + +// GetRepoGpgcheckOk returns a tuple with the RepoGpgcheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublicationResponse) GetRepoGpgcheckOk() (*int64, bool) { + if o == nil || IsNil(o.RepoGpgcheck) { + return nil, false + } + return o.RepoGpgcheck, true +} + +// HasRepoGpgcheck returns a boolean if a field has been set. +func (o *RpmRpmPublicationResponse) HasRepoGpgcheck() bool { + if o != nil && !IsNil(o.RepoGpgcheck) { + return true + } + + return false +} + +// SetRepoGpgcheck gets a reference to the given int64 and assigns it to the RepoGpgcheck field. +func (o *RpmRpmPublicationResponse) SetRepoGpgcheck(v int64) { + o.RepoGpgcheck = &v +} + +// GetSqliteMetadata returns the SqliteMetadata field value if set, zero value otherwise. +func (o *RpmRpmPublicationResponse) GetSqliteMetadata() bool { + if o == nil || IsNil(o.SqliteMetadata) { + var ret bool + return ret + } + return *o.SqliteMetadata +} + +// GetSqliteMetadataOk returns a tuple with the SqliteMetadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmPublicationResponse) GetSqliteMetadataOk() (*bool, bool) { + if o == nil || IsNil(o.SqliteMetadata) { + return nil, false + } + return o.SqliteMetadata, true +} + +// HasSqliteMetadata returns a boolean if a field has been set. +func (o *RpmRpmPublicationResponse) HasSqliteMetadata() bool { + if o != nil && !IsNil(o.SqliteMetadata) { + return true + } + + return false +} + +// SetSqliteMetadata gets a reference to the given bool and assigns it to the SqliteMetadata field. +func (o *RpmRpmPublicationResponse) SetSqliteMetadata(v bool) { + o.SqliteMetadata = &v +} + +func (o RpmRpmPublicationResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmRpmPublicationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.RepositoryVersion) { + toSerialize["repository_version"] = o.RepositoryVersion + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.MetadataChecksumType) { + toSerialize["metadata_checksum_type"] = o.MetadataChecksumType + } + if !IsNil(o.PackageChecksumType) { + toSerialize["package_checksum_type"] = o.PackageChecksumType + } + if !IsNil(o.Gpgcheck) { + toSerialize["gpgcheck"] = o.Gpgcheck + } + if !IsNil(o.RepoGpgcheck) { + toSerialize["repo_gpgcheck"] = o.RepoGpgcheck + } + if !IsNil(o.SqliteMetadata) { + toSerialize["sqlite_metadata"] = o.SqliteMetadata + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmRpmPublicationResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmRpmPublicationResponse := _RpmRpmPublicationResponse{} + + if err = json.Unmarshal(bytes, &varRpmRpmPublicationResponse); err == nil { + *o = RpmRpmPublicationResponse(varRpmRpmPublicationResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "repository_version") + delete(additionalProperties, "repository") + delete(additionalProperties, "metadata_checksum_type") + delete(additionalProperties, "package_checksum_type") + delete(additionalProperties, "gpgcheck") + delete(additionalProperties, "repo_gpgcheck") + delete(additionalProperties, "sqlite_metadata") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmRpmPublicationResponse struct { + value *RpmRpmPublicationResponse + isSet bool +} + +func (v NullableRpmRpmPublicationResponse) Get() *RpmRpmPublicationResponse { + return v.value +} + +func (v *NullableRpmRpmPublicationResponse) Set(val *RpmRpmPublicationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmRpmPublicationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmRpmPublicationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmRpmPublicationResponse(val *RpmRpmPublicationResponse) *NullableRpmRpmPublicationResponse { + return &NullableRpmRpmPublicationResponse{value: val, isSet: true} +} + +func (v NullableRpmRpmPublicationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmRpmPublicationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_remote.go new file mode 100644 index 0000000000..f0ebec5eee --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_remote.go @@ -0,0 +1,1095 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RpmRpmRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmRpmRemote{} + +// RpmRpmRemote A Serializer for RpmRemote. +type RpmRpmRemote struct { + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // Authentication token for SLES repositories. + SlesAuthToken NullableString `json:"sles_auth_token,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmRpmRemote RpmRpmRemote + +// NewRpmRpmRemote instantiates a new RpmRpmRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmRpmRemote(name string, url string) *RpmRpmRemote { + this := RpmRpmRemote{} + this.Name = name + this.Url = url + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewRpmRpmRemoteWithDefaults instantiates a new RpmRpmRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmRpmRemoteWithDefaults() *RpmRpmRemote { + this := RpmRpmRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value +func (o *RpmRpmRemote) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmRpmRemote) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmRpmRemote) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *RpmRpmRemote) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *RpmRpmRemote) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *RpmRpmRemote) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *RpmRpmRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *RpmRpmRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *RpmRpmRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *RpmRpmRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *RpmRpmRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *RpmRpmRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *RpmRpmRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *RpmRpmRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *RpmRpmRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *RpmRpmRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *RpmRpmRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *RpmRpmRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *RpmRpmRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *RpmRpmRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *RpmRpmRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *RpmRpmRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *RpmRpmRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *RpmRpmRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *RpmRpmRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *RpmRpmRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *RpmRpmRemote) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *RpmRpmRemote) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *RpmRpmRemote) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *RpmRpmRemote) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *RpmRpmRemote) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *RpmRpmRemote) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *RpmRpmRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *RpmRpmRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *RpmRpmRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *RpmRpmRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *RpmRpmRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *RpmRpmRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *RpmRpmRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *RpmRpmRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *RpmRpmRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *RpmRpmRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *RpmRpmRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *RpmRpmRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *RpmRpmRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *RpmRpmRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *RpmRpmRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *RpmRpmRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *RpmRpmRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *RpmRpmRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *RpmRpmRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *RpmRpmRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *RpmRpmRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *RpmRpmRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *RpmRpmRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *RpmRpmRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *RpmRpmRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *RpmRpmRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *RpmRpmRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetSlesAuthToken returns the SlesAuthToken field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemote) GetSlesAuthToken() string { + if o == nil || IsNil(o.SlesAuthToken.Get()) { + var ret string + return ret + } + return *o.SlesAuthToken.Get() +} + +// GetSlesAuthTokenOk returns a tuple with the SlesAuthToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemote) GetSlesAuthTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SlesAuthToken.Get(), o.SlesAuthToken.IsSet() +} + +// HasSlesAuthToken returns a boolean if a field has been set. +func (o *RpmRpmRemote) HasSlesAuthToken() bool { + if o != nil && o.SlesAuthToken.IsSet() { + return true + } + + return false +} + +// SetSlesAuthToken gets a reference to the given NullableString and assigns it to the SlesAuthToken field. +func (o *RpmRpmRemote) SetSlesAuthToken(v string) { + o.SlesAuthToken.Set(&v) +} +// SetSlesAuthTokenNil sets the value for SlesAuthToken to be an explicit nil +func (o *RpmRpmRemote) SetSlesAuthTokenNil() { + o.SlesAuthToken.Set(nil) +} + +// UnsetSlesAuthToken ensures that no value is present for SlesAuthToken, not even an explicit nil +func (o *RpmRpmRemote) UnsetSlesAuthToken() { + o.SlesAuthToken.Unset() +} + +func (o RpmRpmRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmRpmRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if o.SlesAuthToken.IsSet() { + toSerialize["sles_auth_token"] = o.SlesAuthToken.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmRpmRemote) UnmarshalJSON(bytes []byte) (err error) { + varRpmRpmRemote := _RpmRpmRemote{} + + if err = json.Unmarshal(bytes, &varRpmRpmRemote); err == nil { + *o = RpmRpmRemote(varRpmRpmRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "sles_auth_token") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmRpmRemote struct { + value *RpmRpmRemote + isSet bool +} + +func (v NullableRpmRpmRemote) Get() *RpmRpmRemote { + return v.value +} + +func (v *NullableRpmRpmRemote) Set(val *RpmRpmRemote) { + v.value = val + v.isSet = true +} + +func (v NullableRpmRpmRemote) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmRpmRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmRpmRemote(val *RpmRpmRemote) *NullableRpmRpmRemote { + return &NullableRpmRpmRemote{value: val, isSet: true} +} + +func (v NullableRpmRpmRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmRpmRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_remote_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_remote_response.go new file mode 100644 index 0000000000..c497b37841 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_remote_response.go @@ -0,0 +1,1007 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmRpmRemoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmRpmRemoteResponse{} + +// RpmRpmRemoteResponse A Serializer for RpmRemote. +type RpmRpmRemoteResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // The URL of an external content source. + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + // Authentication token for SLES repositories. + SlesAuthToken NullableString `json:"sles_auth_token,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmRpmRemoteResponse RpmRpmRemoteResponse + +// NewRpmRpmRemoteResponse instantiates a new RpmRpmRemoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmRpmRemoteResponse(name string, url string) *RpmRpmRemoteResponse { + this := RpmRpmRemoteResponse{} + this.Name = name + this.Url = url + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewRpmRpmRemoteResponseWithDefaults instantiates a new RpmRpmRemoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmRpmRemoteResponseWithDefaults() *RpmRpmRemoteResponse { + this := RpmRpmRemoteResponse{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmRpmRemoteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRemoteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmRpmRemoteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmRpmRemoteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRemoteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmRpmRemoteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *RpmRpmRemoteResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmRpmRemoteResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmRpmRemoteResponse) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *RpmRpmRemoteResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *RpmRpmRemoteResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *RpmRpmRemoteResponse) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemoteResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemoteResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *RpmRpmRemoteResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *RpmRpmRemoteResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *RpmRpmRemoteResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemoteResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemoteResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *RpmRpmRemoteResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *RpmRpmRemoteResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *RpmRpmRemoteResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *RpmRpmRemoteResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRemoteResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *RpmRpmRemoteResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemoteResponse) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemoteResponse) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *RpmRpmRemoteResponse) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *RpmRpmRemoteResponse) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *RpmRpmRemoteResponse) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *RpmRpmRemoteResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRemoteResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *RpmRpmRemoteResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *RpmRpmRemoteResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRemoteResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *RpmRpmRemoteResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemoteResponse) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemoteResponse) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *RpmRpmRemoteResponse) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *RpmRpmRemoteResponse) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *RpmRpmRemoteResponse) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemoteResponse) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemoteResponse) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *RpmRpmRemoteResponse) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *RpmRpmRemoteResponse) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *RpmRpmRemoteResponse) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *RpmRpmRemoteResponse) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRemoteResponse) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *RpmRpmRemoteResponse) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemoteResponse) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemoteResponse) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *RpmRpmRemoteResponse) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *RpmRpmRemoteResponse) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *RpmRpmRemoteResponse) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemoteResponse) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemoteResponse) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *RpmRpmRemoteResponse) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *RpmRpmRemoteResponse) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *RpmRpmRemoteResponse) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemoteResponse) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemoteResponse) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *RpmRpmRemoteResponse) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *RpmRpmRemoteResponse) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *RpmRpmRemoteResponse) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemoteResponse) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemoteResponse) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *RpmRpmRemoteResponse) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *RpmRpmRemoteResponse) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *RpmRpmRemoteResponse) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *RpmRpmRemoteResponse) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRemoteResponse) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *RpmRpmRemoteResponse) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemoteResponse) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemoteResponse) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *RpmRpmRemoteResponse) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *RpmRpmRemoteResponse) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *RpmRpmRemoteResponse) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *RpmRpmRemoteResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRemoteResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *RpmRpmRemoteResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +// GetSlesAuthToken returns the SlesAuthToken field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRemoteResponse) GetSlesAuthToken() string { + if o == nil || IsNil(o.SlesAuthToken.Get()) { + var ret string + return ret + } + return *o.SlesAuthToken.Get() +} + +// GetSlesAuthTokenOk returns a tuple with the SlesAuthToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRemoteResponse) GetSlesAuthTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SlesAuthToken.Get(), o.SlesAuthToken.IsSet() +} + +// HasSlesAuthToken returns a boolean if a field has been set. +func (o *RpmRpmRemoteResponse) HasSlesAuthToken() bool { + if o != nil && o.SlesAuthToken.IsSet() { + return true + } + + return false +} + +// SetSlesAuthToken gets a reference to the given NullableString and assigns it to the SlesAuthToken field. +func (o *RpmRpmRemoteResponse) SetSlesAuthToken(v string) { + o.SlesAuthToken.Set(&v) +} +// SetSlesAuthTokenNil sets the value for SlesAuthToken to be an explicit nil +func (o *RpmRpmRemoteResponse) SetSlesAuthTokenNil() { + o.SlesAuthToken.Set(nil) +} + +// UnsetSlesAuthToken ensures that no value is present for SlesAuthToken, not even an explicit nil +func (o *RpmRpmRemoteResponse) UnsetSlesAuthToken() { + o.SlesAuthToken.Unset() +} + +func (o RpmRpmRemoteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmRpmRemoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + if o.SlesAuthToken.IsSet() { + toSerialize["sles_auth_token"] = o.SlesAuthToken.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmRpmRemoteResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmRpmRemoteResponse := _RpmRpmRemoteResponse{} + + if err = json.Unmarshal(bytes, &varRpmRpmRemoteResponse); err == nil { + *o = RpmRpmRemoteResponse(varRpmRpmRemoteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "hidden_fields") + delete(additionalProperties, "sles_auth_token") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmRpmRemoteResponse struct { + value *RpmRpmRemoteResponse + isSet bool +} + +func (v NullableRpmRpmRemoteResponse) Get() *RpmRpmRemoteResponse { + return v.value +} + +func (v *NullableRpmRpmRemoteResponse) Set(val *RpmRpmRemoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmRpmRemoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmRpmRemoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmRpmRemoteResponse(val *RpmRpmRemoteResponse) *NullableRpmRpmRemoteResponse { + return &NullableRpmRpmRemoteResponse{value: val, isSet: true} +} + +func (v NullableRpmRpmRemoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmRpmRemoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_repository.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_repository.go new file mode 100644 index 0000000000..885157e069 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_repository.go @@ -0,0 +1,673 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RpmRpmRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmRpmRepository{} + +// RpmRpmRepository Serializer for Rpm Repositories. +type RpmRpmRepository struct { + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. + Autopublish *bool `json:"autopublish,omitempty"` + // A reference to an associated signing service. + MetadataSigningService NullableString `json:"metadata_signing_service,omitempty"` + // The number of versions of each package to keep in the repository; older versions will be purged. The default is '0', which will disable this feature and keep all versions of each package. + RetainPackageVersions *int64 `json:"retain_package_versions,omitempty"` + MetadataChecksumType NullableMetadataChecksumTypeEnum `json:"metadata_checksum_type,omitempty"` + PackageChecksumType NullablePackageChecksumTypeEnum `json:"package_checksum_type,omitempty"` + // An option specifying whether a client should perform a GPG signature check on packages. + Gpgcheck *int64 `json:"gpgcheck,omitempty"` + // An option specifying whether a client should perform a GPG signature check on the repodata. + RepoGpgcheck *int64 `json:"repo_gpgcheck,omitempty"` + // DEPRECATED: An option specifying whether Pulp should generate SQLite metadata. + SqliteMetadata *bool `json:"sqlite_metadata,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmRpmRepository RpmRpmRepository + +// NewRpmRpmRepository instantiates a new RpmRpmRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmRpmRepository(name string) *RpmRpmRepository { + this := RpmRpmRepository{} + this.Name = name + var autopublish bool = false + this.Autopublish = &autopublish + var gpgcheck int64 = 0 + this.Gpgcheck = &gpgcheck + var repoGpgcheck int64 = 0 + this.RepoGpgcheck = &repoGpgcheck + var sqliteMetadata bool = false + this.SqliteMetadata = &sqliteMetadata + return &this +} + +// NewRpmRpmRepositoryWithDefaults instantiates a new RpmRpmRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmRpmRepositoryWithDefaults() *RpmRpmRepository { + this := RpmRpmRepository{} + var autopublish bool = false + this.Autopublish = &autopublish + var gpgcheck int64 = 0 + this.Gpgcheck = &gpgcheck + var repoGpgcheck int64 = 0 + this.RepoGpgcheck = &repoGpgcheck + var sqliteMetadata bool = false + this.SqliteMetadata = &sqliteMetadata + return &this +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *RpmRpmRepository) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepository) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *RpmRpmRepository) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *RpmRpmRepository) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetName returns the Name field value +func (o *RpmRpmRepository) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmRpmRepository) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmRpmRepository) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRepository) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRepository) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *RpmRpmRepository) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *RpmRpmRepository) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *RpmRpmRepository) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *RpmRpmRepository) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRepository) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRepository) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *RpmRpmRepository) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *RpmRpmRepository) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *RpmRpmRepository) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *RpmRpmRepository) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRepository) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRepository) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *RpmRpmRepository) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *RpmRpmRepository) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *RpmRpmRepository) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *RpmRpmRepository) UnsetRemote() { + o.Remote.Unset() +} + +// GetAutopublish returns the Autopublish field value if set, zero value otherwise. +func (o *RpmRpmRepository) GetAutopublish() bool { + if o == nil || IsNil(o.Autopublish) { + var ret bool + return ret + } + return *o.Autopublish +} + +// GetAutopublishOk returns a tuple with the Autopublish field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepository) GetAutopublishOk() (*bool, bool) { + if o == nil || IsNil(o.Autopublish) { + return nil, false + } + return o.Autopublish, true +} + +// HasAutopublish returns a boolean if a field has been set. +func (o *RpmRpmRepository) HasAutopublish() bool { + if o != nil && !IsNil(o.Autopublish) { + return true + } + + return false +} + +// SetAutopublish gets a reference to the given bool and assigns it to the Autopublish field. +func (o *RpmRpmRepository) SetAutopublish(v bool) { + o.Autopublish = &v +} + +// GetMetadataSigningService returns the MetadataSigningService field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRepository) GetMetadataSigningService() string { + if o == nil || IsNil(o.MetadataSigningService.Get()) { + var ret string + return ret + } + return *o.MetadataSigningService.Get() +} + +// GetMetadataSigningServiceOk returns a tuple with the MetadataSigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRepository) GetMetadataSigningServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MetadataSigningService.Get(), o.MetadataSigningService.IsSet() +} + +// HasMetadataSigningService returns a boolean if a field has been set. +func (o *RpmRpmRepository) HasMetadataSigningService() bool { + if o != nil && o.MetadataSigningService.IsSet() { + return true + } + + return false +} + +// SetMetadataSigningService gets a reference to the given NullableString and assigns it to the MetadataSigningService field. +func (o *RpmRpmRepository) SetMetadataSigningService(v string) { + o.MetadataSigningService.Set(&v) +} +// SetMetadataSigningServiceNil sets the value for MetadataSigningService to be an explicit nil +func (o *RpmRpmRepository) SetMetadataSigningServiceNil() { + o.MetadataSigningService.Set(nil) +} + +// UnsetMetadataSigningService ensures that no value is present for MetadataSigningService, not even an explicit nil +func (o *RpmRpmRepository) UnsetMetadataSigningService() { + o.MetadataSigningService.Unset() +} + +// GetRetainPackageVersions returns the RetainPackageVersions field value if set, zero value otherwise. +func (o *RpmRpmRepository) GetRetainPackageVersions() int64 { + if o == nil || IsNil(o.RetainPackageVersions) { + var ret int64 + return ret + } + return *o.RetainPackageVersions +} + +// GetRetainPackageVersionsOk returns a tuple with the RetainPackageVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepository) GetRetainPackageVersionsOk() (*int64, bool) { + if o == nil || IsNil(o.RetainPackageVersions) { + return nil, false + } + return o.RetainPackageVersions, true +} + +// HasRetainPackageVersions returns a boolean if a field has been set. +func (o *RpmRpmRepository) HasRetainPackageVersions() bool { + if o != nil && !IsNil(o.RetainPackageVersions) { + return true + } + + return false +} + +// SetRetainPackageVersions gets a reference to the given int64 and assigns it to the RetainPackageVersions field. +func (o *RpmRpmRepository) SetRetainPackageVersions(v int64) { + o.RetainPackageVersions = &v +} + +// GetMetadataChecksumType returns the MetadataChecksumType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRepository) GetMetadataChecksumType() MetadataChecksumTypeEnum { + if o == nil || IsNil(o.MetadataChecksumType.Get()) { + var ret MetadataChecksumTypeEnum + return ret + } + return *o.MetadataChecksumType.Get() +} + +// GetMetadataChecksumTypeOk returns a tuple with the MetadataChecksumType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRepository) GetMetadataChecksumTypeOk() (*MetadataChecksumTypeEnum, bool) { + if o == nil { + return nil, false + } + return o.MetadataChecksumType.Get(), o.MetadataChecksumType.IsSet() +} + +// HasMetadataChecksumType returns a boolean if a field has been set. +func (o *RpmRpmRepository) HasMetadataChecksumType() bool { + if o != nil && o.MetadataChecksumType.IsSet() { + return true + } + + return false +} + +// SetMetadataChecksumType gets a reference to the given NullableMetadataChecksumTypeEnum and assigns it to the MetadataChecksumType field. +func (o *RpmRpmRepository) SetMetadataChecksumType(v MetadataChecksumTypeEnum) { + o.MetadataChecksumType.Set(&v) +} +// SetMetadataChecksumTypeNil sets the value for MetadataChecksumType to be an explicit nil +func (o *RpmRpmRepository) SetMetadataChecksumTypeNil() { + o.MetadataChecksumType.Set(nil) +} + +// UnsetMetadataChecksumType ensures that no value is present for MetadataChecksumType, not even an explicit nil +func (o *RpmRpmRepository) UnsetMetadataChecksumType() { + o.MetadataChecksumType.Unset() +} + +// GetPackageChecksumType returns the PackageChecksumType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRepository) GetPackageChecksumType() PackageChecksumTypeEnum { + if o == nil || IsNil(o.PackageChecksumType.Get()) { + var ret PackageChecksumTypeEnum + return ret + } + return *o.PackageChecksumType.Get() +} + +// GetPackageChecksumTypeOk returns a tuple with the PackageChecksumType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRepository) GetPackageChecksumTypeOk() (*PackageChecksumTypeEnum, bool) { + if o == nil { + return nil, false + } + return o.PackageChecksumType.Get(), o.PackageChecksumType.IsSet() +} + +// HasPackageChecksumType returns a boolean if a field has been set. +func (o *RpmRpmRepository) HasPackageChecksumType() bool { + if o != nil && o.PackageChecksumType.IsSet() { + return true + } + + return false +} + +// SetPackageChecksumType gets a reference to the given NullablePackageChecksumTypeEnum and assigns it to the PackageChecksumType field. +func (o *RpmRpmRepository) SetPackageChecksumType(v PackageChecksumTypeEnum) { + o.PackageChecksumType.Set(&v) +} +// SetPackageChecksumTypeNil sets the value for PackageChecksumType to be an explicit nil +func (o *RpmRpmRepository) SetPackageChecksumTypeNil() { + o.PackageChecksumType.Set(nil) +} + +// UnsetPackageChecksumType ensures that no value is present for PackageChecksumType, not even an explicit nil +func (o *RpmRpmRepository) UnsetPackageChecksumType() { + o.PackageChecksumType.Unset() +} + +// GetGpgcheck returns the Gpgcheck field value if set, zero value otherwise. +func (o *RpmRpmRepository) GetGpgcheck() int64 { + if o == nil || IsNil(o.Gpgcheck) { + var ret int64 + return ret + } + return *o.Gpgcheck +} + +// GetGpgcheckOk returns a tuple with the Gpgcheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepository) GetGpgcheckOk() (*int64, bool) { + if o == nil || IsNil(o.Gpgcheck) { + return nil, false + } + return o.Gpgcheck, true +} + +// HasGpgcheck returns a boolean if a field has been set. +func (o *RpmRpmRepository) HasGpgcheck() bool { + if o != nil && !IsNil(o.Gpgcheck) { + return true + } + + return false +} + +// SetGpgcheck gets a reference to the given int64 and assigns it to the Gpgcheck field. +func (o *RpmRpmRepository) SetGpgcheck(v int64) { + o.Gpgcheck = &v +} + +// GetRepoGpgcheck returns the RepoGpgcheck field value if set, zero value otherwise. +func (o *RpmRpmRepository) GetRepoGpgcheck() int64 { + if o == nil || IsNil(o.RepoGpgcheck) { + var ret int64 + return ret + } + return *o.RepoGpgcheck +} + +// GetRepoGpgcheckOk returns a tuple with the RepoGpgcheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepository) GetRepoGpgcheckOk() (*int64, bool) { + if o == nil || IsNil(o.RepoGpgcheck) { + return nil, false + } + return o.RepoGpgcheck, true +} + +// HasRepoGpgcheck returns a boolean if a field has been set. +func (o *RpmRpmRepository) HasRepoGpgcheck() bool { + if o != nil && !IsNil(o.RepoGpgcheck) { + return true + } + + return false +} + +// SetRepoGpgcheck gets a reference to the given int64 and assigns it to the RepoGpgcheck field. +func (o *RpmRpmRepository) SetRepoGpgcheck(v int64) { + o.RepoGpgcheck = &v +} + +// GetSqliteMetadata returns the SqliteMetadata field value if set, zero value otherwise. +func (o *RpmRpmRepository) GetSqliteMetadata() bool { + if o == nil || IsNil(o.SqliteMetadata) { + var ret bool + return ret + } + return *o.SqliteMetadata +} + +// GetSqliteMetadataOk returns a tuple with the SqliteMetadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepository) GetSqliteMetadataOk() (*bool, bool) { + if o == nil || IsNil(o.SqliteMetadata) { + return nil, false + } + return o.SqliteMetadata, true +} + +// HasSqliteMetadata returns a boolean if a field has been set. +func (o *RpmRpmRepository) HasSqliteMetadata() bool { + if o != nil && !IsNil(o.SqliteMetadata) { + return true + } + + return false +} + +// SetSqliteMetadata gets a reference to the given bool and assigns it to the SqliteMetadata field. +func (o *RpmRpmRepository) SetSqliteMetadata(v bool) { + o.SqliteMetadata = &v +} + +func (o RpmRpmRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmRpmRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if !IsNil(o.Autopublish) { + toSerialize["autopublish"] = o.Autopublish + } + if o.MetadataSigningService.IsSet() { + toSerialize["metadata_signing_service"] = o.MetadataSigningService.Get() + } + if !IsNil(o.RetainPackageVersions) { + toSerialize["retain_package_versions"] = o.RetainPackageVersions + } + if o.MetadataChecksumType.IsSet() { + toSerialize["metadata_checksum_type"] = o.MetadataChecksumType.Get() + } + if o.PackageChecksumType.IsSet() { + toSerialize["package_checksum_type"] = o.PackageChecksumType.Get() + } + if !IsNil(o.Gpgcheck) { + toSerialize["gpgcheck"] = o.Gpgcheck + } + if !IsNil(o.RepoGpgcheck) { + toSerialize["repo_gpgcheck"] = o.RepoGpgcheck + } + if !IsNil(o.SqliteMetadata) { + toSerialize["sqlite_metadata"] = o.SqliteMetadata + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmRpmRepository) UnmarshalJSON(bytes []byte) (err error) { + varRpmRpmRepository := _RpmRpmRepository{} + + if err = json.Unmarshal(bytes, &varRpmRpmRepository); err == nil { + *o = RpmRpmRepository(varRpmRpmRepository) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "autopublish") + delete(additionalProperties, "metadata_signing_service") + delete(additionalProperties, "retain_package_versions") + delete(additionalProperties, "metadata_checksum_type") + delete(additionalProperties, "package_checksum_type") + delete(additionalProperties, "gpgcheck") + delete(additionalProperties, "repo_gpgcheck") + delete(additionalProperties, "sqlite_metadata") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmRpmRepository struct { + value *RpmRpmRepository + isSet bool +} + +func (v NullableRpmRpmRepository) Get() *RpmRpmRepository { + return v.value +} + +func (v *NullableRpmRpmRepository) Set(val *RpmRpmRepository) { + v.value = val + v.isSet = true +} + +func (v NullableRpmRpmRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmRpmRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmRpmRepository(val *RpmRpmRepository) *NullableRpmRpmRepository { + return &NullableRpmRpmRepository{value: val, isSet: true} +} + +func (v NullableRpmRpmRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmRpmRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_repository_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_repository_response.go new file mode 100644 index 0000000000..7204129bbf --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_rpm_repository_response.go @@ -0,0 +1,823 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmRpmRepositoryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmRpmRepositoryResponse{} + +// RpmRpmRepositoryResponse Serializer for Rpm Repositories. +type RpmRpmRepositoryResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + VersionsHref *string `json:"versions_href,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + LatestVersionHref *string `json:"latest_version_href,omitempty"` + // A unique name for this repository. + Name string `json:"name"` + // An optional description. + Description NullableString `json:"description,omitempty"` + // Retain X versions of the repository. Default is null which retains all versions. + RetainRepoVersions NullableInt64 `json:"retain_repo_versions,omitempty"` + // An optional remote to use by default when syncing. + Remote NullableString `json:"remote,omitempty"` + // Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. + Autopublish *bool `json:"autopublish,omitempty"` + // A reference to an associated signing service. + MetadataSigningService NullableString `json:"metadata_signing_service,omitempty"` + // The number of versions of each package to keep in the repository; older versions will be purged. The default is '0', which will disable this feature and keep all versions of each package. + RetainPackageVersions *int64 `json:"retain_package_versions,omitempty"` + MetadataChecksumType NullableMetadataChecksumTypeEnum `json:"metadata_checksum_type,omitempty"` + PackageChecksumType NullablePackageChecksumTypeEnum `json:"package_checksum_type,omitempty"` + // An option specifying whether a client should perform a GPG signature check on packages. + Gpgcheck *int64 `json:"gpgcheck,omitempty"` + // An option specifying whether a client should perform a GPG signature check on the repodata. + RepoGpgcheck *int64 `json:"repo_gpgcheck,omitempty"` + // DEPRECATED: An option specifying whether Pulp should generate SQLite metadata. + SqliteMetadata *bool `json:"sqlite_metadata,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmRpmRepositoryResponse RpmRpmRepositoryResponse + +// NewRpmRpmRepositoryResponse instantiates a new RpmRpmRepositoryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmRpmRepositoryResponse(name string) *RpmRpmRepositoryResponse { + this := RpmRpmRepositoryResponse{} + this.Name = name + var autopublish bool = false + this.Autopublish = &autopublish + var gpgcheck int64 = 0 + this.Gpgcheck = &gpgcheck + var repoGpgcheck int64 = 0 + this.RepoGpgcheck = &repoGpgcheck + var sqliteMetadata bool = false + this.SqliteMetadata = &sqliteMetadata + return &this +} + +// NewRpmRpmRepositoryResponseWithDefaults instantiates a new RpmRpmRepositoryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmRpmRepositoryResponseWithDefaults() *RpmRpmRepositoryResponse { + this := RpmRpmRepositoryResponse{} + var autopublish bool = false + this.Autopublish = &autopublish + var gpgcheck int64 = 0 + this.Gpgcheck = &gpgcheck + var repoGpgcheck int64 = 0 + this.RepoGpgcheck = &repoGpgcheck + var sqliteMetadata bool = false + this.SqliteMetadata = &sqliteMetadata + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmRpmRepositoryResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepositoryResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmRpmRepositoryResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmRpmRepositoryResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepositoryResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmRpmRepositoryResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetVersionsHref returns the VersionsHref field value if set, zero value otherwise. +func (o *RpmRpmRepositoryResponse) GetVersionsHref() string { + if o == nil || IsNil(o.VersionsHref) { + var ret string + return ret + } + return *o.VersionsHref +} + +// GetVersionsHrefOk returns a tuple with the VersionsHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepositoryResponse) GetVersionsHrefOk() (*string, bool) { + if o == nil || IsNil(o.VersionsHref) { + return nil, false + } + return o.VersionsHref, true +} + +// HasVersionsHref returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasVersionsHref() bool { + if o != nil && !IsNil(o.VersionsHref) { + return true + } + + return false +} + +// SetVersionsHref gets a reference to the given string and assigns it to the VersionsHref field. +func (o *RpmRpmRepositoryResponse) SetVersionsHref(v string) { + o.VersionsHref = &v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *RpmRpmRepositoryResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepositoryResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *RpmRpmRepositoryResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetLatestVersionHref returns the LatestVersionHref field value if set, zero value otherwise. +func (o *RpmRpmRepositoryResponse) GetLatestVersionHref() string { + if o == nil || IsNil(o.LatestVersionHref) { + var ret string + return ret + } + return *o.LatestVersionHref +} + +// GetLatestVersionHrefOk returns a tuple with the LatestVersionHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepositoryResponse) GetLatestVersionHrefOk() (*string, bool) { + if o == nil || IsNil(o.LatestVersionHref) { + return nil, false + } + return o.LatestVersionHref, true +} + +// HasLatestVersionHref returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasLatestVersionHref() bool { + if o != nil && !IsNil(o.LatestVersionHref) { + return true + } + + return false +} + +// SetLatestVersionHref gets a reference to the given string and assigns it to the LatestVersionHref field. +func (o *RpmRpmRepositoryResponse) SetLatestVersionHref(v string) { + o.LatestVersionHref = &v +} + +// GetName returns the Name field value +func (o *RpmRpmRepositoryResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmRpmRepositoryResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmRpmRepositoryResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRepositoryResponse) GetDescription() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRepositoryResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *RpmRpmRepositoryResponse) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *RpmRpmRepositoryResponse) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *RpmRpmRepositoryResponse) UnsetDescription() { + o.Description.Unset() +} + +// GetRetainRepoVersions returns the RetainRepoVersions field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRepositoryResponse) GetRetainRepoVersions() int64 { + if o == nil || IsNil(o.RetainRepoVersions.Get()) { + var ret int64 + return ret + } + return *o.RetainRepoVersions.Get() +} + +// GetRetainRepoVersionsOk returns a tuple with the RetainRepoVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRepositoryResponse) GetRetainRepoVersionsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RetainRepoVersions.Get(), o.RetainRepoVersions.IsSet() +} + +// HasRetainRepoVersions returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasRetainRepoVersions() bool { + if o != nil && o.RetainRepoVersions.IsSet() { + return true + } + + return false +} + +// SetRetainRepoVersions gets a reference to the given NullableInt64 and assigns it to the RetainRepoVersions field. +func (o *RpmRpmRepositoryResponse) SetRetainRepoVersions(v int64) { + o.RetainRepoVersions.Set(&v) +} +// SetRetainRepoVersionsNil sets the value for RetainRepoVersions to be an explicit nil +func (o *RpmRpmRepositoryResponse) SetRetainRepoVersionsNil() { + o.RetainRepoVersions.Set(nil) +} + +// UnsetRetainRepoVersions ensures that no value is present for RetainRepoVersions, not even an explicit nil +func (o *RpmRpmRepositoryResponse) UnsetRetainRepoVersions() { + o.RetainRepoVersions.Unset() +} + +// GetRemote returns the Remote field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRepositoryResponse) GetRemote() string { + if o == nil || IsNil(o.Remote.Get()) { + var ret string + return ret + } + return *o.Remote.Get() +} + +// GetRemoteOk returns a tuple with the Remote field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRepositoryResponse) GetRemoteOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Remote.Get(), o.Remote.IsSet() +} + +// HasRemote returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasRemote() bool { + if o != nil && o.Remote.IsSet() { + return true + } + + return false +} + +// SetRemote gets a reference to the given NullableString and assigns it to the Remote field. +func (o *RpmRpmRepositoryResponse) SetRemote(v string) { + o.Remote.Set(&v) +} +// SetRemoteNil sets the value for Remote to be an explicit nil +func (o *RpmRpmRepositoryResponse) SetRemoteNil() { + o.Remote.Set(nil) +} + +// UnsetRemote ensures that no value is present for Remote, not even an explicit nil +func (o *RpmRpmRepositoryResponse) UnsetRemote() { + o.Remote.Unset() +} + +// GetAutopublish returns the Autopublish field value if set, zero value otherwise. +func (o *RpmRpmRepositoryResponse) GetAutopublish() bool { + if o == nil || IsNil(o.Autopublish) { + var ret bool + return ret + } + return *o.Autopublish +} + +// GetAutopublishOk returns a tuple with the Autopublish field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepositoryResponse) GetAutopublishOk() (*bool, bool) { + if o == nil || IsNil(o.Autopublish) { + return nil, false + } + return o.Autopublish, true +} + +// HasAutopublish returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasAutopublish() bool { + if o != nil && !IsNil(o.Autopublish) { + return true + } + + return false +} + +// SetAutopublish gets a reference to the given bool and assigns it to the Autopublish field. +func (o *RpmRpmRepositoryResponse) SetAutopublish(v bool) { + o.Autopublish = &v +} + +// GetMetadataSigningService returns the MetadataSigningService field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRepositoryResponse) GetMetadataSigningService() string { + if o == nil || IsNil(o.MetadataSigningService.Get()) { + var ret string + return ret + } + return *o.MetadataSigningService.Get() +} + +// GetMetadataSigningServiceOk returns a tuple with the MetadataSigningService field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRepositoryResponse) GetMetadataSigningServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.MetadataSigningService.Get(), o.MetadataSigningService.IsSet() +} + +// HasMetadataSigningService returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasMetadataSigningService() bool { + if o != nil && o.MetadataSigningService.IsSet() { + return true + } + + return false +} + +// SetMetadataSigningService gets a reference to the given NullableString and assigns it to the MetadataSigningService field. +func (o *RpmRpmRepositoryResponse) SetMetadataSigningService(v string) { + o.MetadataSigningService.Set(&v) +} +// SetMetadataSigningServiceNil sets the value for MetadataSigningService to be an explicit nil +func (o *RpmRpmRepositoryResponse) SetMetadataSigningServiceNil() { + o.MetadataSigningService.Set(nil) +} + +// UnsetMetadataSigningService ensures that no value is present for MetadataSigningService, not even an explicit nil +func (o *RpmRpmRepositoryResponse) UnsetMetadataSigningService() { + o.MetadataSigningService.Unset() +} + +// GetRetainPackageVersions returns the RetainPackageVersions field value if set, zero value otherwise. +func (o *RpmRpmRepositoryResponse) GetRetainPackageVersions() int64 { + if o == nil || IsNil(o.RetainPackageVersions) { + var ret int64 + return ret + } + return *o.RetainPackageVersions +} + +// GetRetainPackageVersionsOk returns a tuple with the RetainPackageVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepositoryResponse) GetRetainPackageVersionsOk() (*int64, bool) { + if o == nil || IsNil(o.RetainPackageVersions) { + return nil, false + } + return o.RetainPackageVersions, true +} + +// HasRetainPackageVersions returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasRetainPackageVersions() bool { + if o != nil && !IsNil(o.RetainPackageVersions) { + return true + } + + return false +} + +// SetRetainPackageVersions gets a reference to the given int64 and assigns it to the RetainPackageVersions field. +func (o *RpmRpmRepositoryResponse) SetRetainPackageVersions(v int64) { + o.RetainPackageVersions = &v +} + +// GetMetadataChecksumType returns the MetadataChecksumType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRepositoryResponse) GetMetadataChecksumType() MetadataChecksumTypeEnum { + if o == nil || IsNil(o.MetadataChecksumType.Get()) { + var ret MetadataChecksumTypeEnum + return ret + } + return *o.MetadataChecksumType.Get() +} + +// GetMetadataChecksumTypeOk returns a tuple with the MetadataChecksumType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRepositoryResponse) GetMetadataChecksumTypeOk() (*MetadataChecksumTypeEnum, bool) { + if o == nil { + return nil, false + } + return o.MetadataChecksumType.Get(), o.MetadataChecksumType.IsSet() +} + +// HasMetadataChecksumType returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasMetadataChecksumType() bool { + if o != nil && o.MetadataChecksumType.IsSet() { + return true + } + + return false +} + +// SetMetadataChecksumType gets a reference to the given NullableMetadataChecksumTypeEnum and assigns it to the MetadataChecksumType field. +func (o *RpmRpmRepositoryResponse) SetMetadataChecksumType(v MetadataChecksumTypeEnum) { + o.MetadataChecksumType.Set(&v) +} +// SetMetadataChecksumTypeNil sets the value for MetadataChecksumType to be an explicit nil +func (o *RpmRpmRepositoryResponse) SetMetadataChecksumTypeNil() { + o.MetadataChecksumType.Set(nil) +} + +// UnsetMetadataChecksumType ensures that no value is present for MetadataChecksumType, not even an explicit nil +func (o *RpmRpmRepositoryResponse) UnsetMetadataChecksumType() { + o.MetadataChecksumType.Unset() +} + +// GetPackageChecksumType returns the PackageChecksumType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmRpmRepositoryResponse) GetPackageChecksumType() PackageChecksumTypeEnum { + if o == nil || IsNil(o.PackageChecksumType.Get()) { + var ret PackageChecksumTypeEnum + return ret + } + return *o.PackageChecksumType.Get() +} + +// GetPackageChecksumTypeOk returns a tuple with the PackageChecksumType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmRpmRepositoryResponse) GetPackageChecksumTypeOk() (*PackageChecksumTypeEnum, bool) { + if o == nil { + return nil, false + } + return o.PackageChecksumType.Get(), o.PackageChecksumType.IsSet() +} + +// HasPackageChecksumType returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasPackageChecksumType() bool { + if o != nil && o.PackageChecksumType.IsSet() { + return true + } + + return false +} + +// SetPackageChecksumType gets a reference to the given NullablePackageChecksumTypeEnum and assigns it to the PackageChecksumType field. +func (o *RpmRpmRepositoryResponse) SetPackageChecksumType(v PackageChecksumTypeEnum) { + o.PackageChecksumType.Set(&v) +} +// SetPackageChecksumTypeNil sets the value for PackageChecksumType to be an explicit nil +func (o *RpmRpmRepositoryResponse) SetPackageChecksumTypeNil() { + o.PackageChecksumType.Set(nil) +} + +// UnsetPackageChecksumType ensures that no value is present for PackageChecksumType, not even an explicit nil +func (o *RpmRpmRepositoryResponse) UnsetPackageChecksumType() { + o.PackageChecksumType.Unset() +} + +// GetGpgcheck returns the Gpgcheck field value if set, zero value otherwise. +func (o *RpmRpmRepositoryResponse) GetGpgcheck() int64 { + if o == nil || IsNil(o.Gpgcheck) { + var ret int64 + return ret + } + return *o.Gpgcheck +} + +// GetGpgcheckOk returns a tuple with the Gpgcheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepositoryResponse) GetGpgcheckOk() (*int64, bool) { + if o == nil || IsNil(o.Gpgcheck) { + return nil, false + } + return o.Gpgcheck, true +} + +// HasGpgcheck returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasGpgcheck() bool { + if o != nil && !IsNil(o.Gpgcheck) { + return true + } + + return false +} + +// SetGpgcheck gets a reference to the given int64 and assigns it to the Gpgcheck field. +func (o *RpmRpmRepositoryResponse) SetGpgcheck(v int64) { + o.Gpgcheck = &v +} + +// GetRepoGpgcheck returns the RepoGpgcheck field value if set, zero value otherwise. +func (o *RpmRpmRepositoryResponse) GetRepoGpgcheck() int64 { + if o == nil || IsNil(o.RepoGpgcheck) { + var ret int64 + return ret + } + return *o.RepoGpgcheck +} + +// GetRepoGpgcheckOk returns a tuple with the RepoGpgcheck field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepositoryResponse) GetRepoGpgcheckOk() (*int64, bool) { + if o == nil || IsNil(o.RepoGpgcheck) { + return nil, false + } + return o.RepoGpgcheck, true +} + +// HasRepoGpgcheck returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasRepoGpgcheck() bool { + if o != nil && !IsNil(o.RepoGpgcheck) { + return true + } + + return false +} + +// SetRepoGpgcheck gets a reference to the given int64 and assigns it to the RepoGpgcheck field. +func (o *RpmRpmRepositoryResponse) SetRepoGpgcheck(v int64) { + o.RepoGpgcheck = &v +} + +// GetSqliteMetadata returns the SqliteMetadata field value if set, zero value otherwise. +func (o *RpmRpmRepositoryResponse) GetSqliteMetadata() bool { + if o == nil || IsNil(o.SqliteMetadata) { + var ret bool + return ret + } + return *o.SqliteMetadata +} + +// GetSqliteMetadataOk returns a tuple with the SqliteMetadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmRpmRepositoryResponse) GetSqliteMetadataOk() (*bool, bool) { + if o == nil || IsNil(o.SqliteMetadata) { + return nil, false + } + return o.SqliteMetadata, true +} + +// HasSqliteMetadata returns a boolean if a field has been set. +func (o *RpmRpmRepositoryResponse) HasSqliteMetadata() bool { + if o != nil && !IsNil(o.SqliteMetadata) { + return true + } + + return false +} + +// SetSqliteMetadata gets a reference to the given bool and assigns it to the SqliteMetadata field. +func (o *RpmRpmRepositoryResponse) SetSqliteMetadata(v bool) { + o.SqliteMetadata = &v +} + +func (o RpmRpmRepositoryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmRpmRepositoryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.VersionsHref) { + toSerialize["versions_href"] = o.VersionsHref + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.LatestVersionHref) { + toSerialize["latest_version_href"] = o.LatestVersionHref + } + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if o.RetainRepoVersions.IsSet() { + toSerialize["retain_repo_versions"] = o.RetainRepoVersions.Get() + } + if o.Remote.IsSet() { + toSerialize["remote"] = o.Remote.Get() + } + if !IsNil(o.Autopublish) { + toSerialize["autopublish"] = o.Autopublish + } + if o.MetadataSigningService.IsSet() { + toSerialize["metadata_signing_service"] = o.MetadataSigningService.Get() + } + if !IsNil(o.RetainPackageVersions) { + toSerialize["retain_package_versions"] = o.RetainPackageVersions + } + if o.MetadataChecksumType.IsSet() { + toSerialize["metadata_checksum_type"] = o.MetadataChecksumType.Get() + } + if o.PackageChecksumType.IsSet() { + toSerialize["package_checksum_type"] = o.PackageChecksumType.Get() + } + if !IsNil(o.Gpgcheck) { + toSerialize["gpgcheck"] = o.Gpgcheck + } + if !IsNil(o.RepoGpgcheck) { + toSerialize["repo_gpgcheck"] = o.RepoGpgcheck + } + if !IsNil(o.SqliteMetadata) { + toSerialize["sqlite_metadata"] = o.SqliteMetadata + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmRpmRepositoryResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmRpmRepositoryResponse := _RpmRpmRepositoryResponse{} + + if err = json.Unmarshal(bytes, &varRpmRpmRepositoryResponse); err == nil { + *o = RpmRpmRepositoryResponse(varRpmRpmRepositoryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "versions_href") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "latest_version_href") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "retain_repo_versions") + delete(additionalProperties, "remote") + delete(additionalProperties, "autopublish") + delete(additionalProperties, "metadata_signing_service") + delete(additionalProperties, "retain_package_versions") + delete(additionalProperties, "metadata_checksum_type") + delete(additionalProperties, "package_checksum_type") + delete(additionalProperties, "gpgcheck") + delete(additionalProperties, "repo_gpgcheck") + delete(additionalProperties, "sqlite_metadata") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmRpmRepositoryResponse struct { + value *RpmRpmRepositoryResponse + isSet bool +} + +func (v NullableRpmRpmRepositoryResponse) Get() *RpmRpmRepositoryResponse { + return v.value +} + +func (v *NullableRpmRpmRepositoryResponse) Set(val *RpmRpmRepositoryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmRpmRepositoryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmRpmRepositoryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmRpmRepositoryResponse(val *RpmRpmRepositoryResponse) *NullableRpmRpmRepositoryResponse { + return &NullableRpmRpmRepositoryResponse{value: val, isSet: true} +} + +func (v NullableRpmRpmRepositoryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmRpmRepositoryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_uln_remote.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_uln_remote.go new file mode 100644 index 0000000000..5b8fd4306c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_uln_remote.go @@ -0,0 +1,1057 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RpmUlnRemote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmUlnRemote{} + +// RpmUlnRemote A Serializer for UlnRemote. +type RpmUlnRemote struct { + // A unique name for this remote. + Name string `json:"name"` + // The ULN repo URL of the remote content source.\"This is \"uln://\" followed by the channel name. E.g.: \"uln://ol7_x86_64_oracle\" + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + // The username to authenticte to the proxy. + ProxyUsername NullableString `json:"proxy_username,omitempty"` + // The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. + ProxyPassword NullableString `json:"proxy_password,omitempty"` + // Your ULN account username. + Username string `json:"username"` + // Your ULN account password. + Password string `json:"password"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // Base URL of the ULN server. If the uln_server_base_url is not provided pulp_rpm willuse the contents of the DEFAULT_ULN_SERVER_BASE_URL setting instead. + UlnServerBaseUrl NullableString `json:"uln_server_base_url,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmUlnRemote RpmUlnRemote + +// NewRpmUlnRemote instantiates a new RpmUlnRemote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmUlnRemote(name string, url string, username string, password string) *RpmUlnRemote { + this := RpmUlnRemote{} + this.Name = name + this.Url = url + this.Username = username + this.Password = password + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewRpmUlnRemoteWithDefaults instantiates a new RpmUlnRemote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmUlnRemoteWithDefaults() *RpmUlnRemote { + this := RpmUlnRemote{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetName returns the Name field value +func (o *RpmUlnRemote) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmUlnRemote) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmUlnRemote) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *RpmUlnRemote) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *RpmUlnRemote) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *RpmUlnRemote) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *RpmUlnRemote) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *RpmUlnRemote) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *RpmUlnRemote) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *RpmUlnRemote) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *RpmUlnRemote) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *RpmUlnRemote) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *RpmUlnRemote) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *RpmUlnRemote) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *RpmUlnRemote) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *RpmUlnRemote) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUlnRemote) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *RpmUlnRemote) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *RpmUlnRemote) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *RpmUlnRemote) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *RpmUlnRemote) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetProxyUsername returns the ProxyUsername field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetProxyUsername() string { + if o == nil || IsNil(o.ProxyUsername.Get()) { + var ret string + return ret + } + return *o.ProxyUsername.Get() +} + +// GetProxyUsernameOk returns a tuple with the ProxyUsername field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetProxyUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUsername.Get(), o.ProxyUsername.IsSet() +} + +// HasProxyUsername returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasProxyUsername() bool { + if o != nil && o.ProxyUsername.IsSet() { + return true + } + + return false +} + +// SetProxyUsername gets a reference to the given NullableString and assigns it to the ProxyUsername field. +func (o *RpmUlnRemote) SetProxyUsername(v string) { + o.ProxyUsername.Set(&v) +} +// SetProxyUsernameNil sets the value for ProxyUsername to be an explicit nil +func (o *RpmUlnRemote) SetProxyUsernameNil() { + o.ProxyUsername.Set(nil) +} + +// UnsetProxyUsername ensures that no value is present for ProxyUsername, not even an explicit nil +func (o *RpmUlnRemote) UnsetProxyUsername() { + o.ProxyUsername.Unset() +} + +// GetProxyPassword returns the ProxyPassword field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetProxyPassword() string { + if o == nil || IsNil(o.ProxyPassword.Get()) { + var ret string + return ret + } + return *o.ProxyPassword.Get() +} + +// GetProxyPasswordOk returns a tuple with the ProxyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetProxyPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyPassword.Get(), o.ProxyPassword.IsSet() +} + +// HasProxyPassword returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasProxyPassword() bool { + if o != nil && o.ProxyPassword.IsSet() { + return true + } + + return false +} + +// SetProxyPassword gets a reference to the given NullableString and assigns it to the ProxyPassword field. +func (o *RpmUlnRemote) SetProxyPassword(v string) { + o.ProxyPassword.Set(&v) +} +// SetProxyPasswordNil sets the value for ProxyPassword to be an explicit nil +func (o *RpmUlnRemote) SetProxyPasswordNil() { + o.ProxyPassword.Set(nil) +} + +// UnsetProxyPassword ensures that no value is present for ProxyPassword, not even an explicit nil +func (o *RpmUlnRemote) UnsetProxyPassword() { + o.ProxyPassword.Unset() +} + +// GetUsername returns the Username field value +func (o *RpmUlnRemote) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *RpmUlnRemote) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *RpmUlnRemote) SetUsername(v string) { + o.Username = v +} + +// GetPassword returns the Password field value +func (o *RpmUlnRemote) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *RpmUlnRemote) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *RpmUlnRemote) SetPassword(v string) { + o.Password = v +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *RpmUlnRemote) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUlnRemote) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *RpmUlnRemote) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *RpmUlnRemote) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *RpmUlnRemote) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *RpmUlnRemote) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *RpmUlnRemote) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *RpmUlnRemote) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *RpmUlnRemote) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *RpmUlnRemote) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUlnRemote) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *RpmUlnRemote) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *RpmUlnRemote) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *RpmUlnRemote) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *RpmUlnRemote) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *RpmUlnRemote) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *RpmUlnRemote) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *RpmUlnRemote) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *RpmUlnRemote) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *RpmUlnRemote) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *RpmUlnRemote) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *RpmUlnRemote) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *RpmUlnRemote) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *RpmUlnRemote) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *RpmUlnRemote) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUlnRemote) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *RpmUlnRemote) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *RpmUlnRemote) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *RpmUlnRemote) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *RpmUlnRemote) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetUlnServerBaseUrl returns the UlnServerBaseUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemote) GetUlnServerBaseUrl() string { + if o == nil || IsNil(o.UlnServerBaseUrl.Get()) { + var ret string + return ret + } + return *o.UlnServerBaseUrl.Get() +} + +// GetUlnServerBaseUrlOk returns a tuple with the UlnServerBaseUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemote) GetUlnServerBaseUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UlnServerBaseUrl.Get(), o.UlnServerBaseUrl.IsSet() +} + +// HasUlnServerBaseUrl returns a boolean if a field has been set. +func (o *RpmUlnRemote) HasUlnServerBaseUrl() bool { + if o != nil && o.UlnServerBaseUrl.IsSet() { + return true + } + + return false +} + +// SetUlnServerBaseUrl gets a reference to the given NullableString and assigns it to the UlnServerBaseUrl field. +func (o *RpmUlnRemote) SetUlnServerBaseUrl(v string) { + o.UlnServerBaseUrl.Set(&v) +} +// SetUlnServerBaseUrlNil sets the value for UlnServerBaseUrl to be an explicit nil +func (o *RpmUlnRemote) SetUlnServerBaseUrlNil() { + o.UlnServerBaseUrl.Set(nil) +} + +// UnsetUlnServerBaseUrl ensures that no value is present for UlnServerBaseUrl, not even an explicit nil +func (o *RpmUlnRemote) UnsetUlnServerBaseUrl() { + o.UlnServerBaseUrl.Unset() +} + +func (o RpmUlnRemote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmUlnRemote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if o.ProxyUsername.IsSet() { + toSerialize["proxy_username"] = o.ProxyUsername.Get() + } + if o.ProxyPassword.IsSet() { + toSerialize["proxy_password"] = o.ProxyPassword.Get() + } + toSerialize["username"] = o.Username + toSerialize["password"] = o.Password + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if o.UlnServerBaseUrl.IsSet() { + toSerialize["uln_server_base_url"] = o.UlnServerBaseUrl.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmUlnRemote) UnmarshalJSON(bytes []byte) (err error) { + varRpmUlnRemote := _RpmUlnRemote{} + + if err = json.Unmarshal(bytes, &varRpmUlnRemote); err == nil { + *o = RpmUlnRemote(varRpmUlnRemote) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "proxy_username") + delete(additionalProperties, "proxy_password") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "uln_server_base_url") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmUlnRemote struct { + value *RpmUlnRemote + isSet bool +} + +func (v NullableRpmUlnRemote) Get() *RpmUlnRemote { + return v.value +} + +func (v *NullableRpmUlnRemote) Set(val *RpmUlnRemote) { + v.value = val + v.isSet = true +} + +func (v NullableRpmUlnRemote) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmUlnRemote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmUlnRemote(val *RpmUlnRemote) *NullableRpmUlnRemote { + return &NullableRpmUlnRemote{value: val, isSet: true} +} + +func (v NullableRpmUlnRemote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmUlnRemote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_uln_remote_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_uln_remote_response.go new file mode 100644 index 0000000000..a72b1c1ff8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_uln_remote_response.go @@ -0,0 +1,1007 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmUlnRemoteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmUlnRemoteResponse{} + +// RpmUlnRemoteResponse A Serializer for UlnRemote. +type RpmUlnRemoteResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name for this remote. + Name string `json:"name"` + // The ULN repo URL of the remote content source.\"This is \"uln://\" followed by the channel name. E.g.: \"uln://ol7_x86_64_oracle\" + Url string `json:"url"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The proxy URL. Format: scheme://host:port + ProxyUrl NullableString `json:"proxy_url,omitempty"` + PulpLabels *map[string]string `json:"pulp_labels,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // Total number of simultaneous connections. If not set then the default value will be used. + DownloadConcurrency NullableInt64 `json:"download_concurrency,omitempty"` + // Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. + MaxRetries NullableInt64 `json:"max_retries,omitempty"` + Policy *Policy762Enum `json:"policy,omitempty"` + // aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + TotalTimeout NullableFloat64 `json:"total_timeout,omitempty"` + // aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + ConnectTimeout NullableFloat64 `json:"connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockConnectTimeout NullableFloat64 `json:"sock_connect_timeout,omitempty"` + // aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. + SockReadTimeout NullableFloat64 `json:"sock_read_timeout,omitempty"` + // Headers for aiohttp.Clientsession + Headers []map[string]interface{} `json:"headers,omitempty"` + // Limits requests per second for each concurrent downloader + RateLimit NullableInt64 `json:"rate_limit,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + // Base URL of the ULN server. If the uln_server_base_url is not provided pulp_rpm willuse the contents of the DEFAULT_ULN_SERVER_BASE_URL setting instead. + UlnServerBaseUrl NullableString `json:"uln_server_base_url,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmUlnRemoteResponse RpmUlnRemoteResponse + +// NewRpmUlnRemoteResponse instantiates a new RpmUlnRemoteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmUlnRemoteResponse(name string, url string) *RpmUlnRemoteResponse { + this := RpmUlnRemoteResponse{} + this.Name = name + this.Url = url + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// NewRpmUlnRemoteResponseWithDefaults instantiates a new RpmUlnRemoteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmUlnRemoteResponseWithDefaults() *RpmUlnRemoteResponse { + this := RpmUlnRemoteResponse{} + var policy Policy762Enum = POLICY762ENUM_IMMEDIATE + this.Policy = &policy + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmUlnRemoteResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUlnRemoteResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmUlnRemoteResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmUlnRemoteResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUlnRemoteResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmUlnRemoteResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *RpmUlnRemoteResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RpmUlnRemoteResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RpmUlnRemoteResponse) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *RpmUlnRemoteResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *RpmUlnRemoteResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *RpmUlnRemoteResponse) SetUrl(v string) { + o.Url = v +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemoteResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemoteResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *RpmUlnRemoteResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *RpmUlnRemoteResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *RpmUlnRemoteResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemoteResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemoteResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *RpmUlnRemoteResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *RpmUlnRemoteResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *RpmUlnRemoteResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *RpmUlnRemoteResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUlnRemoteResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *RpmUlnRemoteResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemoteResponse) GetProxyUrl() string { + if o == nil || IsNil(o.ProxyUrl.Get()) { + var ret string + return ret + } + return *o.ProxyUrl.Get() +} + +// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemoteResponse) GetProxyUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProxyUrl.Get(), o.ProxyUrl.IsSet() +} + +// HasProxyUrl returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasProxyUrl() bool { + if o != nil && o.ProxyUrl.IsSet() { + return true + } + + return false +} + +// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field. +func (o *RpmUlnRemoteResponse) SetProxyUrl(v string) { + o.ProxyUrl.Set(&v) +} +// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil +func (o *RpmUlnRemoteResponse) SetProxyUrlNil() { + o.ProxyUrl.Set(nil) +} + +// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil +func (o *RpmUlnRemoteResponse) UnsetProxyUrl() { + o.ProxyUrl.Unset() +} + +// GetPulpLabels returns the PulpLabels field value if set, zero value otherwise. +func (o *RpmUlnRemoteResponse) GetPulpLabels() map[string]string { + if o == nil || IsNil(o.PulpLabels) { + var ret map[string]string + return ret + } + return *o.PulpLabels +} + +// GetPulpLabelsOk returns a tuple with the PulpLabels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUlnRemoteResponse) GetPulpLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.PulpLabels) { + return nil, false + } + return o.PulpLabels, true +} + +// HasPulpLabels returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasPulpLabels() bool { + if o != nil && !IsNil(o.PulpLabels) { + return true + } + + return false +} + +// SetPulpLabels gets a reference to the given map[string]string and assigns it to the PulpLabels field. +func (o *RpmUlnRemoteResponse) SetPulpLabels(v map[string]string) { + o.PulpLabels = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *RpmUlnRemoteResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUlnRemoteResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *RpmUlnRemoteResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetDownloadConcurrency returns the DownloadConcurrency field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemoteResponse) GetDownloadConcurrency() int64 { + if o == nil || IsNil(o.DownloadConcurrency.Get()) { + var ret int64 + return ret + } + return *o.DownloadConcurrency.Get() +} + +// GetDownloadConcurrencyOk returns a tuple with the DownloadConcurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemoteResponse) GetDownloadConcurrencyOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.DownloadConcurrency.Get(), o.DownloadConcurrency.IsSet() +} + +// HasDownloadConcurrency returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasDownloadConcurrency() bool { + if o != nil && o.DownloadConcurrency.IsSet() { + return true + } + + return false +} + +// SetDownloadConcurrency gets a reference to the given NullableInt64 and assigns it to the DownloadConcurrency field. +func (o *RpmUlnRemoteResponse) SetDownloadConcurrency(v int64) { + o.DownloadConcurrency.Set(&v) +} +// SetDownloadConcurrencyNil sets the value for DownloadConcurrency to be an explicit nil +func (o *RpmUlnRemoteResponse) SetDownloadConcurrencyNil() { + o.DownloadConcurrency.Set(nil) +} + +// UnsetDownloadConcurrency ensures that no value is present for DownloadConcurrency, not even an explicit nil +func (o *RpmUlnRemoteResponse) UnsetDownloadConcurrency() { + o.DownloadConcurrency.Unset() +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemoteResponse) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries.Get()) { + var ret int64 + return ret + } + return *o.MaxRetries.Get() +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemoteResponse) GetMaxRetriesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxRetries.Get(), o.MaxRetries.IsSet() +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasMaxRetries() bool { + if o != nil && o.MaxRetries.IsSet() { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given NullableInt64 and assigns it to the MaxRetries field. +func (o *RpmUlnRemoteResponse) SetMaxRetries(v int64) { + o.MaxRetries.Set(&v) +} +// SetMaxRetriesNil sets the value for MaxRetries to be an explicit nil +func (o *RpmUlnRemoteResponse) SetMaxRetriesNil() { + o.MaxRetries.Set(nil) +} + +// UnsetMaxRetries ensures that no value is present for MaxRetries, not even an explicit nil +func (o *RpmUlnRemoteResponse) UnsetMaxRetries() { + o.MaxRetries.Unset() +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *RpmUlnRemoteResponse) GetPolicy() Policy762Enum { + if o == nil || IsNil(o.Policy) { + var ret Policy762Enum + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUlnRemoteResponse) GetPolicyOk() (*Policy762Enum, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given Policy762Enum and assigns it to the Policy field. +func (o *RpmUlnRemoteResponse) SetPolicy(v Policy762Enum) { + o.Policy = &v +} + +// GetTotalTimeout returns the TotalTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemoteResponse) GetTotalTimeout() float64 { + if o == nil || IsNil(o.TotalTimeout.Get()) { + var ret float64 + return ret + } + return *o.TotalTimeout.Get() +} + +// GetTotalTimeoutOk returns a tuple with the TotalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemoteResponse) GetTotalTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.TotalTimeout.Get(), o.TotalTimeout.IsSet() +} + +// HasTotalTimeout returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasTotalTimeout() bool { + if o != nil && o.TotalTimeout.IsSet() { + return true + } + + return false +} + +// SetTotalTimeout gets a reference to the given NullableFloat64 and assigns it to the TotalTimeout field. +func (o *RpmUlnRemoteResponse) SetTotalTimeout(v float64) { + o.TotalTimeout.Set(&v) +} +// SetTotalTimeoutNil sets the value for TotalTimeout to be an explicit nil +func (o *RpmUlnRemoteResponse) SetTotalTimeoutNil() { + o.TotalTimeout.Set(nil) +} + +// UnsetTotalTimeout ensures that no value is present for TotalTimeout, not even an explicit nil +func (o *RpmUlnRemoteResponse) UnsetTotalTimeout() { + o.TotalTimeout.Unset() +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemoteResponse) GetConnectTimeout() float64 { + if o == nil || IsNil(o.ConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.ConnectTimeout.Get() +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemoteResponse) GetConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.ConnectTimeout.Get(), o.ConnectTimeout.IsSet() +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasConnectTimeout() bool { + if o != nil && o.ConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the ConnectTimeout field. +func (o *RpmUlnRemoteResponse) SetConnectTimeout(v float64) { + o.ConnectTimeout.Set(&v) +} +// SetConnectTimeoutNil sets the value for ConnectTimeout to be an explicit nil +func (o *RpmUlnRemoteResponse) SetConnectTimeoutNil() { + o.ConnectTimeout.Set(nil) +} + +// UnsetConnectTimeout ensures that no value is present for ConnectTimeout, not even an explicit nil +func (o *RpmUlnRemoteResponse) UnsetConnectTimeout() { + o.ConnectTimeout.Unset() +} + +// GetSockConnectTimeout returns the SockConnectTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemoteResponse) GetSockConnectTimeout() float64 { + if o == nil || IsNil(o.SockConnectTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockConnectTimeout.Get() +} + +// GetSockConnectTimeoutOk returns a tuple with the SockConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemoteResponse) GetSockConnectTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockConnectTimeout.Get(), o.SockConnectTimeout.IsSet() +} + +// HasSockConnectTimeout returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasSockConnectTimeout() bool { + if o != nil && o.SockConnectTimeout.IsSet() { + return true + } + + return false +} + +// SetSockConnectTimeout gets a reference to the given NullableFloat64 and assigns it to the SockConnectTimeout field. +func (o *RpmUlnRemoteResponse) SetSockConnectTimeout(v float64) { + o.SockConnectTimeout.Set(&v) +} +// SetSockConnectTimeoutNil sets the value for SockConnectTimeout to be an explicit nil +func (o *RpmUlnRemoteResponse) SetSockConnectTimeoutNil() { + o.SockConnectTimeout.Set(nil) +} + +// UnsetSockConnectTimeout ensures that no value is present for SockConnectTimeout, not even an explicit nil +func (o *RpmUlnRemoteResponse) UnsetSockConnectTimeout() { + o.SockConnectTimeout.Unset() +} + +// GetSockReadTimeout returns the SockReadTimeout field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemoteResponse) GetSockReadTimeout() float64 { + if o == nil || IsNil(o.SockReadTimeout.Get()) { + var ret float64 + return ret + } + return *o.SockReadTimeout.Get() +} + +// GetSockReadTimeoutOk returns a tuple with the SockReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemoteResponse) GetSockReadTimeoutOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.SockReadTimeout.Get(), o.SockReadTimeout.IsSet() +} + +// HasSockReadTimeout returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasSockReadTimeout() bool { + if o != nil && o.SockReadTimeout.IsSet() { + return true + } + + return false +} + +// SetSockReadTimeout gets a reference to the given NullableFloat64 and assigns it to the SockReadTimeout field. +func (o *RpmUlnRemoteResponse) SetSockReadTimeout(v float64) { + o.SockReadTimeout.Set(&v) +} +// SetSockReadTimeoutNil sets the value for SockReadTimeout to be an explicit nil +func (o *RpmUlnRemoteResponse) SetSockReadTimeoutNil() { + o.SockReadTimeout.Set(nil) +} + +// UnsetSockReadTimeout ensures that no value is present for SockReadTimeout, not even an explicit nil +func (o *RpmUlnRemoteResponse) UnsetSockReadTimeout() { + o.SockReadTimeout.Unset() +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *RpmUlnRemoteResponse) GetHeaders() []map[string]interface{} { + if o == nil || IsNil(o.Headers) { + var ret []map[string]interface{} + return ret + } + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUlnRemoteResponse) GetHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given []map[string]interface{} and assigns it to the Headers field. +func (o *RpmUlnRemoteResponse) SetHeaders(v []map[string]interface{}) { + o.Headers = v +} + +// GetRateLimit returns the RateLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemoteResponse) GetRateLimit() int64 { + if o == nil || IsNil(o.RateLimit.Get()) { + var ret int64 + return ret + } + return *o.RateLimit.Get() +} + +// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemoteResponse) GetRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.RateLimit.Get(), o.RateLimit.IsSet() +} + +// HasRateLimit returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasRateLimit() bool { + if o != nil && o.RateLimit.IsSet() { + return true + } + + return false +} + +// SetRateLimit gets a reference to the given NullableInt64 and assigns it to the RateLimit field. +func (o *RpmUlnRemoteResponse) SetRateLimit(v int64) { + o.RateLimit.Set(&v) +} +// SetRateLimitNil sets the value for RateLimit to be an explicit nil +func (o *RpmUlnRemoteResponse) SetRateLimitNil() { + o.RateLimit.Set(nil) +} + +// UnsetRateLimit ensures that no value is present for RateLimit, not even an explicit nil +func (o *RpmUlnRemoteResponse) UnsetRateLimit() { + o.RateLimit.Unset() +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *RpmUlnRemoteResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUlnRemoteResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *RpmUlnRemoteResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +// GetUlnServerBaseUrl returns the UlnServerBaseUrl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RpmUlnRemoteResponse) GetUlnServerBaseUrl() string { + if o == nil || IsNil(o.UlnServerBaseUrl.Get()) { + var ret string + return ret + } + return *o.UlnServerBaseUrl.Get() +} + +// GetUlnServerBaseUrlOk returns a tuple with the UlnServerBaseUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUlnRemoteResponse) GetUlnServerBaseUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.UlnServerBaseUrl.Get(), o.UlnServerBaseUrl.IsSet() +} + +// HasUlnServerBaseUrl returns a boolean if a field has been set. +func (o *RpmUlnRemoteResponse) HasUlnServerBaseUrl() bool { + if o != nil && o.UlnServerBaseUrl.IsSet() { + return true + } + + return false +} + +// SetUlnServerBaseUrl gets a reference to the given NullableString and assigns it to the UlnServerBaseUrl field. +func (o *RpmUlnRemoteResponse) SetUlnServerBaseUrl(v string) { + o.UlnServerBaseUrl.Set(&v) +} +// SetUlnServerBaseUrlNil sets the value for UlnServerBaseUrl to be an explicit nil +func (o *RpmUlnRemoteResponse) SetUlnServerBaseUrlNil() { + o.UlnServerBaseUrl.Set(nil) +} + +// UnsetUlnServerBaseUrl ensures that no value is present for UlnServerBaseUrl, not even an explicit nil +func (o *RpmUlnRemoteResponse) UnsetUlnServerBaseUrl() { + o.UlnServerBaseUrl.Unset() +} + +func (o RpmUlnRemoteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmUlnRemoteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.ProxyUrl.IsSet() { + toSerialize["proxy_url"] = o.ProxyUrl.Get() + } + if !IsNil(o.PulpLabels) { + toSerialize["pulp_labels"] = o.PulpLabels + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if o.DownloadConcurrency.IsSet() { + toSerialize["download_concurrency"] = o.DownloadConcurrency.Get() + } + if o.MaxRetries.IsSet() { + toSerialize["max_retries"] = o.MaxRetries.Get() + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if o.TotalTimeout.IsSet() { + toSerialize["total_timeout"] = o.TotalTimeout.Get() + } + if o.ConnectTimeout.IsSet() { + toSerialize["connect_timeout"] = o.ConnectTimeout.Get() + } + if o.SockConnectTimeout.IsSet() { + toSerialize["sock_connect_timeout"] = o.SockConnectTimeout.Get() + } + if o.SockReadTimeout.IsSet() { + toSerialize["sock_read_timeout"] = o.SockReadTimeout.Get() + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if o.RateLimit.IsSet() { + toSerialize["rate_limit"] = o.RateLimit.Get() + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + if o.UlnServerBaseUrl.IsSet() { + toSerialize["uln_server_base_url"] = o.UlnServerBaseUrl.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmUlnRemoteResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmUlnRemoteResponse := _RpmUlnRemoteResponse{} + + if err = json.Unmarshal(bytes, &varRpmUlnRemoteResponse); err == nil { + *o = RpmUlnRemoteResponse(varRpmUlnRemoteResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "proxy_url") + delete(additionalProperties, "pulp_labels") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "download_concurrency") + delete(additionalProperties, "max_retries") + delete(additionalProperties, "policy") + delete(additionalProperties, "total_timeout") + delete(additionalProperties, "connect_timeout") + delete(additionalProperties, "sock_connect_timeout") + delete(additionalProperties, "sock_read_timeout") + delete(additionalProperties, "headers") + delete(additionalProperties, "rate_limit") + delete(additionalProperties, "hidden_fields") + delete(additionalProperties, "uln_server_base_url") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmUlnRemoteResponse struct { + value *RpmUlnRemoteResponse + isSet bool +} + +func (v NullableRpmUlnRemoteResponse) Get() *RpmUlnRemoteResponse { + return v.value +} + +func (v *NullableRpmUlnRemoteResponse) Set(val *RpmUlnRemoteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmUlnRemoteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmUlnRemoteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmUlnRemoteResponse(val *RpmUlnRemoteResponse) *NullableRpmUlnRemoteResponse { + return &NullableRpmUlnRemoteResponse{value: val, isSet: true} +} + +func (v NullableRpmUlnRemoteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmUlnRemoteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_collection.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_collection.go new file mode 100644 index 0000000000..899002617b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_collection.go @@ -0,0 +1,210 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RpmUpdateCollection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmUpdateCollection{} + +// RpmUpdateCollection A Serializer for UpdateCollection. +type RpmUpdateCollection struct { + // Collection name. + Name NullableString `json:"name"` + // Collection short name. + Shortname NullableString `json:"shortname"` + // Collection modular NSVCA. + Module map[string]interface{} `json:"module"` + AdditionalProperties map[string]interface{} +} + +type _RpmUpdateCollection RpmUpdateCollection + +// NewRpmUpdateCollection instantiates a new RpmUpdateCollection object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmUpdateCollection(name NullableString, shortname NullableString, module map[string]interface{}) *RpmUpdateCollection { + this := RpmUpdateCollection{} + this.Name = name + this.Shortname = shortname + this.Module = module + return &this +} + +// NewRpmUpdateCollectionWithDefaults instantiates a new RpmUpdateCollection object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmUpdateCollectionWithDefaults() *RpmUpdateCollection { + this := RpmUpdateCollection{} + return &this +} + +// GetName returns the Name field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmUpdateCollection) GetName() string { + if o == nil || o.Name.Get() == nil { + var ret string + return ret + } + + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUpdateCollection) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// SetName sets field value +func (o *RpmUpdateCollection) SetName(v string) { + o.Name.Set(&v) +} + +// GetShortname returns the Shortname field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmUpdateCollection) GetShortname() string { + if o == nil || o.Shortname.Get() == nil { + var ret string + return ret + } + + return *o.Shortname.Get() +} + +// GetShortnameOk returns a tuple with the Shortname field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUpdateCollection) GetShortnameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Shortname.Get(), o.Shortname.IsSet() +} + +// SetShortname sets field value +func (o *RpmUpdateCollection) SetShortname(v string) { + o.Shortname.Set(&v) +} + +// GetModule returns the Module field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmUpdateCollection) GetModule() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Module +} + +// GetModuleOk returns a tuple with the Module field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUpdateCollection) GetModuleOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Module) { + return map[string]interface{}{}, false + } + return o.Module, true +} + +// SetModule sets field value +func (o *RpmUpdateCollection) SetModule(v map[string]interface{}) { + o.Module = v +} + +func (o RpmUpdateCollection) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmUpdateCollection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name.Get() + toSerialize["shortname"] = o.Shortname.Get() + if o.Module != nil { + toSerialize["module"] = o.Module + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmUpdateCollection) UnmarshalJSON(bytes []byte) (err error) { + varRpmUpdateCollection := _RpmUpdateCollection{} + + if err = json.Unmarshal(bytes, &varRpmUpdateCollection); err == nil { + *o = RpmUpdateCollection(varRpmUpdateCollection) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "shortname") + delete(additionalProperties, "module") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmUpdateCollection struct { + value *RpmUpdateCollection + isSet bool +} + +func (v NullableRpmUpdateCollection) Get() *RpmUpdateCollection { + return v.value +} + +func (v *NullableRpmUpdateCollection) Set(val *RpmUpdateCollection) { + v.value = val + v.isSet = true +} + +func (v NullableRpmUpdateCollection) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmUpdateCollection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmUpdateCollection(val *RpmUpdateCollection) *NullableRpmUpdateCollection { + return &NullableRpmUpdateCollection{value: val, isSet: true} +} + +func (v NullableRpmUpdateCollection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmUpdateCollection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_collection_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_collection_response.go new file mode 100644 index 0000000000..0ac3484fe0 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_collection_response.go @@ -0,0 +1,248 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the RpmUpdateCollectionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmUpdateCollectionResponse{} + +// RpmUpdateCollectionResponse A Serializer for UpdateCollection. +type RpmUpdateCollectionResponse struct { + // Collection name. + Name NullableString `json:"name"` + // Collection short name. + Shortname NullableString `json:"shortname"` + // Collection modular NSVCA. + Module map[string]interface{} `json:"module"` + // List of packages + Packages []map[string]interface{} `json:"packages,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmUpdateCollectionResponse RpmUpdateCollectionResponse + +// NewRpmUpdateCollectionResponse instantiates a new RpmUpdateCollectionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmUpdateCollectionResponse(name NullableString, shortname NullableString, module map[string]interface{}) *RpmUpdateCollectionResponse { + this := RpmUpdateCollectionResponse{} + this.Name = name + this.Shortname = shortname + this.Module = module + return &this +} + +// NewRpmUpdateCollectionResponseWithDefaults instantiates a new RpmUpdateCollectionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmUpdateCollectionResponseWithDefaults() *RpmUpdateCollectionResponse { + this := RpmUpdateCollectionResponse{} + return &this +} + +// GetName returns the Name field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmUpdateCollectionResponse) GetName() string { + if o == nil || o.Name.Get() == nil { + var ret string + return ret + } + + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUpdateCollectionResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// SetName sets field value +func (o *RpmUpdateCollectionResponse) SetName(v string) { + o.Name.Set(&v) +} + +// GetShortname returns the Shortname field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RpmUpdateCollectionResponse) GetShortname() string { + if o == nil || o.Shortname.Get() == nil { + var ret string + return ret + } + + return *o.Shortname.Get() +} + +// GetShortnameOk returns a tuple with the Shortname field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUpdateCollectionResponse) GetShortnameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Shortname.Get(), o.Shortname.IsSet() +} + +// SetShortname sets field value +func (o *RpmUpdateCollectionResponse) SetShortname(v string) { + o.Shortname.Set(&v) +} + +// GetModule returns the Module field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *RpmUpdateCollectionResponse) GetModule() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Module +} + +// GetModuleOk returns a tuple with the Module field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RpmUpdateCollectionResponse) GetModuleOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Module) { + return map[string]interface{}{}, false + } + return o.Module, true +} + +// SetModule sets field value +func (o *RpmUpdateCollectionResponse) SetModule(v map[string]interface{}) { + o.Module = v +} + +// GetPackages returns the Packages field value if set, zero value otherwise. +func (o *RpmUpdateCollectionResponse) GetPackages() []map[string]interface{} { + if o == nil || IsNil(o.Packages) { + var ret []map[string]interface{} + return ret + } + return o.Packages +} + +// GetPackagesOk returns a tuple with the Packages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateCollectionResponse) GetPackagesOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Packages) { + return nil, false + } + return o.Packages, true +} + +// HasPackages returns a boolean if a field has been set. +func (o *RpmUpdateCollectionResponse) HasPackages() bool { + if o != nil && !IsNil(o.Packages) { + return true + } + + return false +} + +// SetPackages gets a reference to the given []map[string]interface{} and assigns it to the Packages field. +func (o *RpmUpdateCollectionResponse) SetPackages(v []map[string]interface{}) { + o.Packages = v +} + +func (o RpmUpdateCollectionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmUpdateCollectionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name.Get() + toSerialize["shortname"] = o.Shortname.Get() + if o.Module != nil { + toSerialize["module"] = o.Module + } + if !IsNil(o.Packages) { + toSerialize["packages"] = o.Packages + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmUpdateCollectionResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmUpdateCollectionResponse := _RpmUpdateCollectionResponse{} + + if err = json.Unmarshal(bytes, &varRpmUpdateCollectionResponse); err == nil { + *o = RpmUpdateCollectionResponse(varRpmUpdateCollectionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "shortname") + delete(additionalProperties, "module") + delete(additionalProperties, "packages") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmUpdateCollectionResponse struct { + value *RpmUpdateCollectionResponse + isSet bool +} + +func (v NullableRpmUpdateCollectionResponse) Get() *RpmUpdateCollectionResponse { + return v.value +} + +func (v *NullableRpmUpdateCollectionResponse) Set(val *RpmUpdateCollectionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmUpdateCollectionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmUpdateCollectionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmUpdateCollectionResponse(val *RpmUpdateCollectionResponse) *NullableRpmUpdateCollectionResponse { + return &NullableRpmUpdateCollectionResponse{value: val, isSet: true} +} + +func (v NullableRpmUpdateCollectionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmUpdateCollectionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_record.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_record.go new file mode 100644 index 0000000000..da1a896c9f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_record.go @@ -0,0 +1,192 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the RpmUpdateRecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmUpdateRecord{} + +// RpmUpdateRecord A Serializer for UpdateRecord. +type RpmUpdateRecord struct { + // A URI of a repository the new content unit should be associated with. + Repository *string `json:"repository,omitempty"` + // An uploaded file that may be turned into the artifact of the content unit. + File **os.File `json:"file,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmUpdateRecord RpmUpdateRecord + +// NewRpmUpdateRecord instantiates a new RpmUpdateRecord object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmUpdateRecord() *RpmUpdateRecord { + this := RpmUpdateRecord{} + return &this +} + +// NewRpmUpdateRecordWithDefaults instantiates a new RpmUpdateRecord object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmUpdateRecordWithDefaults() *RpmUpdateRecord { + this := RpmUpdateRecord{} + return &this +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *RpmUpdateRecord) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecord) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *RpmUpdateRecord) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *RpmUpdateRecord) SetRepository(v string) { + o.Repository = &v +} + +// GetFile returns the File field value if set, zero value otherwise. +func (o *RpmUpdateRecord) GetFile() *os.File { + if o == nil || IsNil(o.File) { + var ret *os.File + return ret + } + return *o.File +} + +// GetFileOk returns a tuple with the File field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecord) GetFileOk() (**os.File, bool) { + if o == nil || IsNil(o.File) { + return nil, false + } + return o.File, true +} + +// HasFile returns a boolean if a field has been set. +func (o *RpmUpdateRecord) HasFile() bool { + if o != nil && !IsNil(o.File) { + return true + } + + return false +} + +// SetFile gets a reference to the given *os.File and assigns it to the File field. +func (o *RpmUpdateRecord) SetFile(v *os.File) { + o.File = &v +} + +func (o RpmUpdateRecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmUpdateRecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.File) { + toSerialize["file"] = o.File + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmUpdateRecord) UnmarshalJSON(bytes []byte) (err error) { + varRpmUpdateRecord := _RpmUpdateRecord{} + + if err = json.Unmarshal(bytes, &varRpmUpdateRecord); err == nil { + *o = RpmUpdateRecord(varRpmUpdateRecord) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "repository") + delete(additionalProperties, "file") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmUpdateRecord struct { + value *RpmUpdateRecord + isSet bool +} + +func (v NullableRpmUpdateRecord) Get() *RpmUpdateRecord { + return v.value +} + +func (v *NullableRpmUpdateRecord) Set(val *RpmUpdateRecord) { + v.value = val + v.isSet = true +} + +func (v NullableRpmUpdateRecord) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmUpdateRecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmUpdateRecord(val *RpmUpdateRecord) *NullableRpmUpdateRecord { + return &NullableRpmUpdateRecord{value: val, isSet: true} +} + +func (v NullableRpmUpdateRecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmUpdateRecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_record_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_record_response.go new file mode 100644 index 0000000000..a37cf5dfeb --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_rpm_update_record_response.go @@ -0,0 +1,875 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the RpmUpdateRecordResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RpmUpdateRecordResponse{} + +// RpmUpdateRecordResponse A Serializer for UpdateRecord. +type RpmUpdateRecordResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // Update id (short update name, e.g. RHEA-2013:1777) + Id *string `json:"id,omitempty"` + // Date when the update was updated (e.g. '2013-12-02 00:00:00') + UpdatedDate *string `json:"updated_date,omitempty"` + // Update description + Description *string `json:"description,omitempty"` + // Date when the update was issued (e.g. '2013-12-02 00:00:00') + IssuedDate *string `json:"issued_date,omitempty"` + // Source of the update (e.g. security@redhat.com) + Fromstr *string `json:"fromstr,omitempty"` + // Update status ('final', ...) + Status *string `json:"status,omitempty"` + // Update name + Title *string `json:"title,omitempty"` + // Short summary + Summary *string `json:"summary,omitempty"` + // Update version (probably always an integer number) + Version *string `json:"version,omitempty"` + // Update type ('enhancement', 'bugfix', ...) + Type *string `json:"type,omitempty"` + // Severity + Severity *string `json:"severity,omitempty"` + // Solution + Solution *string `json:"solution,omitempty"` + // Update release + Release *string `json:"release,omitempty"` + // Copyrights + Rights *string `json:"rights,omitempty"` + // Push count + Pushcount *string `json:"pushcount,omitempty"` + // List of packages + Pkglist []RpmUpdateCollectionResponse `json:"pkglist,omitempty"` + // List of references + References []map[string]interface{} `json:"references,omitempty"` + // Reboot suggested + RebootSuggested *bool `json:"reboot_suggested,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RpmUpdateRecordResponse RpmUpdateRecordResponse + +// NewRpmUpdateRecordResponse instantiates a new RpmUpdateRecordResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRpmUpdateRecordResponse() *RpmUpdateRecordResponse { + this := RpmUpdateRecordResponse{} + return &this +} + +// NewRpmUpdateRecordResponseWithDefaults instantiates a new RpmUpdateRecordResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRpmUpdateRecordResponseWithDefaults() *RpmUpdateRecordResponse { + this := RpmUpdateRecordResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *RpmUpdateRecordResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *RpmUpdateRecordResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RpmUpdateRecordResponse) SetId(v string) { + o.Id = &v +} + +// GetUpdatedDate returns the UpdatedDate field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetUpdatedDate() string { + if o == nil || IsNil(o.UpdatedDate) { + var ret string + return ret + } + return *o.UpdatedDate +} + +// GetUpdatedDateOk returns a tuple with the UpdatedDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetUpdatedDateOk() (*string, bool) { + if o == nil || IsNil(o.UpdatedDate) { + return nil, false + } + return o.UpdatedDate, true +} + +// HasUpdatedDate returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasUpdatedDate() bool { + if o != nil && !IsNil(o.UpdatedDate) { + return true + } + + return false +} + +// SetUpdatedDate gets a reference to the given string and assigns it to the UpdatedDate field. +func (o *RpmUpdateRecordResponse) SetUpdatedDate(v string) { + o.UpdatedDate = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *RpmUpdateRecordResponse) SetDescription(v string) { + o.Description = &v +} + +// GetIssuedDate returns the IssuedDate field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetIssuedDate() string { + if o == nil || IsNil(o.IssuedDate) { + var ret string + return ret + } + return *o.IssuedDate +} + +// GetIssuedDateOk returns a tuple with the IssuedDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetIssuedDateOk() (*string, bool) { + if o == nil || IsNil(o.IssuedDate) { + return nil, false + } + return o.IssuedDate, true +} + +// HasIssuedDate returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasIssuedDate() bool { + if o != nil && !IsNil(o.IssuedDate) { + return true + } + + return false +} + +// SetIssuedDate gets a reference to the given string and assigns it to the IssuedDate field. +func (o *RpmUpdateRecordResponse) SetIssuedDate(v string) { + o.IssuedDate = &v +} + +// GetFromstr returns the Fromstr field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetFromstr() string { + if o == nil || IsNil(o.Fromstr) { + var ret string + return ret + } + return *o.Fromstr +} + +// GetFromstrOk returns a tuple with the Fromstr field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetFromstrOk() (*string, bool) { + if o == nil || IsNil(o.Fromstr) { + return nil, false + } + return o.Fromstr, true +} + +// HasFromstr returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasFromstr() bool { + if o != nil && !IsNil(o.Fromstr) { + return true + } + + return false +} + +// SetFromstr gets a reference to the given string and assigns it to the Fromstr field. +func (o *RpmUpdateRecordResponse) SetFromstr(v string) { + o.Fromstr = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *RpmUpdateRecordResponse) SetStatus(v string) { + o.Status = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetTitle() string { + if o == nil || IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetTitleOk() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *RpmUpdateRecordResponse) SetTitle(v string) { + o.Title = &v +} + +// GetSummary returns the Summary field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetSummary() string { + if o == nil || IsNil(o.Summary) { + var ret string + return ret + } + return *o.Summary +} + +// GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetSummaryOk() (*string, bool) { + if o == nil || IsNil(o.Summary) { + return nil, false + } + return o.Summary, true +} + +// HasSummary returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasSummary() bool { + if o != nil && !IsNil(o.Summary) { + return true + } + + return false +} + +// SetSummary gets a reference to the given string and assigns it to the Summary field. +func (o *RpmUpdateRecordResponse) SetSummary(v string) { + o.Summary = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *RpmUpdateRecordResponse) SetVersion(v string) { + o.Version = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RpmUpdateRecordResponse) SetType(v string) { + o.Type = &v +} + +// GetSeverity returns the Severity field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetSeverity() string { + if o == nil || IsNil(o.Severity) { + var ret string + return ret + } + return *o.Severity +} + +// GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetSeverityOk() (*string, bool) { + if o == nil || IsNil(o.Severity) { + return nil, false + } + return o.Severity, true +} + +// HasSeverity returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasSeverity() bool { + if o != nil && !IsNil(o.Severity) { + return true + } + + return false +} + +// SetSeverity gets a reference to the given string and assigns it to the Severity field. +func (o *RpmUpdateRecordResponse) SetSeverity(v string) { + o.Severity = &v +} + +// GetSolution returns the Solution field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetSolution() string { + if o == nil || IsNil(o.Solution) { + var ret string + return ret + } + return *o.Solution +} + +// GetSolutionOk returns a tuple with the Solution field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetSolutionOk() (*string, bool) { + if o == nil || IsNil(o.Solution) { + return nil, false + } + return o.Solution, true +} + +// HasSolution returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasSolution() bool { + if o != nil && !IsNil(o.Solution) { + return true + } + + return false +} + +// SetSolution gets a reference to the given string and assigns it to the Solution field. +func (o *RpmUpdateRecordResponse) SetSolution(v string) { + o.Solution = &v +} + +// GetRelease returns the Release field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetRelease() string { + if o == nil || IsNil(o.Release) { + var ret string + return ret + } + return *o.Release +} + +// GetReleaseOk returns a tuple with the Release field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetReleaseOk() (*string, bool) { + if o == nil || IsNil(o.Release) { + return nil, false + } + return o.Release, true +} + +// HasRelease returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasRelease() bool { + if o != nil && !IsNil(o.Release) { + return true + } + + return false +} + +// SetRelease gets a reference to the given string and assigns it to the Release field. +func (o *RpmUpdateRecordResponse) SetRelease(v string) { + o.Release = &v +} + +// GetRights returns the Rights field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetRights() string { + if o == nil || IsNil(o.Rights) { + var ret string + return ret + } + return *o.Rights +} + +// GetRightsOk returns a tuple with the Rights field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetRightsOk() (*string, bool) { + if o == nil || IsNil(o.Rights) { + return nil, false + } + return o.Rights, true +} + +// HasRights returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasRights() bool { + if o != nil && !IsNil(o.Rights) { + return true + } + + return false +} + +// SetRights gets a reference to the given string and assigns it to the Rights field. +func (o *RpmUpdateRecordResponse) SetRights(v string) { + o.Rights = &v +} + +// GetPushcount returns the Pushcount field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetPushcount() string { + if o == nil || IsNil(o.Pushcount) { + var ret string + return ret + } + return *o.Pushcount +} + +// GetPushcountOk returns a tuple with the Pushcount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetPushcountOk() (*string, bool) { + if o == nil || IsNil(o.Pushcount) { + return nil, false + } + return o.Pushcount, true +} + +// HasPushcount returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasPushcount() bool { + if o != nil && !IsNil(o.Pushcount) { + return true + } + + return false +} + +// SetPushcount gets a reference to the given string and assigns it to the Pushcount field. +func (o *RpmUpdateRecordResponse) SetPushcount(v string) { + o.Pushcount = &v +} + +// GetPkglist returns the Pkglist field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetPkglist() []RpmUpdateCollectionResponse { + if o == nil || IsNil(o.Pkglist) { + var ret []RpmUpdateCollectionResponse + return ret + } + return o.Pkglist +} + +// GetPkglistOk returns a tuple with the Pkglist field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetPkglistOk() ([]RpmUpdateCollectionResponse, bool) { + if o == nil || IsNil(o.Pkglist) { + return nil, false + } + return o.Pkglist, true +} + +// HasPkglist returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasPkglist() bool { + if o != nil && !IsNil(o.Pkglist) { + return true + } + + return false +} + +// SetPkglist gets a reference to the given []RpmUpdateCollectionResponse and assigns it to the Pkglist field. +func (o *RpmUpdateRecordResponse) SetPkglist(v []RpmUpdateCollectionResponse) { + o.Pkglist = v +} + +// GetReferences returns the References field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetReferences() []map[string]interface{} { + if o == nil || IsNil(o.References) { + var ret []map[string]interface{} + return ret + } + return o.References +} + +// GetReferencesOk returns a tuple with the References field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetReferencesOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.References) { + return nil, false + } + return o.References, true +} + +// HasReferences returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasReferences() bool { + if o != nil && !IsNil(o.References) { + return true + } + + return false +} + +// SetReferences gets a reference to the given []map[string]interface{} and assigns it to the References field. +func (o *RpmUpdateRecordResponse) SetReferences(v []map[string]interface{}) { + o.References = v +} + +// GetRebootSuggested returns the RebootSuggested field value if set, zero value otherwise. +func (o *RpmUpdateRecordResponse) GetRebootSuggested() bool { + if o == nil || IsNil(o.RebootSuggested) { + var ret bool + return ret + } + return *o.RebootSuggested +} + +// GetRebootSuggestedOk returns a tuple with the RebootSuggested field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RpmUpdateRecordResponse) GetRebootSuggestedOk() (*bool, bool) { + if o == nil || IsNil(o.RebootSuggested) { + return nil, false + } + return o.RebootSuggested, true +} + +// HasRebootSuggested returns a boolean if a field has been set. +func (o *RpmUpdateRecordResponse) HasRebootSuggested() bool { + if o != nil && !IsNil(o.RebootSuggested) { + return true + } + + return false +} + +// SetRebootSuggested gets a reference to the given bool and assigns it to the RebootSuggested field. +func (o *RpmUpdateRecordResponse) SetRebootSuggested(v bool) { + o.RebootSuggested = &v +} + +func (o RpmUpdateRecordResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RpmUpdateRecordResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.UpdatedDate) { + toSerialize["updated_date"] = o.UpdatedDate + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.IssuedDate) { + toSerialize["issued_date"] = o.IssuedDate + } + if !IsNil(o.Fromstr) { + toSerialize["fromstr"] = o.Fromstr + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Summary) { + toSerialize["summary"] = o.Summary + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Severity) { + toSerialize["severity"] = o.Severity + } + if !IsNil(o.Solution) { + toSerialize["solution"] = o.Solution + } + if !IsNil(o.Release) { + toSerialize["release"] = o.Release + } + if !IsNil(o.Rights) { + toSerialize["rights"] = o.Rights + } + if !IsNil(o.Pushcount) { + toSerialize["pushcount"] = o.Pushcount + } + if !IsNil(o.Pkglist) { + toSerialize["pkglist"] = o.Pkglist + } + if !IsNil(o.References) { + toSerialize["references"] = o.References + } + if !IsNil(o.RebootSuggested) { + toSerialize["reboot_suggested"] = o.RebootSuggested + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RpmUpdateRecordResponse) UnmarshalJSON(bytes []byte) (err error) { + varRpmUpdateRecordResponse := _RpmUpdateRecordResponse{} + + if err = json.Unmarshal(bytes, &varRpmUpdateRecordResponse); err == nil { + *o = RpmUpdateRecordResponse(varRpmUpdateRecordResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "id") + delete(additionalProperties, "updated_date") + delete(additionalProperties, "description") + delete(additionalProperties, "issued_date") + delete(additionalProperties, "fromstr") + delete(additionalProperties, "status") + delete(additionalProperties, "title") + delete(additionalProperties, "summary") + delete(additionalProperties, "version") + delete(additionalProperties, "type") + delete(additionalProperties, "severity") + delete(additionalProperties, "solution") + delete(additionalProperties, "release") + delete(additionalProperties, "rights") + delete(additionalProperties, "pushcount") + delete(additionalProperties, "pkglist") + delete(additionalProperties, "references") + delete(additionalProperties, "reboot_suggested") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRpmUpdateRecordResponse struct { + value *RpmUpdateRecordResponse + isSet bool +} + +func (v NullableRpmUpdateRecordResponse) Get() *RpmUpdateRecordResponse { + return v.value +} + +func (v *NullableRpmUpdateRecordResponse) Set(val *RpmUpdateRecordResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRpmUpdateRecordResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRpmUpdateRecordResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRpmUpdateRecordResponse(val *RpmUpdateRecordResponse) *NullableRpmUpdateRecordResponse { + return &NullableRpmUpdateRecordResponse{value: val, isSet: true} +} + +func (v NullableRpmUpdateRecordResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRpmUpdateRecordResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_signing_service_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_signing_service_response.go new file mode 100644 index 0000000000..a3ee84e7bb --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_signing_service_response.go @@ -0,0 +1,307 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the SigningServiceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SigningServiceResponse{} + +// SigningServiceResponse A serializer for the model declaring a signing service. +type SigningServiceResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name used to recognize a script. + Name string `json:"name"` + // The value of a public key used for the repository verification. + PublicKey string `json:"public_key"` + // The fingerprint of the public key. + PubkeyFingerprint string `json:"pubkey_fingerprint"` + // An absolute path to a script which is going to be used for the signing. + Script string `json:"script"` + AdditionalProperties map[string]interface{} +} + +type _SigningServiceResponse SigningServiceResponse + +// NewSigningServiceResponse instantiates a new SigningServiceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSigningServiceResponse(name string, publicKey string, pubkeyFingerprint string, script string) *SigningServiceResponse { + this := SigningServiceResponse{} + this.Name = name + this.PublicKey = publicKey + this.PubkeyFingerprint = pubkeyFingerprint + this.Script = script + return &this +} + +// NewSigningServiceResponseWithDefaults instantiates a new SigningServiceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSigningServiceResponseWithDefaults() *SigningServiceResponse { + this := SigningServiceResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *SigningServiceResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigningServiceResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *SigningServiceResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *SigningServiceResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *SigningServiceResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SigningServiceResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *SigningServiceResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *SigningServiceResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *SigningServiceResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SigningServiceResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *SigningServiceResponse) SetName(v string) { + o.Name = v +} + +// GetPublicKey returns the PublicKey field value +func (o *SigningServiceResponse) GetPublicKey() string { + if o == nil { + var ret string + return ret + } + + return o.PublicKey +} + +// GetPublicKeyOk returns a tuple with the PublicKey field value +// and a boolean to check if the value has been set. +func (o *SigningServiceResponse) GetPublicKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PublicKey, true +} + +// SetPublicKey sets field value +func (o *SigningServiceResponse) SetPublicKey(v string) { + o.PublicKey = v +} + +// GetPubkeyFingerprint returns the PubkeyFingerprint field value +func (o *SigningServiceResponse) GetPubkeyFingerprint() string { + if o == nil { + var ret string + return ret + } + + return o.PubkeyFingerprint +} + +// GetPubkeyFingerprintOk returns a tuple with the PubkeyFingerprint field value +// and a boolean to check if the value has been set. +func (o *SigningServiceResponse) GetPubkeyFingerprintOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PubkeyFingerprint, true +} + +// SetPubkeyFingerprint sets field value +func (o *SigningServiceResponse) SetPubkeyFingerprint(v string) { + o.PubkeyFingerprint = v +} + +// GetScript returns the Script field value +func (o *SigningServiceResponse) GetScript() string { + if o == nil { + var ret string + return ret + } + + return o.Script +} + +// GetScriptOk returns a tuple with the Script field value +// and a boolean to check if the value has been set. +func (o *SigningServiceResponse) GetScriptOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Script, true +} + +// SetScript sets field value +func (o *SigningServiceResponse) SetScript(v string) { + o.Script = v +} + +func (o SigningServiceResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SigningServiceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["public_key"] = o.PublicKey + toSerialize["pubkey_fingerprint"] = o.PubkeyFingerprint + toSerialize["script"] = o.Script + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *SigningServiceResponse) UnmarshalJSON(bytes []byte) (err error) { + varSigningServiceResponse := _SigningServiceResponse{} + + if err = json.Unmarshal(bytes, &varSigningServiceResponse); err == nil { + *o = SigningServiceResponse(varSigningServiceResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "public_key") + delete(additionalProperties, "pubkey_fingerprint") + delete(additionalProperties, "script") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableSigningServiceResponse struct { + value *SigningServiceResponse + isSet bool +} + +func (v NullableSigningServiceResponse) Get() *SigningServiceResponse { + return v.value +} + +func (v *NullableSigningServiceResponse) Set(val *SigningServiceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSigningServiceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSigningServiceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSigningServiceResponse(val *SigningServiceResponse) *NullableSigningServiceResponse { + return &NullableSigningServiceResponse{value: val, isSet: true} +} + +func (v NullableSigningServiceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSigningServiceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_skip_types_enum.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_skip_types_enum.go new file mode 100644 index 0000000000..fe5fe08704 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_skip_types_enum.go @@ -0,0 +1,112 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "fmt" +) + +// SkipTypesEnum * `srpm` - srpm * `treeinfo` - treeinfo +type SkipTypesEnum string + +// List of SkipTypesEnum +const ( + SKIPTYPESENUM_SRPM SkipTypesEnum = "srpm" + SKIPTYPESENUM_TREEINFO SkipTypesEnum = "treeinfo" +) + +// All allowed values of SkipTypesEnum enum +var AllowedSkipTypesEnumEnumValues = []SkipTypesEnum{ + "srpm", + "treeinfo", +} + +func (v *SkipTypesEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := SkipTypesEnum(value) + for _, existing := range AllowedSkipTypesEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid SkipTypesEnum", value) +} + +// NewSkipTypesEnumFromValue returns a pointer to a valid SkipTypesEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewSkipTypesEnumFromValue(v string) (*SkipTypesEnum, error) { + ev := SkipTypesEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for SkipTypesEnum: valid values are %v", v, AllowedSkipTypesEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v SkipTypesEnum) IsValid() bool { + for _, existing := range AllowedSkipTypesEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SkipTypesEnum value +func (v SkipTypesEnum) Ptr() *SkipTypesEnum { + return &v +} + +type NullableSkipTypesEnum struct { + value *SkipTypesEnum + isSet bool +} + +func (v NullableSkipTypesEnum) Get() *SkipTypesEnum { + return v.value +} + +func (v *NullableSkipTypesEnum) Set(val *SkipTypesEnum) { + v.value = val + v.isSet = true +} + +func (v NullableSkipTypesEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableSkipTypesEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSkipTypesEnum(val *SkipTypesEnum) *NullableSkipTypesEnum { + return &NullableSkipTypesEnum{value: val, isSet: true} +} + +func (v NullableSkipTypesEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSkipTypesEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_states_enum.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_states_enum.go new file mode 100644 index 0000000000..e74ef178ec --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_states_enum.go @@ -0,0 +1,116 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "fmt" +) + +// StatesEnum * `skipped` - skipped * `completed` - completed * `failed` - failed * `canceled` - canceled +type StatesEnum string + +// List of StatesEnum +const ( + STATESENUM_SKIPPED StatesEnum = "skipped" + STATESENUM_COMPLETED StatesEnum = "completed" + STATESENUM_FAILED StatesEnum = "failed" + STATESENUM_CANCELED StatesEnum = "canceled" +) + +// All allowed values of StatesEnum enum +var AllowedStatesEnumEnumValues = []StatesEnum{ + "skipped", + "completed", + "failed", + "canceled", +} + +func (v *StatesEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := StatesEnum(value) + for _, existing := range AllowedStatesEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid StatesEnum", value) +} + +// NewStatesEnumFromValue returns a pointer to a valid StatesEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewStatesEnumFromValue(v string) (*StatesEnum, error) { + ev := StatesEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for StatesEnum: valid values are %v", v, AllowedStatesEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v StatesEnum) IsValid() bool { + for _, existing := range AllowedStatesEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to StatesEnum value +func (v StatesEnum) Ptr() *StatesEnum { + return &v +} + +type NullableStatesEnum struct { + value *StatesEnum + isSet bool +} + +func (v NullableStatesEnum) Get() *StatesEnum { + return v.value +} + +func (v *NullableStatesEnum) Set(val *StatesEnum) { + v.value = val + v.isSet = true +} + +func (v NullableStatesEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableStatesEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatesEnum(val *StatesEnum) *NullableStatesEnum { + return &NullableStatesEnum{value: val, isSet: true} +} + +func (v NullableStatesEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatesEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_status_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_status_response.go new file mode 100644 index 0000000000..b9adccb55e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_status_response.go @@ -0,0 +1,361 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the StatusResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusResponse{} + +// StatusResponse Serializer for the status information of the app +type StatusResponse struct { + // Version information of Pulp components + Versions []VersionResponse `json:"versions"` + // List of online workers known to the application. An online worker is actively heartbeating and can respond to new work + OnlineWorkers []WorkerResponse `json:"online_workers"` + // List of online content apps known to the application. An online content app is actively heartbeating and can serve data to clients + OnlineContentApps []ContentAppStatusResponse `json:"online_content_apps"` + DatabaseConnection DatabaseConnectionResponse `json:"database_connection"` + RedisConnection *RedisConnectionResponse `json:"redis_connection,omitempty"` + Storage *StorageResponse `json:"storage,omitempty"` + ContentSettings ContentSettingsResponse `json:"content_settings"` + // Is Domains enabled + DomainEnabled bool `json:"domain_enabled"` + AdditionalProperties map[string]interface{} +} + +type _StatusResponse StatusResponse + +// NewStatusResponse instantiates a new StatusResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStatusResponse(versions []VersionResponse, onlineWorkers []WorkerResponse, onlineContentApps []ContentAppStatusResponse, databaseConnection DatabaseConnectionResponse, contentSettings ContentSettingsResponse, domainEnabled bool) *StatusResponse { + this := StatusResponse{} + this.Versions = versions + this.OnlineWorkers = onlineWorkers + this.OnlineContentApps = onlineContentApps + this.DatabaseConnection = databaseConnection + this.ContentSettings = contentSettings + this.DomainEnabled = domainEnabled + return &this +} + +// NewStatusResponseWithDefaults instantiates a new StatusResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStatusResponseWithDefaults() *StatusResponse { + this := StatusResponse{} + return &this +} + +// GetVersions returns the Versions field value +func (o *StatusResponse) GetVersions() []VersionResponse { + if o == nil { + var ret []VersionResponse + return ret + } + + return o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetVersionsOk() ([]VersionResponse, bool) { + if o == nil { + return nil, false + } + return o.Versions, true +} + +// SetVersions sets field value +func (o *StatusResponse) SetVersions(v []VersionResponse) { + o.Versions = v +} + +// GetOnlineWorkers returns the OnlineWorkers field value +func (o *StatusResponse) GetOnlineWorkers() []WorkerResponse { + if o == nil { + var ret []WorkerResponse + return ret + } + + return o.OnlineWorkers +} + +// GetOnlineWorkersOk returns a tuple with the OnlineWorkers field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetOnlineWorkersOk() ([]WorkerResponse, bool) { + if o == nil { + return nil, false + } + return o.OnlineWorkers, true +} + +// SetOnlineWorkers sets field value +func (o *StatusResponse) SetOnlineWorkers(v []WorkerResponse) { + o.OnlineWorkers = v +} + +// GetOnlineContentApps returns the OnlineContentApps field value +func (o *StatusResponse) GetOnlineContentApps() []ContentAppStatusResponse { + if o == nil { + var ret []ContentAppStatusResponse + return ret + } + + return o.OnlineContentApps +} + +// GetOnlineContentAppsOk returns a tuple with the OnlineContentApps field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetOnlineContentAppsOk() ([]ContentAppStatusResponse, bool) { + if o == nil { + return nil, false + } + return o.OnlineContentApps, true +} + +// SetOnlineContentApps sets field value +func (o *StatusResponse) SetOnlineContentApps(v []ContentAppStatusResponse) { + o.OnlineContentApps = v +} + +// GetDatabaseConnection returns the DatabaseConnection field value +func (o *StatusResponse) GetDatabaseConnection() DatabaseConnectionResponse { + if o == nil { + var ret DatabaseConnectionResponse + return ret + } + + return o.DatabaseConnection +} + +// GetDatabaseConnectionOk returns a tuple with the DatabaseConnection field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetDatabaseConnectionOk() (*DatabaseConnectionResponse, bool) { + if o == nil { + return nil, false + } + return &o.DatabaseConnection, true +} + +// SetDatabaseConnection sets field value +func (o *StatusResponse) SetDatabaseConnection(v DatabaseConnectionResponse) { + o.DatabaseConnection = v +} + +// GetRedisConnection returns the RedisConnection field value if set, zero value otherwise. +func (o *StatusResponse) GetRedisConnection() RedisConnectionResponse { + if o == nil || IsNil(o.RedisConnection) { + var ret RedisConnectionResponse + return ret + } + return *o.RedisConnection +} + +// GetRedisConnectionOk returns a tuple with the RedisConnection field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetRedisConnectionOk() (*RedisConnectionResponse, bool) { + if o == nil || IsNil(o.RedisConnection) { + return nil, false + } + return o.RedisConnection, true +} + +// HasRedisConnection returns a boolean if a field has been set. +func (o *StatusResponse) HasRedisConnection() bool { + if o != nil && !IsNil(o.RedisConnection) { + return true + } + + return false +} + +// SetRedisConnection gets a reference to the given RedisConnectionResponse and assigns it to the RedisConnection field. +func (o *StatusResponse) SetRedisConnection(v RedisConnectionResponse) { + o.RedisConnection = &v +} + +// GetStorage returns the Storage field value if set, zero value otherwise. +func (o *StatusResponse) GetStorage() StorageResponse { + if o == nil || IsNil(o.Storage) { + var ret StorageResponse + return ret + } + return *o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetStorageOk() (*StorageResponse, bool) { + if o == nil || IsNil(o.Storage) { + return nil, false + } + return o.Storage, true +} + +// HasStorage returns a boolean if a field has been set. +func (o *StatusResponse) HasStorage() bool { + if o != nil && !IsNil(o.Storage) { + return true + } + + return false +} + +// SetStorage gets a reference to the given StorageResponse and assigns it to the Storage field. +func (o *StatusResponse) SetStorage(v StorageResponse) { + o.Storage = &v +} + +// GetContentSettings returns the ContentSettings field value +func (o *StatusResponse) GetContentSettings() ContentSettingsResponse { + if o == nil { + var ret ContentSettingsResponse + return ret + } + + return o.ContentSettings +} + +// GetContentSettingsOk returns a tuple with the ContentSettings field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetContentSettingsOk() (*ContentSettingsResponse, bool) { + if o == nil { + return nil, false + } + return &o.ContentSettings, true +} + +// SetContentSettings sets field value +func (o *StatusResponse) SetContentSettings(v ContentSettingsResponse) { + o.ContentSettings = v +} + +// GetDomainEnabled returns the DomainEnabled field value +func (o *StatusResponse) GetDomainEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.DomainEnabled +} + +// GetDomainEnabledOk returns a tuple with the DomainEnabled field value +// and a boolean to check if the value has been set. +func (o *StatusResponse) GetDomainEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.DomainEnabled, true +} + +// SetDomainEnabled sets field value +func (o *StatusResponse) SetDomainEnabled(v bool) { + o.DomainEnabled = v +} + +func (o StatusResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["versions"] = o.Versions + toSerialize["online_workers"] = o.OnlineWorkers + toSerialize["online_content_apps"] = o.OnlineContentApps + toSerialize["database_connection"] = o.DatabaseConnection + if !IsNil(o.RedisConnection) { + toSerialize["redis_connection"] = o.RedisConnection + } + if !IsNil(o.Storage) { + toSerialize["storage"] = o.Storage + } + toSerialize["content_settings"] = o.ContentSettings + toSerialize["domain_enabled"] = o.DomainEnabled + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *StatusResponse) UnmarshalJSON(bytes []byte) (err error) { + varStatusResponse := _StatusResponse{} + + if err = json.Unmarshal(bytes, &varStatusResponse); err == nil { + *o = StatusResponse(varStatusResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "versions") + delete(additionalProperties, "online_workers") + delete(additionalProperties, "online_content_apps") + delete(additionalProperties, "database_connection") + delete(additionalProperties, "redis_connection") + delete(additionalProperties, "storage") + delete(additionalProperties, "content_settings") + delete(additionalProperties, "domain_enabled") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableStatusResponse struct { + value *StatusResponse + isSet bool +} + +func (v NullableStatusResponse) Get() *StatusResponse { + return v.value +} + +func (v *NullableStatusResponse) Set(val *StatusResponse) { + v.value = val + v.isSet = true +} + +func (v NullableStatusResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusResponse(val *StatusResponse) *NullableStatusResponse { + return &NullableStatusResponse{value: val, isSet: true} +} + +func (v NullableStatusResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_storage_class_enum.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_storage_class_enum.go new file mode 100644 index 0000000000..4fb2c8f6c2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_storage_class_enum.go @@ -0,0 +1,114 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "fmt" +) + +// StorageClassEnum * `pulpcore.app.models.storage.FileSystem` - Use local filesystem as storage * `storages.backends.s3boto3.S3Boto3Storage` - Use Amazon S3 as storage * `storages.backends.azure_storage.AzureStorage` - Use Azure Blob as storage +type StorageClassEnum string + +// List of StorageClassEnum +const ( + STORAGECLASSENUM_PULPCORE_APP_MODELS_STORAGE_FILE_SYSTEM StorageClassEnum = "pulpcore.app.models.storage.FileSystem" + STORAGECLASSENUM_STORAGES_BACKENDS_S3BOTO3_S3_BOTO3_STORAGE StorageClassEnum = "storages.backends.s3boto3.S3Boto3Storage" + STORAGECLASSENUM_STORAGES_BACKENDS_AZURE_STORAGE_AZURE_STORAGE StorageClassEnum = "storages.backends.azure_storage.AzureStorage" +) + +// All allowed values of StorageClassEnum enum +var AllowedStorageClassEnumEnumValues = []StorageClassEnum{ + "pulpcore.app.models.storage.FileSystem", + "storages.backends.s3boto3.S3Boto3Storage", + "storages.backends.azure_storage.AzureStorage", +} + +func (v *StorageClassEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := StorageClassEnum(value) + for _, existing := range AllowedStorageClassEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid StorageClassEnum", value) +} + +// NewStorageClassEnumFromValue returns a pointer to a valid StorageClassEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewStorageClassEnumFromValue(v string) (*StorageClassEnum, error) { + ev := StorageClassEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for StorageClassEnum: valid values are %v", v, AllowedStorageClassEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v StorageClassEnum) IsValid() bool { + for _, existing := range AllowedStorageClassEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to StorageClassEnum value +func (v StorageClassEnum) Ptr() *StorageClassEnum { + return &v +} + +type NullableStorageClassEnum struct { + value *StorageClassEnum + isSet bool +} + +func (v NullableStorageClassEnum) Get() *StorageClassEnum { + return v.value +} + +func (v *NullableStorageClassEnum) Set(val *StorageClassEnum) { + v.value = val + v.isSet = true +} + +func (v NullableStorageClassEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableStorageClassEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorageClassEnum(val *StorageClassEnum) *NullableStorageClassEnum { + return &NullableStorageClassEnum{value: val, isSet: true} +} + +func (v NullableStorageClassEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorageClassEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_storage_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_storage_response.go new file mode 100644 index 0000000000..9621b3989b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_storage_response.go @@ -0,0 +1,202 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the StorageResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StorageResponse{} + +// StorageResponse Serializer for information about the storage system +type StorageResponse struct { + // Total number of bytes + Total int64 `json:"total"` + // Number of bytes in use + Used int64 `json:"used"` + // Number of free bytes + Free int64 `json:"free"` + AdditionalProperties map[string]interface{} +} + +type _StorageResponse StorageResponse + +// NewStorageResponse instantiates a new StorageResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStorageResponse(total int64, used int64, free int64) *StorageResponse { + this := StorageResponse{} + this.Total = total + this.Used = used + this.Free = free + return &this +} + +// NewStorageResponseWithDefaults instantiates a new StorageResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStorageResponseWithDefaults() *StorageResponse { + this := StorageResponse{} + return &this +} + +// GetTotal returns the Total field value +func (o *StorageResponse) GetTotal() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *StorageResponse) GetTotalOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *StorageResponse) SetTotal(v int64) { + o.Total = v +} + +// GetUsed returns the Used field value +func (o *StorageResponse) GetUsed() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Used +} + +// GetUsedOk returns a tuple with the Used field value +// and a boolean to check if the value has been set. +func (o *StorageResponse) GetUsedOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Used, true +} + +// SetUsed sets field value +func (o *StorageResponse) SetUsed(v int64) { + o.Used = v +} + +// GetFree returns the Free field value +func (o *StorageResponse) GetFree() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Free +} + +// GetFreeOk returns a tuple with the Free field value +// and a boolean to check if the value has been set. +func (o *StorageResponse) GetFreeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Free, true +} + +// SetFree sets field value +func (o *StorageResponse) SetFree(v int64) { + o.Free = v +} + +func (o StorageResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StorageResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["total"] = o.Total + toSerialize["used"] = o.Used + toSerialize["free"] = o.Free + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *StorageResponse) UnmarshalJSON(bytes []byte) (err error) { + varStorageResponse := _StorageResponse{} + + if err = json.Unmarshal(bytes, &varStorageResponse); err == nil { + *o = StorageResponse(varStorageResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "total") + delete(additionalProperties, "used") + delete(additionalProperties, "free") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableStorageResponse struct { + value *StorageResponse + isSet bool +} + +func (v NullableStorageResponse) Get() *StorageResponse { + return v.value +} + +func (v *NullableStorageResponse) Set(val *StorageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableStorageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableStorageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorageResponse(val *StorageResponse) *NullableStorageResponse { + return &NullableStorageResponse{value: val, isSet: true} +} + +func (v NullableStorageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_summary_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_summary_response.go new file mode 100644 index 0000000000..99a83acb53 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_summary_response.go @@ -0,0 +1,202 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the SummaryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SummaryResponse{} + +// SummaryResponse A Serializer for summary information of an index. +type SummaryResponse struct { + // Number of Python projects in index + Projects int64 `json:"projects"` + // Number of Python distribution releases in index + Releases int64 `json:"releases"` + // Number of files for all distributions in index + Files int64 `json:"files"` + AdditionalProperties map[string]interface{} +} + +type _SummaryResponse SummaryResponse + +// NewSummaryResponse instantiates a new SummaryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSummaryResponse(projects int64, releases int64, files int64) *SummaryResponse { + this := SummaryResponse{} + this.Projects = projects + this.Releases = releases + this.Files = files + return &this +} + +// NewSummaryResponseWithDefaults instantiates a new SummaryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSummaryResponseWithDefaults() *SummaryResponse { + this := SummaryResponse{} + return &this +} + +// GetProjects returns the Projects field value +func (o *SummaryResponse) GetProjects() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Projects +} + +// GetProjectsOk returns a tuple with the Projects field value +// and a boolean to check if the value has been set. +func (o *SummaryResponse) GetProjectsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Projects, true +} + +// SetProjects sets field value +func (o *SummaryResponse) SetProjects(v int64) { + o.Projects = v +} + +// GetReleases returns the Releases field value +func (o *SummaryResponse) GetReleases() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Releases +} + +// GetReleasesOk returns a tuple with the Releases field value +// and a boolean to check if the value has been set. +func (o *SummaryResponse) GetReleasesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Releases, true +} + +// SetReleases sets field value +func (o *SummaryResponse) SetReleases(v int64) { + o.Releases = v +} + +// GetFiles returns the Files field value +func (o *SummaryResponse) GetFiles() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Files +} + +// GetFilesOk returns a tuple with the Files field value +// and a boolean to check if the value has been set. +func (o *SummaryResponse) GetFilesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Files, true +} + +// SetFiles sets field value +func (o *SummaryResponse) SetFiles(v int64) { + o.Files = v +} + +func (o SummaryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SummaryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["projects"] = o.Projects + toSerialize["releases"] = o.Releases + toSerialize["files"] = o.Files + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *SummaryResponse) UnmarshalJSON(bytes []byte) (err error) { + varSummaryResponse := _SummaryResponse{} + + if err = json.Unmarshal(bytes, &varSummaryResponse); err == nil { + *o = SummaryResponse(varSummaryResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "projects") + delete(additionalProperties, "releases") + delete(additionalProperties, "files") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableSummaryResponse struct { + value *SummaryResponse + isSet bool +} + +func (v NullableSummaryResponse) Get() *SummaryResponse { + return v.value +} + +func (v *NullableSummaryResponse) Set(val *SummaryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSummaryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSummaryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSummaryResponse(val *SummaryResponse) *NullableSummaryResponse { + return &NullableSummaryResponse{value: val, isSet: true} +} + +func (v NullableSummaryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSummaryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_sync_policy_enum.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_sync_policy_enum.go new file mode 100644 index 0000000000..76c0b01386 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_sync_policy_enum.go @@ -0,0 +1,114 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "fmt" +) + +// SyncPolicyEnum * `additive` - additive * `mirror_complete` - mirror_complete * `mirror_content_only` - mirror_content_only +type SyncPolicyEnum string + +// List of SyncPolicyEnum +const ( + SYNCPOLICYENUM_ADDITIVE SyncPolicyEnum = "additive" + SYNCPOLICYENUM_MIRROR_COMPLETE SyncPolicyEnum = "mirror_complete" + SYNCPOLICYENUM_MIRROR_CONTENT_ONLY SyncPolicyEnum = "mirror_content_only" +) + +// All allowed values of SyncPolicyEnum enum +var AllowedSyncPolicyEnumEnumValues = []SyncPolicyEnum{ + "additive", + "mirror_complete", + "mirror_content_only", +} + +func (v *SyncPolicyEnum) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := SyncPolicyEnum(value) + for _, existing := range AllowedSyncPolicyEnumEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid SyncPolicyEnum", value) +} + +// NewSyncPolicyEnumFromValue returns a pointer to a valid SyncPolicyEnum +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewSyncPolicyEnumFromValue(v string) (*SyncPolicyEnum, error) { + ev := SyncPolicyEnum(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for SyncPolicyEnum: valid values are %v", v, AllowedSyncPolicyEnumEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v SyncPolicyEnum) IsValid() bool { + for _, existing := range AllowedSyncPolicyEnumEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SyncPolicyEnum value +func (v SyncPolicyEnum) Ptr() *SyncPolicyEnum { + return &v +} + +type NullableSyncPolicyEnum struct { + value *SyncPolicyEnum + isSet bool +} + +func (v NullableSyncPolicyEnum) Get() *SyncPolicyEnum { + return v.value +} + +func (v *NullableSyncPolicyEnum) Set(val *SyncPolicyEnum) { + v.value = val + v.isSet = true +} + +func (v NullableSyncPolicyEnum) IsSet() bool { + return v.isSet +} + +func (v *NullableSyncPolicyEnum) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSyncPolicyEnum(val *SyncPolicyEnum) *NullableSyncPolicyEnum { + return &NullableSyncPolicyEnum{value: val, isSet: true} +} + +func (v NullableSyncPolicyEnum) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSyncPolicyEnum) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_tag_copy.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_tag_copy.go new file mode 100644 index 0000000000..d677d539a2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_tag_copy.go @@ -0,0 +1,229 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the TagCopy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TagCopy{} + +// TagCopy Serializer for copying tags from a source repository to a destination repository. +type TagCopy struct { + // A URI of the repository to copy content from. + SourceRepository *string `json:"source_repository,omitempty"` + // A URI of the repository version to copy content from. + SourceRepositoryVersion *string `json:"source_repository_version,omitempty"` + // A list of tag names to copy. + Names []interface{} `json:"names,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _TagCopy TagCopy + +// NewTagCopy instantiates a new TagCopy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTagCopy() *TagCopy { + this := TagCopy{} + return &this +} + +// NewTagCopyWithDefaults instantiates a new TagCopy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTagCopyWithDefaults() *TagCopy { + this := TagCopy{} + return &this +} + +// GetSourceRepository returns the SourceRepository field value if set, zero value otherwise. +func (o *TagCopy) GetSourceRepository() string { + if o == nil || IsNil(o.SourceRepository) { + var ret string + return ret + } + return *o.SourceRepository +} + +// GetSourceRepositoryOk returns a tuple with the SourceRepository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TagCopy) GetSourceRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.SourceRepository) { + return nil, false + } + return o.SourceRepository, true +} + +// HasSourceRepository returns a boolean if a field has been set. +func (o *TagCopy) HasSourceRepository() bool { + if o != nil && !IsNil(o.SourceRepository) { + return true + } + + return false +} + +// SetSourceRepository gets a reference to the given string and assigns it to the SourceRepository field. +func (o *TagCopy) SetSourceRepository(v string) { + o.SourceRepository = &v +} + +// GetSourceRepositoryVersion returns the SourceRepositoryVersion field value if set, zero value otherwise. +func (o *TagCopy) GetSourceRepositoryVersion() string { + if o == nil || IsNil(o.SourceRepositoryVersion) { + var ret string + return ret + } + return *o.SourceRepositoryVersion +} + +// GetSourceRepositoryVersionOk returns a tuple with the SourceRepositoryVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TagCopy) GetSourceRepositoryVersionOk() (*string, bool) { + if o == nil || IsNil(o.SourceRepositoryVersion) { + return nil, false + } + return o.SourceRepositoryVersion, true +} + +// HasSourceRepositoryVersion returns a boolean if a field has been set. +func (o *TagCopy) HasSourceRepositoryVersion() bool { + if o != nil && !IsNil(o.SourceRepositoryVersion) { + return true + } + + return false +} + +// SetSourceRepositoryVersion gets a reference to the given string and assigns it to the SourceRepositoryVersion field. +func (o *TagCopy) SetSourceRepositoryVersion(v string) { + o.SourceRepositoryVersion = &v +} + +// GetNames returns the Names field value if set, zero value otherwise. +func (o *TagCopy) GetNames() []interface{} { + if o == nil || IsNil(o.Names) { + var ret []interface{} + return ret + } + return o.Names +} + +// GetNamesOk returns a tuple with the Names field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TagCopy) GetNamesOk() ([]interface{}, bool) { + if o == nil || IsNil(o.Names) { + return nil, false + } + return o.Names, true +} + +// HasNames returns a boolean if a field has been set. +func (o *TagCopy) HasNames() bool { + if o != nil && !IsNil(o.Names) { + return true + } + + return false +} + +// SetNames gets a reference to the given []interface{} and assigns it to the Names field. +func (o *TagCopy) SetNames(v []interface{}) { + o.Names = v +} + +func (o TagCopy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TagCopy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SourceRepository) { + toSerialize["source_repository"] = o.SourceRepository + } + if !IsNil(o.SourceRepositoryVersion) { + toSerialize["source_repository_version"] = o.SourceRepositoryVersion + } + if !IsNil(o.Names) { + toSerialize["names"] = o.Names + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TagCopy) UnmarshalJSON(bytes []byte) (err error) { + varTagCopy := _TagCopy{} + + if err = json.Unmarshal(bytes, &varTagCopy); err == nil { + *o = TagCopy(varTagCopy) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "source_repository") + delete(additionalProperties, "source_repository_version") + delete(additionalProperties, "names") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTagCopy struct { + value *TagCopy + isSet bool +} + +func (v NullableTagCopy) Get() *TagCopy { + return v.value +} + +func (v *NullableTagCopy) Set(val *TagCopy) { + v.value = val + v.isSet = true +} + +func (v NullableTagCopy) IsSet() bool { + return v.isSet +} + +func (v *NullableTagCopy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTagCopy(val *TagCopy) *NullableTagCopy { + return &NullableTagCopy{value: val, isSet: true} +} + +func (v NullableTagCopy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTagCopy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_tag_image.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_tag_image.go new file mode 100644 index 0000000000..4b065d053a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_tag_image.go @@ -0,0 +1,173 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the TagImage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TagImage{} + +// TagImage A serializer for parsing and validating data associated with a manifest tagging. +type TagImage struct { + // A tag name + Tag string `json:"tag"` + // sha256 of the Manifest file + Digest string `json:"digest"` + AdditionalProperties map[string]interface{} +} + +type _TagImage TagImage + +// NewTagImage instantiates a new TagImage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTagImage(tag string, digest string) *TagImage { + this := TagImage{} + this.Tag = tag + this.Digest = digest + return &this +} + +// NewTagImageWithDefaults instantiates a new TagImage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTagImageWithDefaults() *TagImage { + this := TagImage{} + return &this +} + +// GetTag returns the Tag field value +func (o *TagImage) GetTag() string { + if o == nil { + var ret string + return ret + } + + return o.Tag +} + +// GetTagOk returns a tuple with the Tag field value +// and a boolean to check if the value has been set. +func (o *TagImage) GetTagOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Tag, true +} + +// SetTag sets field value +func (o *TagImage) SetTag(v string) { + o.Tag = v +} + +// GetDigest returns the Digest field value +func (o *TagImage) GetDigest() string { + if o == nil { + var ret string + return ret + } + + return o.Digest +} + +// GetDigestOk returns a tuple with the Digest field value +// and a boolean to check if the value has been set. +func (o *TagImage) GetDigestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Digest, true +} + +// SetDigest sets field value +func (o *TagImage) SetDigest(v string) { + o.Digest = v +} + +func (o TagImage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TagImage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["tag"] = o.Tag + toSerialize["digest"] = o.Digest + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TagImage) UnmarshalJSON(bytes []byte) (err error) { + varTagImage := _TagImage{} + + if err = json.Unmarshal(bytes, &varTagImage); err == nil { + *o = TagImage(varTagImage) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "tag") + delete(additionalProperties, "digest") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTagImage struct { + value *TagImage + isSet bool +} + +func (v NullableTagImage) Get() *TagImage { + return v.value +} + +func (v *NullableTagImage) Set(val *TagImage) { + v.value = val + v.isSet = true +} + +func (v NullableTagImage) IsSet() bool { + return v.isSet +} + +func (v *NullableTagImage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTagImage(val *TagImage) *NullableTagImage { + return &NullableTagImage{value: val, isSet: true} +} + +func (v NullableTagImage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTagImage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_tag_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_tag_response.go new file mode 100644 index 0000000000..d7ba51955d --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_tag_response.go @@ -0,0 +1,152 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the TagResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TagResponse{} + +// TagResponse A serializer for the Tag model. +type TagResponse struct { + Name *string `json:"name,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _TagResponse TagResponse + +// NewTagResponse instantiates a new TagResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTagResponse() *TagResponse { + this := TagResponse{} + return &this +} + +// NewTagResponseWithDefaults instantiates a new TagResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTagResponseWithDefaults() *TagResponse { + this := TagResponse{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TagResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TagResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *TagResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *TagResponse) SetName(v string) { + o.Name = &v +} + +func (o TagResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TagResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TagResponse) UnmarshalJSON(bytes []byte) (err error) { + varTagResponse := _TagResponse{} + + if err = json.Unmarshal(bytes, &varTagResponse); err == nil { + *o = TagResponse(varTagResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTagResponse struct { + value *TagResponse + isSet bool +} + +func (v NullableTagResponse) Get() *TagResponse { + return v.value +} + +func (v *NullableTagResponse) Set(val *TagResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTagResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTagResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTagResponse(val *TagResponse) *NullableTagResponse { + return &NullableTagResponse{value: val, isSet: true} +} + +func (v NullableTagResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTagResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_task.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_task.go new file mode 100644 index 0000000000..82e4128a8a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_task.go @@ -0,0 +1,173 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the Task type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Task{} + +// Task Base serializer for use with :class:`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. +type Task struct { + // The name of task. + Name string `json:"name"` + // The logging correlation id associated with this task + LoggingCid string `json:"logging_cid"` + AdditionalProperties map[string]interface{} +} + +type _Task Task + +// NewTask instantiates a new Task object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTask(name string, loggingCid string) *Task { + this := Task{} + this.Name = name + this.LoggingCid = loggingCid + return &this +} + +// NewTaskWithDefaults instantiates a new Task object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTaskWithDefaults() *Task { + this := Task{} + return &this +} + +// GetName returns the Name field value +func (o *Task) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Task) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Task) SetName(v string) { + o.Name = v +} + +// GetLoggingCid returns the LoggingCid field value +func (o *Task) GetLoggingCid() string { + if o == nil { + var ret string + return ret + } + + return o.LoggingCid +} + +// GetLoggingCidOk returns a tuple with the LoggingCid field value +// and a boolean to check if the value has been set. +func (o *Task) GetLoggingCidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LoggingCid, true +} + +// SetLoggingCid sets field value +func (o *Task) SetLoggingCid(v string) { + o.LoggingCid = v +} + +func (o Task) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Task) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["logging_cid"] = o.LoggingCid + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Task) UnmarshalJSON(bytes []byte) (err error) { + varTask := _Task{} + + if err = json.Unmarshal(bytes, &varTask); err == nil { + *o = Task(varTask) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "logging_cid") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTask struct { + value *Task + isSet bool +} + +func (v NullableTask) Get() *Task { + return v.value +} + +func (v *NullableTask) Set(val *Task) { + v.value = val + v.isSet = true +} + +func (v NullableTask) IsSet() bool { + return v.isSet +} + +func (v *NullableTask) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTask(val *Task) *NullableTask { + return &NullableTask{value: val, isSet: true} +} + +func (v NullableTask) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTask) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_task_group_operation_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_task_group_operation_response.go new file mode 100644 index 0000000000..fc0a400b2f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_task_group_operation_response.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the TaskGroupOperationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TaskGroupOperationResponse{} + +// TaskGroupOperationResponse Serializer for asynchronous operations that return a task group. +type TaskGroupOperationResponse struct { + // The href of the task group. + TaskGroup string `json:"task_group"` + AdditionalProperties map[string]interface{} +} + +type _TaskGroupOperationResponse TaskGroupOperationResponse + +// NewTaskGroupOperationResponse instantiates a new TaskGroupOperationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTaskGroupOperationResponse(taskGroup string) *TaskGroupOperationResponse { + this := TaskGroupOperationResponse{} + this.TaskGroup = taskGroup + return &this +} + +// NewTaskGroupOperationResponseWithDefaults instantiates a new TaskGroupOperationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTaskGroupOperationResponseWithDefaults() *TaskGroupOperationResponse { + this := TaskGroupOperationResponse{} + return &this +} + +// GetTaskGroup returns the TaskGroup field value +func (o *TaskGroupOperationResponse) GetTaskGroup() string { + if o == nil { + var ret string + return ret + } + + return o.TaskGroup +} + +// GetTaskGroupOk returns a tuple with the TaskGroup field value +// and a boolean to check if the value has been set. +func (o *TaskGroupOperationResponse) GetTaskGroupOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TaskGroup, true +} + +// SetTaskGroup sets field value +func (o *TaskGroupOperationResponse) SetTaskGroup(v string) { + o.TaskGroup = v +} + +func (o TaskGroupOperationResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TaskGroupOperationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["task_group"] = o.TaskGroup + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TaskGroupOperationResponse) UnmarshalJSON(bytes []byte) (err error) { + varTaskGroupOperationResponse := _TaskGroupOperationResponse{} + + if err = json.Unmarshal(bytes, &varTaskGroupOperationResponse); err == nil { + *o = TaskGroupOperationResponse(varTaskGroupOperationResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "task_group") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTaskGroupOperationResponse struct { + value *TaskGroupOperationResponse + isSet bool +} + +func (v NullableTaskGroupOperationResponse) Get() *TaskGroupOperationResponse { + return v.value +} + +func (v *NullableTaskGroupOperationResponse) Set(val *TaskGroupOperationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTaskGroupOperationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTaskGroupOperationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaskGroupOperationResponse(val *TaskGroupOperationResponse) *NullableTaskGroupOperationResponse { + return &NullableTaskGroupOperationResponse{value: val, isSet: true} +} + +func (v NullableTaskGroupOperationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaskGroupOperationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_task_group_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_task_group_response.go new file mode 100644 index 0000000000..bbd138654c --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_task_group_response.go @@ -0,0 +1,550 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the TaskGroupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TaskGroupResponse{} + +// TaskGroupResponse Base serializer for use with :class:`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. +type TaskGroupResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // A description of the task group. + Description string `json:"description"` + // Whether all tasks have been spawned for this task group. + AllTasksDispatched bool `json:"all_tasks_dispatched"` + // Number of tasks in the 'waiting' state + Waiting *int64 `json:"waiting,omitempty"` + // Number of tasks in the 'skipped' state + Skipped *int64 `json:"skipped,omitempty"` + // Number of tasks in the 'running' state + Running *int64 `json:"running,omitempty"` + // Number of tasks in the 'completed' state + Completed *int64 `json:"completed,omitempty"` + // Number of tasks in the 'canceled' state + Canceled *int64 `json:"canceled,omitempty"` + // Number of tasks in the 'failed' state + Failed *int64 `json:"failed,omitempty"` + // Number of tasks in the 'canceling' state + Canceling *int64 `json:"canceling,omitempty"` + GroupProgressReports []GroupProgressReportResponse `json:"group_progress_reports,omitempty"` + Tasks []MinimalTaskResponse `json:"tasks,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _TaskGroupResponse TaskGroupResponse + +// NewTaskGroupResponse instantiates a new TaskGroupResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTaskGroupResponse(description string, allTasksDispatched bool) *TaskGroupResponse { + this := TaskGroupResponse{} + this.Description = description + this.AllTasksDispatched = allTasksDispatched + return &this +} + +// NewTaskGroupResponseWithDefaults instantiates a new TaskGroupResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTaskGroupResponseWithDefaults() *TaskGroupResponse { + this := TaskGroupResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *TaskGroupResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskGroupResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *TaskGroupResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *TaskGroupResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetDescription returns the Description field value +func (o *TaskGroupResponse) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *TaskGroupResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *TaskGroupResponse) SetDescription(v string) { + o.Description = v +} + +// GetAllTasksDispatched returns the AllTasksDispatched field value +func (o *TaskGroupResponse) GetAllTasksDispatched() bool { + if o == nil { + var ret bool + return ret + } + + return o.AllTasksDispatched +} + +// GetAllTasksDispatchedOk returns a tuple with the AllTasksDispatched field value +// and a boolean to check if the value has been set. +func (o *TaskGroupResponse) GetAllTasksDispatchedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AllTasksDispatched, true +} + +// SetAllTasksDispatched sets field value +func (o *TaskGroupResponse) SetAllTasksDispatched(v bool) { + o.AllTasksDispatched = v +} + +// GetWaiting returns the Waiting field value if set, zero value otherwise. +func (o *TaskGroupResponse) GetWaiting() int64 { + if o == nil || IsNil(o.Waiting) { + var ret int64 + return ret + } + return *o.Waiting +} + +// GetWaitingOk returns a tuple with the Waiting field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskGroupResponse) GetWaitingOk() (*int64, bool) { + if o == nil || IsNil(o.Waiting) { + return nil, false + } + return o.Waiting, true +} + +// HasWaiting returns a boolean if a field has been set. +func (o *TaskGroupResponse) HasWaiting() bool { + if o != nil && !IsNil(o.Waiting) { + return true + } + + return false +} + +// SetWaiting gets a reference to the given int64 and assigns it to the Waiting field. +func (o *TaskGroupResponse) SetWaiting(v int64) { + o.Waiting = &v +} + +// GetSkipped returns the Skipped field value if set, zero value otherwise. +func (o *TaskGroupResponse) GetSkipped() int64 { + if o == nil || IsNil(o.Skipped) { + var ret int64 + return ret + } + return *o.Skipped +} + +// GetSkippedOk returns a tuple with the Skipped field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskGroupResponse) GetSkippedOk() (*int64, bool) { + if o == nil || IsNil(o.Skipped) { + return nil, false + } + return o.Skipped, true +} + +// HasSkipped returns a boolean if a field has been set. +func (o *TaskGroupResponse) HasSkipped() bool { + if o != nil && !IsNil(o.Skipped) { + return true + } + + return false +} + +// SetSkipped gets a reference to the given int64 and assigns it to the Skipped field. +func (o *TaskGroupResponse) SetSkipped(v int64) { + o.Skipped = &v +} + +// GetRunning returns the Running field value if set, zero value otherwise. +func (o *TaskGroupResponse) GetRunning() int64 { + if o == nil || IsNil(o.Running) { + var ret int64 + return ret + } + return *o.Running +} + +// GetRunningOk returns a tuple with the Running field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskGroupResponse) GetRunningOk() (*int64, bool) { + if o == nil || IsNil(o.Running) { + return nil, false + } + return o.Running, true +} + +// HasRunning returns a boolean if a field has been set. +func (o *TaskGroupResponse) HasRunning() bool { + if o != nil && !IsNil(o.Running) { + return true + } + + return false +} + +// SetRunning gets a reference to the given int64 and assigns it to the Running field. +func (o *TaskGroupResponse) SetRunning(v int64) { + o.Running = &v +} + +// GetCompleted returns the Completed field value if set, zero value otherwise. +func (o *TaskGroupResponse) GetCompleted() int64 { + if o == nil || IsNil(o.Completed) { + var ret int64 + return ret + } + return *o.Completed +} + +// GetCompletedOk returns a tuple with the Completed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskGroupResponse) GetCompletedOk() (*int64, bool) { + if o == nil || IsNil(o.Completed) { + return nil, false + } + return o.Completed, true +} + +// HasCompleted returns a boolean if a field has been set. +func (o *TaskGroupResponse) HasCompleted() bool { + if o != nil && !IsNil(o.Completed) { + return true + } + + return false +} + +// SetCompleted gets a reference to the given int64 and assigns it to the Completed field. +func (o *TaskGroupResponse) SetCompleted(v int64) { + o.Completed = &v +} + +// GetCanceled returns the Canceled field value if set, zero value otherwise. +func (o *TaskGroupResponse) GetCanceled() int64 { + if o == nil || IsNil(o.Canceled) { + var ret int64 + return ret + } + return *o.Canceled +} + +// GetCanceledOk returns a tuple with the Canceled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskGroupResponse) GetCanceledOk() (*int64, bool) { + if o == nil || IsNil(o.Canceled) { + return nil, false + } + return o.Canceled, true +} + +// HasCanceled returns a boolean if a field has been set. +func (o *TaskGroupResponse) HasCanceled() bool { + if o != nil && !IsNil(o.Canceled) { + return true + } + + return false +} + +// SetCanceled gets a reference to the given int64 and assigns it to the Canceled field. +func (o *TaskGroupResponse) SetCanceled(v int64) { + o.Canceled = &v +} + +// GetFailed returns the Failed field value if set, zero value otherwise. +func (o *TaskGroupResponse) GetFailed() int64 { + if o == nil || IsNil(o.Failed) { + var ret int64 + return ret + } + return *o.Failed +} + +// GetFailedOk returns a tuple with the Failed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskGroupResponse) GetFailedOk() (*int64, bool) { + if o == nil || IsNil(o.Failed) { + return nil, false + } + return o.Failed, true +} + +// HasFailed returns a boolean if a field has been set. +func (o *TaskGroupResponse) HasFailed() bool { + if o != nil && !IsNil(o.Failed) { + return true + } + + return false +} + +// SetFailed gets a reference to the given int64 and assigns it to the Failed field. +func (o *TaskGroupResponse) SetFailed(v int64) { + o.Failed = &v +} + +// GetCanceling returns the Canceling field value if set, zero value otherwise. +func (o *TaskGroupResponse) GetCanceling() int64 { + if o == nil || IsNil(o.Canceling) { + var ret int64 + return ret + } + return *o.Canceling +} + +// GetCancelingOk returns a tuple with the Canceling field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskGroupResponse) GetCancelingOk() (*int64, bool) { + if o == nil || IsNil(o.Canceling) { + return nil, false + } + return o.Canceling, true +} + +// HasCanceling returns a boolean if a field has been set. +func (o *TaskGroupResponse) HasCanceling() bool { + if o != nil && !IsNil(o.Canceling) { + return true + } + + return false +} + +// SetCanceling gets a reference to the given int64 and assigns it to the Canceling field. +func (o *TaskGroupResponse) SetCanceling(v int64) { + o.Canceling = &v +} + +// GetGroupProgressReports returns the GroupProgressReports field value if set, zero value otherwise. +func (o *TaskGroupResponse) GetGroupProgressReports() []GroupProgressReportResponse { + if o == nil || IsNil(o.GroupProgressReports) { + var ret []GroupProgressReportResponse + return ret + } + return o.GroupProgressReports +} + +// GetGroupProgressReportsOk returns a tuple with the GroupProgressReports field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskGroupResponse) GetGroupProgressReportsOk() ([]GroupProgressReportResponse, bool) { + if o == nil || IsNil(o.GroupProgressReports) { + return nil, false + } + return o.GroupProgressReports, true +} + +// HasGroupProgressReports returns a boolean if a field has been set. +func (o *TaskGroupResponse) HasGroupProgressReports() bool { + if o != nil && !IsNil(o.GroupProgressReports) { + return true + } + + return false +} + +// SetGroupProgressReports gets a reference to the given []GroupProgressReportResponse and assigns it to the GroupProgressReports field. +func (o *TaskGroupResponse) SetGroupProgressReports(v []GroupProgressReportResponse) { + o.GroupProgressReports = v +} + +// GetTasks returns the Tasks field value if set, zero value otherwise. +func (o *TaskGroupResponse) GetTasks() []MinimalTaskResponse { + if o == nil || IsNil(o.Tasks) { + var ret []MinimalTaskResponse + return ret + } + return o.Tasks +} + +// GetTasksOk returns a tuple with the Tasks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskGroupResponse) GetTasksOk() ([]MinimalTaskResponse, bool) { + if o == nil || IsNil(o.Tasks) { + return nil, false + } + return o.Tasks, true +} + +// HasTasks returns a boolean if a field has been set. +func (o *TaskGroupResponse) HasTasks() bool { + if o != nil && !IsNil(o.Tasks) { + return true + } + + return false +} + +// SetTasks gets a reference to the given []MinimalTaskResponse and assigns it to the Tasks field. +func (o *TaskGroupResponse) SetTasks(v []MinimalTaskResponse) { + o.Tasks = v +} + +func (o TaskGroupResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TaskGroupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + toSerialize["description"] = o.Description + toSerialize["all_tasks_dispatched"] = o.AllTasksDispatched + if !IsNil(o.Waiting) { + toSerialize["waiting"] = o.Waiting + } + if !IsNil(o.Skipped) { + toSerialize["skipped"] = o.Skipped + } + if !IsNil(o.Running) { + toSerialize["running"] = o.Running + } + if !IsNil(o.Completed) { + toSerialize["completed"] = o.Completed + } + if !IsNil(o.Canceled) { + toSerialize["canceled"] = o.Canceled + } + if !IsNil(o.Failed) { + toSerialize["failed"] = o.Failed + } + if !IsNil(o.Canceling) { + toSerialize["canceling"] = o.Canceling + } + if !IsNil(o.GroupProgressReports) { + toSerialize["group_progress_reports"] = o.GroupProgressReports + } + if !IsNil(o.Tasks) { + toSerialize["tasks"] = o.Tasks + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TaskGroupResponse) UnmarshalJSON(bytes []byte) (err error) { + varTaskGroupResponse := _TaskGroupResponse{} + + if err = json.Unmarshal(bytes, &varTaskGroupResponse); err == nil { + *o = TaskGroupResponse(varTaskGroupResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "description") + delete(additionalProperties, "all_tasks_dispatched") + delete(additionalProperties, "waiting") + delete(additionalProperties, "skipped") + delete(additionalProperties, "running") + delete(additionalProperties, "completed") + delete(additionalProperties, "canceled") + delete(additionalProperties, "failed") + delete(additionalProperties, "canceling") + delete(additionalProperties, "group_progress_reports") + delete(additionalProperties, "tasks") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTaskGroupResponse struct { + value *TaskGroupResponse + isSet bool +} + +func (v NullableTaskGroupResponse) Get() *TaskGroupResponse { + return v.value +} + +func (v *NullableTaskGroupResponse) Set(val *TaskGroupResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTaskGroupResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTaskGroupResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaskGroupResponse(val *TaskGroupResponse) *NullableTaskGroupResponse { + return &NullableTaskGroupResponse{value: val, isSet: true} +} + +func (v NullableTaskGroupResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaskGroupResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_task_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_task_response.go new file mode 100644 index 0000000000..7576d3b7cc --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_task_response.go @@ -0,0 +1,704 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the TaskResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TaskResponse{} + +// TaskResponse Base serializer for use with :class:`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. +type TaskResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The current state of the task. The possible values include: 'waiting', 'skipped', 'running', 'completed', 'failed', 'canceled' and 'canceling'. + State *string `json:"state,omitempty"` + // The name of task. + Name string `json:"name"` + // The logging correlation id associated with this task + LoggingCid string `json:"logging_cid"` + // User who dispatched this task. + CreatedBy *string `json:"created_by,omitempty"` + // Timestamp of the when this task started execution. + StartedAt *time.Time `json:"started_at,omitempty"` + // Timestamp of the when this task stopped execution. + FinishedAt *time.Time `json:"finished_at,omitempty"` + // A JSON Object of a fatal error encountered during the execution of this task. + Error map[string]map[string]interface{} `json:"error,omitempty"` + // The worker associated with this task. This field is empty if a worker is not yet assigned. + Worker *string `json:"worker,omitempty"` + // The parent task that spawned this task. + ParentTask *string `json:"parent_task,omitempty"` + // Any tasks spawned by this task. + ChildTasks []string `json:"child_tasks,omitempty"` + // The task group that this task is a member of. + TaskGroup *string `json:"task_group,omitempty"` + ProgressReports []ProgressReportResponse `json:"progress_reports,omitempty"` + // Resources created by this task. + CreatedResources []string `json:"created_resources,omitempty"` + // A list of resources required by that task. + ReservedResourcesRecord []string `json:"reserved_resources_record,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _TaskResponse TaskResponse + +// NewTaskResponse instantiates a new TaskResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTaskResponse(name string, loggingCid string) *TaskResponse { + this := TaskResponse{} + this.Name = name + this.LoggingCid = loggingCid + return &this +} + +// NewTaskResponseWithDefaults instantiates a new TaskResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTaskResponseWithDefaults() *TaskResponse { + this := TaskResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *TaskResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *TaskResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *TaskResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *TaskResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *TaskResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *TaskResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *TaskResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *TaskResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *TaskResponse) SetState(v string) { + o.State = &v +} + +// GetName returns the Name field value +func (o *TaskResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TaskResponse) SetName(v string) { + o.Name = v +} + +// GetLoggingCid returns the LoggingCid field value +func (o *TaskResponse) GetLoggingCid() string { + if o == nil { + var ret string + return ret + } + + return o.LoggingCid +} + +// GetLoggingCidOk returns a tuple with the LoggingCid field value +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetLoggingCidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LoggingCid, true +} + +// SetLoggingCid sets field value +func (o *TaskResponse) SetLoggingCid(v string) { + o.LoggingCid = v +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise. +func (o *TaskResponse) GetCreatedBy() string { + if o == nil || IsNil(o.CreatedBy) { + var ret string + return ret + } + return *o.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetCreatedByOk() (*string, bool) { + if o == nil || IsNil(o.CreatedBy) { + return nil, false + } + return o.CreatedBy, true +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *TaskResponse) HasCreatedBy() bool { + if o != nil && !IsNil(o.CreatedBy) { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field. +func (o *TaskResponse) SetCreatedBy(v string) { + o.CreatedBy = &v +} + +// GetStartedAt returns the StartedAt field value if set, zero value otherwise. +func (o *TaskResponse) GetStartedAt() time.Time { + if o == nil || IsNil(o.StartedAt) { + var ret time.Time + return ret + } + return *o.StartedAt +} + +// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetStartedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.StartedAt) { + return nil, false + } + return o.StartedAt, true +} + +// HasStartedAt returns a boolean if a field has been set. +func (o *TaskResponse) HasStartedAt() bool { + if o != nil && !IsNil(o.StartedAt) { + return true + } + + return false +} + +// SetStartedAt gets a reference to the given time.Time and assigns it to the StartedAt field. +func (o *TaskResponse) SetStartedAt(v time.Time) { + o.StartedAt = &v +} + +// GetFinishedAt returns the FinishedAt field value if set, zero value otherwise. +func (o *TaskResponse) GetFinishedAt() time.Time { + if o == nil || IsNil(o.FinishedAt) { + var ret time.Time + return ret + } + return *o.FinishedAt +} + +// GetFinishedAtOk returns a tuple with the FinishedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetFinishedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.FinishedAt) { + return nil, false + } + return o.FinishedAt, true +} + +// HasFinishedAt returns a boolean if a field has been set. +func (o *TaskResponse) HasFinishedAt() bool { + if o != nil && !IsNil(o.FinishedAt) { + return true + } + + return false +} + +// SetFinishedAt gets a reference to the given time.Time and assigns it to the FinishedAt field. +func (o *TaskResponse) SetFinishedAt(v time.Time) { + o.FinishedAt = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *TaskResponse) GetError() map[string]map[string]interface{} { + if o == nil || IsNil(o.Error) { + var ret map[string]map[string]interface{} + return ret + } + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetErrorOk() (map[string]map[string]interface{}, bool) { + if o == nil || IsNil(o.Error) { + return map[string]map[string]interface{}{}, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *TaskResponse) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given map[string]map[string]interface{} and assigns it to the Error field. +func (o *TaskResponse) SetError(v map[string]map[string]interface{}) { + o.Error = v +} + +// GetWorker returns the Worker field value if set, zero value otherwise. +func (o *TaskResponse) GetWorker() string { + if o == nil || IsNil(o.Worker) { + var ret string + return ret + } + return *o.Worker +} + +// GetWorkerOk returns a tuple with the Worker field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetWorkerOk() (*string, bool) { + if o == nil || IsNil(o.Worker) { + return nil, false + } + return o.Worker, true +} + +// HasWorker returns a boolean if a field has been set. +func (o *TaskResponse) HasWorker() bool { + if o != nil && !IsNil(o.Worker) { + return true + } + + return false +} + +// SetWorker gets a reference to the given string and assigns it to the Worker field. +func (o *TaskResponse) SetWorker(v string) { + o.Worker = &v +} + +// GetParentTask returns the ParentTask field value if set, zero value otherwise. +func (o *TaskResponse) GetParentTask() string { + if o == nil || IsNil(o.ParentTask) { + var ret string + return ret + } + return *o.ParentTask +} + +// GetParentTaskOk returns a tuple with the ParentTask field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetParentTaskOk() (*string, bool) { + if o == nil || IsNil(o.ParentTask) { + return nil, false + } + return o.ParentTask, true +} + +// HasParentTask returns a boolean if a field has been set. +func (o *TaskResponse) HasParentTask() bool { + if o != nil && !IsNil(o.ParentTask) { + return true + } + + return false +} + +// SetParentTask gets a reference to the given string and assigns it to the ParentTask field. +func (o *TaskResponse) SetParentTask(v string) { + o.ParentTask = &v +} + +// GetChildTasks returns the ChildTasks field value if set, zero value otherwise. +func (o *TaskResponse) GetChildTasks() []string { + if o == nil || IsNil(o.ChildTasks) { + var ret []string + return ret + } + return o.ChildTasks +} + +// GetChildTasksOk returns a tuple with the ChildTasks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetChildTasksOk() ([]string, bool) { + if o == nil || IsNil(o.ChildTasks) { + return nil, false + } + return o.ChildTasks, true +} + +// HasChildTasks returns a boolean if a field has been set. +func (o *TaskResponse) HasChildTasks() bool { + if o != nil && !IsNil(o.ChildTasks) { + return true + } + + return false +} + +// SetChildTasks gets a reference to the given []string and assigns it to the ChildTasks field. +func (o *TaskResponse) SetChildTasks(v []string) { + o.ChildTasks = v +} + +// GetTaskGroup returns the TaskGroup field value if set, zero value otherwise. +func (o *TaskResponse) GetTaskGroup() string { + if o == nil || IsNil(o.TaskGroup) { + var ret string + return ret + } + return *o.TaskGroup +} + +// GetTaskGroupOk returns a tuple with the TaskGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetTaskGroupOk() (*string, bool) { + if o == nil || IsNil(o.TaskGroup) { + return nil, false + } + return o.TaskGroup, true +} + +// HasTaskGroup returns a boolean if a field has been set. +func (o *TaskResponse) HasTaskGroup() bool { + if o != nil && !IsNil(o.TaskGroup) { + return true + } + + return false +} + +// SetTaskGroup gets a reference to the given string and assigns it to the TaskGroup field. +func (o *TaskResponse) SetTaskGroup(v string) { + o.TaskGroup = &v +} + +// GetProgressReports returns the ProgressReports field value if set, zero value otherwise. +func (o *TaskResponse) GetProgressReports() []ProgressReportResponse { + if o == nil || IsNil(o.ProgressReports) { + var ret []ProgressReportResponse + return ret + } + return o.ProgressReports +} + +// GetProgressReportsOk returns a tuple with the ProgressReports field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetProgressReportsOk() ([]ProgressReportResponse, bool) { + if o == nil || IsNil(o.ProgressReports) { + return nil, false + } + return o.ProgressReports, true +} + +// HasProgressReports returns a boolean if a field has been set. +func (o *TaskResponse) HasProgressReports() bool { + if o != nil && !IsNil(o.ProgressReports) { + return true + } + + return false +} + +// SetProgressReports gets a reference to the given []ProgressReportResponse and assigns it to the ProgressReports field. +func (o *TaskResponse) SetProgressReports(v []ProgressReportResponse) { + o.ProgressReports = v +} + +// GetCreatedResources returns the CreatedResources field value if set, zero value otherwise. +func (o *TaskResponse) GetCreatedResources() []string { + if o == nil || IsNil(o.CreatedResources) { + var ret []string + return ret + } + return o.CreatedResources +} + +// GetCreatedResourcesOk returns a tuple with the CreatedResources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetCreatedResourcesOk() ([]string, bool) { + if o == nil || IsNil(o.CreatedResources) { + return nil, false + } + return o.CreatedResources, true +} + +// HasCreatedResources returns a boolean if a field has been set. +func (o *TaskResponse) HasCreatedResources() bool { + if o != nil && !IsNil(o.CreatedResources) { + return true + } + + return false +} + +// SetCreatedResources gets a reference to the given []string and assigns it to the CreatedResources field. +func (o *TaskResponse) SetCreatedResources(v []string) { + o.CreatedResources = v +} + +// GetReservedResourcesRecord returns the ReservedResourcesRecord field value if set, zero value otherwise. +func (o *TaskResponse) GetReservedResourcesRecord() []string { + if o == nil || IsNil(o.ReservedResourcesRecord) { + var ret []string + return ret + } + return o.ReservedResourcesRecord +} + +// GetReservedResourcesRecordOk returns a tuple with the ReservedResourcesRecord field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskResponse) GetReservedResourcesRecordOk() ([]string, bool) { + if o == nil || IsNil(o.ReservedResourcesRecord) { + return nil, false + } + return o.ReservedResourcesRecord, true +} + +// HasReservedResourcesRecord returns a boolean if a field has been set. +func (o *TaskResponse) HasReservedResourcesRecord() bool { + if o != nil && !IsNil(o.ReservedResourcesRecord) { + return true + } + + return false +} + +// SetReservedResourcesRecord gets a reference to the given []string and assigns it to the ReservedResourcesRecord field. +func (o *TaskResponse) SetReservedResourcesRecord(v []string) { + o.ReservedResourcesRecord = v +} + +func (o TaskResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TaskResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["name"] = o.Name + toSerialize["logging_cid"] = o.LoggingCid + if !IsNil(o.CreatedBy) { + toSerialize["created_by"] = o.CreatedBy + } + if !IsNil(o.StartedAt) { + toSerialize["started_at"] = o.StartedAt + } + if !IsNil(o.FinishedAt) { + toSerialize["finished_at"] = o.FinishedAt + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Worker) { + toSerialize["worker"] = o.Worker + } + if !IsNil(o.ParentTask) { + toSerialize["parent_task"] = o.ParentTask + } + if !IsNil(o.ChildTasks) { + toSerialize["child_tasks"] = o.ChildTasks + } + if !IsNil(o.TaskGroup) { + toSerialize["task_group"] = o.TaskGroup + } + if !IsNil(o.ProgressReports) { + toSerialize["progress_reports"] = o.ProgressReports + } + if !IsNil(o.CreatedResources) { + toSerialize["created_resources"] = o.CreatedResources + } + if !IsNil(o.ReservedResourcesRecord) { + toSerialize["reserved_resources_record"] = o.ReservedResourcesRecord + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TaskResponse) UnmarshalJSON(bytes []byte) (err error) { + varTaskResponse := _TaskResponse{} + + if err = json.Unmarshal(bytes, &varTaskResponse); err == nil { + *o = TaskResponse(varTaskResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "state") + delete(additionalProperties, "name") + delete(additionalProperties, "logging_cid") + delete(additionalProperties, "created_by") + delete(additionalProperties, "started_at") + delete(additionalProperties, "finished_at") + delete(additionalProperties, "error") + delete(additionalProperties, "worker") + delete(additionalProperties, "parent_task") + delete(additionalProperties, "child_tasks") + delete(additionalProperties, "task_group") + delete(additionalProperties, "progress_reports") + delete(additionalProperties, "created_resources") + delete(additionalProperties, "reserved_resources_record") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTaskResponse struct { + value *TaskResponse + isSet bool +} + +func (v NullableTaskResponse) Get() *TaskResponse { + return v.value +} + +func (v *NullableTaskResponse) Set(val *TaskResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTaskResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTaskResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaskResponse(val *TaskResponse) *NullableTaskResponse { + return &NullableTaskResponse{value: val, isSet: true} +} + +func (v NullableTaskResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaskResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_task_schedule_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_task_schedule_response.go new file mode 100644 index 0000000000..3fbbbf50d6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_task_schedule_response.go @@ -0,0 +1,366 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the TaskScheduleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TaskScheduleResponse{} + +// TaskScheduleResponse Base serializer for use with :class:`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. +type TaskScheduleResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The name of the task schedule. + Name string `json:"name"` + // The name of the task to be scheduled. + TaskName string `json:"task_name"` + // Periodicity of the schedule. + DispatchInterval NullableString `json:"dispatch_interval"` + // Timestamp of the next time the task will be dispatched. + NextDispatch NullableTime `json:"next_dispatch,omitempty"` + // The last task dispatched by this schedule. + LastTask *string `json:"last_task,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _TaskScheduleResponse TaskScheduleResponse + +// NewTaskScheduleResponse instantiates a new TaskScheduleResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTaskScheduleResponse(name string, taskName string, dispatchInterval NullableString) *TaskScheduleResponse { + this := TaskScheduleResponse{} + this.Name = name + this.TaskName = taskName + this.DispatchInterval = dispatchInterval + return &this +} + +// NewTaskScheduleResponseWithDefaults instantiates a new TaskScheduleResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTaskScheduleResponseWithDefaults() *TaskScheduleResponse { + this := TaskScheduleResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *TaskScheduleResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskScheduleResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *TaskScheduleResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *TaskScheduleResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *TaskScheduleResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskScheduleResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *TaskScheduleResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *TaskScheduleResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *TaskScheduleResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TaskScheduleResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TaskScheduleResponse) SetName(v string) { + o.Name = v +} + +// GetTaskName returns the TaskName field value +func (o *TaskScheduleResponse) GetTaskName() string { + if o == nil { + var ret string + return ret + } + + return o.TaskName +} + +// GetTaskNameOk returns a tuple with the TaskName field value +// and a boolean to check if the value has been set. +func (o *TaskScheduleResponse) GetTaskNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TaskName, true +} + +// SetTaskName sets field value +func (o *TaskScheduleResponse) SetTaskName(v string) { + o.TaskName = v +} + +// GetDispatchInterval returns the DispatchInterval field value +// If the value is explicit nil, the zero value for string will be returned +func (o *TaskScheduleResponse) GetDispatchInterval() string { + if o == nil || o.DispatchInterval.Get() == nil { + var ret string + return ret + } + + return *o.DispatchInterval.Get() +} + +// GetDispatchIntervalOk returns a tuple with the DispatchInterval field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TaskScheduleResponse) GetDispatchIntervalOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DispatchInterval.Get(), o.DispatchInterval.IsSet() +} + +// SetDispatchInterval sets field value +func (o *TaskScheduleResponse) SetDispatchInterval(v string) { + o.DispatchInterval.Set(&v) +} + +// GetNextDispatch returns the NextDispatch field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TaskScheduleResponse) GetNextDispatch() time.Time { + if o == nil || IsNil(o.NextDispatch.Get()) { + var ret time.Time + return ret + } + return *o.NextDispatch.Get() +} + +// GetNextDispatchOk returns a tuple with the NextDispatch field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TaskScheduleResponse) GetNextDispatchOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.NextDispatch.Get(), o.NextDispatch.IsSet() +} + +// HasNextDispatch returns a boolean if a field has been set. +func (o *TaskScheduleResponse) HasNextDispatch() bool { + if o != nil && o.NextDispatch.IsSet() { + return true + } + + return false +} + +// SetNextDispatch gets a reference to the given NullableTime and assigns it to the NextDispatch field. +func (o *TaskScheduleResponse) SetNextDispatch(v time.Time) { + o.NextDispatch.Set(&v) +} +// SetNextDispatchNil sets the value for NextDispatch to be an explicit nil +func (o *TaskScheduleResponse) SetNextDispatchNil() { + o.NextDispatch.Set(nil) +} + +// UnsetNextDispatch ensures that no value is present for NextDispatch, not even an explicit nil +func (o *TaskScheduleResponse) UnsetNextDispatch() { + o.NextDispatch.Unset() +} + +// GetLastTask returns the LastTask field value if set, zero value otherwise. +func (o *TaskScheduleResponse) GetLastTask() string { + if o == nil || IsNil(o.LastTask) { + var ret string + return ret + } + return *o.LastTask +} + +// GetLastTaskOk returns a tuple with the LastTask field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TaskScheduleResponse) GetLastTaskOk() (*string, bool) { + if o == nil || IsNil(o.LastTask) { + return nil, false + } + return o.LastTask, true +} + +// HasLastTask returns a boolean if a field has been set. +func (o *TaskScheduleResponse) HasLastTask() bool { + if o != nil && !IsNil(o.LastTask) { + return true + } + + return false +} + +// SetLastTask gets a reference to the given string and assigns it to the LastTask field. +func (o *TaskScheduleResponse) SetLastTask(v string) { + o.LastTask = &v +} + +func (o TaskScheduleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TaskScheduleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["task_name"] = o.TaskName + toSerialize["dispatch_interval"] = o.DispatchInterval.Get() + if o.NextDispatch.IsSet() { + toSerialize["next_dispatch"] = o.NextDispatch.Get() + } + if !IsNil(o.LastTask) { + toSerialize["last_task"] = o.LastTask + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TaskScheduleResponse) UnmarshalJSON(bytes []byte) (err error) { + varTaskScheduleResponse := _TaskScheduleResponse{} + + if err = json.Unmarshal(bytes, &varTaskScheduleResponse); err == nil { + *o = TaskScheduleResponse(varTaskScheduleResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "task_name") + delete(additionalProperties, "dispatch_interval") + delete(additionalProperties, "next_dispatch") + delete(additionalProperties, "last_task") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTaskScheduleResponse struct { + value *TaskScheduleResponse + isSet bool +} + +func (v NullableTaskScheduleResponse) Get() *TaskScheduleResponse { + return v.value +} + +func (v *NullableTaskScheduleResponse) Set(val *TaskScheduleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTaskScheduleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTaskScheduleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTaskScheduleResponse(val *TaskScheduleResponse) *NullableTaskScheduleResponse { + return &NullableTaskScheduleResponse{value: val, isSet: true} +} + +func (v NullableTaskScheduleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTaskScheduleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_un_tag_image.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_un_tag_image.go new file mode 100644 index 0000000000..feec8e3a43 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_un_tag_image.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the UnTagImage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UnTagImage{} + +// UnTagImage A serializer for parsing and validating data associated with a manifest untagging. +type UnTagImage struct { + // A tag name + Tag string `json:"tag"` + AdditionalProperties map[string]interface{} +} + +type _UnTagImage UnTagImage + +// NewUnTagImage instantiates a new UnTagImage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUnTagImage(tag string) *UnTagImage { + this := UnTagImage{} + this.Tag = tag + return &this +} + +// NewUnTagImageWithDefaults instantiates a new UnTagImage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUnTagImageWithDefaults() *UnTagImage { + this := UnTagImage{} + return &this +} + +// GetTag returns the Tag field value +func (o *UnTagImage) GetTag() string { + if o == nil { + var ret string + return ret + } + + return o.Tag +} + +// GetTagOk returns a tuple with the Tag field value +// and a boolean to check if the value has been set. +func (o *UnTagImage) GetTagOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Tag, true +} + +// SetTag sets field value +func (o *UnTagImage) SetTag(v string) { + o.Tag = v +} + +func (o UnTagImage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UnTagImage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["tag"] = o.Tag + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UnTagImage) UnmarshalJSON(bytes []byte) (err error) { + varUnTagImage := _UnTagImage{} + + if err = json.Unmarshal(bytes, &varUnTagImage); err == nil { + *o = UnTagImage(varUnTagImage) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "tag") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUnTagImage struct { + value *UnTagImage + isSet bool +} + +func (v NullableUnTagImage) Get() *UnTagImage { + return v.value +} + +func (v *NullableUnTagImage) Set(val *UnTagImage) { + v.value = val + v.isSet = true +} + +func (v NullableUnTagImage) IsSet() bool { + return v.isSet +} + +func (v *NullableUnTagImage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUnTagImage(val *UnTagImage) *NullableUnTagImage { + return &NullableUnTagImage{value: val, isSet: true} +} + +func (v NullableUnTagImage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUnTagImage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_unpaginated_collection_version_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_unpaginated_collection_version_response.go new file mode 100644 index 0000000000..2700bf2a2a --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_unpaginated_collection_version_response.go @@ -0,0 +1,659 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the UnpaginatedCollectionVersionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UnpaginatedCollectionVersionResponse{} + +// UnpaginatedCollectionVersionResponse A serializer for unpaginated CollectionVersion. +type UnpaginatedCollectionVersionResponse struct { + Version *string `json:"version,omitempty"` + // Get href. + Href *string `json:"href,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + RequiresAnsible NullableString `json:"requires_ansible,omitempty"` + // Get a list of mark values filtering only those in the current repo. + Marks []string `json:"marks,omitempty"` + Artifact *ArtifactRefResponse `json:"artifact,omitempty"` + Collection *CollectionRefResponse `json:"collection,omitempty"` + // Get artifact download URL. + DownloadUrl *string `json:"download_url,omitempty"` + Name *string `json:"name,omitempty"` + Namespace *CollectionNamespaceResponse `json:"namespace,omitempty"` + Signatures []CollectionVersionSignatureResponse `json:"signatures"` + Metadata *CollectionMetadataResponse `json:"metadata,omitempty"` + // Get the git URL. + GitUrl *string `json:"git_url,omitempty"` + // Get the git commit sha. + GitCommitSha *string `json:"git_commit_sha,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UnpaginatedCollectionVersionResponse UnpaginatedCollectionVersionResponse + +// NewUnpaginatedCollectionVersionResponse instantiates a new UnpaginatedCollectionVersionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUnpaginatedCollectionVersionResponse(createdAt time.Time, updatedAt time.Time, signatures []CollectionVersionSignatureResponse) *UnpaginatedCollectionVersionResponse { + this := UnpaginatedCollectionVersionResponse{} + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Signatures = signatures + return &this +} + +// NewUnpaginatedCollectionVersionResponseWithDefaults instantiates a new UnpaginatedCollectionVersionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUnpaginatedCollectionVersionResponseWithDefaults() *UnpaginatedCollectionVersionResponse { + this := UnpaginatedCollectionVersionResponse{} + return &this +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *UnpaginatedCollectionVersionResponse) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *UnpaginatedCollectionVersionResponse) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *UnpaginatedCollectionVersionResponse) SetVersion(v string) { + o.Version = &v +} + +// GetHref returns the Href field value if set, zero value otherwise. +func (o *UnpaginatedCollectionVersionResponse) GetHref() string { + if o == nil || IsNil(o.Href) { + var ret string + return ret + } + return *o.Href +} + +// GetHrefOk returns a tuple with the Href field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetHrefOk() (*string, bool) { + if o == nil || IsNil(o.Href) { + return nil, false + } + return o.Href, true +} + +// HasHref returns a boolean if a field has been set. +func (o *UnpaginatedCollectionVersionResponse) HasHref() bool { + if o != nil && !IsNil(o.Href) { + return true + } + + return false +} + +// SetHref gets a reference to the given string and assigns it to the Href field. +func (o *UnpaginatedCollectionVersionResponse) SetHref(v string) { + o.Href = &v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *UnpaginatedCollectionVersionResponse) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *UnpaginatedCollectionVersionResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *UnpaginatedCollectionVersionResponse) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *UnpaginatedCollectionVersionResponse) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetRequiresAnsible returns the RequiresAnsible field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UnpaginatedCollectionVersionResponse) GetRequiresAnsible() string { + if o == nil || IsNil(o.RequiresAnsible.Get()) { + var ret string + return ret + } + return *o.RequiresAnsible.Get() +} + +// GetRequiresAnsibleOk returns a tuple with the RequiresAnsible field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UnpaginatedCollectionVersionResponse) GetRequiresAnsibleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RequiresAnsible.Get(), o.RequiresAnsible.IsSet() +} + +// HasRequiresAnsible returns a boolean if a field has been set. +func (o *UnpaginatedCollectionVersionResponse) HasRequiresAnsible() bool { + if o != nil && o.RequiresAnsible.IsSet() { + return true + } + + return false +} + +// SetRequiresAnsible gets a reference to the given NullableString and assigns it to the RequiresAnsible field. +func (o *UnpaginatedCollectionVersionResponse) SetRequiresAnsible(v string) { + o.RequiresAnsible.Set(&v) +} +// SetRequiresAnsibleNil sets the value for RequiresAnsible to be an explicit nil +func (o *UnpaginatedCollectionVersionResponse) SetRequiresAnsibleNil() { + o.RequiresAnsible.Set(nil) +} + +// UnsetRequiresAnsible ensures that no value is present for RequiresAnsible, not even an explicit nil +func (o *UnpaginatedCollectionVersionResponse) UnsetRequiresAnsible() { + o.RequiresAnsible.Unset() +} + +// GetMarks returns the Marks field value if set, zero value otherwise. +func (o *UnpaginatedCollectionVersionResponse) GetMarks() []string { + if o == nil || IsNil(o.Marks) { + var ret []string + return ret + } + return o.Marks +} + +// GetMarksOk returns a tuple with the Marks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetMarksOk() ([]string, bool) { + if o == nil || IsNil(o.Marks) { + return nil, false + } + return o.Marks, true +} + +// HasMarks returns a boolean if a field has been set. +func (o *UnpaginatedCollectionVersionResponse) HasMarks() bool { + if o != nil && !IsNil(o.Marks) { + return true + } + + return false +} + +// SetMarks gets a reference to the given []string and assigns it to the Marks field. +func (o *UnpaginatedCollectionVersionResponse) SetMarks(v []string) { + o.Marks = v +} + +// GetArtifact returns the Artifact field value if set, zero value otherwise. +func (o *UnpaginatedCollectionVersionResponse) GetArtifact() ArtifactRefResponse { + if o == nil || IsNil(o.Artifact) { + var ret ArtifactRefResponse + return ret + } + return *o.Artifact +} + +// GetArtifactOk returns a tuple with the Artifact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetArtifactOk() (*ArtifactRefResponse, bool) { + if o == nil || IsNil(o.Artifact) { + return nil, false + } + return o.Artifact, true +} + +// HasArtifact returns a boolean if a field has been set. +func (o *UnpaginatedCollectionVersionResponse) HasArtifact() bool { + if o != nil && !IsNil(o.Artifact) { + return true + } + + return false +} + +// SetArtifact gets a reference to the given ArtifactRefResponse and assigns it to the Artifact field. +func (o *UnpaginatedCollectionVersionResponse) SetArtifact(v ArtifactRefResponse) { + o.Artifact = &v +} + +// GetCollection returns the Collection field value if set, zero value otherwise. +func (o *UnpaginatedCollectionVersionResponse) GetCollection() CollectionRefResponse { + if o == nil || IsNil(o.Collection) { + var ret CollectionRefResponse + return ret + } + return *o.Collection +} + +// GetCollectionOk returns a tuple with the Collection field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetCollectionOk() (*CollectionRefResponse, bool) { + if o == nil || IsNil(o.Collection) { + return nil, false + } + return o.Collection, true +} + +// HasCollection returns a boolean if a field has been set. +func (o *UnpaginatedCollectionVersionResponse) HasCollection() bool { + if o != nil && !IsNil(o.Collection) { + return true + } + + return false +} + +// SetCollection gets a reference to the given CollectionRefResponse and assigns it to the Collection field. +func (o *UnpaginatedCollectionVersionResponse) SetCollection(v CollectionRefResponse) { + o.Collection = &v +} + +// GetDownloadUrl returns the DownloadUrl field value if set, zero value otherwise. +func (o *UnpaginatedCollectionVersionResponse) GetDownloadUrl() string { + if o == nil || IsNil(o.DownloadUrl) { + var ret string + return ret + } + return *o.DownloadUrl +} + +// GetDownloadUrlOk returns a tuple with the DownloadUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetDownloadUrlOk() (*string, bool) { + if o == nil || IsNil(o.DownloadUrl) { + return nil, false + } + return o.DownloadUrl, true +} + +// HasDownloadUrl returns a boolean if a field has been set. +func (o *UnpaginatedCollectionVersionResponse) HasDownloadUrl() bool { + if o != nil && !IsNil(o.DownloadUrl) { + return true + } + + return false +} + +// SetDownloadUrl gets a reference to the given string and assigns it to the DownloadUrl field. +func (o *UnpaginatedCollectionVersionResponse) SetDownloadUrl(v string) { + o.DownloadUrl = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UnpaginatedCollectionVersionResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UnpaginatedCollectionVersionResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UnpaginatedCollectionVersionResponse) SetName(v string) { + o.Name = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *UnpaginatedCollectionVersionResponse) GetNamespace() CollectionNamespaceResponse { + if o == nil || IsNil(o.Namespace) { + var ret CollectionNamespaceResponse + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetNamespaceOk() (*CollectionNamespaceResponse, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *UnpaginatedCollectionVersionResponse) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given CollectionNamespaceResponse and assigns it to the Namespace field. +func (o *UnpaginatedCollectionVersionResponse) SetNamespace(v CollectionNamespaceResponse) { + o.Namespace = &v +} + +// GetSignatures returns the Signatures field value +func (o *UnpaginatedCollectionVersionResponse) GetSignatures() []CollectionVersionSignatureResponse { + if o == nil { + var ret []CollectionVersionSignatureResponse + return ret + } + + return o.Signatures +} + +// GetSignaturesOk returns a tuple with the Signatures field value +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetSignaturesOk() ([]CollectionVersionSignatureResponse, bool) { + if o == nil { + return nil, false + } + return o.Signatures, true +} + +// SetSignatures sets field value +func (o *UnpaginatedCollectionVersionResponse) SetSignatures(v []CollectionVersionSignatureResponse) { + o.Signatures = v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *UnpaginatedCollectionVersionResponse) GetMetadata() CollectionMetadataResponse { + if o == nil || IsNil(o.Metadata) { + var ret CollectionMetadataResponse + return ret + } + return *o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetMetadataOk() (*CollectionMetadataResponse, bool) { + if o == nil || IsNil(o.Metadata) { + return nil, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *UnpaginatedCollectionVersionResponse) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given CollectionMetadataResponse and assigns it to the Metadata field. +func (o *UnpaginatedCollectionVersionResponse) SetMetadata(v CollectionMetadataResponse) { + o.Metadata = &v +} + +// GetGitUrl returns the GitUrl field value if set, zero value otherwise. +func (o *UnpaginatedCollectionVersionResponse) GetGitUrl() string { + if o == nil || IsNil(o.GitUrl) { + var ret string + return ret + } + return *o.GitUrl +} + +// GetGitUrlOk returns a tuple with the GitUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetGitUrlOk() (*string, bool) { + if o == nil || IsNil(o.GitUrl) { + return nil, false + } + return o.GitUrl, true +} + +// HasGitUrl returns a boolean if a field has been set. +func (o *UnpaginatedCollectionVersionResponse) HasGitUrl() bool { + if o != nil && !IsNil(o.GitUrl) { + return true + } + + return false +} + +// SetGitUrl gets a reference to the given string and assigns it to the GitUrl field. +func (o *UnpaginatedCollectionVersionResponse) SetGitUrl(v string) { + o.GitUrl = &v +} + +// GetGitCommitSha returns the GitCommitSha field value if set, zero value otherwise. +func (o *UnpaginatedCollectionVersionResponse) GetGitCommitSha() string { + if o == nil || IsNil(o.GitCommitSha) { + var ret string + return ret + } + return *o.GitCommitSha +} + +// GetGitCommitShaOk returns a tuple with the GitCommitSha field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnpaginatedCollectionVersionResponse) GetGitCommitShaOk() (*string, bool) { + if o == nil || IsNil(o.GitCommitSha) { + return nil, false + } + return o.GitCommitSha, true +} + +// HasGitCommitSha returns a boolean if a field has been set. +func (o *UnpaginatedCollectionVersionResponse) HasGitCommitSha() bool { + if o != nil && !IsNil(o.GitCommitSha) { + return true + } + + return false +} + +// SetGitCommitSha gets a reference to the given string and assigns it to the GitCommitSha field. +func (o *UnpaginatedCollectionVersionResponse) SetGitCommitSha(v string) { + o.GitCommitSha = &v +} + +func (o UnpaginatedCollectionVersionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UnpaginatedCollectionVersionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + if !IsNil(o.Href) { + toSerialize["href"] = o.Href + } + toSerialize["created_at"] = o.CreatedAt + toSerialize["updated_at"] = o.UpdatedAt + if o.RequiresAnsible.IsSet() { + toSerialize["requires_ansible"] = o.RequiresAnsible.Get() + } + if !IsNil(o.Marks) { + toSerialize["marks"] = o.Marks + } + if !IsNil(o.Artifact) { + toSerialize["artifact"] = o.Artifact + } + if !IsNil(o.Collection) { + toSerialize["collection"] = o.Collection + } + if !IsNil(o.DownloadUrl) { + toSerialize["download_url"] = o.DownloadUrl + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + toSerialize["signatures"] = o.Signatures + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !IsNil(o.GitUrl) { + toSerialize["git_url"] = o.GitUrl + } + if !IsNil(o.GitCommitSha) { + toSerialize["git_commit_sha"] = o.GitCommitSha + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UnpaginatedCollectionVersionResponse) UnmarshalJSON(bytes []byte) (err error) { + varUnpaginatedCollectionVersionResponse := _UnpaginatedCollectionVersionResponse{} + + if err = json.Unmarshal(bytes, &varUnpaginatedCollectionVersionResponse); err == nil { + *o = UnpaginatedCollectionVersionResponse(varUnpaginatedCollectionVersionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "version") + delete(additionalProperties, "href") + delete(additionalProperties, "created_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "requires_ansible") + delete(additionalProperties, "marks") + delete(additionalProperties, "artifact") + delete(additionalProperties, "collection") + delete(additionalProperties, "download_url") + delete(additionalProperties, "name") + delete(additionalProperties, "namespace") + delete(additionalProperties, "signatures") + delete(additionalProperties, "metadata") + delete(additionalProperties, "git_url") + delete(additionalProperties, "git_commit_sha") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUnpaginatedCollectionVersionResponse struct { + value *UnpaginatedCollectionVersionResponse + isSet bool +} + +func (v NullableUnpaginatedCollectionVersionResponse) Get() *UnpaginatedCollectionVersionResponse { + return v.value +} + +func (v *NullableUnpaginatedCollectionVersionResponse) Set(val *UnpaginatedCollectionVersionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUnpaginatedCollectionVersionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUnpaginatedCollectionVersionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUnpaginatedCollectionVersionResponse(val *UnpaginatedCollectionVersionResponse) *NullableUnpaginatedCollectionVersionResponse { + return &NullableUnpaginatedCollectionVersionResponse{value: val, isSet: true} +} + +func (v NullableUnpaginatedCollectionVersionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUnpaginatedCollectionVersionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload.go new file mode 100644 index 0000000000..566f6901ab --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the Upload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Upload{} + +// Upload Serializer for chunked uploads. +type Upload struct { + // The size of the upload in bytes. + Size int64 `json:"size"` + AdditionalProperties map[string]interface{} +} + +type _Upload Upload + +// NewUpload instantiates a new Upload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpload(size int64) *Upload { + this := Upload{} + this.Size = size + return &this +} + +// NewUploadWithDefaults instantiates a new Upload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUploadWithDefaults() *Upload { + this := Upload{} + return &this +} + +// GetSize returns the Size field value +func (o *Upload) GetSize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *Upload) GetSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Size, true +} + +// SetSize sets field value +func (o *Upload) SetSize(v int64) { + o.Size = v +} + +func (o Upload) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Upload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["size"] = o.Size + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Upload) UnmarshalJSON(bytes []byte) (err error) { + varUpload := _Upload{} + + if err = json.Unmarshal(bytes, &varUpload); err == nil { + *o = Upload(varUpload) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "size") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpload struct { + value *Upload + isSet bool +} + +func (v NullableUpload) Get() *Upload { + return v.value +} + +func (v *NullableUpload) Set(val *Upload) { + v.value = val + v.isSet = true +} + +func (v NullableUpload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpload(val *Upload) *NullableUpload { + return &NullableUpload{value: val, isSet: true} +} + +func (v NullableUpload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_chunk.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_chunk.go new file mode 100644 index 0000000000..06c876fcc5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_chunk.go @@ -0,0 +1,193 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "os" +) + +// checks if the UploadChunk type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UploadChunk{} + +// UploadChunk A mixin for validating unknown serializers' fields. +type UploadChunk struct { + // A chunk of the uploaded file. + File *os.File `json:"file"` + // The SHA-256 checksum of the chunk if available. + Sha256 NullableString `json:"sha256,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UploadChunk UploadChunk + +// NewUploadChunk instantiates a new UploadChunk object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUploadChunk(file *os.File) *UploadChunk { + this := UploadChunk{} + this.File = file + return &this +} + +// NewUploadChunkWithDefaults instantiates a new UploadChunk object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUploadChunkWithDefaults() *UploadChunk { + this := UploadChunk{} + return &this +} + +// GetFile returns the File field value +func (o *UploadChunk) GetFile() *os.File { + if o == nil { + var ret *os.File + return ret + } + + return o.File +} + +// GetFileOk returns a tuple with the File field value +// and a boolean to check if the value has been set. +func (o *UploadChunk) GetFileOk() (**os.File, bool) { + if o == nil { + return nil, false + } + return &o.File, true +} + +// SetFile sets field value +func (o *UploadChunk) SetFile(v *os.File) { + o.File = v +} + +// GetSha256 returns the Sha256 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UploadChunk) GetSha256() string { + if o == nil || IsNil(o.Sha256.Get()) { + var ret string + return ret + } + return *o.Sha256.Get() +} + +// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UploadChunk) GetSha256Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Sha256.Get(), o.Sha256.IsSet() +} + +// HasSha256 returns a boolean if a field has been set. +func (o *UploadChunk) HasSha256() bool { + if o != nil && o.Sha256.IsSet() { + return true + } + + return false +} + +// SetSha256 gets a reference to the given NullableString and assigns it to the Sha256 field. +func (o *UploadChunk) SetSha256(v string) { + o.Sha256.Set(&v) +} +// SetSha256Nil sets the value for Sha256 to be an explicit nil +func (o *UploadChunk) SetSha256Nil() { + o.Sha256.Set(nil) +} + +// UnsetSha256 ensures that no value is present for Sha256, not even an explicit nil +func (o *UploadChunk) UnsetSha256() { + o.Sha256.Unset() +} + +func (o UploadChunk) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UploadChunk) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["file"] = o.File + if o.Sha256.IsSet() { + toSerialize["sha256"] = o.Sha256.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UploadChunk) UnmarshalJSON(bytes []byte) (err error) { + varUploadChunk := _UploadChunk{} + + if err = json.Unmarshal(bytes, &varUploadChunk); err == nil { + *o = UploadChunk(varUploadChunk) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "file") + delete(additionalProperties, "sha256") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUploadChunk struct { + value *UploadChunk + isSet bool +} + +func (v NullableUploadChunk) Get() *UploadChunk { + return v.value +} + +func (v *NullableUploadChunk) Set(val *UploadChunk) { + v.value = val + v.isSet = true +} + +func (v NullableUploadChunk) IsSet() bool { + return v.isSet +} + +func (v *NullableUploadChunk) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUploadChunk(val *UploadChunk) *NullableUploadChunk { + return &NullableUploadChunk{value: val, isSet: true} +} + +func (v NullableUploadChunk) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUploadChunk) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_chunk_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_chunk_response.go new file mode 100644 index 0000000000..ab8d3cc49e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_chunk_response.go @@ -0,0 +1,189 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the UploadChunkResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UploadChunkResponse{} + +// UploadChunkResponse A mixin for validating unknown serializers' fields. +type UploadChunkResponse struct { + Offset *int64 `json:"offset,omitempty"` + Size *int64 `json:"size,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UploadChunkResponse UploadChunkResponse + +// NewUploadChunkResponse instantiates a new UploadChunkResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUploadChunkResponse() *UploadChunkResponse { + this := UploadChunkResponse{} + return &this +} + +// NewUploadChunkResponseWithDefaults instantiates a new UploadChunkResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUploadChunkResponseWithDefaults() *UploadChunkResponse { + this := UploadChunkResponse{} + return &this +} + +// GetOffset returns the Offset field value if set, zero value otherwise. +func (o *UploadChunkResponse) GetOffset() int64 { + if o == nil || IsNil(o.Offset) { + var ret int64 + return ret + } + return *o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UploadChunkResponse) GetOffsetOk() (*int64, bool) { + if o == nil || IsNil(o.Offset) { + return nil, false + } + return o.Offset, true +} + +// HasOffset returns a boolean if a field has been set. +func (o *UploadChunkResponse) HasOffset() bool { + if o != nil && !IsNil(o.Offset) { + return true + } + + return false +} + +// SetOffset gets a reference to the given int64 and assigns it to the Offset field. +func (o *UploadChunkResponse) SetOffset(v int64) { + o.Offset = &v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *UploadChunkResponse) GetSize() int64 { + if o == nil || IsNil(o.Size) { + var ret int64 + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UploadChunkResponse) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *UploadChunkResponse) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *UploadChunkResponse) SetSize(v int64) { + o.Size = &v +} + +func (o UploadChunkResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UploadChunkResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Offset) { + toSerialize["offset"] = o.Offset + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UploadChunkResponse) UnmarshalJSON(bytes []byte) (err error) { + varUploadChunkResponse := _UploadChunkResponse{} + + if err = json.Unmarshal(bytes, &varUploadChunkResponse); err == nil { + *o = UploadChunkResponse(varUploadChunkResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "offset") + delete(additionalProperties, "size") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUploadChunkResponse struct { + value *UploadChunkResponse + isSet bool +} + +func (v NullableUploadChunkResponse) Get() *UploadChunkResponse { + return v.value +} + +func (v *NullableUploadChunkResponse) Set(val *UploadChunkResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUploadChunkResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUploadChunkResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUploadChunkResponse(val *UploadChunkResponse) *NullableUploadChunkResponse { + return &NullableUploadChunkResponse{value: val, isSet: true} +} + +func (v NullableUploadChunkResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUploadChunkResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_commit.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_commit.go new file mode 100644 index 0000000000..09a5599811 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_commit.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the UploadCommit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UploadCommit{} + +// UploadCommit A mixin for validating unknown serializers' fields. +type UploadCommit struct { + // The expected sha256 checksum for the file. + Sha256 string `json:"sha256"` + AdditionalProperties map[string]interface{} +} + +type _UploadCommit UploadCommit + +// NewUploadCommit instantiates a new UploadCommit object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUploadCommit(sha256 string) *UploadCommit { + this := UploadCommit{} + this.Sha256 = sha256 + return &this +} + +// NewUploadCommitWithDefaults instantiates a new UploadCommit object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUploadCommitWithDefaults() *UploadCommit { + this := UploadCommit{} + return &this +} + +// GetSha256 returns the Sha256 field value +func (o *UploadCommit) GetSha256() string { + if o == nil { + var ret string + return ret + } + + return o.Sha256 +} + +// GetSha256Ok returns a tuple with the Sha256 field value +// and a boolean to check if the value has been set. +func (o *UploadCommit) GetSha256Ok() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Sha256, true +} + +// SetSha256 sets field value +func (o *UploadCommit) SetSha256(v string) { + o.Sha256 = v +} + +func (o UploadCommit) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UploadCommit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["sha256"] = o.Sha256 + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UploadCommit) UnmarshalJSON(bytes []byte) (err error) { + varUploadCommit := _UploadCommit{} + + if err = json.Unmarshal(bytes, &varUploadCommit); err == nil { + *o = UploadCommit(varUploadCommit) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "sha256") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUploadCommit struct { + value *UploadCommit + isSet bool +} + +func (v NullableUploadCommit) Get() *UploadCommit { + return v.value +} + +func (v *NullableUploadCommit) Set(val *UploadCommit) { + v.value = val + v.isSet = true +} + +func (v NullableUploadCommit) IsSet() bool { + return v.isSet +} + +func (v *NullableUploadCommit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUploadCommit(val *UploadCommit) *NullableUploadCommit { + return &NullableUploadCommit{value: val, isSet: true} +} + +func (v NullableUploadCommit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUploadCommit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_detail_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_detail_response.go new file mode 100644 index 0000000000..76064c546e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_detail_response.go @@ -0,0 +1,295 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the UploadDetailResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UploadDetailResponse{} + +// UploadDetailResponse Serializer for chunked uploads. +type UploadDetailResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The size of the upload in bytes. + Size int64 `json:"size"` + // Timestamp when upload is committed. + Completed *time.Time `json:"completed,omitempty"` + Chunks []UploadChunkResponse `json:"chunks,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UploadDetailResponse UploadDetailResponse + +// NewUploadDetailResponse instantiates a new UploadDetailResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUploadDetailResponse(size int64) *UploadDetailResponse { + this := UploadDetailResponse{} + this.Size = size + return &this +} + +// NewUploadDetailResponseWithDefaults instantiates a new UploadDetailResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUploadDetailResponseWithDefaults() *UploadDetailResponse { + this := UploadDetailResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *UploadDetailResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UploadDetailResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *UploadDetailResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *UploadDetailResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *UploadDetailResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UploadDetailResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *UploadDetailResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *UploadDetailResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetSize returns the Size field value +func (o *UploadDetailResponse) GetSize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *UploadDetailResponse) GetSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Size, true +} + +// SetSize sets field value +func (o *UploadDetailResponse) SetSize(v int64) { + o.Size = v +} + +// GetCompleted returns the Completed field value if set, zero value otherwise. +func (o *UploadDetailResponse) GetCompleted() time.Time { + if o == nil || IsNil(o.Completed) { + var ret time.Time + return ret + } + return *o.Completed +} + +// GetCompletedOk returns a tuple with the Completed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UploadDetailResponse) GetCompletedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Completed) { + return nil, false + } + return o.Completed, true +} + +// HasCompleted returns a boolean if a field has been set. +func (o *UploadDetailResponse) HasCompleted() bool { + if o != nil && !IsNil(o.Completed) { + return true + } + + return false +} + +// SetCompleted gets a reference to the given time.Time and assigns it to the Completed field. +func (o *UploadDetailResponse) SetCompleted(v time.Time) { + o.Completed = &v +} + +// GetChunks returns the Chunks field value if set, zero value otherwise. +func (o *UploadDetailResponse) GetChunks() []UploadChunkResponse { + if o == nil || IsNil(o.Chunks) { + var ret []UploadChunkResponse + return ret + } + return o.Chunks +} + +// GetChunksOk returns a tuple with the Chunks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UploadDetailResponse) GetChunksOk() ([]UploadChunkResponse, bool) { + if o == nil || IsNil(o.Chunks) { + return nil, false + } + return o.Chunks, true +} + +// HasChunks returns a boolean if a field has been set. +func (o *UploadDetailResponse) HasChunks() bool { + if o != nil && !IsNil(o.Chunks) { + return true + } + + return false +} + +// SetChunks gets a reference to the given []UploadChunkResponse and assigns it to the Chunks field. +func (o *UploadDetailResponse) SetChunks(v []UploadChunkResponse) { + o.Chunks = v +} + +func (o UploadDetailResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UploadDetailResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["size"] = o.Size + if !IsNil(o.Completed) { + toSerialize["completed"] = o.Completed + } + if !IsNil(o.Chunks) { + toSerialize["chunks"] = o.Chunks + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UploadDetailResponse) UnmarshalJSON(bytes []byte) (err error) { + varUploadDetailResponse := _UploadDetailResponse{} + + if err = json.Unmarshal(bytes, &varUploadDetailResponse); err == nil { + *o = UploadDetailResponse(varUploadDetailResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "size") + delete(additionalProperties, "completed") + delete(additionalProperties, "chunks") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUploadDetailResponse struct { + value *UploadDetailResponse + isSet bool +} + +func (v NullableUploadDetailResponse) Get() *UploadDetailResponse { + return v.value +} + +func (v *NullableUploadDetailResponse) Set(val *UploadDetailResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUploadDetailResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUploadDetailResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUploadDetailResponse(val *UploadDetailResponse) *NullableUploadDetailResponse { + return &NullableUploadDetailResponse{value: val, isSet: true} +} + +func (v NullableUploadDetailResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUploadDetailResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_response.go new file mode 100644 index 0000000000..671a1c8cb5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upload_response.go @@ -0,0 +1,258 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the UploadResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UploadResponse{} + +// UploadResponse Serializer for chunked uploads. +type UploadResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The size of the upload in bytes. + Size int64 `json:"size"` + // Timestamp when upload is committed. + Completed *time.Time `json:"completed,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UploadResponse UploadResponse + +// NewUploadResponse instantiates a new UploadResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUploadResponse(size int64) *UploadResponse { + this := UploadResponse{} + this.Size = size + return &this +} + +// NewUploadResponseWithDefaults instantiates a new UploadResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUploadResponseWithDefaults() *UploadResponse { + this := UploadResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *UploadResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UploadResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *UploadResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *UploadResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *UploadResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UploadResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *UploadResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *UploadResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetSize returns the Size field value +func (o *UploadResponse) GetSize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *UploadResponse) GetSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Size, true +} + +// SetSize sets field value +func (o *UploadResponse) SetSize(v int64) { + o.Size = v +} + +// GetCompleted returns the Completed field value if set, zero value otherwise. +func (o *UploadResponse) GetCompleted() time.Time { + if o == nil || IsNil(o.Completed) { + var ret time.Time + return ret + } + return *o.Completed +} + +// GetCompletedOk returns a tuple with the Completed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UploadResponse) GetCompletedOk() (*time.Time, bool) { + if o == nil || IsNil(o.Completed) { + return nil, false + } + return o.Completed, true +} + +// HasCompleted returns a boolean if a field has been set. +func (o *UploadResponse) HasCompleted() bool { + if o != nil && !IsNil(o.Completed) { + return true + } + + return false +} + +// SetCompleted gets a reference to the given time.Time and assigns it to the Completed field. +func (o *UploadResponse) SetCompleted(v time.Time) { + o.Completed = &v +} + +func (o UploadResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UploadResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["size"] = o.Size + if !IsNil(o.Completed) { + toSerialize["completed"] = o.Completed + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UploadResponse) UnmarshalJSON(bytes []byte) (err error) { + varUploadResponse := _UploadResponse{} + + if err = json.Unmarshal(bytes, &varUploadResponse); err == nil { + *o = UploadResponse(varUploadResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "size") + delete(additionalProperties, "completed") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUploadResponse struct { + value *UploadResponse + isSet bool +} + +func (v NullableUploadResponse) Get() *UploadResponse { + return v.value +} + +func (v *NullableUploadResponse) Set(val *UploadResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUploadResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUploadResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUploadResponse(val *UploadResponse) *NullableUploadResponse { + return &NullableUploadResponse{value: val, isSet: true} +} + +func (v NullableUploadResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUploadResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_upstream_pulp.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upstream_pulp.go new file mode 100644 index 0000000000..12372832e2 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upstream_pulp.go @@ -0,0 +1,576 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the UpstreamPulp type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpstreamPulp{} + +// UpstreamPulp Serializer for a Server. +type UpstreamPulp struct { + // A unique name for this Pulp server. + Name string `json:"name"` + // The transport, hostname, and an optional port of the Pulp server. e.g. https://example.com + BaseUrl string `json:"base_url"` + // The API root. Defaults to '/pulp/'. + ApiRoot string `json:"api_root"` + // The domain of the Pulp server if enabled. + Domain NullableString `json:"domain,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // A PEM encoded private key used for authentication. + ClientKey NullableString `json:"client_key,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // The username to be used for authentication when syncing. + Username NullableString `json:"username,omitempty"` + // The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. + Password NullableString `json:"password,omitempty"` + // One or more comma separated labels that will be used to filter distributions on the upstream Pulp. E.g. \"foo=bar,key=val\" or \"foo,key\" + PulpLabelSelect NullableString `json:"pulp_label_select,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpstreamPulp UpstreamPulp + +// NewUpstreamPulp instantiates a new UpstreamPulp object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpstreamPulp(name string, baseUrl string, apiRoot string) *UpstreamPulp { + this := UpstreamPulp{} + this.Name = name + this.BaseUrl = baseUrl + this.ApiRoot = apiRoot + return &this +} + +// NewUpstreamPulpWithDefaults instantiates a new UpstreamPulp object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpstreamPulpWithDefaults() *UpstreamPulp { + this := UpstreamPulp{} + return &this +} + +// GetName returns the Name field value +func (o *UpstreamPulp) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpstreamPulp) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpstreamPulp) SetName(v string) { + o.Name = v +} + +// GetBaseUrl returns the BaseUrl field value +func (o *UpstreamPulp) GetBaseUrl() string { + if o == nil { + var ret string + return ret + } + + return o.BaseUrl +} + +// GetBaseUrlOk returns a tuple with the BaseUrl field value +// and a boolean to check if the value has been set. +func (o *UpstreamPulp) GetBaseUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BaseUrl, true +} + +// SetBaseUrl sets field value +func (o *UpstreamPulp) SetBaseUrl(v string) { + o.BaseUrl = v +} + +// GetApiRoot returns the ApiRoot field value +func (o *UpstreamPulp) GetApiRoot() string { + if o == nil { + var ret string + return ret + } + + return o.ApiRoot +} + +// GetApiRootOk returns a tuple with the ApiRoot field value +// and a boolean to check if the value has been set. +func (o *UpstreamPulp) GetApiRootOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiRoot, true +} + +// SetApiRoot sets field value +func (o *UpstreamPulp) SetApiRoot(v string) { + o.ApiRoot = v +} + +// GetDomain returns the Domain field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamPulp) GetDomain() string { + if o == nil || IsNil(o.Domain.Get()) { + var ret string + return ret + } + return *o.Domain.Get() +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamPulp) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Domain.Get(), o.Domain.IsSet() +} + +// HasDomain returns a boolean if a field has been set. +func (o *UpstreamPulp) HasDomain() bool { + if o != nil && o.Domain.IsSet() { + return true + } + + return false +} + +// SetDomain gets a reference to the given NullableString and assigns it to the Domain field. +func (o *UpstreamPulp) SetDomain(v string) { + o.Domain.Set(&v) +} +// SetDomainNil sets the value for Domain to be an explicit nil +func (o *UpstreamPulp) SetDomainNil() { + o.Domain.Set(nil) +} + +// UnsetDomain ensures that no value is present for Domain, not even an explicit nil +func (o *UpstreamPulp) UnsetDomain() { + o.Domain.Unset() +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamPulp) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamPulp) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *UpstreamPulp) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *UpstreamPulp) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *UpstreamPulp) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *UpstreamPulp) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamPulp) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamPulp) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *UpstreamPulp) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *UpstreamPulp) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *UpstreamPulp) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *UpstreamPulp) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetClientKey returns the ClientKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamPulp) GetClientKey() string { + if o == nil || IsNil(o.ClientKey.Get()) { + var ret string + return ret + } + return *o.ClientKey.Get() +} + +// GetClientKeyOk returns a tuple with the ClientKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamPulp) GetClientKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientKey.Get(), o.ClientKey.IsSet() +} + +// HasClientKey returns a boolean if a field has been set. +func (o *UpstreamPulp) HasClientKey() bool { + if o != nil && o.ClientKey.IsSet() { + return true + } + + return false +} + +// SetClientKey gets a reference to the given NullableString and assigns it to the ClientKey field. +func (o *UpstreamPulp) SetClientKey(v string) { + o.ClientKey.Set(&v) +} +// SetClientKeyNil sets the value for ClientKey to be an explicit nil +func (o *UpstreamPulp) SetClientKeyNil() { + o.ClientKey.Set(nil) +} + +// UnsetClientKey ensures that no value is present for ClientKey, not even an explicit nil +func (o *UpstreamPulp) UnsetClientKey() { + o.ClientKey.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *UpstreamPulp) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamPulp) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *UpstreamPulp) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *UpstreamPulp) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamPulp) GetUsername() string { + if o == nil || IsNil(o.Username.Get()) { + var ret string + return ret + } + return *o.Username.Get() +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamPulp) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username.Get(), o.Username.IsSet() +} + +// HasUsername returns a boolean if a field has been set. +func (o *UpstreamPulp) HasUsername() bool { + if o != nil && o.Username.IsSet() { + return true + } + + return false +} + +// SetUsername gets a reference to the given NullableString and assigns it to the Username field. +func (o *UpstreamPulp) SetUsername(v string) { + o.Username.Set(&v) +} +// SetUsernameNil sets the value for Username to be an explicit nil +func (o *UpstreamPulp) SetUsernameNil() { + o.Username.Set(nil) +} + +// UnsetUsername ensures that no value is present for Username, not even an explicit nil +func (o *UpstreamPulp) UnsetUsername() { + o.Username.Unset() +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamPulp) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamPulp) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *UpstreamPulp) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *UpstreamPulp) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *UpstreamPulp) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *UpstreamPulp) UnsetPassword() { + o.Password.Unset() +} + +// GetPulpLabelSelect returns the PulpLabelSelect field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamPulp) GetPulpLabelSelect() string { + if o == nil || IsNil(o.PulpLabelSelect.Get()) { + var ret string + return ret + } + return *o.PulpLabelSelect.Get() +} + +// GetPulpLabelSelectOk returns a tuple with the PulpLabelSelect field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamPulp) GetPulpLabelSelectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PulpLabelSelect.Get(), o.PulpLabelSelect.IsSet() +} + +// HasPulpLabelSelect returns a boolean if a field has been set. +func (o *UpstreamPulp) HasPulpLabelSelect() bool { + if o != nil && o.PulpLabelSelect.IsSet() { + return true + } + + return false +} + +// SetPulpLabelSelect gets a reference to the given NullableString and assigns it to the PulpLabelSelect field. +func (o *UpstreamPulp) SetPulpLabelSelect(v string) { + o.PulpLabelSelect.Set(&v) +} +// SetPulpLabelSelectNil sets the value for PulpLabelSelect to be an explicit nil +func (o *UpstreamPulp) SetPulpLabelSelectNil() { + o.PulpLabelSelect.Set(nil) +} + +// UnsetPulpLabelSelect ensures that no value is present for PulpLabelSelect, not even an explicit nil +func (o *UpstreamPulp) UnsetPulpLabelSelect() { + o.PulpLabelSelect.Unset() +} + +func (o UpstreamPulp) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpstreamPulp) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["base_url"] = o.BaseUrl + toSerialize["api_root"] = o.ApiRoot + if o.Domain.IsSet() { + toSerialize["domain"] = o.Domain.Get() + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if o.ClientKey.IsSet() { + toSerialize["client_key"] = o.ClientKey.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if o.Username.IsSet() { + toSerialize["username"] = o.Username.Get() + } + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if o.PulpLabelSelect.IsSet() { + toSerialize["pulp_label_select"] = o.PulpLabelSelect.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpstreamPulp) UnmarshalJSON(bytes []byte) (err error) { + varUpstreamPulp := _UpstreamPulp{} + + if err = json.Unmarshal(bytes, &varUpstreamPulp); err == nil { + *o = UpstreamPulp(varUpstreamPulp) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "base_url") + delete(additionalProperties, "api_root") + delete(additionalProperties, "domain") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "client_key") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "pulp_label_select") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpstreamPulp struct { + value *UpstreamPulp + isSet bool +} + +func (v NullableUpstreamPulp) Get() *UpstreamPulp { + return v.value +} + +func (v *NullableUpstreamPulp) Set(val *UpstreamPulp) { + v.value = val + v.isSet = true +} + +func (v NullableUpstreamPulp) IsSet() bool { + return v.isSet +} + +func (v *NullableUpstreamPulp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpstreamPulp(val *UpstreamPulp) *NullableUpstreamPulp { + return &NullableUpstreamPulp{value: val, isSet: true} +} + +func (v NullableUpstreamPulp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpstreamPulp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_upstream_pulp_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upstream_pulp_response.go new file mode 100644 index 0000000000..bb9c688b64 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_upstream_pulp_response.go @@ -0,0 +1,584 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the UpstreamPulpResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpstreamPulpResponse{} + +// UpstreamPulpResponse Serializer for a Server. +type UpstreamPulpResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // A unique name for this Pulp server. + Name string `json:"name"` + // The transport, hostname, and an optional port of the Pulp server. e.g. https://example.com + BaseUrl string `json:"base_url"` + // The API root. Defaults to '/pulp/'. + ApiRoot string `json:"api_root"` + // The domain of the Pulp server if enabled. + Domain NullableString `json:"domain,omitempty"` + // A PEM encoded CA certificate used to validate the server certificate presented by the remote server. + CaCert NullableString `json:"ca_cert,omitempty"` + // A PEM encoded client certificate used for authentication. + ClientCert NullableString `json:"client_cert,omitempty"` + // If True, TLS peer validation must be performed. + TlsValidation *bool `json:"tls_validation,omitempty"` + // Timestamp of the most recent update of the remote. + PulpLastUpdated *time.Time `json:"pulp_last_updated,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + // One or more comma separated labels that will be used to filter distributions on the upstream Pulp. E.g. \"foo=bar,key=val\" or \"foo,key\" + PulpLabelSelect NullableString `json:"pulp_label_select,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpstreamPulpResponse UpstreamPulpResponse + +// NewUpstreamPulpResponse instantiates a new UpstreamPulpResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpstreamPulpResponse(name string, baseUrl string, apiRoot string) *UpstreamPulpResponse { + this := UpstreamPulpResponse{} + this.Name = name + this.BaseUrl = baseUrl + this.ApiRoot = apiRoot + return &this +} + +// NewUpstreamPulpResponseWithDefaults instantiates a new UpstreamPulpResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpstreamPulpResponseWithDefaults() *UpstreamPulpResponse { + this := UpstreamPulpResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *UpstreamPulpResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamPulpResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *UpstreamPulpResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *UpstreamPulpResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *UpstreamPulpResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamPulpResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *UpstreamPulpResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *UpstreamPulpResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value +func (o *UpstreamPulpResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpstreamPulpResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpstreamPulpResponse) SetName(v string) { + o.Name = v +} + +// GetBaseUrl returns the BaseUrl field value +func (o *UpstreamPulpResponse) GetBaseUrl() string { + if o == nil { + var ret string + return ret + } + + return o.BaseUrl +} + +// GetBaseUrlOk returns a tuple with the BaseUrl field value +// and a boolean to check if the value has been set. +func (o *UpstreamPulpResponse) GetBaseUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BaseUrl, true +} + +// SetBaseUrl sets field value +func (o *UpstreamPulpResponse) SetBaseUrl(v string) { + o.BaseUrl = v +} + +// GetApiRoot returns the ApiRoot field value +func (o *UpstreamPulpResponse) GetApiRoot() string { + if o == nil { + var ret string + return ret + } + + return o.ApiRoot +} + +// GetApiRootOk returns a tuple with the ApiRoot field value +// and a boolean to check if the value has been set. +func (o *UpstreamPulpResponse) GetApiRootOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiRoot, true +} + +// SetApiRoot sets field value +func (o *UpstreamPulpResponse) SetApiRoot(v string) { + o.ApiRoot = v +} + +// GetDomain returns the Domain field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamPulpResponse) GetDomain() string { + if o == nil || IsNil(o.Domain.Get()) { + var ret string + return ret + } + return *o.Domain.Get() +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamPulpResponse) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Domain.Get(), o.Domain.IsSet() +} + +// HasDomain returns a boolean if a field has been set. +func (o *UpstreamPulpResponse) HasDomain() bool { + if o != nil && o.Domain.IsSet() { + return true + } + + return false +} + +// SetDomain gets a reference to the given NullableString and assigns it to the Domain field. +func (o *UpstreamPulpResponse) SetDomain(v string) { + o.Domain.Set(&v) +} +// SetDomainNil sets the value for Domain to be an explicit nil +func (o *UpstreamPulpResponse) SetDomainNil() { + o.Domain.Set(nil) +} + +// UnsetDomain ensures that no value is present for Domain, not even an explicit nil +func (o *UpstreamPulpResponse) UnsetDomain() { + o.Domain.Unset() +} + +// GetCaCert returns the CaCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamPulpResponse) GetCaCert() string { + if o == nil || IsNil(o.CaCert.Get()) { + var ret string + return ret + } + return *o.CaCert.Get() +} + +// GetCaCertOk returns a tuple with the CaCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamPulpResponse) GetCaCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CaCert.Get(), o.CaCert.IsSet() +} + +// HasCaCert returns a boolean if a field has been set. +func (o *UpstreamPulpResponse) HasCaCert() bool { + if o != nil && o.CaCert.IsSet() { + return true + } + + return false +} + +// SetCaCert gets a reference to the given NullableString and assigns it to the CaCert field. +func (o *UpstreamPulpResponse) SetCaCert(v string) { + o.CaCert.Set(&v) +} +// SetCaCertNil sets the value for CaCert to be an explicit nil +func (o *UpstreamPulpResponse) SetCaCertNil() { + o.CaCert.Set(nil) +} + +// UnsetCaCert ensures that no value is present for CaCert, not even an explicit nil +func (o *UpstreamPulpResponse) UnsetCaCert() { + o.CaCert.Unset() +} + +// GetClientCert returns the ClientCert field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamPulpResponse) GetClientCert() string { + if o == nil || IsNil(o.ClientCert.Get()) { + var ret string + return ret + } + return *o.ClientCert.Get() +} + +// GetClientCertOk returns a tuple with the ClientCert field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamPulpResponse) GetClientCertOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientCert.Get(), o.ClientCert.IsSet() +} + +// HasClientCert returns a boolean if a field has been set. +func (o *UpstreamPulpResponse) HasClientCert() bool { + if o != nil && o.ClientCert.IsSet() { + return true + } + + return false +} + +// SetClientCert gets a reference to the given NullableString and assigns it to the ClientCert field. +func (o *UpstreamPulpResponse) SetClientCert(v string) { + o.ClientCert.Set(&v) +} +// SetClientCertNil sets the value for ClientCert to be an explicit nil +func (o *UpstreamPulpResponse) SetClientCertNil() { + o.ClientCert.Set(nil) +} + +// UnsetClientCert ensures that no value is present for ClientCert, not even an explicit nil +func (o *UpstreamPulpResponse) UnsetClientCert() { + o.ClientCert.Unset() +} + +// GetTlsValidation returns the TlsValidation field value if set, zero value otherwise. +func (o *UpstreamPulpResponse) GetTlsValidation() bool { + if o == nil || IsNil(o.TlsValidation) { + var ret bool + return ret + } + return *o.TlsValidation +} + +// GetTlsValidationOk returns a tuple with the TlsValidation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamPulpResponse) GetTlsValidationOk() (*bool, bool) { + if o == nil || IsNil(o.TlsValidation) { + return nil, false + } + return o.TlsValidation, true +} + +// HasTlsValidation returns a boolean if a field has been set. +func (o *UpstreamPulpResponse) HasTlsValidation() bool { + if o != nil && !IsNil(o.TlsValidation) { + return true + } + + return false +} + +// SetTlsValidation gets a reference to the given bool and assigns it to the TlsValidation field. +func (o *UpstreamPulpResponse) SetTlsValidation(v bool) { + o.TlsValidation = &v +} + +// GetPulpLastUpdated returns the PulpLastUpdated field value if set, zero value otherwise. +func (o *UpstreamPulpResponse) GetPulpLastUpdated() time.Time { + if o == nil || IsNil(o.PulpLastUpdated) { + var ret time.Time + return ret + } + return *o.PulpLastUpdated +} + +// GetPulpLastUpdatedOk returns a tuple with the PulpLastUpdated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamPulpResponse) GetPulpLastUpdatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpLastUpdated) { + return nil, false + } + return o.PulpLastUpdated, true +} + +// HasPulpLastUpdated returns a boolean if a field has been set. +func (o *UpstreamPulpResponse) HasPulpLastUpdated() bool { + if o != nil && !IsNil(o.PulpLastUpdated) { + return true + } + + return false +} + +// SetPulpLastUpdated gets a reference to the given time.Time and assigns it to the PulpLastUpdated field. +func (o *UpstreamPulpResponse) SetPulpLastUpdated(v time.Time) { + o.PulpLastUpdated = &v +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *UpstreamPulpResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamPulpResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *UpstreamPulpResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *UpstreamPulpResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +// GetPulpLabelSelect returns the PulpLabelSelect field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpstreamPulpResponse) GetPulpLabelSelect() string { + if o == nil || IsNil(o.PulpLabelSelect.Get()) { + var ret string + return ret + } + return *o.PulpLabelSelect.Get() +} + +// GetPulpLabelSelectOk returns a tuple with the PulpLabelSelect field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UpstreamPulpResponse) GetPulpLabelSelectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PulpLabelSelect.Get(), o.PulpLabelSelect.IsSet() +} + +// HasPulpLabelSelect returns a boolean if a field has been set. +func (o *UpstreamPulpResponse) HasPulpLabelSelect() bool { + if o != nil && o.PulpLabelSelect.IsSet() { + return true + } + + return false +} + +// SetPulpLabelSelect gets a reference to the given NullableString and assigns it to the PulpLabelSelect field. +func (o *UpstreamPulpResponse) SetPulpLabelSelect(v string) { + o.PulpLabelSelect.Set(&v) +} +// SetPulpLabelSelectNil sets the value for PulpLabelSelect to be an explicit nil +func (o *UpstreamPulpResponse) SetPulpLabelSelectNil() { + o.PulpLabelSelect.Set(nil) +} + +// UnsetPulpLabelSelect ensures that no value is present for PulpLabelSelect, not even an explicit nil +func (o *UpstreamPulpResponse) UnsetPulpLabelSelect() { + o.PulpLabelSelect.Unset() +} + +func (o UpstreamPulpResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpstreamPulpResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["name"] = o.Name + toSerialize["base_url"] = o.BaseUrl + toSerialize["api_root"] = o.ApiRoot + if o.Domain.IsSet() { + toSerialize["domain"] = o.Domain.Get() + } + if o.CaCert.IsSet() { + toSerialize["ca_cert"] = o.CaCert.Get() + } + if o.ClientCert.IsSet() { + toSerialize["client_cert"] = o.ClientCert.Get() + } + if !IsNil(o.TlsValidation) { + toSerialize["tls_validation"] = o.TlsValidation + } + if !IsNil(o.PulpLastUpdated) { + toSerialize["pulp_last_updated"] = o.PulpLastUpdated + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + if o.PulpLabelSelect.IsSet() { + toSerialize["pulp_label_select"] = o.PulpLabelSelect.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpstreamPulpResponse) UnmarshalJSON(bytes []byte) (err error) { + varUpstreamPulpResponse := _UpstreamPulpResponse{} + + if err = json.Unmarshal(bytes, &varUpstreamPulpResponse); err == nil { + *o = UpstreamPulpResponse(varUpstreamPulpResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "base_url") + delete(additionalProperties, "api_root") + delete(additionalProperties, "domain") + delete(additionalProperties, "ca_cert") + delete(additionalProperties, "client_cert") + delete(additionalProperties, "tls_validation") + delete(additionalProperties, "pulp_last_updated") + delete(additionalProperties, "hidden_fields") + delete(additionalProperties, "pulp_label_select") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpstreamPulpResponse struct { + value *UpstreamPulpResponse + isSet bool +} + +func (v NullableUpstreamPulpResponse) Get() *UpstreamPulpResponse { + return v.value +} + +func (v *NullableUpstreamPulpResponse) Set(val *UpstreamPulpResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpstreamPulpResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpstreamPulpResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpstreamPulpResponse(val *UpstreamPulpResponse) *NullableUpstreamPulpResponse { + return &NullableUpstreamPulpResponse{value: val, isSet: true} +} + +func (v NullableUpstreamPulpResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpstreamPulpResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_user.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_user.go new file mode 100644 index 0000000000..f1ba6aca13 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_user.go @@ -0,0 +1,390 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + +// User Serializer for User. +type User struct { + // Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + Username string `json:"username"` + // Users password. Set to ``null`` to disable password authentication. + Password NullableString `json:"password,omitempty"` + // First name + FirstName *string `json:"first_name,omitempty"` + // Last name + LastName *string `json:"last_name,omitempty"` + // Email address + Email *string `json:"email,omitempty"` + // Designates whether the user can log into this admin site. + IsStaff *bool `json:"is_staff,omitempty"` + // Designates whether this user should be treated as active. + IsActive *bool `json:"is_active,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _User User + +// NewUser instantiates a new User object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUser(username string) *User { + this := User{} + this.Username = username + var isStaff bool = false + this.IsStaff = &isStaff + var isActive bool = true + this.IsActive = &isActive + return &this +} + +// NewUserWithDefaults instantiates a new User object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserWithDefaults() *User { + this := User{} + var isStaff bool = false + this.IsStaff = &isStaff + var isActive bool = true + this.IsActive = &isActive + return &this +} + +// GetUsername returns the Username field value +func (o *User) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *User) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *User) SetUsername(v string) { + o.Username = v +} + +// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *User) GetPassword() string { + if o == nil || IsNil(o.Password.Get()) { + var ret string + return ret + } + return *o.Password.Get() +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *User) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Password.Get(), o.Password.IsSet() +} + +// HasPassword returns a boolean if a field has been set. +func (o *User) HasPassword() bool { + if o != nil && o.Password.IsSet() { + return true + } + + return false +} + +// SetPassword gets a reference to the given NullableString and assigns it to the Password field. +func (o *User) SetPassword(v string) { + o.Password.Set(&v) +} +// SetPasswordNil sets the value for Password to be an explicit nil +func (o *User) SetPasswordNil() { + o.Password.Set(nil) +} + +// UnsetPassword ensures that no value is present for Password, not even an explicit nil +func (o *User) UnsetPassword() { + o.Password.Unset() +} + +// GetFirstName returns the FirstName field value if set, zero value otherwise. +func (o *User) GetFirstName() string { + if o == nil || IsNil(o.FirstName) { + var ret string + return ret + } + return *o.FirstName +} + +// GetFirstNameOk returns a tuple with the FirstName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetFirstNameOk() (*string, bool) { + if o == nil || IsNil(o.FirstName) { + return nil, false + } + return o.FirstName, true +} + +// HasFirstName returns a boolean if a field has been set. +func (o *User) HasFirstName() bool { + if o != nil && !IsNil(o.FirstName) { + return true + } + + return false +} + +// SetFirstName gets a reference to the given string and assigns it to the FirstName field. +func (o *User) SetFirstName(v string) { + o.FirstName = &v +} + +// GetLastName returns the LastName field value if set, zero value otherwise. +func (o *User) GetLastName() string { + if o == nil || IsNil(o.LastName) { + var ret string + return ret + } + return *o.LastName +} + +// GetLastNameOk returns a tuple with the LastName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLastNameOk() (*string, bool) { + if o == nil || IsNil(o.LastName) { + return nil, false + } + return o.LastName, true +} + +// HasLastName returns a boolean if a field has been set. +func (o *User) HasLastName() bool { + if o != nil && !IsNil(o.LastName) { + return true + } + + return false +} + +// SetLastName gets a reference to the given string and assigns it to the LastName field. +func (o *User) SetLastName(v string) { + o.LastName = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *User) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *User) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *User) SetEmail(v string) { + o.Email = &v +} + +// GetIsStaff returns the IsStaff field value if set, zero value otherwise. +func (o *User) GetIsStaff() bool { + if o == nil || IsNil(o.IsStaff) { + var ret bool + return ret + } + return *o.IsStaff +} + +// GetIsStaffOk returns a tuple with the IsStaff field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetIsStaffOk() (*bool, bool) { + if o == nil || IsNil(o.IsStaff) { + return nil, false + } + return o.IsStaff, true +} + +// HasIsStaff returns a boolean if a field has been set. +func (o *User) HasIsStaff() bool { + if o != nil && !IsNil(o.IsStaff) { + return true + } + + return false +} + +// SetIsStaff gets a reference to the given bool and assigns it to the IsStaff field. +func (o *User) SetIsStaff(v bool) { + o.IsStaff = &v +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise. +func (o *User) GetIsActive() bool { + if o == nil || IsNil(o.IsActive) { + var ret bool + return ret + } + return *o.IsActive +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetIsActiveOk() (*bool, bool) { + if o == nil || IsNil(o.IsActive) { + return nil, false + } + return o.IsActive, true +} + +// HasIsActive returns a boolean if a field has been set. +func (o *User) HasIsActive() bool { + if o != nil && !IsNil(o.IsActive) { + return true + } + + return false +} + +// SetIsActive gets a reference to the given bool and assigns it to the IsActive field. +func (o *User) SetIsActive(v bool) { + o.IsActive = &v +} + +func (o User) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o User) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + if o.Password.IsSet() { + toSerialize["password"] = o.Password.Get() + } + if !IsNil(o.FirstName) { + toSerialize["first_name"] = o.FirstName + } + if !IsNil(o.LastName) { + toSerialize["last_name"] = o.LastName + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.IsStaff) { + toSerialize["is_staff"] = o.IsStaff + } + if !IsNil(o.IsActive) { + toSerialize["is_active"] = o.IsActive + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *User) UnmarshalJSON(bytes []byte) (err error) { + varUser := _User{} + + if err = json.Unmarshal(bytes, &varUser); err == nil { + *o = User(varUser) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "first_name") + delete(additionalProperties, "last_name") + delete(additionalProperties, "email") + delete(additionalProperties, "is_staff") + delete(additionalProperties, "is_active") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUser struct { + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} +} + +func (v NullableUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_group.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_group.go new file mode 100644 index 0000000000..826d64296f --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_group.go @@ -0,0 +1,144 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the UserGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserGroup{} + +// UserGroup Serializer for Groups that belong to an User. +type UserGroup struct { + // Name. + Name string `json:"name"` + AdditionalProperties map[string]interface{} +} + +type _UserGroup UserGroup + +// NewUserGroup instantiates a new UserGroup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserGroup(name string) *UserGroup { + this := UserGroup{} + this.Name = name + return &this +} + +// NewUserGroupWithDefaults instantiates a new UserGroup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserGroupWithDefaults() *UserGroup { + this := UserGroup{} + return &this +} + +// GetName returns the Name field value +func (o *UserGroup) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UserGroup) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UserGroup) SetName(v string) { + o.Name = v +} + +func (o UserGroup) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UserGroup) UnmarshalJSON(bytes []byte) (err error) { + varUserGroup := _UserGroup{} + + if err = json.Unmarshal(bytes, &varUserGroup); err == nil { + *o = UserGroup(varUserGroup) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUserGroup struct { + value *UserGroup + isSet bool +} + +func (v NullableUserGroup) Get() *UserGroup { + return v.value +} + +func (v *NullableUserGroup) Set(val *UserGroup) { + v.value = val + v.isSet = true +} + +func (v NullableUserGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableUserGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserGroup(val *UserGroup) *NullableUserGroup { + return &NullableUserGroup{value: val, isSet: true} +} + +func (v NullableUserGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_group_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_group_response.go new file mode 100644 index 0000000000..3c12bc1dcf --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_group_response.go @@ -0,0 +1,181 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the UserGroupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserGroupResponse{} + +// UserGroupResponse Serializer for Groups that belong to an User. +type UserGroupResponse struct { + // Name. + Name string `json:"name"` + PulpHref *string `json:"pulp_href,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UserGroupResponse UserGroupResponse + +// NewUserGroupResponse instantiates a new UserGroupResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserGroupResponse(name string) *UserGroupResponse { + this := UserGroupResponse{} + this.Name = name + return &this +} + +// NewUserGroupResponseWithDefaults instantiates a new UserGroupResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserGroupResponseWithDefaults() *UserGroupResponse { + this := UserGroupResponse{} + return &this +} + +// GetName returns the Name field value +func (o *UserGroupResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UserGroupResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UserGroupResponse) SetName(v string) { + o.Name = v +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *UserGroupResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserGroupResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *UserGroupResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *UserGroupResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +func (o UserGroupResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserGroupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UserGroupResponse) UnmarshalJSON(bytes []byte) (err error) { + varUserGroupResponse := _UserGroupResponse{} + + if err = json.Unmarshal(bytes, &varUserGroupResponse); err == nil { + *o = UserGroupResponse(varUserGroupResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "pulp_href") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUserGroupResponse struct { + value *UserGroupResponse + isSet bool +} + +func (v NullableUserGroupResponse) Get() *UserGroupResponse { + return v.value +} + +func (v *NullableUserGroupResponse) Set(val *UserGroupResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUserGroupResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUserGroupResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserGroupResponse(val *UserGroupResponse) *NullableUserGroupResponse { + return &NullableUserGroupResponse{value: val, isSet: true} +} + +func (v NullableUserGroupResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserGroupResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_response.go new file mode 100644 index 0000000000..965e2fb5e8 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_response.go @@ -0,0 +1,530 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the UserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserResponse{} + +// UserResponse Serializer for User. +type UserResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + Id *int64 `json:"id,omitempty"` + // Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. + Username string `json:"username"` + // First name + FirstName *string `json:"first_name,omitempty"` + // Last name + LastName *string `json:"last_name,omitempty"` + // Email address + Email *string `json:"email,omitempty"` + // Designates whether the user can log into this admin site. + IsStaff *bool `json:"is_staff,omitempty"` + // Designates whether this user should be treated as active. + IsActive *bool `json:"is_active,omitempty"` + // Date joined + DateJoined *time.Time `json:"date_joined,omitempty"` + Groups []UserGroupResponse `json:"groups,omitempty"` + // List of hidden (write only) fields + HiddenFields []RemoteResponseHiddenFieldsInner `json:"hidden_fields,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UserResponse UserResponse + +// NewUserResponse instantiates a new UserResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserResponse(username string) *UserResponse { + this := UserResponse{} + this.Username = username + var isStaff bool = false + this.IsStaff = &isStaff + var isActive bool = true + this.IsActive = &isActive + return &this +} + +// NewUserResponseWithDefaults instantiates a new UserResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserResponseWithDefaults() *UserResponse { + this := UserResponse{} + var isStaff bool = false + this.IsStaff = &isStaff + var isActive bool = true + this.IsActive = &isActive + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *UserResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *UserResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *UserResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *UserResponse) GetId() int64 { + if o == nil || IsNil(o.Id) { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *UserResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *UserResponse) SetId(v int64) { + o.Id = &v +} + +// GetUsername returns the Username field value +func (o *UserResponse) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *UserResponse) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *UserResponse) SetUsername(v string) { + o.Username = v +} + +// GetFirstName returns the FirstName field value if set, zero value otherwise. +func (o *UserResponse) GetFirstName() string { + if o == nil || IsNil(o.FirstName) { + var ret string + return ret + } + return *o.FirstName +} + +// GetFirstNameOk returns a tuple with the FirstName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetFirstNameOk() (*string, bool) { + if o == nil || IsNil(o.FirstName) { + return nil, false + } + return o.FirstName, true +} + +// HasFirstName returns a boolean if a field has been set. +func (o *UserResponse) HasFirstName() bool { + if o != nil && !IsNil(o.FirstName) { + return true + } + + return false +} + +// SetFirstName gets a reference to the given string and assigns it to the FirstName field. +func (o *UserResponse) SetFirstName(v string) { + o.FirstName = &v +} + +// GetLastName returns the LastName field value if set, zero value otherwise. +func (o *UserResponse) GetLastName() string { + if o == nil || IsNil(o.LastName) { + var ret string + return ret + } + return *o.LastName +} + +// GetLastNameOk returns a tuple with the LastName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetLastNameOk() (*string, bool) { + if o == nil || IsNil(o.LastName) { + return nil, false + } + return o.LastName, true +} + +// HasLastName returns a boolean if a field has been set. +func (o *UserResponse) HasLastName() bool { + if o != nil && !IsNil(o.LastName) { + return true + } + + return false +} + +// SetLastName gets a reference to the given string and assigns it to the LastName field. +func (o *UserResponse) SetLastName(v string) { + o.LastName = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *UserResponse) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *UserResponse) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *UserResponse) SetEmail(v string) { + o.Email = &v +} + +// GetIsStaff returns the IsStaff field value if set, zero value otherwise. +func (o *UserResponse) GetIsStaff() bool { + if o == nil || IsNil(o.IsStaff) { + var ret bool + return ret + } + return *o.IsStaff +} + +// GetIsStaffOk returns a tuple with the IsStaff field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetIsStaffOk() (*bool, bool) { + if o == nil || IsNil(o.IsStaff) { + return nil, false + } + return o.IsStaff, true +} + +// HasIsStaff returns a boolean if a field has been set. +func (o *UserResponse) HasIsStaff() bool { + if o != nil && !IsNil(o.IsStaff) { + return true + } + + return false +} + +// SetIsStaff gets a reference to the given bool and assigns it to the IsStaff field. +func (o *UserResponse) SetIsStaff(v bool) { + o.IsStaff = &v +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise. +func (o *UserResponse) GetIsActive() bool { + if o == nil || IsNil(o.IsActive) { + var ret bool + return ret + } + return *o.IsActive +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetIsActiveOk() (*bool, bool) { + if o == nil || IsNil(o.IsActive) { + return nil, false + } + return o.IsActive, true +} + +// HasIsActive returns a boolean if a field has been set. +func (o *UserResponse) HasIsActive() bool { + if o != nil && !IsNil(o.IsActive) { + return true + } + + return false +} + +// SetIsActive gets a reference to the given bool and assigns it to the IsActive field. +func (o *UserResponse) SetIsActive(v bool) { + o.IsActive = &v +} + +// GetDateJoined returns the DateJoined field value if set, zero value otherwise. +func (o *UserResponse) GetDateJoined() time.Time { + if o == nil || IsNil(o.DateJoined) { + var ret time.Time + return ret + } + return *o.DateJoined +} + +// GetDateJoinedOk returns a tuple with the DateJoined field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetDateJoinedOk() (*time.Time, bool) { + if o == nil || IsNil(o.DateJoined) { + return nil, false + } + return o.DateJoined, true +} + +// HasDateJoined returns a boolean if a field has been set. +func (o *UserResponse) HasDateJoined() bool { + if o != nil && !IsNil(o.DateJoined) { + return true + } + + return false +} + +// SetDateJoined gets a reference to the given time.Time and assigns it to the DateJoined field. +func (o *UserResponse) SetDateJoined(v time.Time) { + o.DateJoined = &v +} + +// GetGroups returns the Groups field value if set, zero value otherwise. +func (o *UserResponse) GetGroups() []UserGroupResponse { + if o == nil || IsNil(o.Groups) { + var ret []UserGroupResponse + return ret + } + return o.Groups +} + +// GetGroupsOk returns a tuple with the Groups field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetGroupsOk() ([]UserGroupResponse, bool) { + if o == nil || IsNil(o.Groups) { + return nil, false + } + return o.Groups, true +} + +// HasGroups returns a boolean if a field has been set. +func (o *UserResponse) HasGroups() bool { + if o != nil && !IsNil(o.Groups) { + return true + } + + return false +} + +// SetGroups gets a reference to the given []UserGroupResponse and assigns it to the Groups field. +func (o *UserResponse) SetGroups(v []UserGroupResponse) { + o.Groups = v +} + +// GetHiddenFields returns the HiddenFields field value if set, zero value otherwise. +func (o *UserResponse) GetHiddenFields() []RemoteResponseHiddenFieldsInner { + if o == nil || IsNil(o.HiddenFields) { + var ret []RemoteResponseHiddenFieldsInner + return ret + } + return o.HiddenFields +} + +// GetHiddenFieldsOk returns a tuple with the HiddenFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetHiddenFieldsOk() ([]RemoteResponseHiddenFieldsInner, bool) { + if o == nil || IsNil(o.HiddenFields) { + return nil, false + } + return o.HiddenFields, true +} + +// HasHiddenFields returns a boolean if a field has been set. +func (o *UserResponse) HasHiddenFields() bool { + if o != nil && !IsNil(o.HiddenFields) { + return true + } + + return false +} + +// SetHiddenFields gets a reference to the given []RemoteResponseHiddenFieldsInner and assigns it to the HiddenFields field. +func (o *UserResponse) SetHiddenFields(v []RemoteResponseHiddenFieldsInner) { + o.HiddenFields = v +} + +func (o UserResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["username"] = o.Username + if !IsNil(o.FirstName) { + toSerialize["first_name"] = o.FirstName + } + if !IsNil(o.LastName) { + toSerialize["last_name"] = o.LastName + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.IsStaff) { + toSerialize["is_staff"] = o.IsStaff + } + if !IsNil(o.IsActive) { + toSerialize["is_active"] = o.IsActive + } + if !IsNil(o.DateJoined) { + toSerialize["date_joined"] = o.DateJoined + } + if !IsNil(o.Groups) { + toSerialize["groups"] = o.Groups + } + if !IsNil(o.HiddenFields) { + toSerialize["hidden_fields"] = o.HiddenFields + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UserResponse) UnmarshalJSON(bytes []byte) (err error) { + varUserResponse := _UserResponse{} + + if err = json.Unmarshal(bytes, &varUserResponse); err == nil { + *o = UserResponse(varUserResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "id") + delete(additionalProperties, "username") + delete(additionalProperties, "first_name") + delete(additionalProperties, "last_name") + delete(additionalProperties, "email") + delete(additionalProperties, "is_staff") + delete(additionalProperties, "is_active") + delete(additionalProperties, "date_joined") + delete(additionalProperties, "groups") + delete(additionalProperties, "hidden_fields") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUserResponse struct { + value *UserResponse + isSet bool +} + +func (v NullableUserResponse) Get() *UserResponse { + return v.value +} + +func (v *NullableUserResponse) Set(val *UserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserResponse(val *UserResponse) *NullableUserResponse { + return &NullableUserResponse{value: val, isSet: true} +} + +func (v NullableUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_role.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_role.go new file mode 100644 index 0000000000..a027f2335b --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_role.go @@ -0,0 +1,222 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the UserRole type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserRole{} + +// UserRole Serializer for UserRole. +type UserRole struct { + Role string `json:"role"` + // pulp_href of the object for which role permissions should be asserted. If set to 'null', permissions will act on either domain or model-level. + ContentObject NullableString `json:"content_object"` + // Domain this role should be applied on, mutually exclusive with content_object. + Domain NullableString `json:"domain,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UserRole UserRole + +// NewUserRole instantiates a new UserRole object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserRole(role string, contentObject NullableString) *UserRole { + this := UserRole{} + this.Role = role + this.ContentObject = contentObject + return &this +} + +// NewUserRoleWithDefaults instantiates a new UserRole object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserRoleWithDefaults() *UserRole { + this := UserRole{} + return &this +} + +// GetRole returns the Role field value +func (o *UserRole) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *UserRole) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *UserRole) SetRole(v string) { + o.Role = v +} + +// GetContentObject returns the ContentObject field value +// If the value is explicit nil, the zero value for string will be returned +func (o *UserRole) GetContentObject() string { + if o == nil || o.ContentObject.Get() == nil { + var ret string + return ret + } + + return *o.ContentObject.Get() +} + +// GetContentObjectOk returns a tuple with the ContentObject field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserRole) GetContentObjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentObject.Get(), o.ContentObject.IsSet() +} + +// SetContentObject sets field value +func (o *UserRole) SetContentObject(v string) { + o.ContentObject.Set(&v) +} + +// GetDomain returns the Domain field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserRole) GetDomain() string { + if o == nil || IsNil(o.Domain.Get()) { + var ret string + return ret + } + return *o.Domain.Get() +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserRole) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Domain.Get(), o.Domain.IsSet() +} + +// HasDomain returns a boolean if a field has been set. +func (o *UserRole) HasDomain() bool { + if o != nil && o.Domain.IsSet() { + return true + } + + return false +} + +// SetDomain gets a reference to the given NullableString and assigns it to the Domain field. +func (o *UserRole) SetDomain(v string) { + o.Domain.Set(&v) +} +// SetDomainNil sets the value for Domain to be an explicit nil +func (o *UserRole) SetDomainNil() { + o.Domain.Set(nil) +} + +// UnsetDomain ensures that no value is present for Domain, not even an explicit nil +func (o *UserRole) UnsetDomain() { + o.Domain.Unset() +} + +func (o UserRole) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserRole) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role"] = o.Role + toSerialize["content_object"] = o.ContentObject.Get() + if o.Domain.IsSet() { + toSerialize["domain"] = o.Domain.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UserRole) UnmarshalJSON(bytes []byte) (err error) { + varUserRole := _UserRole{} + + if err = json.Unmarshal(bytes, &varUserRole); err == nil { + *o = UserRole(varUserRole) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "role") + delete(additionalProperties, "content_object") + delete(additionalProperties, "domain") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUserRole struct { + value *UserRole + isSet bool +} + +func (v NullableUserRole) Get() *UserRole { + return v.value +} + +func (v *NullableUserRole) Set(val *UserRole) { + v.value = val + v.isSet = true +} + +func (v NullableUserRole) IsSet() bool { + return v.isSet +} + +func (v *NullableUserRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserRole(val *UserRole) *NullableUserRole { + return &NullableUserRole{value: val, isSet: true} +} + +func (v NullableUserRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_role_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_role_response.go new file mode 100644 index 0000000000..37592aa0e9 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_user_role_response.go @@ -0,0 +1,372 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the UserRoleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserRoleResponse{} + +// UserRoleResponse Serializer for UserRole. +type UserRoleResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + Role string `json:"role"` + // pulp_href of the object for which role permissions should be asserted. If set to 'null', permissions will act on either domain or model-level. + ContentObject NullableString `json:"content_object"` + Description *string `json:"description,omitempty"` + Permissions []string `json:"permissions,omitempty"` + // Domain this role should be applied on, mutually exclusive with content_object. + Domain NullableString `json:"domain,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UserRoleResponse UserRoleResponse + +// NewUserRoleResponse instantiates a new UserRoleResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserRoleResponse(role string, contentObject NullableString) *UserRoleResponse { + this := UserRoleResponse{} + this.Role = role + this.ContentObject = contentObject + return &this +} + +// NewUserRoleResponseWithDefaults instantiates a new UserRoleResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserRoleResponseWithDefaults() *UserRoleResponse { + this := UserRoleResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *UserRoleResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserRoleResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *UserRoleResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *UserRoleResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *UserRoleResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserRoleResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *UserRoleResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *UserRoleResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetRole returns the Role field value +func (o *UserRoleResponse) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *UserRoleResponse) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *UserRoleResponse) SetRole(v string) { + o.Role = v +} + +// GetContentObject returns the ContentObject field value +// If the value is explicit nil, the zero value for string will be returned +func (o *UserRoleResponse) GetContentObject() string { + if o == nil || o.ContentObject.Get() == nil { + var ret string + return ret + } + + return *o.ContentObject.Get() +} + +// GetContentObjectOk returns a tuple with the ContentObject field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserRoleResponse) GetContentObjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentObject.Get(), o.ContentObject.IsSet() +} + +// SetContentObject sets field value +func (o *UserRoleResponse) SetContentObject(v string) { + o.ContentObject.Set(&v) +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *UserRoleResponse) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserRoleResponse) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *UserRoleResponse) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *UserRoleResponse) SetDescription(v string) { + o.Description = &v +} + +// GetPermissions returns the Permissions field value if set, zero value otherwise. +func (o *UserRoleResponse) GetPermissions() []string { + if o == nil || IsNil(o.Permissions) { + var ret []string + return ret + } + return o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserRoleResponse) GetPermissionsOk() ([]string, bool) { + if o == nil || IsNil(o.Permissions) { + return nil, false + } + return o.Permissions, true +} + +// HasPermissions returns a boolean if a field has been set. +func (o *UserRoleResponse) HasPermissions() bool { + if o != nil && !IsNil(o.Permissions) { + return true + } + + return false +} + +// SetPermissions gets a reference to the given []string and assigns it to the Permissions field. +func (o *UserRoleResponse) SetPermissions(v []string) { + o.Permissions = v +} + +// GetDomain returns the Domain field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UserRoleResponse) GetDomain() string { + if o == nil || IsNil(o.Domain.Get()) { + var ret string + return ret + } + return *o.Domain.Get() +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *UserRoleResponse) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Domain.Get(), o.Domain.IsSet() +} + +// HasDomain returns a boolean if a field has been set. +func (o *UserRoleResponse) HasDomain() bool { + if o != nil && o.Domain.IsSet() { + return true + } + + return false +} + +// SetDomain gets a reference to the given NullableString and assigns it to the Domain field. +func (o *UserRoleResponse) SetDomain(v string) { + o.Domain.Set(&v) +} +// SetDomainNil sets the value for Domain to be an explicit nil +func (o *UserRoleResponse) SetDomainNil() { + o.Domain.Set(nil) +} + +// UnsetDomain ensures that no value is present for Domain, not even an explicit nil +func (o *UserRoleResponse) UnsetDomain() { + o.Domain.Unset() +} + +func (o UserRoleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserRoleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + toSerialize["role"] = o.Role + toSerialize["content_object"] = o.ContentObject.Get() + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Permissions) { + toSerialize["permissions"] = o.Permissions + } + if o.Domain.IsSet() { + toSerialize["domain"] = o.Domain.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UserRoleResponse) UnmarshalJSON(bytes []byte) (err error) { + varUserRoleResponse := _UserRoleResponse{} + + if err = json.Unmarshal(bytes, &varUserRoleResponse); err == nil { + *o = UserRoleResponse(varUserRoleResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "role") + delete(additionalProperties, "content_object") + delete(additionalProperties, "description") + delete(additionalProperties, "permissions") + delete(additionalProperties, "domain") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUserRoleResponse struct { + value *UserRoleResponse + isSet bool +} + +func (v NullableUserRoleResponse) Get() *UserRoleResponse { + return v.value +} + +func (v *NullableUserRoleResponse) Set(val *UserRoleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUserRoleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUserRoleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserRoleResponse(val *UserRoleResponse) *NullableUserRoleResponse { + return &NullableUserRoleResponse{value: val, isSet: true} +} + +func (v NullableUserRoleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserRoleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_variant_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_variant_response.go new file mode 100644 index 0000000000..f7930972ce --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_variant_response.go @@ -0,0 +1,415 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the VariantResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VariantResponse{} + +// VariantResponse Variant serializer. +type VariantResponse struct { + // Variant id. + VariantId string `json:"variant_id"` + // Variant uid. + Uid string `json:"uid"` + // Variant name. + Name string `json:"name"` + // Variant type. + Type string `json:"type"` + // Relative path to directory with binary RPMs. + Packages string `json:"packages"` + // Relative path to directory with source RPMs. + SourcePackages NullableString `json:"source_packages"` + // Relative path to YUM repository with source RPMs. + SourceRepository NullableString `json:"source_repository"` + // Relative path to directory with debug RPMs. + DebugPackages NullableString `json:"debug_packages"` + // Relative path to YUM repository with debug RPMs. + DebugRepository NullableString `json:"debug_repository"` + // Relative path to a pem file that identifies a product. + Identity NullableString `json:"identity"` + AdditionalProperties map[string]interface{} +} + +type _VariantResponse VariantResponse + +// NewVariantResponse instantiates a new VariantResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVariantResponse(variantId string, uid string, name string, type_ string, packages string, sourcePackages NullableString, sourceRepository NullableString, debugPackages NullableString, debugRepository NullableString, identity NullableString) *VariantResponse { + this := VariantResponse{} + this.VariantId = variantId + this.Uid = uid + this.Name = name + this.Type = type_ + this.Packages = packages + this.SourcePackages = sourcePackages + this.SourceRepository = sourceRepository + this.DebugPackages = debugPackages + this.DebugRepository = debugRepository + this.Identity = identity + return &this +} + +// NewVariantResponseWithDefaults instantiates a new VariantResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVariantResponseWithDefaults() *VariantResponse { + this := VariantResponse{} + return &this +} + +// GetVariantId returns the VariantId field value +func (o *VariantResponse) GetVariantId() string { + if o == nil { + var ret string + return ret + } + + return o.VariantId +} + +// GetVariantIdOk returns a tuple with the VariantId field value +// and a boolean to check if the value has been set. +func (o *VariantResponse) GetVariantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.VariantId, true +} + +// SetVariantId sets field value +func (o *VariantResponse) SetVariantId(v string) { + o.VariantId = v +} + +// GetUid returns the Uid field value +func (o *VariantResponse) GetUid() string { + if o == nil { + var ret string + return ret + } + + return o.Uid +} + +// GetUidOk returns a tuple with the Uid field value +// and a boolean to check if the value has been set. +func (o *VariantResponse) GetUidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Uid, true +} + +// SetUid sets field value +func (o *VariantResponse) SetUid(v string) { + o.Uid = v +} + +// GetName returns the Name field value +func (o *VariantResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *VariantResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *VariantResponse) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *VariantResponse) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *VariantResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *VariantResponse) SetType(v string) { + o.Type = v +} + +// GetPackages returns the Packages field value +func (o *VariantResponse) GetPackages() string { + if o == nil { + var ret string + return ret + } + + return o.Packages +} + +// GetPackagesOk returns a tuple with the Packages field value +// and a boolean to check if the value has been set. +func (o *VariantResponse) GetPackagesOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Packages, true +} + +// SetPackages sets field value +func (o *VariantResponse) SetPackages(v string) { + o.Packages = v +} + +// GetSourcePackages returns the SourcePackages field value +// If the value is explicit nil, the zero value for string will be returned +func (o *VariantResponse) GetSourcePackages() string { + if o == nil || o.SourcePackages.Get() == nil { + var ret string + return ret + } + + return *o.SourcePackages.Get() +} + +// GetSourcePackagesOk returns a tuple with the SourcePackages field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *VariantResponse) GetSourcePackagesOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SourcePackages.Get(), o.SourcePackages.IsSet() +} + +// SetSourcePackages sets field value +func (o *VariantResponse) SetSourcePackages(v string) { + o.SourcePackages.Set(&v) +} + +// GetSourceRepository returns the SourceRepository field value +// If the value is explicit nil, the zero value for string will be returned +func (o *VariantResponse) GetSourceRepository() string { + if o == nil || o.SourceRepository.Get() == nil { + var ret string + return ret + } + + return *o.SourceRepository.Get() +} + +// GetSourceRepositoryOk returns a tuple with the SourceRepository field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *VariantResponse) GetSourceRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SourceRepository.Get(), o.SourceRepository.IsSet() +} + +// SetSourceRepository sets field value +func (o *VariantResponse) SetSourceRepository(v string) { + o.SourceRepository.Set(&v) +} + +// GetDebugPackages returns the DebugPackages field value +// If the value is explicit nil, the zero value for string will be returned +func (o *VariantResponse) GetDebugPackages() string { + if o == nil || o.DebugPackages.Get() == nil { + var ret string + return ret + } + + return *o.DebugPackages.Get() +} + +// GetDebugPackagesOk returns a tuple with the DebugPackages field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *VariantResponse) GetDebugPackagesOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DebugPackages.Get(), o.DebugPackages.IsSet() +} + +// SetDebugPackages sets field value +func (o *VariantResponse) SetDebugPackages(v string) { + o.DebugPackages.Set(&v) +} + +// GetDebugRepository returns the DebugRepository field value +// If the value is explicit nil, the zero value for string will be returned +func (o *VariantResponse) GetDebugRepository() string { + if o == nil || o.DebugRepository.Get() == nil { + var ret string + return ret + } + + return *o.DebugRepository.Get() +} + +// GetDebugRepositoryOk returns a tuple with the DebugRepository field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *VariantResponse) GetDebugRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DebugRepository.Get(), o.DebugRepository.IsSet() +} + +// SetDebugRepository sets field value +func (o *VariantResponse) SetDebugRepository(v string) { + o.DebugRepository.Set(&v) +} + +// GetIdentity returns the Identity field value +// If the value is explicit nil, the zero value for string will be returned +func (o *VariantResponse) GetIdentity() string { + if o == nil || o.Identity.Get() == nil { + var ret string + return ret + } + + return *o.Identity.Get() +} + +// GetIdentityOk returns a tuple with the Identity field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *VariantResponse) GetIdentityOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Identity.Get(), o.Identity.IsSet() +} + +// SetIdentity sets field value +func (o *VariantResponse) SetIdentity(v string) { + o.Identity.Set(&v) +} + +func (o VariantResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VariantResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["variant_id"] = o.VariantId + toSerialize["uid"] = o.Uid + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + toSerialize["packages"] = o.Packages + toSerialize["source_packages"] = o.SourcePackages.Get() + toSerialize["source_repository"] = o.SourceRepository.Get() + toSerialize["debug_packages"] = o.DebugPackages.Get() + toSerialize["debug_repository"] = o.DebugRepository.Get() + toSerialize["identity"] = o.Identity.Get() + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *VariantResponse) UnmarshalJSON(bytes []byte) (err error) { + varVariantResponse := _VariantResponse{} + + if err = json.Unmarshal(bytes, &varVariantResponse); err == nil { + *o = VariantResponse(varVariantResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "variant_id") + delete(additionalProperties, "uid") + delete(additionalProperties, "name") + delete(additionalProperties, "type") + delete(additionalProperties, "packages") + delete(additionalProperties, "source_packages") + delete(additionalProperties, "source_repository") + delete(additionalProperties, "debug_packages") + delete(additionalProperties, "debug_repository") + delete(additionalProperties, "identity") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableVariantResponse struct { + value *VariantResponse + isSet bool +} + +func (v NullableVariantResponse) Get() *VariantResponse { + return v.value +} + +func (v *NullableVariantResponse) Set(val *VariantResponse) { + v.value = val + v.isSet = true +} + +func (v NullableVariantResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableVariantResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVariantResponse(val *VariantResponse) *NullableVariantResponse { + return &NullableVariantResponse{value: val, isSet: true} +} + +func (v NullableVariantResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVariantResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_version_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_version_response.go new file mode 100644 index 0000000000..f9b2bb07ef --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_version_response.go @@ -0,0 +1,231 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" +) + +// checks if the VersionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VersionResponse{} + +// VersionResponse Serializer for the version information of Pulp components +type VersionResponse struct { + // Name of a versioned component of Pulp + Component string `json:"component"` + // Version of the component (e.g. 3.0.0) + Version string `json:"version"` + // Python package name providing the component + Package string `json:"package"` + // Domain feature compatibility of component + DomainCompatible bool `json:"domain_compatible"` + AdditionalProperties map[string]interface{} +} + +type _VersionResponse VersionResponse + +// NewVersionResponse instantiates a new VersionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVersionResponse(component string, version string, package_ string, domainCompatible bool) *VersionResponse { + this := VersionResponse{} + this.Component = component + this.Version = version + this.Package = package_ + this.DomainCompatible = domainCompatible + return &this +} + +// NewVersionResponseWithDefaults instantiates a new VersionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVersionResponseWithDefaults() *VersionResponse { + this := VersionResponse{} + return &this +} + +// GetComponent returns the Component field value +func (o *VersionResponse) GetComponent() string { + if o == nil { + var ret string + return ret + } + + return o.Component +} + +// GetComponentOk returns a tuple with the Component field value +// and a boolean to check if the value has been set. +func (o *VersionResponse) GetComponentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Component, true +} + +// SetComponent sets field value +func (o *VersionResponse) SetComponent(v string) { + o.Component = v +} + +// GetVersion returns the Version field value +func (o *VersionResponse) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *VersionResponse) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *VersionResponse) SetVersion(v string) { + o.Version = v +} + +// GetPackage returns the Package field value +func (o *VersionResponse) GetPackage() string { + if o == nil { + var ret string + return ret + } + + return o.Package +} + +// GetPackageOk returns a tuple with the Package field value +// and a boolean to check if the value has been set. +func (o *VersionResponse) GetPackageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Package, true +} + +// SetPackage sets field value +func (o *VersionResponse) SetPackage(v string) { + o.Package = v +} + +// GetDomainCompatible returns the DomainCompatible field value +func (o *VersionResponse) GetDomainCompatible() bool { + if o == nil { + var ret bool + return ret + } + + return o.DomainCompatible +} + +// GetDomainCompatibleOk returns a tuple with the DomainCompatible field value +// and a boolean to check if the value has been set. +func (o *VersionResponse) GetDomainCompatibleOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.DomainCompatible, true +} + +// SetDomainCompatible sets field value +func (o *VersionResponse) SetDomainCompatible(v bool) { + o.DomainCompatible = v +} + +func (o VersionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VersionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["component"] = o.Component + toSerialize["version"] = o.Version + toSerialize["package"] = o.Package + toSerialize["domain_compatible"] = o.DomainCompatible + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *VersionResponse) UnmarshalJSON(bytes []byte) (err error) { + varVersionResponse := _VersionResponse{} + + if err = json.Unmarshal(bytes, &varVersionResponse); err == nil { + *o = VersionResponse(varVersionResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "component") + delete(additionalProperties, "version") + delete(additionalProperties, "package") + delete(additionalProperties, "domain_compatible") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableVersionResponse struct { + value *VersionResponse + isSet bool +} + +func (v NullableVersionResponse) Get() *VersionResponse { + return v.value +} + +func (v *NullableVersionResponse) Set(val *VersionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableVersionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableVersionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVersionResponse(val *VersionResponse) *NullableVersionResponse { + return &NullableVersionResponse{value: val, isSet: true} +} + +func (v NullableVersionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVersionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/model_worker_response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/model_worker_response.go new file mode 100644 index 0000000000..86cc7b56a5 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/model_worker_response.go @@ -0,0 +1,305 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "time" +) + +// checks if the WorkerResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkerResponse{} + +// WorkerResponse Base serializer for use with :class:`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. +type WorkerResponse struct { + PulpHref *string `json:"pulp_href,omitempty"` + // Timestamp of creation. + PulpCreated *time.Time `json:"pulp_created,omitempty"` + // The name of the worker. + Name *string `json:"name,omitempty"` + // Timestamp of the last time the worker talked to the service. + LastHeartbeat *time.Time `json:"last_heartbeat,omitempty"` + // The task this worker is currently executing, or empty if the worker is not currently assigned to a task. + CurrentTask *string `json:"current_task,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _WorkerResponse WorkerResponse + +// NewWorkerResponse instantiates a new WorkerResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkerResponse() *WorkerResponse { + this := WorkerResponse{} + return &this +} + +// NewWorkerResponseWithDefaults instantiates a new WorkerResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkerResponseWithDefaults() *WorkerResponse { + this := WorkerResponse{} + return &this +} + +// GetPulpHref returns the PulpHref field value if set, zero value otherwise. +func (o *WorkerResponse) GetPulpHref() string { + if o == nil || IsNil(o.PulpHref) { + var ret string + return ret + } + return *o.PulpHref +} + +// GetPulpHrefOk returns a tuple with the PulpHref field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkerResponse) GetPulpHrefOk() (*string, bool) { + if o == nil || IsNil(o.PulpHref) { + return nil, false + } + return o.PulpHref, true +} + +// HasPulpHref returns a boolean if a field has been set. +func (o *WorkerResponse) HasPulpHref() bool { + if o != nil && !IsNil(o.PulpHref) { + return true + } + + return false +} + +// SetPulpHref gets a reference to the given string and assigns it to the PulpHref field. +func (o *WorkerResponse) SetPulpHref(v string) { + o.PulpHref = &v +} + +// GetPulpCreated returns the PulpCreated field value if set, zero value otherwise. +func (o *WorkerResponse) GetPulpCreated() time.Time { + if o == nil || IsNil(o.PulpCreated) { + var ret time.Time + return ret + } + return *o.PulpCreated +} + +// GetPulpCreatedOk returns a tuple with the PulpCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkerResponse) GetPulpCreatedOk() (*time.Time, bool) { + if o == nil || IsNil(o.PulpCreated) { + return nil, false + } + return o.PulpCreated, true +} + +// HasPulpCreated returns a boolean if a field has been set. +func (o *WorkerResponse) HasPulpCreated() bool { + if o != nil && !IsNil(o.PulpCreated) { + return true + } + + return false +} + +// SetPulpCreated gets a reference to the given time.Time and assigns it to the PulpCreated field. +func (o *WorkerResponse) SetPulpCreated(v time.Time) { + o.PulpCreated = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *WorkerResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkerResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *WorkerResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *WorkerResponse) SetName(v string) { + o.Name = &v +} + +// GetLastHeartbeat returns the LastHeartbeat field value if set, zero value otherwise. +func (o *WorkerResponse) GetLastHeartbeat() time.Time { + if o == nil || IsNil(o.LastHeartbeat) { + var ret time.Time + return ret + } + return *o.LastHeartbeat +} + +// GetLastHeartbeatOk returns a tuple with the LastHeartbeat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkerResponse) GetLastHeartbeatOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastHeartbeat) { + return nil, false + } + return o.LastHeartbeat, true +} + +// HasLastHeartbeat returns a boolean if a field has been set. +func (o *WorkerResponse) HasLastHeartbeat() bool { + if o != nil && !IsNil(o.LastHeartbeat) { + return true + } + + return false +} + +// SetLastHeartbeat gets a reference to the given time.Time and assigns it to the LastHeartbeat field. +func (o *WorkerResponse) SetLastHeartbeat(v time.Time) { + o.LastHeartbeat = &v +} + +// GetCurrentTask returns the CurrentTask field value if set, zero value otherwise. +func (o *WorkerResponse) GetCurrentTask() string { + if o == nil || IsNil(o.CurrentTask) { + var ret string + return ret + } + return *o.CurrentTask +} + +// GetCurrentTaskOk returns a tuple with the CurrentTask field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkerResponse) GetCurrentTaskOk() (*string, bool) { + if o == nil || IsNil(o.CurrentTask) { + return nil, false + } + return o.CurrentTask, true +} + +// HasCurrentTask returns a boolean if a field has been set. +func (o *WorkerResponse) HasCurrentTask() bool { + if o != nil && !IsNil(o.CurrentTask) { + return true + } + + return false +} + +// SetCurrentTask gets a reference to the given string and assigns it to the CurrentTask field. +func (o *WorkerResponse) SetCurrentTask(v string) { + o.CurrentTask = &v +} + +func (o WorkerResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkerResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PulpHref) { + toSerialize["pulp_href"] = o.PulpHref + } + if !IsNil(o.PulpCreated) { + toSerialize["pulp_created"] = o.PulpCreated + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.LastHeartbeat) { + toSerialize["last_heartbeat"] = o.LastHeartbeat + } + if !IsNil(o.CurrentTask) { + toSerialize["current_task"] = o.CurrentTask + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *WorkerResponse) UnmarshalJSON(bytes []byte) (err error) { + varWorkerResponse := _WorkerResponse{} + + if err = json.Unmarshal(bytes, &varWorkerResponse); err == nil { + *o = WorkerResponse(varWorkerResponse) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "pulp_href") + delete(additionalProperties, "pulp_created") + delete(additionalProperties, "name") + delete(additionalProperties, "last_heartbeat") + delete(additionalProperties, "current_task") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableWorkerResponse struct { + value *WorkerResponse + isSet bool +} + +func (v NullableWorkerResponse) Get() *WorkerResponse { + return v.value +} + +func (v *NullableWorkerResponse) Set(val *WorkerResponse) { + v.value = val + v.isSet = true +} + +func (v NullableWorkerResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkerResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkerResponse(val *WorkerResponse) *NullableWorkerResponse { + return &NullableWorkerResponse{value: val, isSet: true} +} + +func (v NullableWorkerResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkerResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/response.go b/vendor/github.com/osbuild/pulp-client/pulpclient/response.go new file mode 100644 index 0000000000..b3e4e752c6 --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/response.go @@ -0,0 +1,48 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/vendor/github.com/osbuild/pulp-client/pulpclient/utils.go b/vendor/github.com/osbuild/pulp-client/pulpclient/utils.go new file mode 100644 index 0000000000..297ccca58e --- /dev/null +++ b/vendor/github.com/osbuild/pulp-client/pulpclient/utils.go @@ -0,0 +1,348 @@ +/* +Pulp 3 API + +Fetch, Upload, Organize, and Distribute Software Packages + +API version: v3 +Contact: pulp-list@redhat.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pulpclient + +import ( + "encoding/json" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 41d95f9093..80c6e0b17c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -690,6 +690,9 @@ github.com/osbuild/images/pkg/rhsm/facts github.com/osbuild/images/pkg/rpmmd github.com/osbuild/images/pkg/runner github.com/osbuild/images/pkg/subscription +# github.com/osbuild/pulp-client v0.1.0 +## explicit; go 1.19 +github.com/osbuild/pulp-client/pulpclient # github.com/pkg/errors v0.9.1 ## explicit github.com/pkg/errors From 3bd2e934267b5b63ca36c1b0b3f5e57af18bf2f3 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Wed, 16 Aug 2023 16:01:46 +0200 Subject: [PATCH 02/19] upload/pulp: list and create repositories --- internal/upload/pulp/pulp.go | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/internal/upload/pulp/pulp.go b/internal/upload/pulp/pulp.go index fe10085fdc..b395a34faf 100644 --- a/internal/upload/pulp/pulp.go +++ b/internal/upload/pulp/pulp.go @@ -2,6 +2,8 @@ package pulp import ( "context" + "fmt" + "io" "net/http" "github.com/osbuild/pulp-client/pulpclient" @@ -41,3 +43,53 @@ func NewClient(url string, creds *Credentials) *Client { ctx: ctx, } } + +// readBody returns the body of a response as a string and ignores +// errors. Useful for returning details from failed requests. +func readBody(r *http.Response) string { + if r == nil { + return "" + } + b, err := io.ReadAll(r.Body) + if err != nil { + return "" + } + return string(b) +} + +// ListOSTreeRepositories returns a map (repository name -> pulp href) of +// existing ostree repositories. +func (cl *Client) ListOSTreeRepositories() (map[string]string, error) { + list, resp, err := cl.client.RepositoriesOstreeAPI.RepositoriesOstreeOstreeList(cl.ctx).Execute() + if err != nil { + return nil, fmt.Errorf("repository list request returned an error: %s (%s)", err.Error(), readBody(resp)) + } + + repos := make(map[string]string, list.GetCount()) + for _, repo := range list.GetResults() { + name := repo.Name + href := repo.GetPulpHref() + repos[name] = href + } + + return repos, nil +} + +// CreateOSTreeRepository creates a new ostree repository with a name and description +// and returns the pulp href. +func (cl *Client) CreateOSTreeRepository(name, description string) (string, error) { + req := cl.client.RepositoriesOstreeAPI.RepositoriesOstreeOstreeCreate(cl.ctx) + repo := pulpclient.OstreeOstreeRepository{ + Name: name, + } + if description != "" { + repo.Description = *pulpclient.NewNullableString(&description) + } + req = req.OstreeOstreeRepository(repo) + result, resp, err := req.Execute() + if err != nil { + return "", fmt.Errorf("repository creation failed: %s (%s)", err.Error(), readBody(resp)) + } + + return result.GetPulpHref(), nil +} From 1e487a502e693ac3dd5fe793776737f39cb6c6b8 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Wed, 16 Aug 2023 16:04:47 +0200 Subject: [PATCH 03/19] upload/pulp: file upload method --- internal/upload/pulp/pulp.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/internal/upload/pulp/pulp.go b/internal/upload/pulp/pulp.go index b395a34faf..90541e6b0b 100644 --- a/internal/upload/pulp/pulp.go +++ b/internal/upload/pulp/pulp.go @@ -5,6 +5,7 @@ import ( "fmt" "io" "net/http" + "os" "github.com/osbuild/pulp-client/pulpclient" ) @@ -57,6 +58,23 @@ func readBody(r *http.Response) string { return string(b) } +// UploadFile uploads the file at the given path and returns the href of the +// new artifact. +func (cl *Client) UploadFile(path string) (string, error) { + fp, err := os.Open(path) + if err != nil { + return "", err + } + defer fp.Close() + create := cl.client.ArtifactsAPI.ArtifactsCreate(cl.ctx).File(fp) + res, resp, err := create.Execute() + if err != nil { + return "", fmt.Errorf("failed to upload file %q: %s (%s)", path, err.Error(), readBody(resp)) + } + + return res.GetPulpHref(), nil +} + // ListOSTreeRepositories returns a map (repository name -> pulp href) of // existing ostree repositories. func (cl *Client) ListOSTreeRepositories() (map[string]string, error) { From 5d4f12155636c01c2bf58ae09bd0c2227b03fd07 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Wed, 16 Aug 2023 16:08:12 +0200 Subject: [PATCH 04/19] upload/pulp: import commit into repository Function for importing a commit artifact (that's already been uploaded) into a given repository. Note that the "repo" argument to the NewOstreeImportAll() function refers to the name of the repository directory inside the archive, which for the commits we produce in osbuild is always "repo". --- internal/upload/pulp/pulp.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/internal/upload/pulp/pulp.go b/internal/upload/pulp/pulp.go index 90541e6b0b..ea918813ea 100644 --- a/internal/upload/pulp/pulp.go +++ b/internal/upload/pulp/pulp.go @@ -111,3 +111,18 @@ func (cl *Client) CreateOSTreeRepository(name, description string) (string, erro return result.GetPulpHref(), nil } + +// ImportCommit imports a commit that has already been uploaded to a given +// repository. The commitHref must reference a commit tarball artifact. This +// task is asynchronous. The returned value is the href for the import task. +func (cl *Client) ImportCommit(commitHref, repoHref string) (string, error) { + req := cl.client.RepositoriesOstreeAPI.RepositoriesOstreeOstreeImportAll(cl.ctx, repoHref) + importOptions := *pulpclient.NewOstreeImportAll(commitHref, "repo") // our commit archives always use the repo name "repo" + + result, resp, err := req.OstreeImportAll(importOptions).Execute() + if err != nil { + return "", fmt.Errorf("ostree commit import failed: %s (%s)", err.Error(), readBody(resp)) + } + + return result.Task, nil +} From 911bb111f3d691c482a9c30e962f8580c0500e42 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Wed, 16 Aug 2023 16:13:40 +0200 Subject: [PATCH 05/19] upload/pulp: distribute ostree repo Function for distributing an ostree repository, making it available for consumption. --- internal/upload/pulp/pulp.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/internal/upload/pulp/pulp.go b/internal/upload/pulp/pulp.go index ea918813ea..660ca7152e 100644 --- a/internal/upload/pulp/pulp.go +++ b/internal/upload/pulp/pulp.go @@ -126,3 +126,16 @@ func (cl *Client) ImportCommit(commitHref, repoHref string) (string, error) { return result.Task, nil } + +// Distribute makes an ostree repository available for download. This task is +// asynchronous. The returned value is the href for the distribute task. +func (cl *Client) DistributeOSTreeRepo(basePath, name, repoHref string) (string, error) { + dist := *pulpclient.NewOstreeOstreeDistribution(basePath, name) + dist.SetRepository(repoHref) + res, resp, err := cl.client.DistributionsOstreeAPI.DistributionsOstreeOstreeCreate(cl.ctx).OstreeOstreeDistribution(dist).Execute() + if err != nil { + return "", fmt.Errorf("error distributing ostree repository: %s (%s)", err.Error(), readBody(resp)) + } + + return res.Task, nil +} From f134aa2ddd1dddd036557d10b18b2a3069ca78af Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Wed, 16 Aug 2023 16:38:15 +0200 Subject: [PATCH 06/19] upload/pulp: task state functions Define the task state enum based on the available values defined in the API. Add a helper function that returns true if a task is running or waiting and ignores errors. --- internal/upload/pulp/pulp.go | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/internal/upload/pulp/pulp.go b/internal/upload/pulp/pulp.go index 660ca7152e..594fde7f44 100644 --- a/internal/upload/pulp/pulp.go +++ b/internal/upload/pulp/pulp.go @@ -8,6 +8,7 @@ import ( "os" "github.com/osbuild/pulp-client/pulpclient" + "github.com/sirupsen/logrus" ) type Client struct { @@ -139,3 +140,42 @@ func (cl *Client) DistributeOSTreeRepo(basePath, name, repoHref string) (string, return res.Task, nil } + +type TaskState string + +const ( + TASK_WAITING TaskState = "waiting" + TASK_SKIPPED TaskState = "skipped" + TASK_RUNNING TaskState = "running" + TASK_COMPLETED TaskState = "completed" + TASK_FAILED TaskState = "failed" + TASK_CANCELED TaskState = "canceled" + TASK_CANCELING TaskState = "canceling" +) + +// TaskState returns the state of a given task. +func (cl *Client) TaskState(task string) (TaskState, error) { + res, resp, err := cl.client.TasksAPI.TasksRead(cl.ctx, task).Execute() + if err != nil { + return "", fmt.Errorf("error reading task %s: %s (%s)", task, err.Error(), readBody(resp)) + } + + state := res.GetState() + if state == "" { + return "", fmt.Errorf("got empty task state for %s", task) + } + + return TaskState(state), nil +} + +// TaskWaitingOrRunning returns true if the given task is in the running state. Errors +// are ignored and return false. +func (cl *Client) TaskWaitingOrRunning(task string) bool { + state, err := cl.TaskState(task) + if err != nil { + // log the error and return false + logrus.Errorf("failed to get task state: %s", err.Error()) + return false + } + return state == TASK_RUNNING || state == TASK_WAITING +} From b42d56f9530684c29f8bf9e1dff59c638a082249 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Wed, 16 Aug 2023 18:00:33 +0200 Subject: [PATCH 07/19] target: add pulp ostree target and options --- internal/target/pulp_target.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 internal/target/pulp_target.go diff --git a/internal/target/pulp_target.go b/internal/target/pulp_target.go new file mode 100644 index 0000000000..ae3cdeb5c7 --- /dev/null +++ b/internal/target/pulp_target.go @@ -0,0 +1,33 @@ +package target + +const TargetNamePulpOSTree TargetName = "org.osbuild.pulp.ostree" + +type PulpOSTreeTargetOptions struct { + // ServerAddress for the pulp instance + ServerAddress string `json:"server_address,omitempty"` + + // Repository to import the ostree commit to + Repository string `json:"repository"` + + // BasePath for distributing the repository (if new) + BasePath string `json:"basepath,omitempty"` + + Username string `json:"username,omitempty"` + Password string `json:"password,omitempty"` +} + +func (PulpOSTreeTargetOptions) isTargetOptions() {} + +func NewPulpOSTreeTarget(options *PulpOSTreeTargetOptions) *Target { + return newTarget(TargetNamePulpOSTree, options) +} + +type PulpOSTreeTargetResultOptions struct { + RepoURL string `json:"repository_url"` +} + +func (PulpOSTreeTargetResultOptions) isTargetResultOptions() {} + +func NewPulpOSTreeTargetResult(options *PulpOSTreeTargetResultOptions, artifact *OsbuildArtifact) *TargetResult { + return newTargetResult(TargetNamePulpOSTree, options, artifact) +} From cc8a9796db62277d11b9e2842739164bc05d4340 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Wed, 16 Aug 2023 17:57:43 +0200 Subject: [PATCH 08/19] upload/pulp: helper function to upload and distribute Helper function that performs the whole upload and distribute procedure. Two more helper functions are added for retrieving the href for a repository based on its name, and for retrieving the base URL for a repository's distribution. --- internal/upload/pulp/pulp.go | 103 +++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/internal/upload/pulp/pulp.go b/internal/upload/pulp/pulp.go index 594fde7f44..c256a93293 100644 --- a/internal/upload/pulp/pulp.go +++ b/internal/upload/pulp/pulp.go @@ -76,6 +76,31 @@ func (cl *Client) UploadFile(path string) (string, error) { return res.GetPulpHref(), nil } +// GetOSTreeRepositoryByName returns the href for a repository based on its name. +// Returns an empty string without an error if the repository does not exist. +func (cl *Client) GetOSTreeRepositoryByName(name string) (string, error) { + list, resp, err := cl.client.RepositoriesOstreeAPI.RepositoriesOstreeOstreeList(cl.ctx).Name(name).Execute() + if err != nil { + return "", fmt.Errorf("repository list request returned an error: %s (%s)", err.Error(), readBody(resp)) + } + + if list.GetCount() == 0 { + logrus.Infof("no repository named %s was found", name) + return "", nil + } + + if list.GetCount() > 1 { + return "", fmt.Errorf("more than one repository named %s was found: %s (%s)", name, err.Error(), readBody(resp)) + } + + results := list.GetResults() + repo := results[0] + + repoHref := repo.GetPulpHref() + logrus.Infof("found repository %s: %s", name, repoHref) + return repoHref, nil +} + // ListOSTreeRepositories returns a map (repository name -> pulp href) of // existing ostree repositories. func (cl *Client) ListOSTreeRepositories() (map[string]string, error) { @@ -141,6 +166,28 @@ func (cl *Client) DistributeOSTreeRepo(basePath, name, repoHref string) (string, return res.Task, nil } +// GetDistributionURLForOSTreeRepo returns the basepath for an ostree +// distribution of a given repository. Returns an empty string without an error +// if the no distribution for the repo exists. +func (cl *Client) GetDistributionURLForOSTreeRepo(repoHref string) (string, error) { + list, resp, err := cl.client.DistributionsOstreeAPI.DistributionsOstreeOstreeList(cl.ctx).Repository(repoHref).Execute() + + if list.GetCount() == 0 { + logrus.Infof("no distribution for repo %s was found: %s", repoHref, readBody(resp)) + return "", nil + } + + if err != nil { + return "", fmt.Errorf("error looking up distribution for repo %s: %s (%s)", repoHref, err.Error(), readBody(resp)) + } + + results := list.GetResults() + // if there's more than one distribution, return the first one + dist := results[0] + + return dist.GetBaseUrl(), nil +} + type TaskState string const ( @@ -179,3 +226,59 @@ func (cl *Client) TaskWaitingOrRunning(task string) bool { } return state == TASK_RUNNING || state == TASK_WAITING } + +// UploadAndDistributeCommit uploads a commit, creates a repository if +// necessary, imports the commit to the repository, and distributes the +// repository. +func (cl *Client) UploadAndDistributeCommit(archivePath, repoName, basePath string) (string, error) { + // Check for the repository before uploading the commit: + // If the repository needs to be created but the basePath is empty, we + // should fail before uploading the commit. + logrus.Infof("checking if repository %q already exists", repoName) + repoHref, err := cl.GetOSTreeRepositoryByName(repoName) + if err != nil { + return "", err + } + + if repoHref == "" && basePath == "" { + return "", fmt.Errorf("repository %q does not exist and needs to be created, but no basepath for distribution was provided", repoName) + } + + // Upload the file before creating the repository (if we need to create it) + // in case it fails. We don't want to have an empty repository if the + // commit upload fails. + logrus.Infof("uploading ostree commit to pulp") + fileHref, err := cl.UploadFile(archivePath) + if err != nil { + return "", err + } + + if repoHref == "" { + // repository does not exist: create it and distribute + logrus.Infof("repository not found - creating repository %q", repoName) + href, err := cl.CreateOSTreeRepository(repoName, "") + if err != nil { + return "", err + } + + repoHref = href + logrus.Infof("created repository %q (%s)", repoName, repoHref) + logrus.Infof("creating distribution at %q", basePath) + if _, err := cl.DistributeOSTreeRepo(basePath, repoName, repoHref); err != nil { + return "", err + } + } + + logrus.Infof("importing commit %q to repo %q", fileHref, repoHref) + if _, err := cl.ImportCommit(fileHref, repoHref); err != nil { + return "", err + } + + repoURL, err := cl.GetDistributionURLForOSTreeRepo(repoHref) + if err != nil { + return "", err + } + logrus.Infof("repository url: %s", repoURL) + + return repoURL, nil +} From b8554ff7ea1e056a8cde532b034fc4f5e851d354 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Thu, 17 Aug 2023 19:32:17 +0200 Subject: [PATCH 09/19] target: add the pulp.ostree target to the marshal functions --- internal/target/target.go | 6 ++++++ internal/target/targetresult.go | 2 ++ 2 files changed, 8 insertions(+) diff --git a/internal/target/target.go b/internal/target/target.go index 8ab023248b..0d5251666f 100644 --- a/internal/target/target.go +++ b/internal/target/target.go @@ -93,6 +93,8 @@ func (target *Target) UnmarshalJSON(data []byte) error { options = new(ContainerTargetOptions) case TargetNameWorkerServer: options = new(WorkerServerTargetOptions) + case TargetNamePulpOSTree: + options = new(PulpOSTreeTargetOptions) default: return fmt.Errorf("unexpected target name: %s", rawTarget.Name) } @@ -278,6 +280,10 @@ func (target Target) MarshalJSON() ([]byte, error) { // the incompatible change. rawOptions, err = json.Marshal(target.Options) + case *PulpOSTreeTargetOptions: + // added after incompatibility change + rawOptions, err = json.Marshal(target.Options) + default: return nil, fmt.Errorf("unexpected target options type: %t", t) } diff --git a/internal/target/targetresult.go b/internal/target/targetresult.go index 59bccbfb75..52759ce87a 100644 --- a/internal/target/targetresult.go +++ b/internal/target/targetresult.go @@ -76,6 +76,8 @@ func UnmarshalTargetResultOptions(trName TargetName, rawOptions json.RawMessage) options = new(OCIObjectStorageTargetResultOptions) case TargetNameContainer: options = new(ContainerTargetResultOptions) + case TargetNamePulpOSTree: + options = new(PulpOSTreeTargetResultOptions) default: return nil, fmt.Errorf("unexpected target result name: %s", trName) } From 97f5f8cd23fe436391132c3c3faf60a38c4ed423 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Thu, 17 Aug 2023 19:33:12 +0200 Subject: [PATCH 10/19] osbuild-worker: add the pulp.ostree target to the worker --- cmd/osbuild-worker/jobimpl-osbuild.go | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/cmd/osbuild-worker/jobimpl-osbuild.go b/cmd/osbuild-worker/jobimpl-osbuild.go index 9968eb2519..307cdebda2 100644 --- a/cmd/osbuild-worker/jobimpl-osbuild.go +++ b/cmd/osbuild-worker/jobimpl-osbuild.go @@ -12,12 +12,14 @@ import ( "os" "os/exec" "path" + "path/filepath" "strings" "github.com/osbuild/images/pkg/container" "github.com/osbuild/images/pkg/osbuild" "github.com/osbuild/osbuild-composer/internal/upload/oci" + "github.com/osbuild/osbuild-composer/internal/upload/pulp" "github.com/google/uuid" "github.com/sirupsen/logrus" @@ -67,6 +69,11 @@ type OCIConfiguration struct { Namespace string } +type PulpConfiguration struct { + CredsFilePath string + ServerAddress string +} + type OSBuildJobImpl struct { Store string Output string @@ -293,6 +300,26 @@ func (impl *OSBuildJobImpl) getContainerClient(destination string, targetOptions return client, nil } +func (impl *OSBuildJobImpl) getPulpClient(targetOptions *target.PulpOSTreeTargetOptions) (*pulp.Client, error) { + creds := &pulp.Credentials{} + if targetOptions.Username != "" && targetOptions.Password != "" { + creds = &pulp.Credentials{ + Username: targetOptions.Username, + Password: targetOptions.Password, + } + } else { + // TODO: read from worker configuration + return nil, fmt.Errorf("no credentials for pulp were set") + } + + if targetOptions.ServerAddress == "" { + // TODO: read from worker configuration + return nil, fmt.Errorf("pulp server address not set") + } + + return pulp.NewClient(targetOptions.ServerAddress, creds), nil +} + func (impl *OSBuildJobImpl) Run(job worker.Job) error { logWithId := logrus.WithField("jobId", job.Id().String()) // Initialize variable needed for reporting back to osbuild-composer. @@ -1101,6 +1128,23 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error { logWithId.Printf("[container] ๐ŸŽ‰ Image uploaded (%s)!", digest.String()) targetResult.Options = &target.ContainerTargetResultOptions{URL: client.Target.String(), Digest: digest.String()} + case *target.PulpOSTreeTargetOptions: + targetResult = target.NewPulpOSTreeTargetResult(nil, &artifact) + archivePath := filepath.Join(outputDirectory, jobTarget.OsbuildArtifact.ExportName, jobTarget.OsbuildArtifact.ExportFilename) + + client, err := impl.getPulpClient(targetOptions) + if err != nil { + targetResult.TargetError = clienterrors.WorkerClientError(clienterrors.ErrorInvalidConfig, err.Error(), nil) + break + } + + url, err := client.UploadAndDistributeCommit(archivePath, targetOptions.Repository, targetOptions.BasePath) + if err != nil { + targetResult.TargetError = clienterrors.WorkerClientError(clienterrors.ErrorUploadingImage, err.Error(), nil) + break + } + targetResult.Options = &target.PulpOSTreeTargetResultOptions{RepoURL: url} + default: // TODO: we may not want to return completely here with multiple targets, because then no TargetErrors will be added to the JobError details // Nevertheless, all target errors will be still in the OSBuildJobResult. From 689d9b769a5a69d01114a12d77097252cf804fb5 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Thu, 17 Aug 2023 19:33:32 +0200 Subject: [PATCH 11/19] weldr: define the pulp.ostree upload settings --- internal/weldr/upload.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/internal/weldr/upload.go b/internal/weldr/upload.go index 99ee19dcf4..81090467a0 100644 --- a/internal/weldr/upload.go +++ b/internal/weldr/upload.go @@ -108,6 +108,16 @@ type containerUploadSettings struct { func (containerUploadSettings) isUploadSettings() {} +type pulpOSTreeUploadSettings struct { + ServerAddress string `json:"server_address"` + Repository string `json:"repository"` + BasePath string `json:"basepath,omitempty"` + Username string `json:"username"` + Password string `json:"password"` +} + +func (pulpOSTreeUploadSettings) isUploadSettings() {} + type uploadRequest struct { Provider string `json:"provider"` ImageName string `json:"image_name"` @@ -147,6 +157,8 @@ func (u *uploadRequest) UnmarshalJSON(data []byte) error { settings = new(awsS3UploadSettings) case "container": settings = new(containerUploadSettings) + case "pulp.ostree": + settings = new(pulpOSTreeUploadSettings) default: return errors.New("unexpected provider name") } @@ -235,6 +247,15 @@ func targetsToUploadResponses(targets []*target.Target, state ComposeState) []up // AccessKeyID and SecretAccessKey are intentionally not included. } uploads = append(uploads, upload) + case *target.PulpOSTreeTargetOptions: + upload.ProviderName = "pulp.ostree" + upload.Settings = &pulpOSTreeUploadSettings{ + ServerAddress: options.ServerAddress, + Repository: options.Repository, + BasePath: options.BasePath, + // Username and Password are intentionally not included. + } + uploads = append(uploads, upload) } } @@ -363,6 +384,10 @@ func uploadRequestToTarget(u uploadRequest, imageType distro.ImageType) *target. TlsVerify: options.TlsVerify, } + case *pulpOSTreeUploadSettings: + t.Name = target.TargetNamePulpOSTree + convertedOptions := target.PulpOSTreeTargetOptions(*options) + t.Options = &convertedOptions } return &t From 7cbde549861df412c78efcf66669be8e5d60e54d Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Thu, 17 Aug 2023 15:05:26 +0200 Subject: [PATCH 12/19] cmd: add a osbuild-upload-pulp-ostree utility Simple command line wrapper around the UploadAndDistributeCommit() function. --- cmd/osbuild-upload-pulp-ostree/main.go | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 cmd/osbuild-upload-pulp-ostree/main.go diff --git a/cmd/osbuild-upload-pulp-ostree/main.go b/cmd/osbuild-upload-pulp-ostree/main.go new file mode 100644 index 0000000000..bab8c2e844 --- /dev/null +++ b/cmd/osbuild-upload-pulp-ostree/main.go @@ -0,0 +1,44 @@ +package main + +import ( + "encoding/json" + "flag" + "fmt" + "io" + "os" + + "github.com/osbuild/osbuild-composer/internal/upload/pulp" +) + +func check(err error) { + if err != nil { + fmt.Fprintln(os.Stderr, err.Error()) + os.Exit(1) + } +} + +func readCredentials(credPath string) *pulp.Credentials { + fp, err := os.Open(credPath) + check(err) + data, err := io.ReadAll(fp) + check(err) + var creds pulp.Credentials + check(json.Unmarshal(data, &creds)) + return &creds +} + +func main() { + var filename, apiURL, repository, basePath, credsFile string + flag.StringVar(&filename, "archive", "", "ostree archive to upload") + flag.StringVar(&apiURL, "url", "", "server URL") + flag.StringVar(&repository, "repository", "", "repository name") + flag.StringVar(&basePath, "base-path", "", "base path for distribution (if the repository does not already exist)") + flag.StringVar(&credsFile, "credentials", "", `file containing credentials (format: {"username": "...", "password": "..."})`) + flag.Parse() + + client := pulp.NewClient(apiURL, readCredentials(credsFile)) + + repoURL, err := client.UploadAndDistributeCommit(filename, repository, basePath) + check(err) + fmt.Printf("The commit will be available in the repository at %s\n", repoURL) +} From 74a6beff511b86452860f5c76fcb83b8be574f4e Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Mon, 21 Aug 2023 20:07:47 +0200 Subject: [PATCH 13/19] osbuild-worker: add pulp configuration Add support for pulp client configuration in the worker config. Add test values to worker config test. --- cmd/osbuild-upload-pulp-ostree/main.go | 16 +++--------- cmd/osbuild-worker/config.go | 6 +++++ cmd/osbuild-worker/config_test.go | 8 ++++++ cmd/osbuild-worker/jobimpl-osbuild.go | 35 ++++++++++++++++++++------ cmd/osbuild-worker/main.go | 11 ++++++++ internal/upload/pulp/pulp.go | 24 ++++++++++++++++-- 6 files changed, 77 insertions(+), 23 deletions(-) diff --git a/cmd/osbuild-upload-pulp-ostree/main.go b/cmd/osbuild-upload-pulp-ostree/main.go index bab8c2e844..9fa4488348 100644 --- a/cmd/osbuild-upload-pulp-ostree/main.go +++ b/cmd/osbuild-upload-pulp-ostree/main.go @@ -1,10 +1,8 @@ package main import ( - "encoding/json" "flag" "fmt" - "io" "os" "github.com/osbuild/osbuild-composer/internal/upload/pulp" @@ -17,16 +15,6 @@ func check(err error) { } } -func readCredentials(credPath string) *pulp.Credentials { - fp, err := os.Open(credPath) - check(err) - data, err := io.ReadAll(fp) - check(err) - var creds pulp.Credentials - check(json.Unmarshal(data, &creds)) - return &creds -} - func main() { var filename, apiURL, repository, basePath, credsFile string flag.StringVar(&filename, "archive", "", "ostree archive to upload") @@ -36,9 +24,11 @@ func main() { flag.StringVar(&credsFile, "credentials", "", `file containing credentials (format: {"username": "...", "password": "..."})`) flag.Parse() - client := pulp.NewClient(apiURL, readCredentials(credsFile)) + client, err := pulp.NewClientFromFile(apiURL, credsFile) + check(err) repoURL, err := client.UploadAndDistributeCommit(filename, repository, basePath) check(err) + fmt.Printf("The commit will be available in the repository at %s\n", repoURL) } diff --git a/cmd/osbuild-worker/config.go b/cmd/osbuild-worker/config.go index 43491d0cca..e48bacb233 100644 --- a/cmd/osbuild-worker/config.go +++ b/cmd/osbuild-worker/config.go @@ -66,6 +66,11 @@ type containersConfig struct { TLSVerify bool `toml:"tls_verify"` } +type pulpConfig struct { + Credentials string `toml:"credentials"` + ServerURL string `toml:"server_address"` +} + type workerConfig struct { Composer *composerConfig `toml:"composer"` Koji map[string]kojiServerConfig `toml:"koji"` @@ -76,6 +81,7 @@ type workerConfig struct { Authentication *authenticationConfig `toml:"authentication"` Containers *containersConfig `toml:"containers"` OCI *ociConfig `toml:"oci"` + Pulp *pulpConfig `toml:"pulp"` // default value: /api/worker/v1 BasePath string `toml:"base_path"` DNFJson string `toml:"dnf-json"` diff --git a/cmd/osbuild-worker/config_test.go b/cmd/osbuild-worker/config_test.go index 34b5115c54..7e0e947460 100644 --- a/cmd/osbuild-worker/config_test.go +++ b/cmd/osbuild-worker/config_test.go @@ -65,6 +65,10 @@ oauth_url = "https://example.com/token" client_id = "toucan" client_secret = "/etc/osbuild-worker/client_secret" offline_token = "/etc/osbuild-worker/offline_token" + +[pulp] +credentials = "/etc/osbuild-worker/pulp-creds" +server_address = "https://example.com/pulp" `, want: &workerConfig{ BasePath: "/api/image-builder-worker/v1", @@ -116,6 +120,10 @@ offline_token = "/etc/osbuild-worker/offline_token" ClientId: "toucan", ClientSecretPath: "/etc/osbuild-worker/client_secret", }, + Pulp: &pulpConfig{ + Credentials: "/etc/osbuild-worker/pulp-creds", + ServerURL: "https://example.com/pulp", + }, }, }, { diff --git a/cmd/osbuild-worker/jobimpl-osbuild.go b/cmd/osbuild-worker/jobimpl-osbuild.go index 307cdebda2..2c186ca944 100644 --- a/cmd/osbuild-worker/jobimpl-osbuild.go +++ b/cmd/osbuild-worker/jobimpl-osbuild.go @@ -85,6 +85,7 @@ type OSBuildJobImpl struct { AWSBucket string S3Config S3Configuration ContainersConfig ContainersConfiguration + PulpConfig PulpConfiguration } // Returns an *awscloud.AWS object with the credentials of the request. If they @@ -300,24 +301,42 @@ func (impl *OSBuildJobImpl) getContainerClient(destination string, targetOptions return client, nil } +// Read server configuration and credentials from the target options and fall +// back to worker config if they are not set (targetOptions take precedent). +// Mixing sources is allowed. For example, the server address can be configured +// in the worker config while the targetOptions provide the credentials (or +// vice versa). func (impl *OSBuildJobImpl) getPulpClient(targetOptions *target.PulpOSTreeTargetOptions) (*pulp.Client, error) { - creds := &pulp.Credentials{} + + var creds *pulp.Credentials + // Credentials are considered together. In other words, the username can't + // come from a different config source than the password. if targetOptions.Username != "" && targetOptions.Password != "" { creds = &pulp.Credentials{ Username: targetOptions.Username, Password: targetOptions.Password, } - } else { - // TODO: read from worker configuration - return nil, fmt.Errorf("no credentials for pulp were set") } - - if targetOptions.ServerAddress == "" { - // TODO: read from worker configuration + address := targetOptions.ServerAddress + if address == "" { + // fall back to worker configuration for server address + address = impl.PulpConfig.ServerAddress + } + if address == "" { return nil, fmt.Errorf("pulp server address not set") } - return pulp.NewClient(targetOptions.ServerAddress, creds), nil + if creds != nil { + return pulp.NewClient(address, creds), nil + } + + // read from worker configuration + if impl.PulpConfig.CredsFilePath == "" { + return nil, fmt.Errorf("pulp credentials not set") + } + + // use creds file loader helper + return pulp.NewClientFromFile(address, impl.PulpConfig.CredsFilePath) } func (impl *OSBuildJobImpl) Run(job worker.Job) error { diff --git a/cmd/osbuild-worker/main.go b/cmd/osbuild-worker/main.go index 3c5a7b70e5..b4409e83fa 100644 --- a/cmd/osbuild-worker/main.go +++ b/cmd/osbuild-worker/main.go @@ -426,6 +426,13 @@ func main() { } } + var pulpCredsFilePath = "" + var pulpAddress = "" + if config.Pulp != nil { + pulpCredsFilePath = config.Pulp.Credentials + pulpAddress = config.Pulp.ServerURL + } + // depsolve jobs can be done during other jobs depsolveCtx, depsolveCtxCancel := context.WithCancel(context.Background()) solver := dnfjson.NewBaseSolver(rpmmd_cache) @@ -487,6 +494,10 @@ func main() { CertPath: containersCertPath, TLSVerify: &containersTLSVerify, }, + PulpConfig: PulpConfiguration{ + CredsFilePath: pulpCredsFilePath, + ServerAddress: pulpAddress, + }, }, worker.JobTypeKojiInit: &KojiInitJobImpl{ KojiServers: kojiServers, diff --git a/internal/upload/pulp/pulp.go b/internal/upload/pulp/pulp.go index c256a93293..b2e7653f67 100644 --- a/internal/upload/pulp/pulp.go +++ b/internal/upload/pulp/pulp.go @@ -2,6 +2,7 @@ package pulp import ( "context" + "encoding/json" "fmt" "io" "net/http" @@ -17,8 +18,27 @@ type Client struct { } type Credentials struct { - Username string - Password string + Username string `json:"username"` + Password string `json:"password"` +} + +func NewClientFromFile(url, path string) (*Client, error) { + fp, err := os.Open(path) + if err != nil { + return nil, err + } + defer fp.Close() + + data, err := io.ReadAll(fp) + if err != nil { + return nil, err + } + var creds Credentials + if err := json.Unmarshal(data, &creds); err != nil { + return nil, err + } + + return NewClient(url, &creds), nil } func NewClient(url string, creds *Credentials) *Client { From 7e712d20d7778c31174d8982a9987e2003943cbc Mon Sep 17 00:00:00 2001 From: yih Date: Wed, 6 Sep 2023 21:38:37 +0800 Subject: [PATCH 14/19] add pulp test case --- test/cases/ostree.sh | 483 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 470 insertions(+), 13 deletions(-) diff --git a/test/cases/ostree.sh b/test/cases/ostree.sh index 815cd45a99..42eef64dc5 100755 --- a/test/cases/ostree.sh +++ b/test/cases/ostree.sh @@ -13,6 +13,7 @@ fi # Set up variables. FIREWALL_FEATURE="false" SYSROOT_RO="false" +SKIP_PULP_TEST="true" # Provision the software under test. /usr/libexec/osbuild-composer-test/provision.sh none @@ -59,7 +60,6 @@ case "${ID}-${VERSION_ID}" in FIREWALL_FEATURE="true" DIRS_FILES_CUSTOMIZATION="true" - # Use a stable installer image unless it's the nightly pipeline BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-8/RHEL-8/8.8.0/BaseOS/x86_64/os/" if [ "${NIGHTLY:=false}" == "true" ]; then @@ -75,7 +75,6 @@ case "${ID}-${VERSION_ID}" in FIREWALL_FEATURE="true" DIRS_FILES_CUSTOMIZATION="true" - # Use a stable installer image unless it's the nightly pipeline BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-8/RHEL-8/8.8.0/BaseOS/x86_64/os/" if [ "${NIGHTLY:=false}" == "true" ]; then @@ -117,7 +116,7 @@ case "${ID}-${VERSION_ID}" in FIREWALL_FEATURE="true" DIRS_FILES_CUSTOMIZATION="true" SYSROOT_RO="true" - + SKIP_PULP_TEST="false" # Use a stable installer image unless it's the nightly pipeline BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-9/RHEL-9/9.2.0/BaseOS/x86_64/os/" if [ "${NIGHTLY:=false}" == "true" ]; then @@ -224,6 +223,7 @@ COMPOSE_INFO=${TEMPDIR}/compose-info-${IMAGE_KEY}.json FEDORA_IMAGE_DIGEST="sha256:4d76a7480ce1861c95975945633dc9d03807ffb45c64b664ef22e673798d414b" FEDORA_LOCAL_NAME="localhost/fedora-minimal:v1" PROD_REPO_URL=http://192.168.100.1/repo +PROD_REPO=/var/www/html/repo # SSH setup. SSH_OPTIONS=(-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5) @@ -231,6 +231,14 @@ SSH_DATA_DIR=$(/usr/libexec/osbuild-composer-test/gen-ssh.sh) SSH_KEY=${SSH_DATA_DIR}/id_rsa SSH_KEY_PUB="$(cat "${SSH_KEY}".pub)" +# Pulp setup +PULP_CONFIG_FILE="$(pwd)/pulp.toml" +PULP_SERVER="http://192.168.100.1:9090" +PULP_USERNAME="admin" +PULP_PASSWORD="foobar" +PULP_REPO="commit" +PULP_BASEPATH="commit" + # Get the compose log. get_compose_log () { COMPOSE_ID=$1 @@ -259,9 +267,6 @@ get_compose_metadata () { # Build ostree image. build_image() { - blueprint_name=$1 - image_type=$2 - # Get worker unit file so we can watch the journal. WORKER_UNIT=$(sudo systemctl list-units | grep -o -E "osbuild.*worker.*\.service") sudo journalctl -af -n 1 -u "${WORKER_UNIT}" & @@ -271,12 +276,33 @@ build_image() { # Start the compose. greenprint "๐Ÿš€ Starting compose" - if [ $# -eq 4 ]; then - repo_url=$3 - parent_ref=$4 - sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" --parent "$parent_ref" --url "$repo_url" "$blueprint_name" "$image_type" | tee "$COMPOSE_START" + pulp_enabled=$1 + blueprint_name=$2 + image_type=$3 + if [ "$pulp_enabled" == "nopulp" ]; then + # for nopulp first build + if [ $# -eq 3 ]; then + sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" "$blueprint_name" "$image_type" | tee "$COMPOSE_START" + # for nopulp upgrade build + else + repo_url=$4 + parent_ref=$5 + sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" --parent "$parent_ref" --url "$repo_url" "$blueprint_name" "$image_type" | tee "$COMPOSE_START" + fi else - sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" "$blueprint_name" "$image_type" | tee "$COMPOSE_START" + # for pulp first build + if [ $# -eq 5 ]; then + image_key=$4 + pulp_config=$5 + sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" "$blueprint_name" "$image_type" "$image_key" "$pulp_config" | tee "$COMPOSE_START" + # for pulp upgrade build + else + image_key=$4 + pulp_config=$5 + repo_url=$6 + parent_ref=$7 + sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" --parent "$parent_ref" --url "$repo_url" "$blueprint_name" "$image_type" "$image_key" "$pulp_config" | tee "$COMPOSE_START" + fi fi COMPOSE_ID=$(get_build_info ".build_id" "$COMPOSE_START") @@ -441,7 +467,7 @@ sudo composer-cli blueprints push "$BLUEPRINT_FILE" sudo composer-cli blueprints depsolve ostree # Build installation image. -build_image ostree "$IMAGE_TYPE" +build_image nopulp ostree "$IMAGE_TYPE" # Start httpd to serve ostree repo. greenprint "๐Ÿš€ Starting httpd daemon" @@ -698,7 +724,7 @@ greenprint "๐Ÿ•น Get ostree installed commit value" PARENT_HASH=$(curl "${PROD_REPO_URL}/refs/heads/${OSTREE_REF}") # Build upgrade image. -build_image upgrade "$IMAGE_TYPE" "$PROD_REPO_URL" "$PARENT_HASH" +build_image nopulp upgrade "$IMAGE_TYPE" "$PROD_REPO_URL" "$PARENT_HASH" # Download the image and extract tar into web server root folder. greenprint "๐Ÿ“ฅ Downloading and extracting the image" @@ -773,6 +799,437 @@ sudo ansible-playbook -v -i "${TEMPDIR}"/inventory \ /usr/share/tests/osbuild-composer/ansible/check_ostree.yaml || RESULTS=0 check_result +greenprint "๐Ÿงน Clean up VM" +if [[ $(sudo virsh domstate "${IMAGE_KEY}") == "running" ]]; then + sudo virsh destroy "${IMAGE_KEY}" +fi +sudo virsh undefine "${IMAGE_KEY}" --nvram +sudo virsh vol-delete --pool images "$LIBVIRT_IMAGE_PATH" + +# The following pulp test is only for rhel-9.3 and later +if [[ "${SKIP_PULP_TEST}" == "true" ]]; then + greenprint "๐Ÿ“‹ Current OS does not support pulp, skip pulp test and exit" + clean_up + exit 0 +fi + +################################################## +## +## ostree upload commit to pulp +## +################################################## + +# Setup pulp server +greenprint "๐Ÿ“„ Setup pulp server with one container" +mkdir -p settings pulp_storage pgsql containers +echo "CONTENT_ORIGIN='http://$(hostname):8080' +ANSIBLE_API_HOSTNAME='http://$(hostname):8080' +ANSIBLE_CONTENT_HOSTNAME='http://$(hostname):8080/pulp/content' +CACHE_ENABLED=True" >> settings/settings.py +sudo podman run --detach \ + --publish 9090:80 \ + --name pulp \ + --volume "$(pwd)/settings":/etc/pulp:Z \ + --volume "$(pwd)/pulp_storage":/var/lib/pulp:Z \ + --volume "$(pwd)/pgsql":/var/lib/pgsql:Z \ + --volume "$(pwd)/containers":/var/lib/containers:Z \ + --device /dev/fuse \ + docker.io/pulp/pulp:latest + +# Wait until pulp service is fully functional +sleep 120 + +# Rotate pulp admin password +greenprint "๐Ÿ“„ Rotate pulp admin password" +/usr/bin/expect <<-EOF +spawn sudo podman exec -it pulp bash -c "pulpcore-manager reset-admin-password" +expect { +"*password" { send "${PULP_PASSWORD}\r"; exp_continue } +"*again" { send "${PULP_PASSWORD}\r" } +} +expect eof +EOF + +# Write a pulp config file. +greenprint "๐Ÿ“„ Prepare pulp config file" +tee "$PULP_CONFIG_FILE" > /dev/null << EOF +provider = "pulp.ostree" + +[settings] +server_address = "${PULP_SERVER}" +repository = "${PULP_REPO}" +basepath = "${PULP_BASEPATH}" +username = "${PULP_USERNAME}" +password = "${PULP_PASSWORD}" +EOF + +greenprint "๐Ÿ“„ pulp config file" +cat "$PULP_CONFIG_FILE" + +# Write a blueprint for ostree image. +tee "$BLUEPRINT_FILE" > /dev/null << EOF +name = "ostree" +description = "A base ostree image" +version = "0.0.1" +modules = [] +groups = [] + +[[packages]] +name = "python3" +version = "*" + +[[packages]] +name = "sssd" +version = "*" + +[[customizations.user]] +name = "${SSH_USER}" +description = "Administrator account" +password = "\$6\$GRmb7S0p8vsYmXzH\$o0E020S.9JQGaHkszoog4ha4AQVs3sk8q0DvLjSMxoxHBKnB2FBXGQ/OkwZQfW/76ktHd0NX5nls2LPxPuUdl." +key = "${SSH_KEY_PUB}" +home = "/home/${SSH_USER}/" +groups = ["wheel"] + +[[containers]] +source = "quay.io/fedora/fedora:latest" + +[[containers]] +source = "registry.gitlab.com/redhat/services/products/image-builder/ci/osbuild-composer/fedora-minimal@${FEDORA_IMAGE_DIGEST}" +name = "${FEDORA_LOCAL_NAME}" + +[[customizations.directories]] +path = "/etc/custom_dir/dir1" +user = 1020 +group = 1020 +mode = "0770" +ensure_parents = true + +[[customizations.files]] +path = "/etc/systemd/system/custom.service" +data = "[Unit]\nDescription=Custom service\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/false\n[Install]\nWantedBy=multi-user.target\n" + +[[customizations.files]] +path = "/etc/custom_file.txt" +data = "image builder is the best\n" + +[[customizations.directories]] +path = "/etc/systemd/system/custom.service.d" + +[[customizations.files]] +path = "/etc/systemd/system/custom.service.d/override.conf" +data = "[Service]\nExecStart=\nExecStart=/usr/bin/cat /etc/custom_file.txt\n" + +[customizations.services] +enabled = ["custom.service"] +EOF + +greenprint "๐Ÿ“„ ostree blueprint" +cat "$BLUEPRINT_FILE" + +# Prepare the blueprint for the compose. +greenprint "๐Ÿ“‹ Preparing blueprint" +sudo composer-cli blueprints push "$BLUEPRINT_FILE" +sudo composer-cli blueprints depsolve ostree + +# Build commit image +build_image pulp ostree "$IMAGE_TYPE" test "$PULP_CONFIG_FILE" + +# Workaround for bug https://github.com/osbuild/osbuild-composer/issues/3673 +greenprint "Waiting for ostree commit import" +while ! curl -sf "${PULP_SERVER}/pulp/content/${PULP_BASEPATH}/refs/heads/${OSTREE_REF}"; do + echo -n "." + sleep 5 +done + +# Pull commit from pulp to local repo +greenprint "Pull commit from pulp to production repo" +sudo rm -fr "$PROD_REPO" +sudo mkdir -p "$PROD_REPO" +sudo ostree --repo="$PROD_REPO" init --mode=archive +sudo ostree --repo="$PROD_REPO" remote add --no-gpg-verify edge-pulp http://localhost:9090/pulp/content/${PULP_REPO}/ +sudo ostree --repo="$PROD_REPO" pull --mirror edge-pulp "$OSTREE_REF" + +# Clean compose and blueprints. +greenprint "Clean up osbuild-composer" +sudo composer-cli compose delete "${COMPOSE_ID}" > /dev/null +sudo composer-cli blueprints delete ostree > /dev/null + +# Ensure SELinux is happy with our new images. +greenprint "๐Ÿ‘ฟ Running restorecon on image directory" +sudo restorecon -Rv /var/lib/libvirt/images/ + +# Ensure SELinux is happy with all objects files. +greenprint "๐Ÿ‘ฟ Running restorecon on web server root folder" +sudo restorecon -Rv "${PROD_REPO}" > /dev/null + +# Create qcow2 file for virt install. +greenprint "Create qcow2 file for virt install" +LIBVIRT_IMAGE_PATH=/var/lib/libvirt/images/${IMAGE_KEY}-pulp.qcow2 +sudo qemu-img create -f qcow2 "${LIBVIRT_IMAGE_PATH}" 20G + +# Write kickstart file for ostree image installation. +greenprint "Generate kickstart file" +tee "$KS_FILE" > /dev/null << STOPHERE +text +lang en_US.UTF-8 +keyboard us +timezone --utc Etc/UTC + +selinux --enforcing +rootpw --lock --iscrypted locked +user --name=${SSH_USER} --groups=wheel --iscrypted --password=\$6\$1LgwKw9aOoAi/Zy9\$Pn3ErY1E8/yEanJ98evqKEW.DZp24HTuqXPJl6GYCm8uuobAmwxLv7rGCvTRZhxtcYdmC0.XnYRSR9Sh6de3p0 +sshkey --username=${SSH_USER} "${SSH_KEY_PUB}" + +bootloader --timeout=1 --append="net.ifnames=0 modprobe.blacklist=vc4" + +network --bootproto=dhcp --device=link --activate --onboot=on + +zerombr +clearpart --all --initlabel --disklabel=msdos +autopart --nohome --noswap --type=plain +ostreesetup --nogpg --osname=${IMAGE_TYPE} --remote=${IMAGE_TYPE} --url=${PROD_REPO_URL} --ref=${OSTREE_REF} +poweroff + +%post --log=/var/log/anaconda/post-install.log --erroronfail + +# no sudo password for SSH user +echo -e '${SSH_USER}\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers + +# Remove any persistent NIC rules generated by udev +rm -vf /etc/udev/rules.d/*persistent-net*.rules +# And ensure that we will do DHCP on eth0 on startup +cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF +DEVICE="eth0" +BOOTPROTO="dhcp" +ONBOOT="yes" +TYPE="Ethernet" +PERSISTENT_DHCLIENT="yes" +EOF + +echo "Packages within this iot or edge image:" +echo "-----------------------------------------------------------------------" +rpm -qa | sort +echo "-----------------------------------------------------------------------" +# Note that running rpm recreates the rpm db files which aren't needed/wanted +rm -f /var/lib/rpm/__db* + +echo "Zeroing out empty space." +# This forces the filesystem to reclaim space from deleted files +dd bs=1M if=/dev/zero of=/var/tmp/zeros || : +rm -f /var/tmp/zeros +echo "(Don't worry -- that out-of-space error was expected.)" + +%end +STOPHERE + +sudo sed -i '/^user\|^sshkey/d' "${KS_FILE}" + +# Install ostree image via anaconda. +greenprint "Install ostree image via anaconda" +sudo virt-install --initrd-inject="${KS_FILE}" \ + --extra-args="inst.ks=file:/ks.cfg console=ttyS0,115200" \ + --name="${IMAGE_KEY}"\ + --disk path="${LIBVIRT_IMAGE_PATH}",format=qcow2 \ + --ram 3072 \ + --vcpus 2 \ + --network network=integration,mac=34:49:22:B0:83:30 \ + --os-variant ${OS_VARIANT} \ + --location ${location_arg} \ + --nographics \ + --noautoconsole \ + --wait=-1 \ + --noreboot + +# Start VM. +greenprint "Start VM" +sudo virsh start "${IMAGE_KEY}" + +# Check for ssh ready to go. +greenprint "๐Ÿ›ƒ Checking for SSH is ready to go" +for LOOP_COUNTER in $(seq 0 30); do + RESULTS="$(wait_for_ssh_up $GUEST_ADDRESS)" + if [[ $RESULTS == 1 ]]; then + echo "SSH is ready now! ๐Ÿฅณ" + break + fi + sleep 10 +done + +# With new ostree-libs-2022.6-3, edge vm needs to reboot twice to make the /sysroot readonly +sudo ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" "${SSH_USER}@${GUEST_ADDRESS}" 'nohup sudo systemctl reboot &>/dev/null & exit' +# Sleep 10 seconds here to make sure vm restarted already +sleep 10 + +# Check for ssh ready to go. +greenprint "๐Ÿ›ƒ Checking for SSH is ready to go" +for LOOP_COUNTER in $(seq 0 30); do + RESULTS="$(wait_for_ssh_up $GUEST_ADDRESS)" + if [[ $RESULTS == 1 ]]; then + echo "SSH is ready now! ๐Ÿฅณ" + break + fi + sleep 10 +done + +# Check image installation result +check_result + +################################################## +## +## ostree commit upload to pulp upgrade +## +################################################## + +# Write a blueprint for ostree image. +tee "$BLUEPRINT_FILE" > /dev/null << EOF +name = "upgrade" +description = "An upgrade ostree image" +version = "0.0.2" +modules = [] +groups = [] + +[[packages]] +name = "python3" +version = "*" + +[[packages]] +name = "sssd" +version = "*" + +[[packages]] +name = "wget" +version = "*" + +[[customizations.user]] +name = "${SSH_USER}" +description = "Administrator account" +password = "\$6\$GRmb7S0p8vsYmXzH\$o0E020S.9JQGaHkszoog4ha4AQVs3sk8q0DvLjSMxoxHBKnB2FBXGQ/OkwZQfW/76ktHd0NX5nls2LPxPuUdl." +key = "${SSH_KEY_PUB}" +home = "/home/${SSH_USER}/" +groups = ["wheel"] + +[[containers]] +source = "quay.io/fedora/fedora:latest" + +[[containers]] +source = "registry.gitlab.com/redhat/services/products/image-builder/ci/osbuild-composer/fedora-minimal@${FEDORA_IMAGE_DIGEST}" +name = "${FEDORA_LOCAL_NAME}" + +[[customizations.firewall.zones]] +name = "trusted" +sources = ["192.168.100.51"] +[[customizations.firewall.zones]] +name = "work" +sources = ["192.168.100.52"] + +[[customizations.directories]] +path = "/etc/custom_dir/dir1" +user = 1020 +group = 1020 +mode = "0770" +ensure_parents = true + +[[customizations.files]] +path = "/etc/systemd/system/custom.service" +data = "[Unit]\nDescription=Custom service\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/false\n[Install]\nWantedBy=multi-user.target\n" + +[[customizations.files]] +path = "/etc/custom_file.txt" +data = "image builder is the best\n" + +[[customizations.directories]] +path = "/etc/systemd/system/custom.service.d" + +[[customizations.files]] +path = "/etc/systemd/system/custom.service.d/override.conf" +data = "[Service]\nExecStart=\nExecStart=/usr/bin/cat /etc/custom_file.txt\n" + +[customizations.services] +enabled = ["custom.service"] +EOF + +greenprint "๐Ÿ“„ upgrade blueprint" +cat "$BLUEPRINT_FILE" + +# Prepare the blueprint for the compose. +greenprint "๐Ÿ“‹ Preparing blueprint" +sudo composer-cli blueprints push "$BLUEPRINT_FILE" +sudo composer-cli blueprints depsolve upgrade + +greenprint "๐Ÿ•น Get ostree installed commit value" +PARENT_HASH=$(curl "${PROD_REPO_URL}/refs/heads/${OSTREE_REF}") + +# Build upgrade image. +build_image pulp upgrade "$IMAGE_TYPE" test "$PULP_CONFIG_FILE" "$PROD_REPO_URL" "$PARENT_HASH" + +# Workaround for bug https://github.com/osbuild/osbuild-composer/issues/3673 +# Cannot use curl to check because parent commit is already imported +greenprint "Waiting for ostree commit import" +sleep 180 + +# Clean compose and blueprints. +greenprint "Clean up osbuild-composer again" +sudo composer-cli compose delete "${COMPOSE_ID}" > /dev/null +sudo composer-cli blueprints delete upgrade > /dev/null + +# Pull content from pulp to local repo +greenprint "Pull upgrade commit from pulp to local repo" +sudo ostree --repo="$PROD_REPO" pull --mirror edge-pulp "$OSTREE_REF" +sudo ostree --repo="$PROD_REPO" summary -u + +# Ensure SELinux is happy with all objects files. +greenprint "๐Ÿ‘ฟ Running restorecon on web server root folder" +sudo restorecon -Rv "${PROD_REPO}" > /dev/null + +# Get ostree commit value. +greenprint "๐Ÿ•น Get ostree upgrade commit value" +UPGRADE_HASH=$(curl "${PROD_REPO_URL}/refs/heads/${OSTREE_REF}") + +# Upgrade image/commit. +greenprint "Upgrade ostree image/commit" +sudo ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" "${SSH_USER}@${GUEST_ADDRESS}" 'sudo rpm-ostree upgrade || { sudo rpm-ostree status; sudo journalctl -b -r -u rpm-ostreed; exit 1; }' +sudo ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" "${SSH_USER}@${GUEST_ADDRESS}" 'nohup sudo systemctl reboot &>/dev/null & exit' +# Sleep 10 seconds here to make sure vm restarted already +sleep 10 + +# Check for ssh ready to go. +greenprint "๐Ÿ›ƒ Checking for SSH is ready to go" +# shellcheck disable=SC2034 # Unused variables left for readability +for LOOP_COUNTER in $(seq 0 30); do + RESULTS="$(wait_for_ssh_up $GUEST_ADDRESS)" + if [[ $RESULTS == 1 ]]; then + echo "SSH is ready now! ๐Ÿฅณ" + break + fi + sleep 10 +done + +# Check ostree upgrade result +check_result + +# Add instance IP address into /etc/ansible/hosts +sudo tee "${TEMPDIR}"/inventory > /dev/null << EOF +[ostree_guest] +${GUEST_ADDRESS} + +[ostree_guest:vars] +ansible_python_interpreter=/usr/bin/python3 +ansible_user=${SSH_USER} +ansible_private_key_file=${SSH_KEY} +ansible_ssh_common_args="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" +EOF + +# Test IoT/Edge OS +sudo ansible-playbook -v -i "${TEMPDIR}"/inventory \ + -e image_type=${IMAGE_TYPE} \ + -e ostree_commit="${UPGRADE_HASH}" \ + -e embeded_container="${EMBEDED_CONTAINER}" \ + -e firewall_feature="${FIREWALL_FEATURE}" \ + -e test_custom_dirs_files="${DIRS_FILES_CUSTOMIZATION}" \ + -e sysroot_ro="$SYSROOT_RO" \ + /usr/share/tests/osbuild-composer/ansible/check_ostree.yaml || RESULTS=0 +check_result + # Final success clean up clean_up From 24d7a17bf491e036144258533486a011b40a0820 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Fri, 15 Sep 2023 14:36:53 +0200 Subject: [PATCH 15/19] upload/pulp: wait for tasks in UploadAndDistributeCommit When uploading and distributing a commit, wait for any async tasks to finish before returning. There are two tasks that can block this function: - Creating a distribution: this only happens when a new repository is created. - Import commit: this will always happen in this function. --- internal/upload/pulp/pulp.go | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/internal/upload/pulp/pulp.go b/internal/upload/pulp/pulp.go index b2e7653f67..da21f5d954 100644 --- a/internal/upload/pulp/pulp.go +++ b/internal/upload/pulp/pulp.go @@ -7,6 +7,8 @@ import ( "io" "net/http" "os" + "sync" + "time" "github.com/osbuild/pulp-client/pulpclient" "github.com/sirupsen/logrus" @@ -247,6 +249,26 @@ func (cl *Client) TaskWaitingOrRunning(task string) bool { return state == TASK_RUNNING || state == TASK_WAITING } +// Block until all tasks are complete. +func (cl *Client) waitFor(tasks []string) { + wg := sync.WaitGroup{} + logrus.Info("setting up wait group") + for idx := range tasks { + task := tasks[idx] + logrus.Infof("task %q", task) + wg.Add(1) + go func() { + logrus.Infof("waiting for task %q to finish", task) + for cl.TaskWaitingOrRunning(task) { + time.Sleep(15 * time.Second) + } + logrus.Infof("task %q done", task) + wg.Done() + }() + } + wg.Wait() +} + // UploadAndDistributeCommit uploads a commit, creates a repository if // necessary, imports the commit to the repository, and distributes the // repository. @@ -273,6 +295,8 @@ func (cl *Client) UploadAndDistributeCommit(archivePath, repoName, basePath stri return "", err } + tasks := make([]string, 0) + if repoHref == "" { // repository does not exist: create it and distribute logrus.Infof("repository not found - creating repository %q", repoName) @@ -284,15 +308,22 @@ func (cl *Client) UploadAndDistributeCommit(archivePath, repoName, basePath stri repoHref = href logrus.Infof("created repository %q (%s)", repoName, repoHref) logrus.Infof("creating distribution at %q", basePath) - if _, err := cl.DistributeOSTreeRepo(basePath, repoName, repoHref); err != nil { + distTask, err := cl.DistributeOSTreeRepo(basePath, repoName, repoHref) + if err != nil { return "", err } + tasks = append(tasks, distTask) } logrus.Infof("importing commit %q to repo %q", fileHref, repoHref) - if _, err := cl.ImportCommit(fileHref, repoHref); err != nil { + importTask, err := cl.ImportCommit(fileHref, repoHref) + if err != nil { return "", err } + tasks = append(tasks, importTask) + + logrus.Infof("blocking on %d tasks", len(tasks)) + cl.waitFor(tasks) repoURL, err := cl.GetDistributionURLForOSTreeRepo(repoHref) if err != nil { From ed95a8fce9f60e88566368bd993923510abe1527 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Fri, 15 Sep 2023 15:46:20 +0200 Subject: [PATCH 16/19] cmd: update the final message in osbuild-upload-pulp-ostree Since the UploadAndDistributeCommit() function now waits for all tasks to finish, update the wording of the final message to indicate that the commit is available. --- cmd/osbuild-upload-pulp-ostree/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/osbuild-upload-pulp-ostree/main.go b/cmd/osbuild-upload-pulp-ostree/main.go index 9fa4488348..f39941590c 100644 --- a/cmd/osbuild-upload-pulp-ostree/main.go +++ b/cmd/osbuild-upload-pulp-ostree/main.go @@ -30,5 +30,5 @@ func main() { repoURL, err := client.UploadAndDistributeCommit(filename, repository, basePath) check(err) - fmt.Printf("The commit will be available in the repository at %s\n", repoURL) + fmt.Printf("The commit is available in the repository at %s\n", repoURL) } From b642a12ec7589ebc0fef9e9f30bbc827b3b98967 Mon Sep 17 00:00:00 2001 From: yih Date: Tue, 19 Sep 2023 16:44:12 +0800 Subject: [PATCH 17/19] update pulp test case --- test/cases/ostree.sh | 43 ++++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/test/cases/ostree.sh b/test/cases/ostree.sh index 42eef64dc5..f5d54e3089 100755 --- a/test/cases/ostree.sh +++ b/test/cases/ostree.sh @@ -799,25 +799,26 @@ sudo ansible-playbook -v -i "${TEMPDIR}"/inventory \ /usr/share/tests/osbuild-composer/ansible/check_ostree.yaml || RESULTS=0 check_result -greenprint "๐Ÿงน Clean up VM" -if [[ $(sudo virsh domstate "${IMAGE_KEY}") == "running" ]]; then - sudo virsh destroy "${IMAGE_KEY}" -fi -sudo virsh undefine "${IMAGE_KEY}" --nvram -sudo virsh vol-delete --pool images "$LIBVIRT_IMAGE_PATH" +################################################## +## +## Upload ostree commit to pulp test +## +################################################## -# The following pulp test is only for rhel-9.3 and later +# Pulp test is only for rhel-9.4 and later, as there is no 9.4 in CI, run it on 9.3 first if [[ "${SKIP_PULP_TEST}" == "true" ]]; then greenprint "๐Ÿ“‹ Current OS does not support pulp, skip pulp test and exit" clean_up exit 0 fi -################################################## -## -## ostree upload commit to pulp -## -################################################## +# Clean up VM and resources +greenprint "๐Ÿงน Clean up VM" +if [[ $(sudo virsh domstate "${IMAGE_KEY}") == "running" ]]; then + sudo virsh destroy "${IMAGE_KEY}" +fi +sudo virsh undefine "${IMAGE_KEY}" --nvram +sudo virsh vol-delete --pool images "$LIBVIRT_IMAGE_PATH" # Setup pulp server greenprint "๐Ÿ“„ Setup pulp server with one container" @@ -834,7 +835,7 @@ sudo podman run --detach \ --volume "$(pwd)/pgsql":/var/lib/pgsql:Z \ --volume "$(pwd)/containers":/var/lib/containers:Z \ --device /dev/fuse \ - docker.io/pulp/pulp:latest + docker.io/pulp/pulp:nightly # Wait until pulp service is fully functional sleep 120 @@ -863,7 +864,7 @@ username = "${PULP_USERNAME}" password = "${PULP_PASSWORD}" EOF -greenprint "๐Ÿ“„ pulp config file" +greenprint "๐Ÿ“„ pulp config file:" cat "$PULP_CONFIG_FILE" # Write a blueprint for ostree image. @@ -934,13 +935,6 @@ sudo composer-cli blueprints depsolve ostree # Build commit image build_image pulp ostree "$IMAGE_TYPE" test "$PULP_CONFIG_FILE" -# Workaround for bug https://github.com/osbuild/osbuild-composer/issues/3673 -greenprint "Waiting for ostree commit import" -while ! curl -sf "${PULP_SERVER}/pulp/content/${PULP_BASEPATH}/refs/heads/${OSTREE_REF}"; do - echo -n "." - sleep 5 -done - # Pull commit from pulp to local repo greenprint "Pull commit from pulp to production repo" sudo rm -fr "$PROD_REPO" @@ -1076,7 +1070,7 @@ check_result ################################################## ## -## ostree commit upload to pulp upgrade +## Upload upgrade ostree commit to pulp test ## ################################################## @@ -1162,11 +1156,6 @@ PARENT_HASH=$(curl "${PROD_REPO_URL}/refs/heads/${OSTREE_REF}") # Build upgrade image. build_image pulp upgrade "$IMAGE_TYPE" test "$PULP_CONFIG_FILE" "$PROD_REPO_URL" "$PARENT_HASH" -# Workaround for bug https://github.com/osbuild/osbuild-composer/issues/3673 -# Cannot use curl to check because parent commit is already imported -greenprint "Waiting for ostree commit import" -sleep 180 - # Clean compose and blueprints. greenprint "Clean up osbuild-composer again" sudo composer-cli compose delete "${COMPOSE_ID}" > /dev/null From 1981b97166088926606b06cf011c5c10e1f3f619 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Mon, 2 Oct 2023 17:07:39 +0200 Subject: [PATCH 18/19] mockbuild: add a swapfile to el8 aarch64 builds The pulp client is very large and defines a lot of symbols in on package, which causes very large memory usage on el8 aarch64 (presumably because of 64k page sizes). Adding a 1 GiB swapfile fixes the issue in our CI runners. --- schutzbot/mockbuild.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/schutzbot/mockbuild.sh b/schutzbot/mockbuild.sh index f17bec8ab0..def7e5e436 100755 --- a/schutzbot/mockbuild.sh +++ b/schutzbot/mockbuild.sh @@ -72,6 +72,14 @@ if [[ "$ID" == rhel ]] && sudo subscription-manager status; then DISTRO_VERSION=rhel-${VERSION_ID%.*}-cdn fi +# EL8 aarch64 builds run out of memory and get killed. A swapfile fixes this. +if [[ "$PLATFORM_ID" == "platform:el8" ]] && [[ "${ARCH}" == "aarch64" ]]; then + sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 + sudo chmod 600 /swapfile + sudo mkswap /swapfile + sudo swapon /swapfile +fi + # Relative path of the repository โ€“ used for constructing both the local and # remote paths below, so that they're consistent. REPO_PATH=osbuild-composer/${DISTRO_VERSION}/${ARCH}/${COMMIT} From 01eed481e970f760d1a09e5e68c2a2b72b163bc8 Mon Sep 17 00:00:00 2001 From: yih Date: Sat, 7 Oct 2023 16:43:13 +0800 Subject: [PATCH 19/19] update pulp test case --- test/cases/ostree-pulp.sh | 465 +++++++++++++++++++++++++++++++++++++ test/cases/ostree.sh | 472 ++------------------------------------ 2 files changed, 478 insertions(+), 459 deletions(-) create mode 100644 test/cases/ostree-pulp.sh diff --git a/test/cases/ostree-pulp.sh b/test/cases/ostree-pulp.sh new file mode 100644 index 0000000000..6086b3d048 --- /dev/null +++ b/test/cases/ostree-pulp.sh @@ -0,0 +1,465 @@ +#!/bin/bash +set -euo pipefail + +# Get OS data. +source /usr/libexec/osbuild-composer-test/set-env-variables.sh +source /usr/libexec/tests/osbuild-composer/shared_lib.sh + +# Get compose url if it's running on unsubscried RHEL +if [[ ${ID} == "rhel" ]] && ! sudo subscription-manager status; then + source /usr/libexec/osbuild-composer-test/define-compose-url.sh +fi + +# Provision the software under test. +/usr/libexec/osbuild-composer-test/provision.sh none + +# Set os-variant and boot location used by virt-install. +case "${ID}-${VERSION_ID}" in + "rhel-9.3") + IMAGE_TYPE=edge-commit + OSTREE_REF="rhel/9/${ARCH}/edge" + OS_VARIANT="rhel9-unknown" + # Use a stable installer image unless it's the nightly pipeline + BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-9/RHEL-9/9.2.0/BaseOS/x86_64/os/" + if [ "${NIGHTLY:=false}" == "true" ]; then + BOOT_LOCATION="${COMPOSE_URL:-}/compose/BaseOS/x86_64/os/" + fi + ;; + *) + redprint "unsupported distro: ${ID}-${VERSION_ID}" + exit 1;; +esac + +# workaround for bug https://bugzilla.redhat.com/show_bug.cgi?id=2213660 +if [[ "$VERSION_ID" == "9.3" || "$VERSION_ID" == "9" ]]; then + sudo tee /etc/sysconfig/libvirtd << EOF > /dev/null +LIBVIRTD_ARGS= +EOF +fi + +# Start libvirtd and test it. +greenprint "๐Ÿš€ Starting libvirt daemon" +sudo systemctl start libvirtd +sudo virsh list --all > /dev/null + +# Install and start firewalld +greenprint "๐Ÿ”ง Install and start firewalld" +sudo dnf install -y firewalld +sudo systemctl enable --now firewalld + +# Set a customized dnsmasq configuration for libvirt so we always get the +# same address on bootup. +sudo tee /tmp/integration.xml > /dev/null << EOF + + integration + 1c8fe98c-b53a-4ca4-bbdb-deb0f26b3579 + + + + + + + + + + + + + + +EOF +if ! sudo virsh net-info integration > /dev/null 2>&1; then + sudo virsh net-define /tmp/integration.xml + sudo virsh net-start integration +fi + +# Allow anyone in the wheel group to talk to libvirt. +greenprint "๐Ÿšช Allowing users in wheel group to talk to libvirt" +WHEEL_GROUP=wheel +if [[ $ID == rhel ]]; then + WHEEL_GROUP=adm +fi +sudo tee /etc/polkit-1/rules.d/50-libvirt.rules > /dev/null << EOF +polkit.addRule(function(action, subject) { + if (action.id == "org.libvirt.unix.manage" && + subject.isInGroup("${WHEEL_GROUP}")) { + return polkit.Result.YES; + } +}); +EOF + +# Set up variables. +TEST_UUID=$(uuidgen) +IMAGE_KEY="osbuild-composer-ostree-test-${TEST_UUID}" +GUEST_ADDRESS=192.168.100.50 +SSH_USER="admin" +ARTIFACTS="${ARTIFACTS:-/tmp/artifacts}" + +# Set up temporary files. +TEMPDIR=$(mktemp -d) +BLUEPRINT_FILE=${TEMPDIR}/blueprint.toml +KS_FILE=${TEMPDIR}/ks.cfg +COMPOSE_START=${TEMPDIR}/compose-start-${IMAGE_KEY}.json +COMPOSE_INFO=${TEMPDIR}/compose-info-${IMAGE_KEY}.json +PROD_REPO_URL=http://192.168.100.1/repo +PROD_REPO=/var/www/html/repo + +# SSH setup. +SSH_OPTIONS=(-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5) +SSH_DATA_DIR=$(/usr/libexec/osbuild-composer-test/gen-ssh.sh) +SSH_KEY=${SSH_DATA_DIR}/id_rsa +SSH_KEY_PUB="$(cat "${SSH_KEY}".pub)" + +# Pulp setup +PULP_CONFIG_FILE="$(pwd)/pulp.toml" +PULP_SERVER="http://192.168.100.1:9090" +PULP_USERNAME="admin" +PULP_PASSWORD="foobar" +PULP_REPO="commit" +PULP_BASEPATH="commit" + +# Get the compose log. +get_compose_log () { + COMPOSE_ID=$1 + LOG_FILE=${ARTIFACTS}/osbuild-${ID}-${VERSION_ID}-${COMPOSE_ID}.log + + # Download the logs. + sudo composer-cli compose log "$COMPOSE_ID" | tee "$LOG_FILE" > /dev/null +} + +# Get the compose metadata. +get_compose_metadata () { + COMPOSE_ID=$1 + METADATA_FILE=${ARTIFACTS}/osbuild-${ID}-${VERSION_ID}-${COMPOSE_ID}.json + + # Download the metadata. + sudo composer-cli compose metadata "$COMPOSE_ID" > /dev/null + + # Find the tarball and extract it. + TARBALL=$(basename "$(find . -maxdepth 1 -type f -name "*-metadata.tar")") + sudo tar -xf "$TARBALL" -C "${TEMPDIR}" + sudo rm -f "$TARBALL" + + # Move the JSON file into place. + sudo cat "${TEMPDIR}"/"${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null +} + +# Build ostree image. +build_image() { + # Get worker unit file so we can watch the journal. + WORKER_UNIT=$(sudo systemctl list-units | grep -o -E "osbuild.*worker.*\.service") + sudo journalctl -af -n 1 -u "${WORKER_UNIT}" & + WORKER_JOURNAL_PID=$! + # Stop watching the worker journal when exiting. + trap 'sudo pkill -P ${WORKER_JOURNAL_PID}' EXIT + + # Start the compose. + greenprint "๐Ÿš€ Starting compose" + blueprint_name=$1 + image_type=$2 + # for pulp first build + if [ $# -eq 4 ]; then + image_key=$3 + pulp_config=$4 + sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" "$blueprint_name" "$image_type" "$image_key" "$pulp_config" | tee "$COMPOSE_START" + # for pulp upgrade build + else + image_key=$3 + pulp_config=$4 + repo_url=$5 + parent_ref=$6 + sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" --parent "$parent_ref" --url "$repo_url" "$blueprint_name" "$image_type" "$image_key" "$pulp_config" | tee "$COMPOSE_START" + fi + COMPOSE_ID=$(get_build_info ".build_id" "$COMPOSE_START") + + # Wait for the compose to finish. + greenprint "โฑ Waiting for compose to finish: ${COMPOSE_ID}" + while true; do + sudo composer-cli --json compose info "${COMPOSE_ID}" | tee "$COMPOSE_INFO" > /dev/null + COMPOSE_STATUS=$(get_build_info ".queue_status" "$COMPOSE_INFO") + + # Is the compose finished? + if [[ $COMPOSE_STATUS != RUNNING ]] && [[ $COMPOSE_STATUS != WAITING ]]; then + break + fi + + # Wait 30 seconds and try again. + sleep 5 + done + + # Capture the compose logs from osbuild. + greenprint "๐Ÿ’ฌ Getting compose log and metadata" + get_compose_log "$COMPOSE_ID" + get_compose_metadata "$COMPOSE_ID" + + # Kill the journal monitor immediately and remove the trap + sudo pkill -P ${WORKER_JOURNAL_PID} + trap - EXIT + + # Did the compose finish with success? + if [[ $COMPOSE_STATUS != FINISHED ]]; then + redprint "Something went wrong with the compose. ๐Ÿ˜ข" + exit 1 + fi +} + +# Wait for the ssh server up to be. +wait_for_ssh_up () { + SSH_STATUS=$(sudo ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" "${SSH_USER}@${1}" '/bin/bash -c "echo -n READY"') + if [[ $SSH_STATUS == READY ]]; then + echo 1 + else + echo 0 + fi +} + +# Clean up our mess. +clean_up () { + greenprint "๐Ÿงผ Cleaning up" + sudo virsh destroy "${IMAGE_KEY}" + if [[ $ARCH == aarch64 ]]; then + sudo virsh undefine "${IMAGE_KEY}" --nvram + else + sudo virsh undefine "${IMAGE_KEY}" + fi + # Remove qcow2 file. + sudo rm -f "$LIBVIRT_IMAGE_PATH" + # Remomve tmp dir. + sudo rm -rf "$TEMPDIR" + # Stop httpd + sudo systemctl disable httpd --now +} + +# Test result checking +check_result () { + greenprint "Checking for test result" + if [[ $RESULTS == 1 ]]; then + greenprint "๐Ÿ’š Success" + else + redprint "โŒ Failed" + clean_up + exit 1 + fi +} + +################################################## +## +## Upload ostree commit to pulp test +## +################################################## +# Setup pulp server +greenprint "๐Ÿ“„ Setup pulp server with one container" +mkdir -p settings pulp_storage pgsql containers +echo "CONTENT_ORIGIN='http://$(hostname):8080' +ANSIBLE_API_HOSTNAME='http://$(hostname):8080' +ANSIBLE_CONTENT_HOSTNAME='http://$(hostname):8080/pulp/content' +CACHE_ENABLED=True" >> settings/settings.py +sudo podman run --detach \ + --publish 9090:80 \ + --name pulp \ + --volume "$(pwd)/settings":/etc/pulp:Z \ + --volume "$(pwd)/pulp_storage":/var/lib/pulp:Z \ + --volume "$(pwd)/pgsql":/var/lib/pgsql:Z \ + --volume "$(pwd)/containers":/var/lib/containers:Z \ + --device /dev/fuse \ + quay.io/pulp/pulp:nightly + +# Wait until pulp service is fully functional +sleep 120 + +# Rotate pulp admin password +greenprint "๐Ÿ“„ Rotate pulp admin password" +/usr/bin/expect <<-EOF +spawn sudo podman exec -it pulp bash -c "pulpcore-manager reset-admin-password" +expect { +"*password" { send "${PULP_PASSWORD}\r"; exp_continue } +"*again" { send "${PULP_PASSWORD}\r" } +} +expect eof +EOF + +# Write a pulp config file. +greenprint "๐Ÿ“„ Prepare pulp config file" +tee "$PULP_CONFIG_FILE" > /dev/null << EOF +provider = "pulp.ostree" + +[settings] +server_address = "${PULP_SERVER}" +repository = "${PULP_REPO}" +basepath = "${PULP_BASEPATH}" +username = "${PULP_USERNAME}" +password = "${PULP_PASSWORD}" +EOF + +greenprint "๐Ÿ“„ pulp config file:" +cat "$PULP_CONFIG_FILE" + +# Write a blueprint for ostree image. +tee "$BLUEPRINT_FILE" > /dev/null << EOF +name = "ostree" +description = "A base ostree image" +version = "0.0.1" +modules = [] +groups = [] + +[[packages]] +name = "python3" +version = "*" + +[[packages]] +name = "sssd" +version = "*" + +[[customizations.user]] +name = "${SSH_USER}" +description = "Administrator account" +password = "\$6\$GRmb7S0p8vsYmXzH\$o0E020S.9JQGaHkszoog4ha4AQVs3sk8q0DvLjSMxoxHBKnB2FBXGQ/OkwZQfW/76ktHd0NX5nls2LPxPuUdl." +key = "${SSH_KEY_PUB}" +home = "/home/${SSH_USER}/" +groups = ["wheel"] +EOF + +greenprint "๐Ÿ“„ ostree blueprint" +cat "$BLUEPRINT_FILE" + +# Prepare the blueprint for the compose. +greenprint "๐Ÿ“‹ Preparing blueprint" +sudo composer-cli blueprints push "$BLUEPRINT_FILE" +sudo composer-cli blueprints depsolve ostree + +# Build commit image +build_image ostree "$IMAGE_TYPE" test "$PULP_CONFIG_FILE" + +# Start httpd to serve ostree repo. +greenprint "๐Ÿš€ Starting httpd daemon" +# osbuild-composer-tests have mod_ssl as a dependency. The package installs +# an example configuration which automatically enabled httpd on port 443, but +# that one is already in use. Remove the default configuration as it is useless +# anyway. +sudo rm -f /etc/httpd/conf.d/ssl.conf +sudo systemctl start httpd + +# Pull commit from pulp to local repo +greenprint "Pull commit from pulp to production repo" +sudo rm -fr "$PROD_REPO" +sudo mkdir -p "$PROD_REPO" +sudo ostree --repo="$PROD_REPO" init --mode=archive +sudo ostree --repo="$PROD_REPO" remote add --no-gpg-verify edge-pulp http://localhost:9090/pulp/content/${PULP_REPO}/ +sudo ostree --repo="$PROD_REPO" pull --mirror edge-pulp "$OSTREE_REF" + +# Clean compose and blueprints. +greenprint "Clean up osbuild-composer" +sudo composer-cli compose delete "${COMPOSE_ID}" > /dev/null +sudo composer-cli blueprints delete ostree > /dev/null + +# Ensure SELinux is happy with our new images. +greenprint "๐Ÿ‘ฟ Running restorecon on image directory" +sudo restorecon -Rv /var/lib/libvirt/images/ + +# Ensure SELinux is happy with all objects files. +greenprint "๐Ÿ‘ฟ Running restorecon on web server root folder" +sudo restorecon -Rv "${PROD_REPO}" > /dev/null + +# Create qcow2 file for virt install. +greenprint "Create qcow2 file for virt install" +LIBVIRT_IMAGE_PATH=/var/lib/libvirt/images/${IMAGE_KEY}-pulp.qcow2 +sudo qemu-img create -f qcow2 "${LIBVIRT_IMAGE_PATH}" 20G + +# Write kickstart file for ostree image installation. +greenprint "Generate kickstart file" +tee "$KS_FILE" > /dev/null << STOPHERE +text +lang en_US.UTF-8 +keyboard us +timezone --utc Etc/UTC + +selinux --enforcing +rootpw --lock --iscrypted locked +user --name=${SSH_USER} --groups=wheel --iscrypted --password=\$6\$1LgwKw9aOoAi/Zy9\$Pn3ErY1E8/yEanJ98evqKEW.DZp24HTuqXPJl6GYCm8uuobAmwxLv7rGCvTRZhxtcYdmC0.XnYRSR9Sh6de3p0 +sshkey --username=${SSH_USER} "${SSH_KEY_PUB}" + +bootloader --timeout=1 --append="net.ifnames=0 modprobe.blacklist=vc4" + +network --bootproto=dhcp --device=link --activate --onboot=on + +zerombr +clearpart --all --initlabel --disklabel=msdos +autopart --nohome --noswap --type=plain +ostreesetup --nogpg --osname=${IMAGE_TYPE} --remote=${IMAGE_TYPE} --url=${PROD_REPO_URL} --ref=${OSTREE_REF} +poweroff + +%post --log=/var/log/anaconda/post-install.log --erroronfail + +# no sudo password for SSH user +echo -e '${SSH_USER}\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers + +# Remove any persistent NIC rules generated by udev +rm -vf /etc/udev/rules.d/*persistent-net*.rules +# And ensure that we will do DHCP on eth0 on startup +cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF +DEVICE="eth0" +BOOTPROTO="dhcp" +ONBOOT="yes" +TYPE="Ethernet" +PERSISTENT_DHCLIENT="yes" +EOF + +echo "Packages within this iot or edge image:" +echo "-----------------------------------------------------------------------" +rpm -qa | sort +echo "-----------------------------------------------------------------------" +# Note that running rpm recreates the rpm db files which aren't needed/wanted +rm -f /var/lib/rpm/__db* + +echo "Zeroing out empty space." +# This forces the filesystem to reclaim space from deleted files +dd bs=1M if=/dev/zero of=/var/tmp/zeros || : +rm -f /var/tmp/zeros +echo "(Don't worry -- that out-of-space error was expected.)" + +%end +STOPHERE + +sudo sed -i '/^user\|^sshkey/d' "${KS_FILE}" + +# Get the boot.iso from BOOT_LOCATION +curl -O "$BOOT_LOCATION"images/boot.iso +sudo mv boot.iso /var/lib/libvirt/images +LOCAL_BOOT_LOCATION="/var/lib/libvirt/images/boot.iso" + +# Install ostree image via anaconda. +greenprint "Install ostree image via anaconda" +sudo virt-install --initrd-inject="${KS_FILE}" \ + --extra-args="inst.ks=file:/ks.cfg console=ttyS0,115200" \ + --name="${IMAGE_KEY}"\ + --disk path="${LIBVIRT_IMAGE_PATH}",format=qcow2 \ + --ram 3072 \ + --vcpus 2 \ + --network network=integration,mac=34:49:22:B0:83:30 \ + --os-variant ${OS_VARIANT} \ + --location ${LOCAL_BOOT_LOCATION} \ + --nographics \ + --noautoconsole \ + --wait=-1 \ + --noreboot + +# Start VM. +greenprint "Start VM" +sudo virsh start "${IMAGE_KEY}" + +# Check for ssh ready to go. +greenprint "๐Ÿ›ƒ Checking for SSH is ready to go" +for _LOOP_COUNTER in $(seq 0 30); do + RESULTS="$(wait_for_ssh_up $GUEST_ADDRESS)" + if [[ $RESULTS == 1 ]]; then + echo "SSH is ready now! ๐Ÿฅณ" + break + fi + sleep 10 +done + +check_result + +clean_up + +exit 0 diff --git a/test/cases/ostree.sh b/test/cases/ostree.sh index f5d54e3089..815cd45a99 100755 --- a/test/cases/ostree.sh +++ b/test/cases/ostree.sh @@ -13,7 +13,6 @@ fi # Set up variables. FIREWALL_FEATURE="false" SYSROOT_RO="false" -SKIP_PULP_TEST="true" # Provision the software under test. /usr/libexec/osbuild-composer-test/provision.sh none @@ -60,6 +59,7 @@ case "${ID}-${VERSION_ID}" in FIREWALL_FEATURE="true" DIRS_FILES_CUSTOMIZATION="true" + # Use a stable installer image unless it's the nightly pipeline BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-8/RHEL-8/8.8.0/BaseOS/x86_64/os/" if [ "${NIGHTLY:=false}" == "true" ]; then @@ -75,6 +75,7 @@ case "${ID}-${VERSION_ID}" in FIREWALL_FEATURE="true" DIRS_FILES_CUSTOMIZATION="true" + # Use a stable installer image unless it's the nightly pipeline BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-8/RHEL-8/8.8.0/BaseOS/x86_64/os/" if [ "${NIGHTLY:=false}" == "true" ]; then @@ -116,7 +117,7 @@ case "${ID}-${VERSION_ID}" in FIREWALL_FEATURE="true" DIRS_FILES_CUSTOMIZATION="true" SYSROOT_RO="true" - SKIP_PULP_TEST="false" + # Use a stable installer image unless it's the nightly pipeline BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-9/RHEL-9/9.2.0/BaseOS/x86_64/os/" if [ "${NIGHTLY:=false}" == "true" ]; then @@ -223,7 +224,6 @@ COMPOSE_INFO=${TEMPDIR}/compose-info-${IMAGE_KEY}.json FEDORA_IMAGE_DIGEST="sha256:4d76a7480ce1861c95975945633dc9d03807ffb45c64b664ef22e673798d414b" FEDORA_LOCAL_NAME="localhost/fedora-minimal:v1" PROD_REPO_URL=http://192.168.100.1/repo -PROD_REPO=/var/www/html/repo # SSH setup. SSH_OPTIONS=(-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5) @@ -231,14 +231,6 @@ SSH_DATA_DIR=$(/usr/libexec/osbuild-composer-test/gen-ssh.sh) SSH_KEY=${SSH_DATA_DIR}/id_rsa SSH_KEY_PUB="$(cat "${SSH_KEY}".pub)" -# Pulp setup -PULP_CONFIG_FILE="$(pwd)/pulp.toml" -PULP_SERVER="http://192.168.100.1:9090" -PULP_USERNAME="admin" -PULP_PASSWORD="foobar" -PULP_REPO="commit" -PULP_BASEPATH="commit" - # Get the compose log. get_compose_log () { COMPOSE_ID=$1 @@ -267,6 +259,9 @@ get_compose_metadata () { # Build ostree image. build_image() { + blueprint_name=$1 + image_type=$2 + # Get worker unit file so we can watch the journal. WORKER_UNIT=$(sudo systemctl list-units | grep -o -E "osbuild.*worker.*\.service") sudo journalctl -af -n 1 -u "${WORKER_UNIT}" & @@ -276,33 +271,12 @@ build_image() { # Start the compose. greenprint "๐Ÿš€ Starting compose" - pulp_enabled=$1 - blueprint_name=$2 - image_type=$3 - if [ "$pulp_enabled" == "nopulp" ]; then - # for nopulp first build - if [ $# -eq 3 ]; then - sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" "$blueprint_name" "$image_type" | tee "$COMPOSE_START" - # for nopulp upgrade build - else - repo_url=$4 - parent_ref=$5 - sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" --parent "$parent_ref" --url "$repo_url" "$blueprint_name" "$image_type" | tee "$COMPOSE_START" - fi + if [ $# -eq 4 ]; then + repo_url=$3 + parent_ref=$4 + sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" --parent "$parent_ref" --url "$repo_url" "$blueprint_name" "$image_type" | tee "$COMPOSE_START" else - # for pulp first build - if [ $# -eq 5 ]; then - image_key=$4 - pulp_config=$5 - sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" "$blueprint_name" "$image_type" "$image_key" "$pulp_config" | tee "$COMPOSE_START" - # for pulp upgrade build - else - image_key=$4 - pulp_config=$5 - repo_url=$6 - parent_ref=$7 - sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" --parent "$parent_ref" --url "$repo_url" "$blueprint_name" "$image_type" "$image_key" "$pulp_config" | tee "$COMPOSE_START" - fi + sudo composer-cli --json compose start-ostree --ref "$OSTREE_REF" "$blueprint_name" "$image_type" | tee "$COMPOSE_START" fi COMPOSE_ID=$(get_build_info ".build_id" "$COMPOSE_START") @@ -467,7 +441,7 @@ sudo composer-cli blueprints push "$BLUEPRINT_FILE" sudo composer-cli blueprints depsolve ostree # Build installation image. -build_image nopulp ostree "$IMAGE_TYPE" +build_image ostree "$IMAGE_TYPE" # Start httpd to serve ostree repo. greenprint "๐Ÿš€ Starting httpd daemon" @@ -724,7 +698,7 @@ greenprint "๐Ÿ•น Get ostree installed commit value" PARENT_HASH=$(curl "${PROD_REPO_URL}/refs/heads/${OSTREE_REF}") # Build upgrade image. -build_image nopulp upgrade "$IMAGE_TYPE" "$PROD_REPO_URL" "$PARENT_HASH" +build_image upgrade "$IMAGE_TYPE" "$PROD_REPO_URL" "$PARENT_HASH" # Download the image and extract tar into web server root folder. greenprint "๐Ÿ“ฅ Downloading and extracting the image" @@ -799,426 +773,6 @@ sudo ansible-playbook -v -i "${TEMPDIR}"/inventory \ /usr/share/tests/osbuild-composer/ansible/check_ostree.yaml || RESULTS=0 check_result -################################################## -## -## Upload ostree commit to pulp test -## -################################################## - -# Pulp test is only for rhel-9.4 and later, as there is no 9.4 in CI, run it on 9.3 first -if [[ "${SKIP_PULP_TEST}" == "true" ]]; then - greenprint "๐Ÿ“‹ Current OS does not support pulp, skip pulp test and exit" - clean_up - exit 0 -fi - -# Clean up VM and resources -greenprint "๐Ÿงน Clean up VM" -if [[ $(sudo virsh domstate "${IMAGE_KEY}") == "running" ]]; then - sudo virsh destroy "${IMAGE_KEY}" -fi -sudo virsh undefine "${IMAGE_KEY}" --nvram -sudo virsh vol-delete --pool images "$LIBVIRT_IMAGE_PATH" - -# Setup pulp server -greenprint "๐Ÿ“„ Setup pulp server with one container" -mkdir -p settings pulp_storage pgsql containers -echo "CONTENT_ORIGIN='http://$(hostname):8080' -ANSIBLE_API_HOSTNAME='http://$(hostname):8080' -ANSIBLE_CONTENT_HOSTNAME='http://$(hostname):8080/pulp/content' -CACHE_ENABLED=True" >> settings/settings.py -sudo podman run --detach \ - --publish 9090:80 \ - --name pulp \ - --volume "$(pwd)/settings":/etc/pulp:Z \ - --volume "$(pwd)/pulp_storage":/var/lib/pulp:Z \ - --volume "$(pwd)/pgsql":/var/lib/pgsql:Z \ - --volume "$(pwd)/containers":/var/lib/containers:Z \ - --device /dev/fuse \ - docker.io/pulp/pulp:nightly - -# Wait until pulp service is fully functional -sleep 120 - -# Rotate pulp admin password -greenprint "๐Ÿ“„ Rotate pulp admin password" -/usr/bin/expect <<-EOF -spawn sudo podman exec -it pulp bash -c "pulpcore-manager reset-admin-password" -expect { -"*password" { send "${PULP_PASSWORD}\r"; exp_continue } -"*again" { send "${PULP_PASSWORD}\r" } -} -expect eof -EOF - -# Write a pulp config file. -greenprint "๐Ÿ“„ Prepare pulp config file" -tee "$PULP_CONFIG_FILE" > /dev/null << EOF -provider = "pulp.ostree" - -[settings] -server_address = "${PULP_SERVER}" -repository = "${PULP_REPO}" -basepath = "${PULP_BASEPATH}" -username = "${PULP_USERNAME}" -password = "${PULP_PASSWORD}" -EOF - -greenprint "๐Ÿ“„ pulp config file:" -cat "$PULP_CONFIG_FILE" - -# Write a blueprint for ostree image. -tee "$BLUEPRINT_FILE" > /dev/null << EOF -name = "ostree" -description = "A base ostree image" -version = "0.0.1" -modules = [] -groups = [] - -[[packages]] -name = "python3" -version = "*" - -[[packages]] -name = "sssd" -version = "*" - -[[customizations.user]] -name = "${SSH_USER}" -description = "Administrator account" -password = "\$6\$GRmb7S0p8vsYmXzH\$o0E020S.9JQGaHkszoog4ha4AQVs3sk8q0DvLjSMxoxHBKnB2FBXGQ/OkwZQfW/76ktHd0NX5nls2LPxPuUdl." -key = "${SSH_KEY_PUB}" -home = "/home/${SSH_USER}/" -groups = ["wheel"] - -[[containers]] -source = "quay.io/fedora/fedora:latest" - -[[containers]] -source = "registry.gitlab.com/redhat/services/products/image-builder/ci/osbuild-composer/fedora-minimal@${FEDORA_IMAGE_DIGEST}" -name = "${FEDORA_LOCAL_NAME}" - -[[customizations.directories]] -path = "/etc/custom_dir/dir1" -user = 1020 -group = 1020 -mode = "0770" -ensure_parents = true - -[[customizations.files]] -path = "/etc/systemd/system/custom.service" -data = "[Unit]\nDescription=Custom service\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/false\n[Install]\nWantedBy=multi-user.target\n" - -[[customizations.files]] -path = "/etc/custom_file.txt" -data = "image builder is the best\n" - -[[customizations.directories]] -path = "/etc/systemd/system/custom.service.d" - -[[customizations.files]] -path = "/etc/systemd/system/custom.service.d/override.conf" -data = "[Service]\nExecStart=\nExecStart=/usr/bin/cat /etc/custom_file.txt\n" - -[customizations.services] -enabled = ["custom.service"] -EOF - -greenprint "๐Ÿ“„ ostree blueprint" -cat "$BLUEPRINT_FILE" - -# Prepare the blueprint for the compose. -greenprint "๐Ÿ“‹ Preparing blueprint" -sudo composer-cli blueprints push "$BLUEPRINT_FILE" -sudo composer-cli blueprints depsolve ostree - -# Build commit image -build_image pulp ostree "$IMAGE_TYPE" test "$PULP_CONFIG_FILE" - -# Pull commit from pulp to local repo -greenprint "Pull commit from pulp to production repo" -sudo rm -fr "$PROD_REPO" -sudo mkdir -p "$PROD_REPO" -sudo ostree --repo="$PROD_REPO" init --mode=archive -sudo ostree --repo="$PROD_REPO" remote add --no-gpg-verify edge-pulp http://localhost:9090/pulp/content/${PULP_REPO}/ -sudo ostree --repo="$PROD_REPO" pull --mirror edge-pulp "$OSTREE_REF" - -# Clean compose and blueprints. -greenprint "Clean up osbuild-composer" -sudo composer-cli compose delete "${COMPOSE_ID}" > /dev/null -sudo composer-cli blueprints delete ostree > /dev/null - -# Ensure SELinux is happy with our new images. -greenprint "๐Ÿ‘ฟ Running restorecon on image directory" -sudo restorecon -Rv /var/lib/libvirt/images/ - -# Ensure SELinux is happy with all objects files. -greenprint "๐Ÿ‘ฟ Running restorecon on web server root folder" -sudo restorecon -Rv "${PROD_REPO}" > /dev/null - -# Create qcow2 file for virt install. -greenprint "Create qcow2 file for virt install" -LIBVIRT_IMAGE_PATH=/var/lib/libvirt/images/${IMAGE_KEY}-pulp.qcow2 -sudo qemu-img create -f qcow2 "${LIBVIRT_IMAGE_PATH}" 20G - -# Write kickstart file for ostree image installation. -greenprint "Generate kickstart file" -tee "$KS_FILE" > /dev/null << STOPHERE -text -lang en_US.UTF-8 -keyboard us -timezone --utc Etc/UTC - -selinux --enforcing -rootpw --lock --iscrypted locked -user --name=${SSH_USER} --groups=wheel --iscrypted --password=\$6\$1LgwKw9aOoAi/Zy9\$Pn3ErY1E8/yEanJ98evqKEW.DZp24HTuqXPJl6GYCm8uuobAmwxLv7rGCvTRZhxtcYdmC0.XnYRSR9Sh6de3p0 -sshkey --username=${SSH_USER} "${SSH_KEY_PUB}" - -bootloader --timeout=1 --append="net.ifnames=0 modprobe.blacklist=vc4" - -network --bootproto=dhcp --device=link --activate --onboot=on - -zerombr -clearpart --all --initlabel --disklabel=msdos -autopart --nohome --noswap --type=plain -ostreesetup --nogpg --osname=${IMAGE_TYPE} --remote=${IMAGE_TYPE} --url=${PROD_REPO_URL} --ref=${OSTREE_REF} -poweroff - -%post --log=/var/log/anaconda/post-install.log --erroronfail - -# no sudo password for SSH user -echo -e '${SSH_USER}\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers - -# Remove any persistent NIC rules generated by udev -rm -vf /etc/udev/rules.d/*persistent-net*.rules -# And ensure that we will do DHCP on eth0 on startup -cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF -DEVICE="eth0" -BOOTPROTO="dhcp" -ONBOOT="yes" -TYPE="Ethernet" -PERSISTENT_DHCLIENT="yes" -EOF - -echo "Packages within this iot or edge image:" -echo "-----------------------------------------------------------------------" -rpm -qa | sort -echo "-----------------------------------------------------------------------" -# Note that running rpm recreates the rpm db files which aren't needed/wanted -rm -f /var/lib/rpm/__db* - -echo "Zeroing out empty space." -# This forces the filesystem to reclaim space from deleted files -dd bs=1M if=/dev/zero of=/var/tmp/zeros || : -rm -f /var/tmp/zeros -echo "(Don't worry -- that out-of-space error was expected.)" - -%end -STOPHERE - -sudo sed -i '/^user\|^sshkey/d' "${KS_FILE}" - -# Install ostree image via anaconda. -greenprint "Install ostree image via anaconda" -sudo virt-install --initrd-inject="${KS_FILE}" \ - --extra-args="inst.ks=file:/ks.cfg console=ttyS0,115200" \ - --name="${IMAGE_KEY}"\ - --disk path="${LIBVIRT_IMAGE_PATH}",format=qcow2 \ - --ram 3072 \ - --vcpus 2 \ - --network network=integration,mac=34:49:22:B0:83:30 \ - --os-variant ${OS_VARIANT} \ - --location ${location_arg} \ - --nographics \ - --noautoconsole \ - --wait=-1 \ - --noreboot - -# Start VM. -greenprint "Start VM" -sudo virsh start "${IMAGE_KEY}" - -# Check for ssh ready to go. -greenprint "๐Ÿ›ƒ Checking for SSH is ready to go" -for LOOP_COUNTER in $(seq 0 30); do - RESULTS="$(wait_for_ssh_up $GUEST_ADDRESS)" - if [[ $RESULTS == 1 ]]; then - echo "SSH is ready now! ๐Ÿฅณ" - break - fi - sleep 10 -done - -# With new ostree-libs-2022.6-3, edge vm needs to reboot twice to make the /sysroot readonly -sudo ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" "${SSH_USER}@${GUEST_ADDRESS}" 'nohup sudo systemctl reboot &>/dev/null & exit' -# Sleep 10 seconds here to make sure vm restarted already -sleep 10 - -# Check for ssh ready to go. -greenprint "๐Ÿ›ƒ Checking for SSH is ready to go" -for LOOP_COUNTER in $(seq 0 30); do - RESULTS="$(wait_for_ssh_up $GUEST_ADDRESS)" - if [[ $RESULTS == 1 ]]; then - echo "SSH is ready now! ๐Ÿฅณ" - break - fi - sleep 10 -done - -# Check image installation result -check_result - -################################################## -## -## Upload upgrade ostree commit to pulp test -## -################################################## - -# Write a blueprint for ostree image. -tee "$BLUEPRINT_FILE" > /dev/null << EOF -name = "upgrade" -description = "An upgrade ostree image" -version = "0.0.2" -modules = [] -groups = [] - -[[packages]] -name = "python3" -version = "*" - -[[packages]] -name = "sssd" -version = "*" - -[[packages]] -name = "wget" -version = "*" - -[[customizations.user]] -name = "${SSH_USER}" -description = "Administrator account" -password = "\$6\$GRmb7S0p8vsYmXzH\$o0E020S.9JQGaHkszoog4ha4AQVs3sk8q0DvLjSMxoxHBKnB2FBXGQ/OkwZQfW/76ktHd0NX5nls2LPxPuUdl." -key = "${SSH_KEY_PUB}" -home = "/home/${SSH_USER}/" -groups = ["wheel"] - -[[containers]] -source = "quay.io/fedora/fedora:latest" - -[[containers]] -source = "registry.gitlab.com/redhat/services/products/image-builder/ci/osbuild-composer/fedora-minimal@${FEDORA_IMAGE_DIGEST}" -name = "${FEDORA_LOCAL_NAME}" - -[[customizations.firewall.zones]] -name = "trusted" -sources = ["192.168.100.51"] -[[customizations.firewall.zones]] -name = "work" -sources = ["192.168.100.52"] - -[[customizations.directories]] -path = "/etc/custom_dir/dir1" -user = 1020 -group = 1020 -mode = "0770" -ensure_parents = true - -[[customizations.files]] -path = "/etc/systemd/system/custom.service" -data = "[Unit]\nDescription=Custom service\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/false\n[Install]\nWantedBy=multi-user.target\n" - -[[customizations.files]] -path = "/etc/custom_file.txt" -data = "image builder is the best\n" - -[[customizations.directories]] -path = "/etc/systemd/system/custom.service.d" - -[[customizations.files]] -path = "/etc/systemd/system/custom.service.d/override.conf" -data = "[Service]\nExecStart=\nExecStart=/usr/bin/cat /etc/custom_file.txt\n" - -[customizations.services] -enabled = ["custom.service"] -EOF - -greenprint "๐Ÿ“„ upgrade blueprint" -cat "$BLUEPRINT_FILE" - -# Prepare the blueprint for the compose. -greenprint "๐Ÿ“‹ Preparing blueprint" -sudo composer-cli blueprints push "$BLUEPRINT_FILE" -sudo composer-cli blueprints depsolve upgrade - -greenprint "๐Ÿ•น Get ostree installed commit value" -PARENT_HASH=$(curl "${PROD_REPO_URL}/refs/heads/${OSTREE_REF}") - -# Build upgrade image. -build_image pulp upgrade "$IMAGE_TYPE" test "$PULP_CONFIG_FILE" "$PROD_REPO_URL" "$PARENT_HASH" - -# Clean compose and blueprints. -greenprint "Clean up osbuild-composer again" -sudo composer-cli compose delete "${COMPOSE_ID}" > /dev/null -sudo composer-cli blueprints delete upgrade > /dev/null - -# Pull content from pulp to local repo -greenprint "Pull upgrade commit from pulp to local repo" -sudo ostree --repo="$PROD_REPO" pull --mirror edge-pulp "$OSTREE_REF" -sudo ostree --repo="$PROD_REPO" summary -u - -# Ensure SELinux is happy with all objects files. -greenprint "๐Ÿ‘ฟ Running restorecon on web server root folder" -sudo restorecon -Rv "${PROD_REPO}" > /dev/null - -# Get ostree commit value. -greenprint "๐Ÿ•น Get ostree upgrade commit value" -UPGRADE_HASH=$(curl "${PROD_REPO_URL}/refs/heads/${OSTREE_REF}") - -# Upgrade image/commit. -greenprint "Upgrade ostree image/commit" -sudo ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" "${SSH_USER}@${GUEST_ADDRESS}" 'sudo rpm-ostree upgrade || { sudo rpm-ostree status; sudo journalctl -b -r -u rpm-ostreed; exit 1; }' -sudo ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" "${SSH_USER}@${GUEST_ADDRESS}" 'nohup sudo systemctl reboot &>/dev/null & exit' -# Sleep 10 seconds here to make sure vm restarted already -sleep 10 - -# Check for ssh ready to go. -greenprint "๐Ÿ›ƒ Checking for SSH is ready to go" -# shellcheck disable=SC2034 # Unused variables left for readability -for LOOP_COUNTER in $(seq 0 30); do - RESULTS="$(wait_for_ssh_up $GUEST_ADDRESS)" - if [[ $RESULTS == 1 ]]; then - echo "SSH is ready now! ๐Ÿฅณ" - break - fi - sleep 10 -done - -# Check ostree upgrade result -check_result - -# Add instance IP address into /etc/ansible/hosts -sudo tee "${TEMPDIR}"/inventory > /dev/null << EOF -[ostree_guest] -${GUEST_ADDRESS} - -[ostree_guest:vars] -ansible_python_interpreter=/usr/bin/python3 -ansible_user=${SSH_USER} -ansible_private_key_file=${SSH_KEY} -ansible_ssh_common_args="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -EOF - -# Test IoT/Edge OS -sudo ansible-playbook -v -i "${TEMPDIR}"/inventory \ - -e image_type=${IMAGE_TYPE} \ - -e ostree_commit="${UPGRADE_HASH}" \ - -e embeded_container="${EMBEDED_CONTAINER}" \ - -e firewall_feature="${FIREWALL_FEATURE}" \ - -e test_custom_dirs_files="${DIRS_FILES_CUSTOMIZATION}" \ - -e sysroot_ro="$SYSROOT_RO" \ - /usr/share/tests/osbuild-composer/ansible/check_ostree.yaml || RESULTS=0 -check_result - # Final success clean up clean_up